apple-push-notifications

Use Apple Push Notification Service through Java

独自空忆成欢 提交于 2019-12-20 08:55:54
问题 Am trying to implement a Java program which sends an Apple Push Notification to an iPhone client app... Found the following library: Java APNs Provider code: Created the following code (from Javapns) to use in my app: try { PayLoad payLoad = new PayLoad(); payLoad.addAlert("My alert message"); payLoad.addBadge(45); payLoad.addSound("default"); PushNotificationManager pushManager = PushNotificationManager.getInstance(); pushManager.addDevice("iPhone", "f4201f5d8278fe39545349d0868a24a3b60ed732"

iOS - Ask to enable push notifications after initial decline

穿精又带淫゛_ 提交于 2019-12-20 08:25:11
问题 I would like to know if it's possible to force the "XXXXX would like to send you push notifications" popup from within an app, after an initial decline. The use case is as follows: The user installs the app, gets the alert about push notifications, and declines because they don't know/trust the app yet. They use the app and proactively request within the app to be alerted when something happens (say for example something they want to buy is sold out so they want to be alerted when it is back

Missing Push Notification Entitlement

人走茶凉 提交于 2019-12-20 06:40:11
问题 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

How to send an apple mdm push notification with plain php?

ぃ、小莉子 提交于 2019-12-20 06:04:50
问题 i've done a apple-mdm-ota-server for IOS so far. The devices deliver me following things to the server (in form of a plist/xml): -Push Magic Token -Device Token (in b64 format oO) -PN-Topic (com.apple.mgmt.xxx) -UDID (in hexcode) -UnlockToken (a very long b64 encoded thing) I need to send the following content to the push notification thing from apple: {"mdm":"pushMagic"} Pushmagic = the Push Magic Token How I need to compose the data I need to write into the apns socket? I tried the one that

How to detect Remote notification in didFinishLaunchingWithOption application method in objective c?

徘徊边缘 提交于 2019-12-20 05:47:24
问题 when app in not in background mode ,inactive mode and app is completely closed. than how to detect is their any notification using application's delegate "didFinishLaunchingWithOption" method. i have searched a lot about it but not get anything. please help . Thanks 回答1: Below methods is used for notifiaction - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { UILocalNotification *notification = [launchOptions objectForKey

iPhone Push Notification - Error response problem

旧巷老猫 提交于 2019-12-20 05:29:09
问题 I've got a problem when checking for a response error after sending a Push Notification. This is my setup: From my PHP server, I'm sending Push Notifications. These notifications are send in the enhanced format, so I can get an error response from the Apple server. For example: Error #7 "Invalid payload size". The way I check for errors is reading the socket response: const ERROR_RESPONSE_SIZE = 6; $errorResponse = @fread($this->_apnsSocket, self::ERROR_RESPONSE_SIZE); This works fine when

Apple Push Notification setting up Remote Notifications method overrides other methods

纵饮孤独 提交于 2019-12-20 05:23:14
问题 I have properly set up my app for Remote Notifications with the method func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject], fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) and it processes it correctly now every time the app receives an Apple Push Notification . But my issue is that this method is being called in all instances now. didFinishLaunchingWithOptions does not seem to be called anymore? Or the

MobileFirst Starter - Bluemix Push Notification failure in Production mode

感情迁移 提交于 2019-12-20 04:56:13
问题 I am building an iOS app that can receive remote notification through Bluemix. I have the app Bundle Identifier in Xcode matches the AppId in Apple Portal which also match the APN certificate (xxx-sandbox.p12 and xxx-production.p12). During development I have tested using Push Notification with Bluemix Sandbox (under MobileFirst Starter boilerplate). All work fine. I can receive notification in my iPhone. However when I tested in Production mode, I keep getting error messages: "Internal

How to detect push notification sent to other apps?

北战南征 提交于 2019-12-20 04:34:41
问题 I cannot seem to find a way to detect when a notification comes in. For example, if my app is open and the user gets a Facebook push notification\, is there any UIApplication notification or something else that will tell me that the app is no longer in the foreground and the Facebook alert is on top? Preferably something that is fired if the notification is a banner or an alert 回答1: You cannot detect a push notification sent to another app. If you want to detect whether your app is not in

Push Notifications Are Not working When I disconnect my device from Xcode

拟墨画扇 提交于 2019-12-20 03:25:16
问题 I am Developing an IOS App using swift language. I have added Firebase based push notifications to my project. they works correctly when my device is attached to xcode or when i debug my app on my device. But when ever i disconnect my device from xcode or i use app without debugging push notification doesn't work. I am looking for a solution My code in App Delegate File In didFinishLaunchingWithOptions function if #available(iOS 10.0, *) { // For iOS 10 display notification (sent via APNS)