Is there any callback for network data authorization on iOS10 - ios10

An "Allow 'XXX' to use data" alert will show when an app launches on an iOS 10 device for first time. Is there has any callback for this? So we can send requests after that.

Related

How to use unlock code iphone into my app?

I have a Swift app with TouchID request when open first viewController. If I enter invalid TouchID some times, This request unlock code of device.
How can I request directly the unlock code device instead TouchID?
There is a framework, api or code available?
Thanks!

Is it possible to get the device token even if Push Notification is not enabled?

I need to get the device token because I will use it for autologin. However, if the user did not allow Push Notifications from my App in his/her device, I will not be able to get the device token. I want to know if it's possible to get and store the user's device token even if he/she did not enable APN. Thanks.
Enabling/Disabling the push notification is just a setting. It doesn't stop the device from receiving the access token from APPLE
Check #Kimpoy's answer including the comments.
In my understanding on APNS, it doesn't depend on the user's action (as you mentioned that if when the user clicks on Don't Allow button) for your iOS to receive the Device Token.
If you included in your app:
- (void)application:didRegisterForRemoteNotificationsWithDeviceToken
This means that your iOS-based app is sending a request for Push Notification registration. In return, Apple sends the Device Token to the iOS; then the iOS sends the token to the app and then the app sends it to their service provider.
Not that when the user is asked "Don't Allow" doesn't mean that you're not going to receive the device token. Don't Allow refers to the action to be taken to any notification received by the app that is intended for the user. Say, location. This is a whole different thing. This means that the user doesn't allow the app to use his/her location.
Yes, it still receives the Device Token as what I have discussed in my answer to your question in #1. This is only a setting for your app, which means that you won't be receiving any visible notification (badge, message or a sound) whenever there are updates about any information in relevance to your application. It's like setting your Facebook account to only receive notifications when your friends sends you a private message. Other than that, you won't be notified at all.
The process of enabling APNS is:
Request for certificate Authority
Create app id
Configuring AppId for Push Notifications
Create provisioning profile
Provisioning a device
Enabling the profile in Xcode
Creating push notification provider.
For more understanding on APNS, check out this.
You still can get the device token even if the user disables it.

Knowing if an app is authorized to receive push notifications on-the-fly

Consider this situation. The app runs and application:didRegisterForRemoteNotificationsWithDeviceToken: receives information that the app is authorized to receive push notifications.
User puts app to background and removes app's authorization to receive notifications on the device's configuration.
User runs app again. Returning from background, the app still thinks it has authorization to receive push notifications. Neither application:didRegisterForRemoteNotificationsWithDeviceToken: or application:didFailToRegisterForRemoteNotificationsWithError: receives anything at this point.
Is there a way to know at any given point if an app has authorization to receive push notifications (reading something from device's notification preferences)?
thanks.
You can check for [[UIApplication sharedApplication] enabledRemoteNotificationTypes] each time the app returns from background.
See: iOS - Check for push notification support in the app
Once I have verified that the user has it disabled is there a way to programmatically direct the user to the notification settings on the device's configuration?
No for newer iOS versions. According to Navigate to settings screen in iphone and iOS Launching Settings -> Restrictions URL Scheme, you can use -[[UIApplication sharedApplication] openURL:] to navigate to settings screen, but only on devices running iOS version 5.0 and prior.

Apple Push Notification Registration & Device Token Receive clarification?

I am working on an iPhone app with Apple Push Notification integration. I have some doubts on this.
If the user clicked "Dont Allow" button in the APNS registration alert, will our code still receives the Device Token from APNS?
I have tested that when the user switched off the notification in iPhone notification, still the app receives the Device Token from APNS? It is correct?
Can anyone please clarify these doubts?
In my understanding on APNS, it doesn't depend on the user's action (as you mentioned that if when the user clicks on "Don't Allow" button) for your iOS to receive the Device Token.
If you included in your app:
- (void)application:didRegisterForRemoteNotificationsWithDeviceToken
This means that your iOS-based app is sending a request for Push Notification registration. In return, Apple sends the Device Token to the iOS; then the iOS sends the token to the app and then the app sends it to their service provider.
Note that when the user is asked "Don't Allow" doesn't mean that you're not going to receive the device token. "Don't Allow" refers to the action to be taken to any notification received by the app that is intended for the user. Say, location. This is a whole different thing. This means that the user doesn't allow the app to use his/her location.
Yes. it still receives the Device Token as what I have discussed in my answer to your question in #1.
This is only a setting for your app, which means that you won't be receiving any visible notification (badge, message or a sound) whenever there are updates about any information in relevance to your application. It's like setting your Facebook account to only receive notifications when your friends sends you a private message. Other than that, you won't be notified at all.
The process of enabling APNS is:
Request for certificate Authority
Create app id
Configuring AppId for Push Notifications
Create provisioning profile
Provisioning a device
Enabling the profile in Xcode
Creating push notification provider.
For more understanding on APNS, check this out.
I have tested with Xcode 6.1, ios8.1.2. Currently the device token will be generated only in two cases
Apple's default consent with "Ok" option
After "Dont allow", manual change in Setting->Notifications->app->AllowNotification(On)
By declining first time with apple's consent, will not generate device token, till manually change the value in settings page.

How to make an iphone app start automatically after an upgrade?

Our app has voip background mode.
Suppose the app is running in the background and an update of the app is presented in appstore. The user goes to appstore and clicks "update" or "update all".
If the user now does not wait for the update to finish, and then explicitly starts the app, the app is no longer running in the background, and the user cannot receive incoming voip calls. He just can receive incoming apple push messages.
Am I missing something?
Why not just push him a message? Cheezy, but it would get him to launch your app. The message can be something like "Thanks for upgrading, incoming calls now enabled."