Appflow.ai
Visit our websitePricingSign up for freeLog in
  • GET STARTED
    • What is Appflow.ai?
    • Quickstart - How to start working with Appflow.ai?
    • FAQ
    • Ownership and other roles
  • SDK Set-up Instructions
    • Android SDK
      • Google Play Store Credentials
        • Google Service Account Key
        • Google real-time developer notifications(RTDN)
        • FCM server key(optional)(to be updated)
      • Events (Custom events)
      • Purchases
      • Visual constructor
      • User info
      • Push notifications
    • iOS SDK
      • Specify Apple Store Keys
      • Purchases and User Info
      • Event tracking (Custom events)
      • Push Notifications Configuration
      • Visual constructor
  • IN-APP PURCHASE
    • SKU adding
  • METRICS & EVENTS
    • Calculations of Analytics
    • Terms and Descriptions
    • Purchase Events
    • In-app Events
    • Events Structure
    • End-users Attributes
    • Users' statuses
  • SUBSCRIPTION ANALYTICS
    • Dashboard
    • Configurator
    • Reports
    • A/B Testing
    • Integrations
    • Create Push-notifications
    • In-app Messages
    • Return of Advertisement
    • Funnels
    • Funnel 2.0 BETA
    • Entitlements
    • Visual Constructor
  • INTEGRATIONS
    • Adjust
    • Appsflyer
    • Mixpanel
    • Webhooks
    • Apple Search Ads Attributions
    • Branch
    • Amplitude
  • OTHERS
    • Pricing plans and important information about your payments
    • Storing your data
    • Privacy Policy
    • Terms of Use
    • Unsubscribe from Appflow.ai
Powered by GitBook
On this page
  • Upload .p12 certificate to Appflow.ai
  • 1. Create a distribution certificate
  • 2. Create a Certificate Signing Request(CSR) file
  • 3. Upload CSR file to continue
  • 4. Convert aps.cer to .p12 file:
  • 5. Upload .p12 file to Appflow.ai
  • Configure Notifications on Your App
  • 1. Capabilities
  • 2. Request PushNotifications Permissions in AppDelegate
  • 3. Permission request completed, get notification settings
  • 4. Successfully register APNs and report DeviceToken

Was this helpful?

  1. SDK Set-up Instructions
  2. iOS SDK

Push Notifications Configuration

Configure no-code push notifications in Appflow.ai to engage with your end users flexibly.

PreviousEvent tracking (Custom events)NextVisual constructor

Last updated 1 year ago

Was this helpful?


You can create and send event-based push notifications via Appflow.ai without coding. Please, follow this doc to complete the one-time configuration.

Upload .p12 certificate to Appflow.ai

Appflow.ai requires Apple Push Notifications service (APNs) with the .p12 certificate to send push notifications on the iOS platform, which is the unified key to send push notifications in sandbox and production.

.p12 certificate uploaded to Appflow.ai should be the same as the .p12 certificate in your app

1. Create a distribution certificate

a. Go to Apple Developer Center, navigate to , in the Certificates section, click the "plus" button to create a new Distribution Certificate.

b. Choose Apple Push Notification service SSL (Sandbox & Production) in Services, then "Continue";

c. Select the App ID to "Continue";

Then, you will be asked to Upload a Certificate Signing Request (CSR) file to continue.

2. Create a Certificate Signing Request(CSR) file

a. Open KeyChain Access on your Mac b. Choose Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority.

Now you have the Certificate Signing Request (CSR) file on your Mac.

3. Upload CSR file to continue

a. Back to Apple Developer Center, upload the Certificate Signing Request (CSR) file to continue.

b. Download your Certificate, you will have an _aps.cer _file on your Mac

4. Convert aps.cer to .p12 file:

a. double click "aps.cer" file to install in Keychain Access; b. if the certificate is not trusted, you need to trust the certificate. c. Export the file into.p12 file,

d. You'll be asked "Enter a password",Please DO NOT enter a password here, just click "OK" to proceed. Then the .p12 file is saved on your Mac.

5. Upload .p12 file to Appflow.ai

Go to Appflow.ai Dash => Settings => Applications => Select the App to Edit

Now you can upload the .p12 file to Appflow.ai.


Configure Notifications on Your App

1. Capabilities

You need to enable Push Notifications services on your project:

a. Your App Target => Signing & Capabilities => click " + Capabilities"

b. Double click to add "Push Notification"

2. Request PushNotifications Permissions in AppDelegate

private func requestPushNotificationsPermissions() {
    let userNotificationCenter = UNUserNotificationCenter.current()
    userNotificationCenter.requestAuthorization(options: [.alert, .sound, .badge]) { [weak self] granted, error in
        print("Permission granted: \(granted)")
        if granted {
            self?.getNotificationSettings()
        }
    }
}

3. Permission request completed, get notification settings

private func getNotificationSettings() {
    UNUserNotificationCenter.current().getNotificationSettings { settings in
        print("Notification settings: \(settings)")
        guard settings.authorizationStatus == .authorized else { return }
        DispatchQueue.main.async {
            UIApplication.shared.registerForRemoteNotifications()
        }
    }
}

4. Successfully register APNs and report DeviceToken

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
    let deviceToken = deviceToken.reduce("", { $0 + String(format: "%02X", $1) })
    Appflow.shared.purchases.uploadDeviceInfo(deviceToken: deviceToken) { _, _ in
    }
}

Congrats! You've finished the remote Push Notifications configuration on Appflow.ai. You can create push notifications in: Appflow.ai Dash => Experiments => Push Notifications.

c. Fill info and "Saved to disk" to continue. You can learn more from this :

Apple doc
Certificates, Identifiers & Profiles