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
Permission asked automatically when the app starts #108
Comments
Anyone here can give me some hint to where to start debugging? (given the fact that I'm not iOS dev but JS dev, I'm not much familiar with Xcode/Swift/Obj-c) Thank you |
@mtt87 in your AppDelegate.m: add "autoRegister: false":
then in your js when you want to ask permission:
|
@arshavinho seems like it worked, the permission is now asked when I trigger I do a double check and see if the notifications are working fine and then I think I can add this to README since it's never mentioned. |
Confirmed! Works like a charm adding |
They have changed the API and now you have to pass a dictionary instead:
|
@goldengecko When I'm adding this line of code to AppDelegate.m, I'm getting this Xcode error: "Property 'oneSignal' not found on object of type 'AppDelegate *'". What should I do? |
Here is how my AppDelegate.m file look like (I have ExpoKit project):
|
You haven't declared that variable anywhere. Suggest |
@goldengecko If I'm adding |
Yes, you would need to declare it in the header |
any suggestion for Android SDK i am facing the same. |
I am not using OneSignal but still getting the same issue, Any idea how to solve? |
For some reason the popup asking permission for the push notifications is showing automatically when the app is opened for the first time even if I'm not calling OneSignal anywhere inside my JS code.
Is this the expected behaviour?
I'd like to be able to ask for permission inside the app at some point, not on the first loading (which is very bad).
Package version:
app.js
The text was updated successfully, but these errors were encountered: