apple-push-notifications

App ID and Bundle Seed ID in multiple applications with ASPN, InApp Purchase, and other

半腔热情 提交于 2019-12-01 01:41:22
问题 I will create multiple sale versions of the same application with push notifications feature: CoolApp (full version) CoolApp Free (free, features limited version) CoolApp InApp (free version upgradable to full via InApp Purchase) While registering for App ID in Apple Program Portal is possible to create "Bundle seed ID": "The Bundle Seed ID portion of your App ID can be utilized to share keychain access between multiple applications you build with a single App ID" Is possible to create only

How can I call a view controller function from an iOS AppDelegate?

心已入冬 提交于 2019-12-01 01:32:24
I am getting a call from a remote push notification, which includes a path to an image, which I want to display. The AppDelegate is: func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) { // get url from notification payload (shortened version) let url = alert["imgurl"] as? NSString let vc = ViewController() vc.loadImage(url as String) // cannot find the imageView inside } ...and the view looks like this: func loadImage(url:String) { downloadImage(url, imgView: self.poolImage) } // http://stackoverflow.com/a/28942299/1011227 func

How to clear a single notification from a list of notifications on clicking?

巧了我就是萌 提交于 2019-12-01 01:25:43
Once i click a notification, all the notifications are cleared.In ios, is there any option to clear a single notification after tapping on it? i have received 4 notifications. now i need the clicked notification alone to get cleared and retain the other ones.Can anyone help me on this? - (void) clearNotifications { [[UIApplication sharedApplication] setApplicationIconBadgeNumber: 0]; [[UIApplication sharedApplication] cancelAllLocalNotifications]; } - (void)application:(UIApplication*)application didReceiveRemoteNotification:(NSDictionary*)userInfo { NSLog(@"Received notification: %@",

Change State when User Selects Notification from iOS Notification Center in Cordova

我与影子孤独终老i 提交于 2019-12-01 01:01:44
I'm attempting to open an iOS/Ionic/Cordova app at a specific message/state (given an ID), when a user clicks on a message push notification in the notification center. Is there a way to tell, using Cordova, if the app has been opened through the notification center? From the docs , the callback is the point of entry for your notification. Any calls you make (or variables you set) inside the callback will only be possible if the app has been opened through the notification center 来源: https://stackoverflow.com/questions/28507469/change-state-when-user-selects-notification-from-ios-notification

Bluetooth LE and ANCS in iOS

放肆的年华 提交于 2019-12-01 00:40:37
Can I develop a service on iOS to register with ANCS so that when iPhone gets a notification the service go through my device BT LE protocol to notify the band? And I read at http://blog.punchthrough.com/post/63658238857/the-apple-notification-center-service-or-wtf-is . I see "ANCS is managed automatically by the iOS device, or “Notification Provider” as its known in ANCS parlance. What this means for you as a developer is that you won’t need to write code to manage ANCS on the iOS side." It means i don't need write code in iOS side that have to implement in my device BT LE ? Thanks for any

PHP Apple iOS Push Notifications: Command2 : Binary Interface and Notification Format

南楼画角 提交于 2019-11-30 23:45:43
Nowadays, PHP and Apple/iOS Push Notifications with Command 2 has been becoming popular. However not sure, how to prepare the format for same, as per Apple guideline here , How to achieve below packet format: Also would like to know, how to receive Format of error-response packet as mentioned below: At present, I am using below simple format: $msg = // new: Command "1" chr(1) // new: Identifier "1111" . chr(1) . chr(1) . chr(1) . chr(1) // new: Expiry "tomorrow" . pack('N', time() + 86400) // old . chr(0) . chr(32) . pack('H*', str_replace(' ', '', $deviceToken)) . chr(0) . chr(strlen($payload

What happens to push notifications after losing internet access?

狂风中的少年 提交于 2019-11-30 23:18:07
What happens if an application is waiting for a push notification and the internet connection is unavailable? For example, I tell my server to do task "A", and notify me via APNS when the task is ready. But, after I send the task to the server, the application loses internet connectivity. Notification will be delivered when internet connection on iPhone becomes available again. Apple Push Notification Service includes a default Quality of Service (QoS) component that performs a store-and-forward function. If APNs attempts to deliver a notification but the device is offline, the QoS stores the

How to get notified when our app is uninstalled in iOS

前提是你 提交于 2019-11-30 23:13:11
We are developing an iPhone application that allow users to send messages to others via Apple Push Notification Service when the target user have installed our application or SMS when haven't. We want to get notified immediately when our app is uninstalled so that we can decide how to send the message to the target user. We find the APNS feedback server have a long time delay that doesn't agree with our requirement. So we use another way: when our server recorded the target user have installed our application, we send him message via APNS, if he haven't read the message in 30 minutes, we

iOS 10 How to set UNotificationContent threadIdentifier for remote notification

泪湿孤枕 提交于 2019-11-30 22:55:32
TL;DR: What key needs to be set in the APNs notification payload JSON to correspond to the threadIdentifier property of the UNNotificationContent object? e.g. the "category" key corresponds to the categoryIdentifier property. iOS 10 introduces the Notification Content Extension allowing us to present a view controller when a notification is expanded. The view controller that we provide conforms to the UNNotificationContentExtension protocol, that requires us to implement the didReceive(_:) method. The documentation for this method includes the following paragraph: This method may be called

Safari push notifications return denied without asking

戏子无情 提交于 2019-11-30 22:15:44
Im trying to use the new push notifications in Safari. I'm using the following snippet: var checkRemotePermission = function (permissionData) { if (permissionData.permission === 'default') { // This is a new web service URL and its validity is unknown. console.log("default"); window.safari.pushNotification.requestPermission('https://website.com/','web.com.website.notify',{uid: "TEST"},checkRemotePermission); } else if (permissionData.permission === 'denied') { // The user said no. console.log("no"); } else if (permissionData.permission === 'granted') { // The web service URL is a valid push