OneSignal-iOS-SDK icon indicating copy to clipboard operation
OneSignal-iOS-SDK copied to clipboard

WIP - Fix subscribing when Background Modes are off and Direct To History is enabled

Open jkasten2 opened this issue 5 years ago • 2 comments

Issue

If Background Modes are off under Xcode > Capabilities AND iOS "Enable iOS 12 Direct To History" is enabled on the OneSignal dashboard settings the player will be created with the following on the dashboard;"Provisioning Profile Missing Push Permission"

The SDK reports notification_types as 80 and no identifier.

Also calling OneSignal.promptForPushNotificationsWithUserResponse says that it is disabled when it isn't and won't show a prompt.

TODO

  1. registerForAPNsToken needs to check for notifPermissionState.provisional.
  • Complete in commit 37a4d6f
  1. We need to delay calling registerForAPNsToken until the download params completes.
  2. Write unit test reproducing issue

This change is Reviewable

jkasten2 avatar Jan 09 '20 19:01 jkasten2

This PR is approved however incomplete so do not merge it yet!

jkasten2 avatar Dec 07 '20 03:12 jkasten2

Prompting for full push now works as intended but the dashboard still shows "Provisioning Profile Missing Push Permission". What should we be displaying if background push is off?

emawby avatar Sep 01 '22 17:09 emawby