apple-push-notifications

IOS unregisterForRemoteNotifications does not work in airplane mode

懵懂的女人 提交于 2019-12-21 16:59:12
问题 One of the feature in my app is to unregister user from the remote pushnotification when user logs-out from the app. Is there way I can unregister the app from push notification when user logs out while the device is in airplane(offline) mode? I tried this code but I still receive notifications when I come back online, [[UIApplication sharedApplication] unregisterForRemoteNotifications]; Could some one help how to remove app from notification center when the device is in airplane mode? 回答1:

Does push notification token changes after application update?

偶尔善良 提交于 2019-12-21 14:28:32
问题 I am asking about two situations: 1) After we do a regular update from the App Store 2) After we simulate an update, by downloading a current version from a Store and installing & running a new version from within Xcode, does push notification token changes? If changes, how often eg. each time, or from time to time? I ask this, because I was doing some testing, where I want to preserve Documents folder after an update. So this can be easily done like I described above, by downloading the app

Does push notification token changes after application update?

断了今生、忘了曾经 提交于 2019-12-21 14:25:11
问题 I am asking about two situations: 1) After we do a regular update from the App Store 2) After we simulate an update, by downloading a current version from a Store and installing & running a new version from within Xcode, does push notification token changes? If changes, how often eg. each time, or from time to time? I ask this, because I was doing some testing, where I want to preserve Documents folder after an update. So this can be easily done like I described above, by downloading the app

UIUserNotificationType was deprecated in iOS10 Swift 3.0

僤鯓⒐⒋嵵緔 提交于 2019-12-21 12:22:06
问题 I am getting this warning in iOS 10 which previously is working fine on iOS 9 :- Is there another function to fix this warning in iOS 10, appreciated if anyone would have idea for this issue. 回答1: in iOS10 UIUserNotificationType has deprecated , use UNUserNotificationCenter dont forget to enable this for Swift3 for sample see this import the UserNotifications framework and add the UNUserNotificationCenterDelegate in Appdelegate import UserNotifications @UIApplicationMain class AppDelegate:

Handling Push Notification scenarios on iOS and Android

可紊 提交于 2019-12-21 12:18:18
问题 I want to implement Push Notification for an App (both iOS and Android) and need clarifications on the following scenarios. I understand how the Push Notification works in general and the limitations. I did read the docs but that just got me confused and didnt answer all my questions. How are the following scenarios handled in iOS and Android: When the device is turned off When the device is not connected to 3G or Wifi networks When the device has crashed and need restart When the App is in

Is there possible make push notification without APNS

不打扰是莪最后的温柔 提交于 2019-12-21 09:14:43
问题 I need to know if its possible to make push notifications without use the APNS. And if it can be done, what are the best options? Web server ->pushNotification-> Device What about the VoIP apps? --> Can we push notification without using APNs? Thanks. 回答1: No, there is no way to use Push notification without APNS. This is restriction from Apple and is documented here 回答2: No you can not push notification to a device without using Apple's push notification service. 回答3: It is not possible to

Device Token Received even after iPhone is not connected to Internet

谁说胖子不能爱 提交于 2019-12-21 05:43:09
问题 I was testing my iOS app I found one interesting thing that even my phone is in airplane mode and I have also switched off WIFI, my app is able to receive the the Device Token after registering for push notification. I have also tried even after removing app and its associated certificate from the iPhone. but got same results. How is it possible, any idea ? thanks in advance. 回答1: This is from the APNS programming guide : By requesting the device token and passing it to the provider every

Invalid token when using Apple Push Notifications (APN) for Passbook

不问归期 提交于 2019-12-21 04:14:12
问题 I am trying to create a server-side implementation for passbook APN, but the server does not like the push token that the device is giving me. If I send the token to Apple's sandbox server, it sends me an "invalid token" response. If I send the token to Apple's production server, it returns the token in the feedback service as one that I should remove from my list. At least I know that the APN certificates and connection to the server work fine. My iPhone 4s has been enabled for development.

Push notification data not getting when app launched directly by clicking app icon

不问归期 提交于 2019-12-21 04:12:14
问题 I have a scenario in which app will get push notification and need to show that messages in home screen of my app, for that i saved the message array into user defaults from my app delegate and everything works well, but in following conditions it's not working if app is in killed state and a notification came and user triggeres the app through the app icon (not from push notification ) if app is in background and notification came and user enters to app through app icon (not from push

Get bundle id from p12/pem file

狂风中的少年 提交于 2019-12-21 04:09:04
问题 Is it possible to get application's bundle id from p12/pem file for APNS? I have a system where user can upload his push certificate (p12 or pem) and would be great to show him an info about bundle id so user will be able to check what he uploaded 回答1: I'm not sure whether it's 100% helpful but you can use command line tool from openssl library in the following manner openssl pkcs12 -info -in mycert.p12 -passin pass:MyCertPassPhrase this will produce the output you can parse MAC Iteration 1