Push Notifications - iOS

How to configure Push notifications for iOS SDK in SalesIQ?

Step1: In the Zoho SalesIQ dashboard, navigate to Settings > Brands > Installation -> iOS -> Configure push notification and click on the toggle to enable push notification for Sandbox or Production mode.

You have two environments available for the push notifications settings:

  • Production: You are to use production mode if your application is being deployed in the production environment to customers.

  • Sandbox: You can use the sandbox environment to test and debug the modifications before moving to production mode for deployment.

APNs Certificate (P12)

You must create and upload a valid Apple Push Notification service (APNs) certificate to send push notifications to your application users. The APNs forwards notification of SalesIQ applications to the Apple devices.

How to generate the APNs certificate?

  1. Log in to the iPhone Developer Connection Portal and click on the iOS Provisioning Portal on the right side of the page.
  2. On the welcome page, click on the Identifiers section, to open the list with identifiers.
  3. To create a new App ID, open the App IDs tab and click on the New App ID button. Enter your app name for the Description, and enter Bundle Identifier.
  4. Ensure, you have created an App ID without a wildcard. Wildcard IDs cannot use the push notification service.
  5. Then, click on Submit button.
  6. You can enter the notification text in the message and click the Send button to test. The Registered mobile devices will receive your test notification message.  Upload the APNS Certificate(P12) for the respective modes by clicking the Upload button as shown.

APNs Password

The APNs certificate would demand a password while configuring. Provide the same password of your APNs certificate here for authentication.

Test the push notification on your registered mobile devices

To test the push notification service, you can register your testing mobile devices here. Upon registering, the device will be added in the list of registered devices and push notifications can be sent using the Send button.

How to register your mobile device?

Note:
You should make sure that you have enabled the Push Notification capability for the project in Xcode.

Setup:
If your application does not previously register for Push Notifications, add the below code snippet to the application(_:didFinishLaunchingWithOptions:) method in the AppDelegate.​

Copied let center = UNUserNotificationCenter.current()
center.delegate = self
center.requestAuthorization(options:[.badge, .alert, .sound]) { (granted, error) in
  guard granted else { return }
  DispatchQueue.main.async {
     application.registerForRemoteNotifications()
  }
}

 

Upon successful registration, the registered iOS device will be visible in the list of registered devices as shown below.

  • You can easily test if your push notification is working in the app. To test manually, go to the Settings > Brands > Installation > iOS.
  • Select Sandbox. If your device is registered correctly and listed in the list of registered devices, enter the message in the testing text box and click Send. You will now receive a notification with your content on your registered iOS device.

You also have an option to delete the registered test devices.

Note:
If you delete a test device from the list of registered devices, any test notifications sent from the test page would not be sent to the removed device. Any other notifications from SalesIQ would still be received.

​​