0

We're working on a native iOS App (iOS 8.0 and newer, Objective-C) that is using WorkLight (v. 7.0.0) and WorkLight Push Notifications.

The issue we're encountering is the timing of when the user is presented with the permission dialog from the operating system.

Push Notification Permission DIalog

The dialog is being presented as soon as we call [[WLClient sharedInstance] wlConnectWithDelegate:self.listener]. We don't want it to be presented at this point. We want to present it after the user has successfully logged into our app or successfully registered as a new user.

Normally this dialog isn't presented until you call the UIApplication class's method registerForRemoteNotifications so I assume that somewhere in wlConnectWithDelegate: that this method is being called.

Is there a way to suppress this dialog when connecting to the WorkLight server for the first time? Or, is there a newer version of WorkLight that fixes this?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Michael B.
  • 143
  • 1
  • 8
  • This should be possible by delaying the invoke of this line : [[WLPush sharedInstance] init]; If you move this line and the onReadyToSubscribeListener binding to a later point in the flow , eg : success callback of the connect, you should see this permission pop-up coming later – Vivin K Feb 12 '16 at 09:37
  • We're not calling [WLPush sharedInstance] anywhere before calling wlConnectWithDelegate:. I've searched my project — the only places we're using WLPush is in the AppDelegate in the didRegisterForRemoteNotificationsWithDeviceToken: method and in a PushManager class I created (using breakpoints I've confirmed that none of this code is being called before the authorization prompt is displayed). I've actually gone as far as commenting out all WLPush code and the same behavior is observed. – Michael B. Feb 12 '16 at 15:31

1 Answers1

0

No! this is a system dialog which cannot be customized.

You cannot change the behavior in iOS

more details check this link please Customizing the iOS permission dialog for push notifications

Community
  • 1
  • 1
Nazmul Hasan
  • 10,130
  • 7
  • 50
  • 73