-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot disable autoRegister on init #1
Comments
Hello, I just tested version 1.9.0 with autoRegister: false and it working correctly. Which version of iOS are you seeing this issue on? How are you resetting the push notification prompt? If your turning off the device when you see the prompt you will need to fully uninstall the app and reinstall it before opening it again. Otherwise iOS will reprompt the user right way when the app opens. See our documentation on Resetting the iOS Notification Permission Prompt. Thanks. |
Hi, thanks for the quick prompt. On Thursday, June 18, 2015, Josh Kasten [email protected] wrote:
Stas Goferman |
Hello, sorry about the delay. I identified an issue where our SDK prompts for push notifications on the 2nd cold start of the app. This seems to be an issue on iOS 8+ devices. I'll attach a commit to this issue when I have a fix. Thanks. |
Great! Thanks! Stas Goferman On Tue, Jun 23, 2015 at 12:33 AM, Josh Kasten [email protected]
|
* Fixed issue where the iOS notification permission prompt would show on the 2nd cold start of the app when autoRegister is set to false.
@jkasten2, can you update the pod as well to 1.9.2? |
Just pushed our update to cocoa pods. Let us know if this version fixes the issue for you and we can close this issue. Thanks. |
didRegisterForRemoteNotificationsWithDeviceToken is being called when I init OneSignal on the app launch. Maybe it's an iOS9 issue. |
Are you seeing the iOS notification permission prompt when OneSignal initWithLaunchOptions is called with autoRegister: false? Or just seeing the firing of I have tested 1.9.2 of our OneSignal SDK with iOS 8.2 and iOS 9 beta 2 and autoRegister: false does not prompt the user for the notification permissions. The If you defer OneSignal init the notification opened callback, session count, total playtime, IAP tracking, as well as any other selector that requires a OneSignal instance will not work. Thanks. |
I'm seeing the firing of application:didRegisterForRemoteNotificationsWithDeviceToken without prompt. So I understand this is a desired behaviour. |
Correct, the firing of We would prefer to understand and fix the issue however if you need to go this route with your app you will need to wrap any other method calls to OneSignal with your same logic. We did not intend for OneSignal not be called when your app starts. You also won't be able to see your user opt in rate on our dashboard and anything the user does before accepting will not be included in their totals. Thanks. |
Josh, we have some logic in application:didRegisterForRemoteNotificationsWithDeviceToken with another functionality. |
In iOS 8 Apple split up push notifications into 2 parts.
See the documentation on registerForRemoteNotifications for the source of what I explained above. If you only want to get the deviceToken/pushPush token if the user accepted permissions to display notifications you can use OneSignal's IdsAvailable: selector. pushToken will be nil if the user has not accepted the prompt yet or disabled notifications in the system settings for your app. Thanks. |
@jkasten2 - Thanks for clarifying this and for your time. This makes a lot sense now. |
Hi!
I cannot disable autoRegister. Passing false to autoRegister in initWithLaunchOptions does not help and still triggers automatic registration. I need to delay the registration.
I'm using 1.9.0 version.
I'd appreciate any help.
The text was updated successfully, but these errors were encountered: