Configure Push Notification for your iOS App | Zoho Creator Help

Configure push notifications for your iOS app

This help page is for users in Creator 6. If you are in the older version (Creator 5), click here. Know your Creator version.
As part of your Creator application’s workflows, you can configure push notifications. For these to work in your iOS app, you need to do the following. The instructions in this page assume that you have installed Creator's core framework or UI framework for the required type of mobile app (user or customer) 
  1. Navigate to Mobile section on the left pane and click the SDK tab.
  2. Click on the required row of the iOS app for which push notifications need to be configured. 


  3. This opens the For Users/For Customers - SDK pane on the right side.
  4. Toggle the Push Notification button.


  5. The Configure Push Notification for iOS app pop-up will appear.
  6. Upload your iOS app’s APNS p12 file by following the steps listed in the section create an APNs p12 file.
  7. Enter your iOS app’s APNS p12 password.
  8. Enter your iOS app’s Bundle identified. For example: com.zylker.myapp
  9. Click Configure.


  10. In the XCode project, navigate to Project settings and choose your target.
  11. Select the Signing & Capabilities tab.
  12. Click the +Capability tab.
  13. Select Push Notifications in the Capabilities pop-up window.


  14. Register your iOS app for remote notifications by calling registerForRemoteNotifications:
    Creator.configure(uiDelegate: self)
    
    UNUserNotificationCenter.current().delegate = self
    let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
    UNUserNotificationCenter.current().requestAuthorization(options: authOptions,completionHandler: {_, _in})
    UIApplication.shared.registerForRemoteNotifications()
  15. Register the device token with Zoho Creator's APNs server:
    Note: Upon registering for remote notification, the didRegisterForRemoteNotificationsWithDeviceToken method in AppDelegate provides the device token.
    func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
            ZCNotificationService.registerAPNS(deviceToken: deviceToken)
        }
  16. Enable the iOS device to receive notification by implementing the delegate method userNotificationCenter:center:willPresent:withCompletionhandler: and pass the options to the completion handler:
    func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
      if let userInfo = notification.request.content.userInfo as? [String: Any] {
        print("is Creator Server : \(ZCNotificationService.isCreatorServerNotification(notificationInfo: userInfo))")
        // Change this to your preferred presentation option
      }
      completionHandler([[.badge, .alert, .sound]])
    }
        
    func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
      if let notificationInfo = response.notification.request.content.userInfo as? [String: Any] {
        if (ZCNotificationService.isCreatorServerNotification(notificationInfo: userInfo)) == true
        {
          if let zcnotification = ZCNotificationService.zcNotification(notificationInfo) {
          // We are showing the record summay as an example.
            let summaryVC = ZCUIService.getRecordSummaryViewController(for: zcnotification)
    window?.rootViewController?.present(UINavigationController.init(rootViewController: summaryVC), animated: true, completion: nil)
          }
        }
        else
        {
          // Not from Zoho Creator server
        }
        completionHandler()
      }
    }
  17. Unregister device from Zoho Creator's APNs server:
    Note: Unregistering a device requires authentication, so you must do it before the device logs out.
      ZCNotificationService.unRegisterAPNS {
      }
  18. Refer to the sample code snippets in this page.

To remove the push notification configuration

Note: Removing this configuration will cause your iOS app’s users to stop receiving push notifications that are triggered by the workflows in your Creator application or from the iOS apps created using Mobile SDK.

  1. Click the trash icon next to Push Notification, as shown below.

  2. Click Remove to proceed.

Create an APNs p12 file

  1. Go to Keychain Access in your Mac.
  2. Click Keychain Access in the top menu bar.
  3. Select Certificate Assistant, then select Request a Certificate from a Certificate Authority:

  4. Enter your email address in the User Email Address field.
  5. Create a name for your private key in the Common Name field.

    Note:Leave the CA Email Address field empty.

  6. Select the Saved to disk option in the Request is group.
  7. Click Continue to complete the CSR generating process. The (.certSigningRequest) file will be saved on the desktop by default.
  8. Go to your Apple Developer's Account page.
  9. Navigate to the Certificates, IDs & Profiles page:

  10. Go to the Identifiers page.
  11. Select the App ID that you created in the previous section. You'll then get to edit your app ID configuration.
  12. Check the Push Notifications checkbox under the Capabilities section, then click Save:

  13. Click Create Certificate under the Production SSL Certificate section, then click Done.

  14. Click Continue.
  15. Upload the .certSigningRequest that you downloaded in step 7 of this section, then click Continue.
  16. Download the certificate and open it.
  17. Go to Keychain Access in your Mac.
  18. Select My certificates under Category in the bottom-left pane. The certificate you downloaded along with a private key will be available in the right pane.
  19. Control-click and select Export.
  20. Create a password for the file and remember the same for future use.
  21. Download the p12 file. This will be your iOS app's APNs p12 file.
Related topics


        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

                                  Zoho FSM Video Tutorials


                                        All-in-one knowledge management and training platform for your employees and customers.

                                                  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

                                                                                                                                    • iOS SDK

                                                                                                                                      This help page is for users in Creator 6. If you are in the older version (Creator 5), click here. Know your Creator version. Mobile Software Development Kits (mobile SDK) provide a set of software development tools that allow for a wide range of ...
                                                                                                                                    • iOS UI framework

                                                                                                                                      This help page is for users in Creator 6. If you are in the older version (Creator 5), click here. Know your Creator version. The UI framework offers predefined view controllers for the components in your Creator application in addition to the ...
                                                                                                                                    • iOS core framework

                                                                                                                                      This help page is for users in Creator 6. If you are in the older version (Creator 5), click here. Know your Creator version. The core framework of Creator's iOS SDK allows you to create a custom UI and build an iOS app using the data present in your ...
                                                                                                                                    • iOS core framework

                                                                                                                                      This help page is for users in Creator 6. If you are in the older version (Creator 5), click here. Know your Creator version. The core framework of Creator's iOS SDK allows you to create a custom UI and build an iOS app using the data present in your ...
                                                                                                                                    • iOS UI framework

                                                                                                                                      This help page is for users in Creator 6. If you are in the older version (Creator 5), click here. Know your Creator version. In addition to the capabilities of the core framework, the UI framework offers predefined view controllers for the ...
                                                                                                                                      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