CocoaPods Integration
The Zixflow React Native SDK automatically integrates with the native iOS SDK via CocoaPods or Swift Package Manager. If you’re using React Native 0.60 or higher, dependencies are auto-linked.- Navigate to the iOS directory:
- Install CocoaPods dependencies:
- Open the workspace in Xcode:
ZixflowCommonZixflowDataPipelinesZixflowMessagingPushZixflowMessagingPushAPN(for APNs)ZixflowMessagingInApp
Swift Package Manager Integration
If you prefer Swift Package Manager (SPM), you can configure your project to use the Zixflow iOS SDK directly:- Open your project in Xcode
- Go to File > Add Package Dependencies
- Enter the repository URL:
- Select the version: Use
1.0.0or higher - Add the following modules to your app target:
Zixflow(umbrella module)ZixflowDataPipelinesZixflowMessagingPushAPNZixflowMessagingInApp
Note: The example app uses SPM for the native iOS SDK integration. See example/ios/Podfile for reference.
Push Notification Setup (APNs)
To enable Apple Push Notifications (APNs):-
Enable Push Notifications capability in Xcode:
- Select your app target
- Go to Signing & Capabilities
- Click + Capability and add Push Notifications
-
Enable Background Modes:
- Add Background Modes capability
- Enable Remote notifications
- Configure APNs certificates in your Apple Developer account and upload them to Zixflow dashboard.
Notification Service Extension
To support rich push notifications (images, videos, action buttons), you need to add a Notification Service Extension:-
Create a Notification Service Extension in Xcode:
- File > New > Target > Notification Service Extension
- Name it
NotificationServiceExtension
-
Add Zixflow modules to the extension in your
Podfile:
- Update
NotificationService.swift:
- Run
pod installagain to install extension dependencies.