apple-push-notifications

How to test Apple Push Notifications Feedback Service?

僤鯓⒐⒋嵵緔 提交于 2019-11-29 00:36:27
What I did as a test is following: I made example app where I enabled push notifications and implemented mechanism for handling them. I was testing sending of silent push notifications to my app with curl and that works pretty well. I am testing that with: curl -v -d '{"aps":{"content-available":1}}' --cert "/Users/me/Desktop/mycert.pem":"" -H "apns-topic:com.domain.name" --http2 https://api.development.push.apple.com/3/device/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX As an answer from Apple, I am always seeing following: < HTTP/2.0 200 < apns-id:XXXXXXXX-XXXX-XXXX-XXXX

Push notification not receiving on iphone

那年仲夏 提交于 2019-11-28 23:52:20
I am using this tutorial to learn push notification. <?php // Put your device token here (without spaces): $deviceToken = '1675ba8bb005740bb514222227f861c30230a81e6eed6bb6b8f353c57831341d'; // Put your private key's passphrase here: $passphrase = '111134'; // Put your alert message here: $message = 'My first push notification!'; //////////////////////////////////////////////////////////////////////////////// $ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl', 'local_cert', 'ck.pem'); stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase); // Open a connection to

IOS - How to disable push notification at logout?

你说的曾经没有我的故事 提交于 2019-11-28 23:49:54
My app registers the account at login in my server to enable push notification for a chat. Yet I haven't implemented yet the unregistration of the account at logout, so in this moment if I do the login with 2 accounts in the same device it can take the notification of both the accounts. At the same time, my notification center has a POST service which unregisters the 'login_name+ device token' from receive notification center. Where should I call it? Do I have to use unregisterForRemoteNotifications ? I just want to unregister the account+Device token from push notification, not to disable the

FCM rich push notification payload for iOS

会有一股神秘感。 提交于 2019-11-28 23:42:11
I am using FCM for my project. It's have rich push notification for a type. I tried to modified most of possible ways to get push from FCM . I got obly ordinary push from FCM , not with image. I am also check with APNS same coding using push try . I got what expected design for push notification. Here my APNS payload { "aps": { "alert": "Enter your message", "badge": 1, "sound": "default", "content-available": 1, "mutable-content": 1 }, "mediaUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/2/2a/FloorGoban.JPG/1024px-FloorGoban.JPG" } Here FCM payload { "to": "dWB537Nz1GA

How to update code using enabledRemoteNotificationTypes because it is “not supported in iOS 8”?

流过昼夜 提交于 2019-11-28 23:37:34
this is the code i used for the RemoteNotificationType: NSUInteger rntypes = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; The error i got was this: 2014-09-29 15:46:47.416 Dummy[258:21766] enabledRemoteNotificationTypes is not supported in iOS 8.0 and later. Would be a great help if someone could give me the solution. You can also use this code: if ([[UIApplication sharedApplication] respondsToSelector:@selector(currentUserNotificationSettings)]) { UIUserNotificationType types = [[[UIApplication sharedApplication] currentUserNotificationSettings] types]; if (types ==

Building for iOS if registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later

橙三吉。 提交于 2019-11-28 23:15:49
If there are breaking changes with how devices register for notifications, and we cannot use registerForRemoteNotificationTypes: anymore, how can we build a new version of the app to support iOS 8 if we cannot use Xcode 6 beta? Will we have to build and submit the day the Xcode 6 GM version is released for our users to continue to get push notifications? iOS 8 has changed notification registration. So you need to check device version and then you need to register notification settings.(please check this link.) I try this code on Xcode 6 and its worked for me. - (BOOL)application:(UIApplication

Update Badge Number when push notification is received when App is not Open

…衆ロ難τιáo~ 提交于 2019-11-28 21:37:46
I have an App in which i am facing the issue that the badge number only gets updated when i open the notification but i need to update the badge number even when app is not open. Can anyone help me with that?? Mike Weller You need to set a value for the badge key in your push notification payload. From your description, it sounds like it is only your application which is updating the badge number, and not the notification itself. See The Notification Payload of the Local and Push Notification Programming Guide for details: Keys and values of the aps dictionary badge (number): The number to

IPA created via Xcode bot fails to run for APNS but runs if built manually via Xcode itself or built as an archive by Xcode

守給你的承諾、 提交于 2019-11-28 21:31:22
I have a CI build machine running Xcode server and using a bot to generate a build, however the .ipa built via the bot is not being entitled to register for the APNS token. Specifically, didFailToRegisterForRemoteNotificationsWithError gets called and there is a runtime warning of ""No valid 'aps-environment' entitlement string found for application". However if I build the app on a separte development PC, or I build it actually on the CI machine independently of the bot then everything is fine. I've used push notifications extensively in several apps so know that the message "No valid 'aps

Cloud messaging handing terminate app

ぐ巨炮叔叔 提交于 2019-11-28 21:15:38
问题 I have an application that stores the user's session in NSUserDefaults. When the application is forced to close, in the initial verify whether the data controller user session there, in case if there sent it to the start window as follows: override func viewWillAppear(animated: Bool) { self.view.hidden = true let defaults = NSUserDefaults.standardUserDefaults() if defaults.stringForKey("user") != nil { dispatch_async(dispatch_get_main_queue(), { () -> Void in let viewController

Enabling Apple Push Notifications for ad hoc distribution environment

混江龙づ霸主 提交于 2019-11-28 20:45:01
I have successfully implemented APN for development Environment. But i am facing problems while implementing the same for ad-hoc distribution environment. Can anybody please suggest me do i need to create different App Id , Certificate and Provisioning Profile for that? And is there any change in Sandbox? A tutorial of steps will be very much appriciated. Thanks Saleel Karkhanis For Adhoc distribution, Please follow the instructions below: In Provisioning Portal, Create a Distribution certificate. Get the "Device ID" of the iPhone that you intend to use for testing. Open iTunes -> Connect your