apple-push-notifications

iOS APNS “best-effort” fallback

一世执手 提交于 2019-12-17 16:54:26
问题 I cannot seem the have my head around this. APNS as stated in the documentation has best-effort delivery, i.e. delivery is not guaranteed. However, if I am to use the push-notification model in my client/server application, I have to use them somehow. The general model looks as follows: there is new data on the server -> the server then sends a push notification informing the client(s) that there is new data available -> client downloads new data. The question is then, if I cannot rely 100%

How do I send a HTTP/2 POST request in PHP

会有一股神秘感。 提交于 2019-12-17 16:13:20
问题 I found a similar question at Sending HTTP/2 POST request in Ruby But I want to update my server with PHP The new Apple push notification HTTP/2 based API described here: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/APNsProviderAPI.html Anyone with HTTP/2 experience help me with making a request as a client in PHP. 回答1: The CURL extension for PHP >= 5.5.24 has support for HTTP/2. (since this commit) You also need a libcurl

PushSharp APNS production: The credentials supplied to the package were not recognized (development works fine though)

泪湿孤枕 提交于 2019-12-17 10:57:11
问题 My app just got ready for sale on App Store, but none of my production devices (devices that have installed the app from App Store) are getting push notifications. When I try to send a push notification to a production device, I am getting this error: "The credentials supplied to the package were not recognized" (System.ComponentModel.Win32Exception) This exception is internally thrown and caught in an infinite loop: It is thrown at line 539 of ApplePushChannel.cs file: try { stream

Silent push notifications only delivered if device is charging and/or app is foreground

落爺英雄遲暮 提交于 2019-12-17 10:14:51
问题 I have implemented silent push notifications but I have noticed some strange behaviour. The silent push notifications are handled via: - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler The silent push messages only seem to be received if the device is charging (ie cable connected) and/or if my app is foreground. If I disconnect the device from the charger (or Mac)

Getting an error from push notification

微笑、不失礼 提交于 2019-12-17 08:45:33
问题 In my app, I need push notifications. I am implementing all the instructions from the push notifications docs. But I got an error from Push Notification: Fail To Register For Remote Notifications With Error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x2340a0 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application} What I am doing wrong? 回答1: Generate a new provisioning profile,

iOS push notification: how to detect if the user tapped on notification when the app is in background?

Deadly 提交于 2019-12-17 08:01:44
问题 There are a lot of stackoverflow threads regarding this topic, but I still didn't find a good solution. If the app is not in the background, I can check launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey] in application:didFinishLaunchingWithOptions: call to see if it's opened from a notification. If the app is in the background, all the posts suggest to use application:didReceiveRemoteNotification: and check the application state. But as I experimented (and also as the name of

iOS push notification: how to detect if the user tapped on notification when the app is in background?

旧城冷巷雨未停 提交于 2019-12-17 08:00:59
问题 There are a lot of stackoverflow threads regarding this topic, but I still didn't find a good solution. If the app is not in the background, I can check launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey] in application:didFinishLaunchingWithOptions: call to see if it's opened from a notification. If the app is in the background, all the posts suggest to use application:didReceiveRemoteNotification: and check the application state. But as I experimented (and also as the name of

Xcode 8 “the aps-environment entitlement is missing from the app's signature” on submit

为君一笑 提交于 2019-12-17 07:07:34
问题 I've got an app that we've submitted dozends of versions to in the last 6 months and we do use APNS. I got the following email from Apple after upgrading to Xcode 8 Dear developer, We have discovered one or more issues with your recent delivery for APP_NAME. Your delivery was successful, but you may wish to correct the following issues in your next delivery: Missing Push Notification Entitlement - Your app includes an API for Apple's Push Notification service, but the aps-environment

Receiving Push Notifications while in background

孤街浪徒 提交于 2019-12-17 06:34:20
问题 I know this is covered in a lot of places, but I cannot figure this out. I use Urban Airship for push notifications. Everything seems to be fine except that when my app is in the background - didReceiveRemoteNotification is not getting called. It works when in the foreground - I am able to properly process messages. And I am able to get to messages from launch options if message is tapped from notifications center. But when in the background, a message it send - iOS displays the alert -

Implement PushKit and test in development behavior

孤人 提交于 2019-12-17 05:45:09
问题 i'd like to implement PushKit service within my app ( Voip app ), but i have following doubt: I see that i can generate only production voip certificate , it works if i try to test voip push notification service on develop device ? This is my implementation test: With this 3 line of code i can get push token on didUpdatePushCredentials callback that i use to save into my server. PKPushRegistry *pushRegistry = [[PKPushRegistry alloc] initWithQueue:dispatch_get_main_queue()]; pushRegistry