Learn how to configure your Push Notifications for iOS

Learn how to configure your Push Notifications for iOS

PageSense allows you to send push notifications to your applications from our dashboard. Please follow the steps to send your first push notification to your application. Please note to test remote push notifications you need to connect your actual iOS device. The remote push notifications don't work on simulator.

Step 1: Configure Push Notifications

To send push notifications on your iOS Application using PageSense dashboard, you first need to upload key or certificate from Apple developer account. There are 2 ways to configure push notifications.

How to acquire and upload a .p8 file? (recommended)
  1. Go to Apple developer account and go to Certificates, Identifiers & Profiles















  1. Go to Keys section and click on a new key using Add button(+)













  1. Choose a unique name for key and select Apple Push Notification service(APNs) checkbox. Click Continue and then Confirm.


  1. Note and save the key ID. Click Download
    to generate and save the key.
    NotesNote: Remember you have to save the key in a secured place because you can't download key more than once. Do not rename Auth key file, and upload it as it is to the PageSense dashboard, as shown in step 6.

  2. Now go to PageSense dashboard and go to Settings > Channels > Mobile Push. Choose iOS tab andchoose Provider authentication token (Auth key) under Authentication Type as given in the following picture.



  3. You will get an option to Upload Auth Key. Upload your .p8 key from Apple developer account and enter Team and Bundle ID.

  4. You will get your Team ID from Apple Developer Account. Go to Membership tab and get your Team ID. Your app's Bundle ID can be found in Xcode. Select the appropriate mode for sending push notifications and click Save.

We recommend that you create and upload an APNs Auth Key rather than uploading .p12 certificate for the following reasons:

i) No need to re-generate the push certificate every year.

ii) One auth key can be used for all your apps – this avoids the complication of maintaining different certificates.

How to acquire and upload a .p12 certificate?

If you have configured .p8 file successfully, you can skip this and directly go to Step 2.

Alternatively, you may utilize Apple’s older authentication scheme (.p12 SSL certificates). These certificates automatically expire every year and will require you to regenerate and re-upload them.
  1. Log in to Apple Developer account, and navigate to the Program Resources tab and select Certificates, Identifiers & Profiles.

  1. Select Certificates tab and add a new certificate using the '+' sign



  2. Select Apple Push Notification service SSL under Services and click Continue


  3. Choose App ID of your project from the dropdown.

  4. Now Apple will ask you to upload a Certificate signing request. On your MAC open Keychain Access and navigate to Certificate Assistant. Select Request a Certificate From a Certificate Authority.



    Selecting this option directs you to the Certificate Assistant. Select Request is > Saved to Disk and leave the email address blank. Click Continue.

  5. Now Upload the certificate on Apple developer account as requested in 5.

  6. Download the certificates generated and open it with the Keychain Access application.

  7. In Keychain Access, click My Certificates and locate your push certificate.


  8. Select, right-click and export it as a .p12 file and use a temporary password. (It will be required when uploading your certificate to PageSense dashboard).



  9. Navigate to Manage Settings > Settings in the dashboard and upload your  certificate under Apple Push Certificate. The passphrase is your temporary password.


    InfoInfo: You can upload either your development or production push certificates to the dashboard for your distribution provisioning profile apps, but you can only have one active push certificate at a time.
    If you wish to test push notifications in a production environment once your app goes live in the App Store, we recommend setting up a separate app group or app for your development environment

Step 2: Enable the Push Notifications Capability

In your Xcode project settings, with the Target selected, click the Signing & Capabilities tab and then click the + Capability button to add. Type “push” in the filter field and select Push Notifications. This will enable the Push Notifications Capability in your project.

Step 3: Registering for push notifications

1. First import User Notifications in your App Delegate. The push integration code has to be written in App delegate file and should be written on main thread. To configure the PageSense SDK to send you push notifications, you should have followed all steps till integrate in iOS quick start guide document.  To setup push notifications in the application, implement the UNUserNotificationCenterDelegate in your AppDelegate.
2. To register the device with the APNS, add the following code to the application:didFinishLaunchingWithOptions:
Delegate method of your app delegate:
  1. func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
  2.         // Override point for customization after application launch.
  3.         PageSense.integrate()
  4. UNUserNotificationCenter.current().delegate = self
  5.         registerForPushNotifications()
  6.         return true
  7.     }  
  8. func registerForPushNotifications() {
  9.     UNUserNotificationCenter.current().requestAuthorization(options: [
  10.               .badge, .sound, .alert
  11.             ]) { granted, _ in
  12.               guard granted else { return }
  13.               DispatchQueue.main.async {
  14.                   UIApplication.shared.registerForRemoteNotifications()
  15.               }
  16.             }
  17.     }
  18. func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
  19.            PageSense.setPushToken(deviceToken: deviceToken)
  20.        }
It is a mandatory step to send push notifications to an iOS Application. The first time your app makes this authorization request, the system prompts the user to grant or deny the request and records the user’s response.

Push Impressions

You can now raise and record push notifications delivered onto your user's iOS devices. To raise Push Impressions for iOS, you must enable the Notification Service Extension. 




Notification Service Extension is a separate and distinct binary embedded in your app bundle. Before displaying a new push notification, the system will call your Notification Service Extension to allow you to call the Notification Viewed method for your Application. In function didReceive of Notification Service file write the following:

  1. override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
  2.         self.contentHandler = contentHandler
  3.         bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)

  4.         if let bestAttemptContent = bestAttemptContent {
  5.             // Modify the notification content here...
  6.             bestAttemptContent.title = "\(bestAttemptContent.title) [modified]"
  7.             
  8.             contentHandler(bestAttemptContent)
  9.             
  10.             PageSense.trackPushNotificationReceived(notificationContent: request.content)
  11.         }
  12.     }

We’ve designed this documentation to guide you every step of the way. If you need further assistance or have any questions, don’t hesitate to contact us at support@zohopagesense.com - we’re always here to help!

      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          Zoho CRM Training Programs

          Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

          Zoho CRM Training
            Redefine the way you work
            with Zoho Workplace

              Zoho DataPrep Personalized Demo

              If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

              Zoho CRM Training

                Create, share, and deliver

                beautiful slides from anywhere.

                Get Started Now


                  Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                  BOOK A SESSION







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsEnterpriseOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceAccessible Forms
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit

                              Intake FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic Forms
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsFormstack alternativeEncrypted Forms

                              Wufoo alternativeSecure Forms

                              TypeformWCAG


                                          Create. Review. Publish.

                                          Write, edit, collaborate on, and publish documents to different content management platforms.

                                          Get Started Now




                                                            You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                                Manage your brands on social media


                                                                  • Desk Community Learning Series


                                                                  • Digest


                                                                  • Functions


                                                                  • Meetups


                                                                  • Kbase


                                                                  • Resources


                                                                  • Glossary


                                                                  • Desk Marketplace


                                                                  • MVP Corner


                                                                  • Word of the Day


                                                                  • Ask the Experts


                                                                    Zoho Sheet Resources

                                                                     

                                                                        Zoho Forms Resources


                                                                          Secure your business
                                                                          communication with Zoho Mail


                                                                          Mail on the move with
                                                                          Zoho Mail mobile application

                                                                            Stay on top of your schedule
                                                                            at all times


                                                                            Carry your calendar with you
                                                                            Anytime, anywhere




                                                                                  Zoho Sign Resources

                                                                                    Sign, Paperless!

                                                                                    Sign and send business documents on the go!

                                                                                    Get Started Now




                                                                                            Zoho TeamInbox Resources





                                                                                                      Zoho DataPrep Demo

                                                                                                      Get a personalized demo or POC

                                                                                                      REGISTER NOW


                                                                                                        Design. Discuss. Deliver.

                                                                                                        Create visually engaging stories with Zoho Show.

                                                                                                        Get Started Now








                                                                                                                            • Related Articles

                                                                                                                            • Create your first mobile push notifications for Android

                                                                                                                              Mobile push notifications help drive appropriate interactions to boost conversions on Android devices. You will get a complete walkthrough on setting up Mobile Push Notifications for Android in PageSense. You will learn all the configurations needed, ...
                                                                                                                            • Get started with your PageSense Mobile Push Notifications

                                                                                                                              Building and maintaining an efficient relationship with your user group is crucial and mobile push notifications are spot-on the most effective way. From interacting with your consumers, boosting conversions, and improving user experience—it’s a ...
                                                                                                                            • Introduction to push notifications

                                                                                                                              Push notifications are clickable pop-up messages on your subscribers' desktops, mobiles, or tablets. They are instant, automated communication between a website and its end user. They typically contain a title, message, image, and URL that persuades ...
                                                                                                                            • Browsers and devices that support push notifications

                                                                                                                              Zoho PageSense push notifications are supported by the following browsers: 1. Google Chrome (version 42+): Windows, Android, MacOS, Linux 2. Firefox (version 44+ for desktop and 48+ for mobile): MacOS, Windows, Linux 3. Edge (Chromium) 79+, Edge ...
                                                                                                                            • Understand your push notification report

                                                                                                                              Track and analyze the impact of your push notification among your subscribers using realtime results. Zoho PageSense allows you to evaluate the success of each notification, with detailed reports based on which notification performed the best, which ...
                                                                                                                              Wherever you are is as good as
                                                                                                                              your workplace

                                                                                                                                Resources

                                                                                                                                Videos

                                                                                                                                Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                                eBooks

                                                                                                                                Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                                Webinars

                                                                                                                                Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                                CRM Tips

                                                                                                                                Make the most of Zoho CRM with these useful tips.



                                                                                                                                  Zoho Show Resources