apple-push-notifications

iOS: Production push notifications, Invalid token from APNS server

↘锁芯ラ 提交于 2019-11-28 08:20:47
My app is now available in the app store, so I've downloaded it to my device. The push notifications were working fine during development. I am using JavaPNS to send out the notifications, and I have switch it to point to Apple's production servers. However, I'm now getting an Invalid Token error back from the APNS servers. I have the Archive scheme set to "Release", and I have Release set to use this distribution profile: Inside that provisioning file, you can see that I have the environment set correctly: Yet I still get the error. When I look in my database, I think the device token the app

Should I update my app upon receiving payload? Or I should always update it by allowing it to download for itself?

偶尔善良 提交于 2019-11-28 08:10:06
问题 When your iPhone receives a WhatsApp/Telegram push notification e.g. wife: "buy pizza" Question1: Is it that the app has to download/receive that itself . That is the banner that pops up on the phone has to download for itself + my Whatsapp/Telegram has to download again for itself? My friend replied: Push notifications can have the message as a payload. Your app could extract that and dynamically insert into the conversation without making an additional request - I've done that before. Makes

iPhone: Push Notification Testing on Production Certificate

爷,独闯天下 提交于 2019-11-28 07:19:09
I have a quick question. I have been testing Development Push Notification Certificate for my iPhone App and its been working fine. I just want to know that is it possible to test Production Certificate before submitting my application to AppStore? I did try but message is not coming along when I use production certificate. Does Apple required application to be in AppStore when I use production certificate? Thanks. If you create an Ad-Hoc Profile, you'll find that it uses the production certificate, that's possibly the easiest way of testing it out. UPDATE: See the Apple documentation here

What causes “Neither PUB key nor PRIV key:: nested asn1 error” when building a public key in ruby?

蹲街弑〆低调 提交于 2019-11-28 07:12:06
When building a public key using the OpenSSL::PKey::RSA module by passing it a .pem file, what is the cause for a response: OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key:: nested asn1 error from /Users/Matt/projects/placepop/lib/apn.rb:48:in `initialize' from /Users/Matt/projects/placepop/lib/apn.rb:48:in `new' from /Users/Matt/projects/placepop/lib/apn.rb:48:in `open' from (irb):1 Here is the source: cert = File.join(rails_root, 'config', 'apns', 'sandbox-cert.pem') APN_CONFIG = { :delivery => { :host => 'gateway.sandbox.push.apple.com', :cert => cert, :passphrase => "", :port => 2195

APNS ssl://gateway.sandbox.push.apple.com:2195 connection fails

倾然丶 夕夏残阳落幕 提交于 2019-11-28 06:56:56
i try to make a push-notification server. I get connection to ssl://gateway.sandbox.push.apple.com:2195 with telnet. telnet gateway.sandbox.push.apple.com 2195 Trying 17.172.232.229... Connected to gateway.sandbox.push-apple.com.akadns.net. Escape character is '^]'. my *.pem is ok (I use it on another server). I use the SAME project on an other Server and it works there but the clone on an other Server doesn't. I get these Errors: Warning: stream_socket_client() [function.stream-socket-client]: SSL operation failed with code 1. OpenSSL Error messages: error:14094415:SSL routines:SSL3_READ

App architecture when 'state changing' APNS fails

邮差的信 提交于 2019-11-28 06:38:19
问题 I've seen several questions on this topic. But all simply say you just have to recover from other means. But none explain what the other means are! I couldn't find an answer on SO. This is also a follow up from the comments of this question. Let's say I'm working on a Uber app. Drivers need to know passenger locations. A passenger sets a pickup location for 123 XYZStreet . 2 minutes later she decides to cancel the entire pickup. So now I need to inform the driver. This is an important state

Not receiving any push notification in iPhone

依然范特西╮ 提交于 2019-11-28 06:24:28
I have made a sample PushTest app for Push Notification using this tutorial . And using above tutorial I got the message that 'PushTest' would like to send you Push Notification (exactly once) and after that I delete the app from iPhone, restart the iPhone but unable to get the same message again. I have run the script sample.php (updating the changes suggested) and got the message 'connected to APNS' & 'your message send'. But I didn't receive any single push notification. Please guide me where I am wrong? Or what shod I try for push notification receive. Divyam shukla You will not receive

FCM Push notification not working in iOS 11

风流意气都作罢 提交于 2019-11-28 06:08:20
问题 I need to handle push notification and that's done with a lower version of ios but in ios 11 never receive any push notification. I using Firebase Cloud Messaging. please, anyone has a solution then please share. 回答1: Please Check as func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Use Firebase library to configure APIs FirebaseApp.configure() self.registerForPushNotifications(application:

Getting errors using APNS PHP

自古美人都是妖i 提交于 2019-11-28 05:34:44
问题 Here's the code I'm using <?php $deviceToken = 'my device key'; // not putting in for security $payload['aps'] = array('alert' => 'This is the alert text', 'badge' => 1, 'sound' => 'default'); $payload = json_encode($payload); $apnsHost = 'gateway.sandbox.push.apple.com'; $apnsPort = 2195; $apnsCert = 'apns-dev.pem'; $streamContext = stream_context_create(); stream_context_set_option($streamContext, 'ssl', 'local_cert', $apnsCert); $apns = stream_socket_client('ssl://' . $apnsHost . ':' .

ios 7 device token is different for same device

微笑、不失礼 提交于 2019-11-28 05:04:33
I have two applications in one device. For iOS 7 both applications are sending different device tokens but for iOS 6 both apps are sending same device token. As per my understanding device token has to be same for all the application in one device. Is there something different in iOS7 than iOS 6? Tommie C. UPDATE: I guess I read this one a bit too quickly. Please note my revisions. If the answer meets your use-case please feel free to accept it. Based on your description I would suggest that there have been underlying changes to the token generation between iOS6 and iOS7. To examine this