This directory contains a sample iOS app titled "Continote" which uses the Firebase Continue for iOS library.
Users can begin writing a note in this app and then continue writing in Chrome from exactly where they are using the sample Chrome extension and sample web app.
For users with a macOS computer that is paired with their iOS device to be Apple Handoff enabled, this app also leverages that technology (via Firebase Continue) to provide users with the option to continue writing directly within Safari.
Before proceeding to the Setup section below, you must
first follow the main samples
README so that you have a properly
configured Firebase project for this and any other "Continote" samples
you run.
After completing the following steps, you will have a properly configured instance of this sample to build and install to try out:
-
First, make sure you followed the Prerequisites section above.
-
Click to "Add Firebase to your iOS app":
-
In the dialog that opens, when asked for an iOS bundle ID, choose one for your sample app (ex.
com.my-unique-name.firebase.continue.sample.continote
).Make note of this bundle ID as you will need it later.
-
Leave everything else in this dialog as is, and click the Register App button.
-
Click the "Download GoogleService-info.plist" button, then close the dialog as we do not need to perform the dialog's remaining steps to set up this sample.
-
Copy the
GoogleService-info.plist
file you just downloaded to theContinote/Continote/
directory.
-
-
Copy the
sample-project.pbxproj
file fromContinote/Continote.xcodeproj
file by first right-clickingContinote/Continote.xcodeproj
and then clicking "Show Package Contents".Then, paste a copy of it also in
Continote/Continote.xcodeproj
. -
Rename the
sample-project.pbxproj
copy toproject.pbxproj
. -
Open
project.pbxproj
in a text editor and fill out the clearly marked [TODO: YOUR-VALUE-HERE] details:- Replace the two instances of [TODO: YOUR-IOS-BUNDLE-ID-HERE] with your iOS bundle ID from above (without any quotes).
-
Copy the
sample-Info.plist
file from theContinote/Continote/
directory and paste a copy of it also inContinote/Continote/
. -
Rename the
sample-Info.plist
copy toInfo.plist
. -
Open
Info.plist
in a text editor and fill out the clearly marked [TODO: YOUR-VALUE-HERE] details:-
Replace the two instances of [TODO: YOUR-FACEBOOK-APP-ID-HERE] with your Facebook app's ID from the Prerequisites section above.
-
Replace [TODO: YOUR-FACEBOOK-APP-NAME-HERE] with your Facebook app's name from the Prerequisites section above.
-
Replace [TODO: YOUR-GOOGLESERVICE-INFO.PLIST-RESERVED_CLIENT_ID-HERE] with the
RESERVED_CLIENT_ID
value in yourGoogleService-Info.plist
file.
-
-
Copy the
Sample-Constants.swift
file from theContinote/Continote/
directory and paste a copy of it also inContinote/Continote/
. -
Rename the
Sample-Constants.swift
copy toConstants.swift
. -
Open
Constants.swift
in a text editor and fill out the clearly marked [TODO: YOUR-VALUE-HERE] details:-
Replace [TODO: YOUR-FIREBASE-HOSTING-URL-FOR-CONTINOTE-WEB-HERE] with the Firebase Hosting URL of the Continote sample web app your project from the Prerequisites section above.
For example:
https://SomeDeployedFirebaseProjectName.firebaseapp.com
-
-
Copy the
FCNContinue.h
andFCNContinue.m
Firebase Continue for iOS library files from the../../ios/FirebaseContinue/FirebaseContinue/Classes/
directory, and paste a copy of them in theContinote/Continote/
directory. -
If you have not already done so, install CocoaPods.
CocoaPods is used for dependency management for this sample.
-
Use CocoaPods to install all remaining dependencies by using the
pod install
command in theContinote/
directory. -
Open
Continote/Continote.xcworkspace
in Xcode. -
Done!
You should now be able to build and then install the sample on any compatible iOS device or simulator.
After this sample is properly set up and installed on your iOS device or simulator, open it.
From there, you will be asked to sign in to be able to add notes, delete notes, or open to edit a note.
When editing a note, you will also have the option of "continuing" to write/edit the note elsewhere (i.e. within Chrome). To make use of this, be sure to also install the sample Chrome extension.
This sample app is compatible with the same versions of iOS as the Firebase Continue library itself.
In order to build and install this sample on an iOS device or simulator, you must be using a macOS computer with Xcode 8+.
This sample is dependent on the following libraries/SDKs:
The focus of this sample is to demonstrate Firebase Continue usage in a somewhat realistic scenario. This sample can also act as a simple model of how to use Firebase and FirebaseUI in an iOS app.
The focus is not, however, to have a perfect user interface or user experience. Please keep that in mind when trying out this sample.