apple-push-notifications

Images in iOS push notification

与世无争的帅哥 提交于 2019-11-27 08:58:59
问题 I am trying to send images in push notifications I have made the notifications registrations in app delegate and apns device token is generating properly. ALso I have coded in service ext as follows: import UserNotifications class NotificationService: UNNotificationServiceExtension { var contentHandler: ((UNNotificationContent) -> Void)? var bestAttemptContent: UNMutableNotificationContent? override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping

Is it possible to intercept push notifications for another app?

扶醉桌前 提交于 2019-11-27 08:52:22
问题 I'd like to act on remote push notifications that are meant for another app in an app that I am writing. Is this possible? 回答1: This is not possible on iOS. A device token is assigned to an installation of an app upon registering to receive push notifications. Push notifications are sent using these tokens as an identifier of the recipient. iOS will then deliver the notification to the app that was assigned that particular device token. The only way to bypass this would be to do some low

didReceiveRemoteNotification function doesn't called with FCM notification server

混江龙づ霸主 提交于 2019-11-27 08:36:09
问题 I'm using FCM server for remote notifications, it worked perfectly with sending and receiving notifications. My problem is when the device is in the background, this function func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) doesn't called. Solutions that I've tried: This function: userNotificationCenter(_ center: UNUserNotificationCenter, didReceive

Update badge icon when app is closed

天大地大妈咪最大 提交于 2019-11-27 08:14:57
问题 I am trying to update the badge icon for my app(closed) when I received a PN. I have tried adding the codes into but it's not working when my app is closed. It works when the app is running in the foreground. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSDictionary *remoteNotif = [launchOptions objectForKey: UIApplicationLaunchOptionsRemoteNotificationKey]; //Accept push notification when app is not open if (remoteNotif) {

didReceiveRemoteNotification not called in Background Mode

◇◆丶佛笑我妖孽 提交于 2019-11-27 08:09:17
问题 I am working on push notifications and the data I receive is in JSON format. How can I parse the JSON data, which is shown in the Notification Center below: 回答1: if your app in background/foreground mode call this method - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler if you used the above method you will face the following error in console application

Apple push notification is not working for distribution but working for development

淺唱寂寞╮ 提交于 2019-11-27 08:03:52
问题 I am implementing push notifications in my application, in the development part it is working fine, and I receive push notifications well. When I decided to publish it in the app store, I implemented it for distribution (I use the certificate and provisioning profile for distribution), I made the same steps and I converted the .p12 files to .pem through shall, and I combine the certificate.pem and key.pem to another file ck.pem. In the PHP file, I did the following: $passphrase = 'The

application:didReceiveRemoteNotification:fetchCompletionHandler Not Called

久未见 提交于 2019-11-27 07:37:18
It appears the function application:didReceiveRemoteNotification:fetchCompletionHandler is not called when the app has been forcefully quit. It was my impression that the function would be invoked no matter what state the app was in, but it appears that it is only called if the app is already running in the background. Is there a way to wake up an app in the background if it is not already running using the new iOS 7 remote notification background mode? nvrtd frst application:didReceiveRemoteNotification:fetchCompletionHandler: gets called even if the app is suspended, not running at all,

Add buttons to push notification alert

限于喜欢 提交于 2019-11-27 07:05:48
问题 Is there a way to set up how users see the push notifications alert box? My notifications are appearing without the view / cancel buttons, but i'm receiving others from different apps with those buttons. Is that a setting i should set before sending the push notification? Thanks! 回答1: There are two things going on in your question. First, you will see no buttons at all when you receive Apple Push Notification alerts and your screen is locked. All Apps will have just the Title and the Message

CloudKit push notifications on record update stopped working

烂漫一生 提交于 2019-11-27 06:55:52
问题 EDIT : Retested today 27.08.2015 and it works again, Apple has fixed it. I have an application in development mode. The application uses CKSubscription to get notified on changes on the server, configured for all three options: create, update, delete. Everything was working fine but recently during regression tests I have discovered the application does not receive notifications on record updates, the create and delete notifications are still working. The susbcription types are set correctly

Getting an error from push notification

被刻印的时光 ゝ 提交于 2019-11-27 06:52:38
In my app, I need push notifications. I am implementing all the instructions from the push notifications docs. But I got an error from Push Notification: Fail To Register For Remote Notifications With Error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x2340a0 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application} What I am doing wrong? Generate a new provisioning profile, after you enable Push, and it will work! I am using Xcode 6.1.1 You don't have to delete or recreate anything