iOS8 - push notification permission popup appears directly without a method - ios

I would like to have a response from someone else and confirm if this is something that has changed on iOS8 or if I have another problem in my project.
I was trying to move the notification permission popup and call it later, but after several test I see I cannot do that with iOS8, it works fine on iOS7.
And I have the following confirmations:
-On iOS8 there's no need to call "registerForRemoteNotifications", the popup appears anyway. (it was "registerForRemoteNotificationsTypes" before but now is deprecated on iOS8 and there seems to be a "registerForRemoteNotifications" that is referenced on the official documentation but there's no documentation for that new method specifically)
(https://developer.apple.com/library/IOs/documentation/UIKit/Reference/UIApplication_Class/index.html)
-I removed the entitlements from my app and the popup also appears, so probably it takes that info from the prov instead of descriptor.
Any though on this? anyone can confirm if this is true?
Thanks

There's not so much documentation about this, but after watching an official video from Apple, and reading more about all these new functionalities for notifications on iOS8, I could understand what's happening with the popup.
First I was using AIR 14 that had a bug for iOS8 and the permission popup appeared even without calling any specific native method in UIApplication, that was fixed on AIR 15.0
Also, there's no more permission popup for remote notification on iOS8, users can receive notifications by default, and they can disable that from the device settings (anyway we should request the token as usual).
The permission popup that we see in iOS8 is for local notifications, and it appears when we call this method:
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
All that explains the weird behavior that I had before, and actually I could clarify and fix this issue.

Related

Cordova FCM - delay ios notfication permission pop up

I'm using https://github.com/fechanique/cordova-plugin-fcm plugin and it works great for both platforms.
However, on iOS, the notification permission pop up is invoked right at the launch of the app, and I want it to appear only after the login process is complete.
I have zero knowledge in objective-C so i can't override the classes.
Can anyone please help?
Found a solution in case anyone encounters the same problem in the future...
https://github.com/jjrom/cordova-plugin-fcm/commit/4fedc72b2d94d85a67f6266aef13e774b7a16bfe

OneSignal iOS Settings keeps disappearing

I'm currently working on implementing push notification for my app using React Native and OneSignal. I've managed to set the settings for Android and iOS, but I noticed the iOS side keeps disappearing from time to time and appearing again. Same thing with the dashboard, the iOS logo sometimes appear and disappear.
When trying to send notification while only targeting my iOS device, sometimes the system would show Total Number of Recipient to be 0 as well. The device itself only received the notifications from time to time while the android side always received them.
Anyone ever have this issue as well? And did you managed to solve it?
EDIT:
I cannot seem to find a way to fix this so I decided to do a workaround instead by creating another project inside OneSignal and disable the old one. The push notification is working fine now.
OneSignal fixed this issue today with the dashboard not saving/persisting data. You should be able to save your settings now. Best to contact OneSignal directly with issues like this.

iOS 10 push notification authorization request showing up on app launch

Previously, when building my app using the iOS 9 SDK, the push notification authorization request alert (that system alert which says: "App" Would Like to Send You Notifications ... Don't Allow / Allow) would only show when I called [[UIApplication sharedApplication] registerForRemoteNotifications].
We've decided to actually only do that at a certain point in the game, so the user is only encouraged to allow push notifications when it makes sense.
On iOS 10, I understand we must use the User Notifications framework to accomplish that (by calling requestAuthorizationWithOptions:completionHandler: on [UNUserNotificationCenter currentNotificationCenter]), enable Push Notification on the app Capabilities and setup the entitlements. And that does work on some devices, but not all of them.
On some devices, the authorization request is presented to the user right at app launch even though I did not call requestAuthorizationWithOptions:completionHandler: or registerForRemoteNotifications at any point yet.
The weirdest part is that this happens consistently on some devices (running iOS 10.1.1 or 10.2 beta), even if I install the AppStore version of the app (which was built using Xcode 7 and iOS 9 SDK).
Should I assume this is a bug of iOS 10? I couldn't find other people with the same issue, only a kinda similar issue here.
The issue is actually a change from iOS 9 to iOS 10 on Game Center's [GKLocalPlayer localPlayer].authenticateHandler.
When it is set, it will trigger a push notification permission request on iOS 10. This did not happen on iOS 9.
For anyone stumbling upon this and not finding the above answer to have been the cause of their problem, it should be noted that attempting to change the app badge will also result in a Push Notification request.
My personal situation was regarding a Cordova app, where I was loading and applying the badge plugin before initialising push, and couldn't work out why the Notification permission dialog was appearing on app launch.

IOS9 Push notifications dialog appears after delete and launch app with xCode7

I have an application, it uses APNS, so I have code that subscribes to notifications, and everything works fine. But every time I reinstall app, and run it with xcode, I get allow push notification dialog. Every time.
I found hundreds questions about how to achieve this dialog again, but none - how to stop achieving them. I need help!
It's seems known IOS9 bug, here is a link for developer forum and still no response from apple and no solution:

ios 8 openUrl itms-services does not exit current app

In iOS 6 or 7, the app exit to the home screen when I call UIApplication openUrl with a url of itms-services://XXXX to install a new version of my app (using enterprise deployment with ipa files).
In iOS 8, this is no longer the case. Now the app continue running just as nothing has happened, but if I go the home screen, I can see my app icon grayed out, with a downloading pie chart about 66% completed and the text "Downloading..." below. If I now wait for a while (less than a minute), the application is installed correctly and I can start my app again.
Has anyone else experienced this behavior? Have anyone seen any documentation regarding this? I can accept behavioral changes as long as it is documented, but I haven't seen any documentation regarding this.
While forcing the app to crash will technically work, a much better solution (allowing the user to retain the state of the application) would be to simply background the app launching the itms-services link by executing the following.
[[UIApplication sharedApplication] performSelector:#selector(suspend)];
We use this in an app used for distributing test builds to our testers and it works very well, and eliminates the confusion of a tester trying to install an app and having the app stay in front. It also allows them to return to our distribution app and have it pick up where they were.
Yes, you also get the same behaviour when clicking a download link in safari now on iOS8.
I'm not sure why they introduced this change but there isn't really a way around it (unless you force your app to crash with something like exit(0);)
Also, the itms-services url scheme is undocumented and is technically a private api. From experience, you're not allowed to submit apps to the App Store that use it.
I have experienced a similar thing. I have a web page for our internal app store and when I tap on the link I do get a prompt asking if I want to install and when I say yes safari just sits there. The app is downloading on the home screen but under IOS 7 safari would be pushed to the background and you could see where your app is being downloaded to and its progress. Now it appears like nothing is happening. I would love to correct this. Perhaps something has changed in the .plist files the itms-services protocol uses. This protocol is not private it is just reserved for enterprise deployments.

Resources