0

I have problem with OneSignal action buttons - when I sent push notification with three action buttons from OneSignal console to iPhone 6 Plus, then all three buttons appere with notification, whether it is banner or alert type of notification. But when I sent push notification with three action buttons from OneSignal console to iPhone 5c, when notification arrive only two action buttons appere... I change type notification from banner to alert, but noting smart happen...

iPhone 6 Plus is on 10.2.1 iOS version, and iPhone is on 10.3.1, so this doesn't mean anything.

I doubt it's problem with size of the phone screen, what is your experience? How can i reslove this problem, if it is somehow possible?


EDIT:

Here isn't problem in my code, on iPhone 6 Plus push notification arrives correctly with all three buttons, and on iPhone 5c push notification arrives but only with two of three buttons, i think here is problem with phone screen.

Here is my code in AppDelegate for registration on OneSignal:

OneSignal.initWithLaunchOptions(launchOptions, appId: oneSignalId, handleNotificationAction: { (nil) in

    }, settings: [kOSSettingsKeyInAppAlerts:false])

And here is rest of my code for OneSignal

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
    print("did register for remote notifications")
    Pusher(key: pusherKey).nativePusher().register(deviceToken: deviceToken)
}

func application(_ application: UIApplication, didReceiveRemoteNotification notification: [AnyHashable: Any]) {
    print("did receive notification")
    MySingleton.handleRichPushNotification(notification: notification)

}

func application(_ application: UIApplication, handleActionWithIdentifier identifier: String?, forRemoteNotification userInfo: [AnyHashable : Any], completionHandler: @escaping () -> Void) {
    MySingleton.handleRichPushNotification(notification: userInfo)
    if identifier == "Yes"
    {
        print("Yes for notification")
    }
    else if identifier == "No"
    {
        print("No for notification")
    }
    else if identifier == "Maybe"
    {
        print("Maybe for notification")
    }
}
Noblak
  • 71
  • 1
  • 6

0 Answers0