-
Notifications
You must be signed in to change notification settings - Fork 444
docs: update firebase push for spm #465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
markemer
wants to merge
6
commits into
main
Choose a base branch
from
firebase
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c9189b6
Add firebase spm images
markemer beae3fb
docs: update firebase push for spm
markemer 8808a87
Add new screenshots
markemer 6512e19
Fix image, and update text
markemer c1e8fdd
Update docs/main/guides/push-notifications-firebase.md
markemer d7cb59e
Update docs/main/guides/push-notifications-firebase.md
markemer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,7 @@ description: Learn how to get Firebase Cloud Messaging working on iOS and Androi | |||||
| contributors: | ||||||
| - bryplano | ||||||
| - javebratt | ||||||
| - markemer | ||||||
| slug: /guides/push-notifications-firebase | ||||||
| --- | ||||||
|
|
||||||
|
|
@@ -289,9 +290,38 @@ npx cap open ios | |||||
|
|
||||||
|  | ||||||
|
|
||||||
| ### Add the Firebase SDK via CocoaPods | ||||||
|
|
||||||
| The Push Notification API on iOS makes use of CocoaPods - an iOS dependency management system - and we need to tell CocoaPods to make use of Firebase. | ||||||
| ### Add the Firebase SDK | ||||||
|
|
||||||
| The Push Notification API on iOS makes use of either Swift Package Manager or CocoaPods for dependency managment. We need to tell them to make use of Firebase. | ||||||
|
|
||||||
| #### Using Swift Package Manager (SPM) | ||||||
|
|
||||||
| To add the SDK using SPM, you'll need to make a modification to your `ios/App/App.xcodeproj` | ||||||
|
|
||||||
| First, open `ios/App/App.xcodeproj` in Xcode by runnning `npx cap open ios` or double click the file in finder. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| Select your App on the left side and select package dependencies on the right, as shown below. | ||||||
|
|
||||||
|  | ||||||
|
|
||||||
| Then, select the plus icon to add a new package, something like the below should be shown. | ||||||
|
|
||||||
|  | ||||||
|
|
||||||
| In the search box, enter `https://github.com/firebase/firebase-ios-sdk`, then select "Add Package." | ||||||
|
|
||||||
|  | ||||||
|
|
||||||
| Now scroll and add Firebase Messaging to the App target. | ||||||
|
|
||||||
|  | ||||||
|
|
||||||
| Click "Add Package", and wait for processing to finish. When it has you should see something similar to this image. | ||||||
|
|
||||||
|  | ||||||
|
|
||||||
| #### Using CocoaPods | ||||||
|
|
||||||
| To do this, we need to modify the `Podfile`, which can be found in Xcode under `Pods`: | ||||||
|
|
||||||
|
|
||||||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.