apple-push-notifications

How to make your push notification Open a certain view controller?

我们两清 提交于 2019-11-27 01:42:31
问题 I looked on SO but I wasn't able to find any question that discusses when you receive a push notification how can you then open a specific view controller. For example if you are creating an app like WhatsApp and you receive two different push notifications ie messages from two different users how would you direct from the app delegate to the respective viewController? As far as I know in the userinfo dictionary that the appDelegate gives you you can give an ID to a specific viewController

Push Notification in PHP using PEM file

我与影子孤独终老i 提交于 2019-11-27 01:09:36
问题 I've been working through Ray Wenderlich's tutorials on push notifications using a PHP Script. Reference: http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1 http://www.raywenderlich.com/32963/apple-push-notification-services-in-ios-6-tutorial-part-2 I have done a ton of research but I have ran into an issue on part 2 where you run the push.php file using the ck.pem file. /Applications/XAMPP/bin/php push.php development My only difference is that I'm

iOS Push Notification Banner shown twice for a single Push

戏子无情 提交于 2019-11-27 00:34:34
问题 I've noticed that sending a Push notification results in the following behavior: See how the banner is shown a second time, after a short delay? At first I thought that our backend was mistakenly sending 2 push notifications, one after the other. However, this appears to be default iOS behavior for a single Push notification. The banner is shown, then immediately "shown again". This results in this jittery UI shown in the gif. The banner appears to be received twice. Tested using iOS 9.0.2. I

New APNS Provider API and PHP

走远了吗. 提交于 2019-11-27 00:30:58
问题 I started creating some code based upon this for sending push notifications from PHP. However now that I have understood there is a new API which utilizes HTTP/2 and provides feedback in the response, I am trying to figure out what I need to do to get that feedback. I haven't been able to find any tutorials or sample code to give me direction (I guess because it is so new). Is it possible to use the stream_socket_client() method of connecting to APNS with the new provider API? How do I get

no valid 'aps-environment' entitlement string found for application

旧城冷巷雨未停 提交于 2019-11-27 00:25:11
问题 I am trying to configure my app to support push notification, but keep getting this error: Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x1f818fc0 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application} I did enable my app to support push notifications (only for development at this point). I did create the provisioning profile AFTER enabling the push

didReceiveRemoteNotification:fetchCompletionHandler not being called when app is in background and not connected to Xcode

霸气de小男生 提交于 2019-11-27 00:14:13
I've a very strange problem, I implemented: - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler For silent remote push notification. It works perfect when app is in background and connected to Xcode. When I unplug any iOS device and run the app, move to background and send remote notification, didReceiveRemoteNotification:fetchCompletionHandler not being called. My code below: - (void)application:(UIApplication *)application didReceiveRemoteNotification:

How does Facebook Messenger clear push notifications from the lock screen if you’ve read them on desktop?

删除回忆录丶 提交于 2019-11-27 00:06:51
问题 When I receive a message on Facebook I get a push notification on a lock screen (iOS). Then I read this message on desktop. Right after that this push notification disappear without any interactions with the phone. How can I implement the same thing myself for removing outdated notifications? The second usage could be stitching notifications together. For instance Instagram sends you a push when someone liked your photo. After 20 likes your notifications screen is ruined and unreadable. But

Missing Push Notification Entitlement

主宰稳场 提交于 2019-11-26 23:58:24
I have received a warning mail from Apple after submitting the binary build. Missing Push Notification Entitlement - Your app appears to include API used to register with the Apple Push Notification service, but the app signature's entitlements do not include the "aps-environment" entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the "aps-environment" entitlement. See "Provisioning and Development" in the

Crash when handling remote notification when app not running

浪子不回头ぞ 提交于 2019-11-26 23:22:36
问题 I receive a remote notification and according to the type of notification, change navigation controller's view controllers. It all works fine when the app is in the foreground, or when the app is in the background but not completely closed (from multi-tasking bar). But, when the app is closed, and receives a remote notification it crashes as soon as it opens. Am I doing wrong with the way I am setting up the ViewControllers? Here's some code. - (BOOL)application:(UIApplication *)application

APN php code giving Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.sandbox.push.apple.com:2195

折月煮酒 提交于 2019-11-26 23:19:31
问题 I am trying to implement Apple Push Notification using php code. Here's my code $deviceToken = 'My device token'; $passphrase = ''; $message = 'My first push notification!'; //////////////////////////////////////////////////////////////////////////////// $ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl', 'local_cert', 'apns-dev-cert.pem'); stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase); $fp = stream_socket_client( 'ssl://gateway.sandbox.push.apple.com