Skip to main content

iOS Setup

CocoaPods Integration

The Zixflow React Native SDK integrates with the native iOS SDK via CocoaPods. If you’re using React Native 0.60 or higher, core dependencies are auto-linked.
  1. Navigate to the iOS directory:
  1. Install CocoaPods dependencies:
  1. Open the workspace in Xcode:
For most React Native apps, CocoaPods auto-linking is enough for CDP. Push requires an explicit Podfile subspec (next section).

Push Notification Setup (APNs)

  1. Add the APNs subspec in your ios/Podfile (inside your app target), then run pod install:
For Firebase on iOS instead, use zixflow-reactnative/fcm and use_frameworks! :linkage => :static — see Push Notifications.
  1. Enable Push Notifications in Xcode:
    • Select your app target → Signing & Capabilities
    • Click + CapabilityPush Notifications
  2. Enable Background Modes:
    • Add Background Modes
    • Enable Remote notifications
  3. Configure AppDelegate — call FirebaseApp.configure() (FCM path) and register the ZX_2BTN category for action buttons. Full pattern: Push Notifications and the example AppDelegate. Receive/display/tracking run in JS via Firebase Messaging + notifee.
  4. Upload APNs credentials in the Zixflow dashboard.

Notification Service Extension (rich push)

To support rich push (images) and reliable delivery tracking on iOS, add a Notification Service Extension:
  1. File > New > Target > Notification Service Extension (e.g. NotificationServiceExtension)
  2. Add the rich-push pod for APNs:
For FCM: zixflow-reactnative-richpush/fcm.
  1. Update NotificationService.swift (canonical snippet — same as the push guide):
  1. Run pod install again.
  2. Add matching App Groups on the host app and NSE, and pass the same .appGroupId(...) from AppDelegate push init.

Location module (optional)

See Location Tracking.

Android Setup

Gradle Configuration

The React Native auto-linking will handle most of the Android setup. However, you need to ensure the following:
  1. Set minimum SDK version in android/build.gradle:
  1. Add Maven repositories in android/build.gradle:
The Zixflow Android SDK will be automatically included via the React Native module.

Firebase Cloud Messaging Setup

To enable Firebase Cloud Messaging (FCM) for push notifications on Android:
  1. Add Firebase to your project:
    • Go to Firebase Console
    • Add your Android app (package name must match applicationId in android/app/build.gradle)
    • Download the client google-services.json and place it in android/app/
    Use the Firebase client config (project_info + client array). Do not put a Firebase service-account JSON in the app.
  2. Add Google Services plugin in android/build.gradle:
  1. Apply the plugin in android/app/build.gradle:
  1. Configure push in Zixflow.initialize (Android push module registers from JS init — unlike iOS, you do not initialize push in native Application code for the recommended path):
  1. Request permission and identify (see Push Notifications):

Permissions

Ensure POST_NOTIFICATIONS is available for Android 13+ (the SDK module declares it; your app still prompts at runtime via showPromptForPushNotifications).

Next steps