Setting Up iOS Push Notifications
Last updated
Last updated
This guide provides step-by-step instructions to set up iOS Push Notifications using Firebase Cloud Messaging (FCM). By following these steps, users can enable push notifications in their iOS app and integrate FCM for seamless message delivery.
Before proceeding, ensure you have:
An active Apple Developer Account.
Xcode installed on your system.
A registered iOS app in Firebase.
Click Add Project.
Enter your project name and click Continue.
(Optional) Enable Google Analytics for your project.
Click Create Project and wait for the setup to complete.
In Firebase Console, open your project.
Click the Settings (⚙️) > Project Settings.
Under the General tab, scroll to Your Apps.
Click Add App > iOS.
Enter your iOS bundle ID (from Info.plist).
(Optional) Add an App Nickname.
Click Register App.
After registering the app, click Download GoogleService-Info.plist.
Move this file to your iOS project: Place it in the root directory of your Xcode project.
Open Xcode and ensure the file is added to the correct targets.
Open Xcode and navigate to Signing & Capabilities.
Click + Capability and select Push Notifications.
Add the Background Modes capability and check Remote Notifications.
Navigate to Certificates, Identifiers & Profiles.
Select Keys and create a new key.
Enable Apple Push Notifications service (APNs) and click Continue.
Download the .p8 key file and note the Key ID.
In Firebase Console, go to Project Settings > Cloud Messaging.
Upload the .p8 file and enter:
Key ID (from Apple Developer Console).
Team ID (from Apple Developer Account).
Bundle ID (from Xcode project).
Save the settings.
Open your Podfile and add: pod 'Firebase/Messaging'
Run pod install in the terminal.
Open AppDelegate.swift and import Firebase:
Configure Firebase in application (_:didFinishLaunchingWithOptions:):
Register for remote notifications:
Implement MessagingDelegate to handle the FCM token:
Run your app on a real iOS device (not a simulator).
Check the Xcode console for the FCM token.
Copy the token for testing.
Go to Firebase Console > Cloud Messaging.
Click Send your first message.
Enter a notification title and message.
Select Send to a test device.
Paste the copied FCM token.
Click Send Message and check if the notification appears on the device.
To send notifications from Organon, users must upload their APNs credentials.
Open Organon and navigate to Push Notification Settings.
Select the iOS tab.
Enter the following details:
Team ID (from Apple Developer Portal)
Key ID (from Apple Developer Portal)
Bundle ID (from Xcode project settings)
Upload the .p8 file.
Click Enable iOS Push Configuration.
Save the configuration.
Once testing is successful:
Use Organon’s campaign feature to send push notifications.
Monitor delivery rates and engagement using Organon’s analytics dashboard.
Optimize message content for better user interaction.
Ensure GoogleService-Info.plist is correctly placed in Organon’s settings.
Verify the Firebase project is set to allow push notifications.
Check Organon’s notification logs for errors.
Ensure the device has internet connectivity.
Following these steps will enable push notifications via Firebase Cloud Messaging and allow sending notifications directly from Organon.
A Firebase project set up in the.
Go to.
Sign in to the.