apple-push-notifications

How to listen for notification dismissed event in iOS?

﹥>﹥吖頭↗ 提交于 2019-12-04 23:12:19
I am listneing to actions pressed for my local notifications, but is there a way to determine when the user dismisses a notification? Here is how I'm listening to my actions in my AppDelegate, but the dismiss doesn't fire this: func application(application: UIApplication, handleActionWithIdentifier identifier: String?, forLocalNotification notification: UILocalNotification, completionHandler: () -> Void) { var actionName: String? = nil if let identifier = identifier { switch identifier { case "snoozeAction": actionName = "snoozeActionTapped" break default: break } if let name = actionName {

How do I make my debug app version receive production push notifications on iOS?

北战南征 提交于 2019-12-04 23:08:28
My server is sporting only one version of sending push notifications, and it has my production (release) push certificate. How do I test the notifications on my debug device and debug builds, using the same production certificate? My device is sending the token, but when I attempt to send a real push notification Apple servers return status 8 error, that means that device token is incorrect. If you want to test your app in production mode, you will need distribute the Distribution version of your app using ad hoc . When your application ready for submission, you create an ad hoc provisioning

Apple Development/Distribution certificates among individual account developers

我的未来我决定 提交于 2019-12-04 22:00:14
I have been search all over the place for a proper answer about handling certificates. Imagine the following account. Joe has an Individual Apple Account. But he cant code at all. He just publishes the app and calls it his. Bob also has an Individual Apple Account. Bob is an expert at coding an is being paid by Joe to develop his first iOS app. The app includes PUSH notification. What should Joe do so that Bob can develop on his own machine and test everything with his own device? The steps that I think they should do so far: Joe adds Bob's device UUID into his apple member page. Joe create

Sending a push notification in yii

好久不见. 提交于 2019-12-04 20:59:22
I want to send a push notification to an ios device by getting the device token, so far i have done this in yii: public function actionPushtest(){ $token=$_REQUEST['token']; $message = 'Hello'; $badge = 1; $sound = 'default'; $development = true; $passphrase='pass'; $payload = array(); $payload['aps'] = array('alert' => $message, 'badge' => intval($badge), 'sound' => $sound); $payload = json_encode($payload); $apns_url = NULL; $apns_cert = NULL; $apns_port = 2195; if($development) { $apns_url = 'gateway.sandbox.push.apple.com'; $apns_cert = dirname(Yii::app()->request->scriptFile).'/file.pem';

Production certificate error in push notification - PushSharp

江枫思渺然 提交于 2019-12-04 20:53:04
My app was getting push notification when I used Enterprise account with following push notification certificate in production environment: Apple Production iOS Push Services Then in order to publish my app in App store, I started using app store account, no matter what I try, apple creates production certificate in following name: Apple Push Services Then from this SO , I came to know that Apple has changed its naming in certificate. My issue is, I am using Push Sharp in server side and getting below error: You have selected the Production server, yet your Certificate does not appear to be

iOS APNS: sending the device token to the provider in string format

送分小仙女□ 提交于 2019-12-04 20:34:33
问题 I need to send the APNS device token of my iOS app to my provider by calling a service that expects JSON data in my request. I'm reading Apple's Local and Push Notification Programming Guide and it only says that the application:didRegisterForRemoteNotificationsWithDeviceToken: delegate method passes the device token as NSData and you should pass it to your provider encoded in binary data. But I need it to be converted to string in order to be able to send a JSON request to my provider. I've

applicationDidBecomeActive not called when launching app from Banner/custom action

徘徊边缘 提交于 2019-12-04 20:27:43
问题 I'm facing this weird problem while trying to implement iOS-8's new Interactive Notifications. When dealing with Local Notifications everything works as expected, but when it comes to APNS - things do not work well. In details: I get the custom push as it should through the banner (I register only to the minimal context), but when the user taps the button that represents the custom action, my application's delegate applicationDidBecomeActive: is not called; In fact - the app gets stuck on an

Limitations on push notifications for multiple apps from the same server

情到浓时终转凉″ 提交于 2019-12-04 20:27:16
I am attempting to send push notifications for multiple apps in quick succession. Each app has its own certificate, of course, and I am using the appropriate certificate for each push token in my database. I am finding that only the first app's 'batch' is arriving. In my php script I am cycling through each app, collecting the messages for that bundle identifier, opening the connection using the corresponding certificate, and sending the messages. Every single message is reported as successfully delivered. If I switch the order in which I process the apps, I always find that all notifications

How do I add a file to the main bundle's /Library/Sounds directory?

谁说我不能喝 提交于 2019-12-04 19:34:38
问题 According to Apple's documentation, sound file in the ~/Library/Sounds will be search by system when trying to play a sound. How do I add a sound file to this folder? I tried to write to the folder in runtime, but has no permission. I added a Library/Sounds folder in xcode but it doesn't seems to copy over. xcode -> window -> devices, select my app and show container, folder is not there To add some context, I am doing custom sound for parse push notification. The server guy told me that when

What is the difference between development and production SSL certificates in iOS?

守給你的承諾、 提交于 2019-12-04 17:35:27
问题 This is maybe a strange question but it is really confusing me. Why do we have to create a development and a production SSL certificate for push notifications in iOS? What is the difference between the development and the production certificates? I am developing an iOS app with Push notifications (handled by a self-hosted Parse Server) and when I switch my environment from development to production (with a production certificate), I don't receive the push notifications anymore on my devices.