apple-push-notifications

iOS APNS not received in background mode

喜欢而已 提交于 2019-12-13 18:59:11
问题 I am trying to receive a notification when in background mode. I don't want the user to launch my app on receiving an alert in the notification. But it seems like iOS doesn't send the notification to the callback function didReceiveRemoteNotification: Any inputs? Is there something special I need to perform in order to receive a push in the background mode. FYI : I tried using voip background mode also and still nothing!!! Basically I want my app to receive a notification without launching my

Is the following structure with body and loc-args in the same notification payload valid?

人走茶凉 提交于 2019-12-13 18:04:18
问题 Would the following payload notification cause any problems if you have body and loc-args and loc-key in the same payload? {"aps":{"alert":{"body" : "Bob wants to play poker", "loc-key":"general","loc-args":["Test DEFAULT."]},"badge":1,"sound":"default"}} The reason I have it set up like this. Is that I am not sure if the notification to just have a body in would be handle during the app, so it would use the localized loc-args in with the following key-valus in the localizable string:

how to present a navigation controller embedded in a tab bar controller when receiving a push notification

大城市里の小女人 提交于 2019-12-13 17:52:41
问题 I'm working on a project with a tab bar controller and push notifications, when my app receives a push notifications depending of the alert body it will open a determinate view controller that is embedded in tab bar. I already can present the view controller but i lost the tab bar. For presenting the view controller this is what i do: UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; vc5 *ivc = [storyboard instantiateViewControllerWithIdentifier:@"vc5"];

Push Notifications work from FCM console but if sent from API show “InvalidApnsCredential” error (only on iOS devices)

不想你离开。 提交于 2019-12-13 17:08:57
问题 Push notification FMC API doesn't work on iOS I tried to verify my APNS certificates and seems okay From FMC console testing notifications work and arrive successfully to iOS devices Endpoint url https://fcm.googleapis.com/fcm/send Request headers: Content-Type:application/json Authorization:key=**SERVER_KEY** Request payload body: { "to": "**FMC_DEVICE_TOKEN**", "priority": "high", "notification": { "title": "Title", "body" : "First Notification", "text": "Text" } } Response body: {

How do silent notification behave once phone got Power off & On

主宰稳场 提交于 2019-12-13 16:30:30
问题 I have a application which tries to grab location of user using silent notification at certain situations. I am able to send silent notification to the phones and able to run the background fetch and get the location back to web-service. Comparing the user payload of silent notification I am doing some operation(Initiating the location manager & grabbing location from delegate method) while app is in background/suspended mode. This works in all other cases expect one case which is iPhone

Apple Push Notification error setting private key

拈花ヽ惹草 提交于 2019-12-13 16:23:56
问题 I have been fighting to get the push notification certificates setup correctly for my app. The app is already in the store, so I can't just 'start over' generating files as has been the solution for others having this problem! I have used this article as an example to create the certificates: http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1#comments. When I get to the point of testing what I have generated I get: openssl s_client -connect gateway

push notification : both didFailToRegister and didRegister delegate not calling

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 15:48:52
问题 I am creating an application which support push notification I am following all the steps. It give error on simulator Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3010 "remote notifications are not supported in the simulator" UserInfo=0x5813d20 {NSLocalizedDescription=remote notifications are not supported in the simulator} But on device it not calling the delegates methods didFailToRegisterForRemoteNotificationsWithError didRegisterForRemoteNotificationsWithDeviceToken My

Apple Push Notifications With Foreign Accent Characters Not Receiving

孤者浪人 提交于 2019-12-13 14:02:33
问题 I'm sending push notifications and when the message contains foreign characters (Turkish in my case) like İ, ş, ç, ğ... The message does not arrive to devices. Here's my code: $message = 'THİS is push'; $passphrase = 'mypass'; $ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl', 'local_cert', 'MyPemFile.pem'); stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase); // Open a connection to the APNS server $fp = stream_socket_client( 'ssl://gateway.push.apple.com

iOS 10 Notification Content Extension not loading

给你一囗甜甜゛ 提交于 2019-12-13 12:34:44
问题 I have a bare-bones app to play with push notifications. I have the Notification Service Extension working. I can send a remote notification with an image URL and have it load. I can't seem to get Notification Content Extension working. I've gone through multiple tutorials and they all say, just create a Notification Content Extension from the target menu and then inside the Notification Content Extensions Info.plist set the UNNotificationCategory to some string. Then when you push the

iOS Push Notification SSL Certificate

风流意气都作罢 提交于 2019-12-13 12:33:42
问题 Is the certificate generated to send push notifications specific to the server, or I can use it on any other server, if I change my server? Thank you. 回答1: You can use it in any server. Apple push notification SSL certificate is not specific to any server. Example: parse.com, xtify.com etc. 回答2: You can use it on any server -- its the certificate and its corresponding private key that matters, not the IP from which the connection is made. 回答3: You can use it in any server. Apple push