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) - Navigate to Mobile section on the left pane and click the SDK tab.
Click on the required row of the iOS app for which push notifications need to be configured.

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

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

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

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()
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)
}
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()
}
}
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 {
}
- 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.
Click the trash icon next to Push Notification, as shown below.

- Click Remove to proceed.
Create an APNs p12 file
- Go to Keychain Access in your Mac.
- Click Keychain Access in the top menu bar.
Select Certificate Assistant, then select Request a Certificate from a Certificate Authority:

- Enter your email address in the User Email Address field.
Create a name for your private key in the Common Name field.
Note:Leave the CA Email Address field empty.
- Select the Saved to disk option in the Request is group.
- Click Continue to complete the CSR generating process. The (.certSigningRequest) file will be saved on the desktop by default.
- Go to your Apple Developer's Account page.
Navigate to the Certificates, IDs & Profiles page:

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

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

- Click Continue.
- Upload the .certSigningRequest that you downloaded in step 7 of this section, then click Continue.
- Download the certificate and open it.
- Go to Keychain Access in your Mac.
- 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.
- Control-click and select Export.
- Create a password for the file and remember the same for future use.
- Download the p12 file. This will be your iOS app's APNs p12 file.