apple-push-notifications

how to display image in ios push notification?

耗尽温柔 提交于 2019-11-26 18:26:09
iOS 10 introduced push notification framework updates, UserNotificationsUI.framework As written on apple docs, it lets us customize the appearance of local and remote notifications when they appear on the user’s device. So if anyone have idea how to display image in push notification when on lock screen. same like andorid push notification are doing. Thanks, If you want to customize the appearance of local and remote notifications, perform the following steps: Create a UNNotificationCategory and add to the UNUserNotificationCenter category: let newCategory = UNNotificationCategory(identifier:

why didRegisterForRemoteNotificationsWithDeviceToken is not called

只谈情不闲聊 提交于 2019-11-26 18:23:47
I am making an application in which I want to implement apple push notification service. I am following the step-by-step instructions given in this tutorial . But still, the methods are not called. I don't know what is causing the problem. Can anyone help me? - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { //NSString * token = [[NSString alloc] initWithData:deviceTokenencoding:NSUTF8StringEncoding]; NSString *str = [NSString stringWithFormat:@"Device Token=%@",deviceToken]; NSLog(@"Device Token:%@",str); //NSLog(@"Device

apple push notification limitation

前提是你 提交于 2019-11-26 18:15:31
问题 I'm wondering if there is a limit to the number of apple push notifications we can send to users at one time ? in other words, can i send 100,000 push notifications at once using the APNS service? 回答1: If you are sending multiple notifications to the same device within a short period of time, the push service will send only the last one. https://developer.apple.com/library/content/technotes/tn2265/_index.html#//apple_ref/doc/uid/DTS40010376-CH1-TNTAG23 Look "Some Notifications Received, but

Enable/Disable Apple Push Notification from iPhone app?

不打扰是莪最后的温柔 提交于 2019-11-26 18:13:56
问题 I have one more doubt on APNS . That is when the app first launch the app asks for Apple Push Notification Permission if the user accepted the they can receive the notifications. If the user cancelled they can't receive any notifications. Am I clear?? Now my doubt is, At first time if the user cancelled the push notification service from the app (Clicked Cancel button) again after some days if they want receive Apple Push Notification it is possible to enable the Apple Push Notification again

How to catch all iOS Push Notifications with different user actions including tap on app icon

 ̄綄美尐妖づ 提交于 2019-11-26 18:06:56
问题 As per the Apple guide: "As a result of the presented notification, the user taps the action button of the alert or taps (or clicks) the application icon. If the action button is tapped (on a device running iOS), the system launches the application and the application calls its delegate’s application:didFinishLaunchingWithOptions: method (if implemented); it passes in the notification payload (for remote notifications) or the local-notification object (for local notifications). If the

Callback Method if user declines Push Notification Prompt?

僤鯓⒐⒋嵵緔 提交于 2019-11-26 17:49:21
My problem is I want to show a loading screen for the initial Push Notification Prompt "The app wants to send you push notifications." So if the user hits yes I can proceed and start the app in the then invoked delegate methods: - (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken { [self hideLoadingScreen]; } - (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error { [self hideLoadingScreen]; } However if the user hits no , none of these methods get called, which makes

didReceiveRemoteNotification: fetchCompletionHandler: open from icon vs push notification

荒凉一梦 提交于 2019-11-26 17:35:22
问题 I'm trying to implement background push notification handling, but I'm having issues with determining whether the user opened the app from the push notification that was sent as opposed to opening it from the icon. - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { //************************************************************ // I only want this called if the user

Remote Notification iOS 8

北慕城南 提交于 2019-11-26 17:01:54
How can I get the Device Token for remote notification in iOS 8? I used the method didRegisterForRemoteNotificationsWithDeviceToken in AppDelegate in iOS < 8, and it returned the device token. But in iOS 8, it does not. Madao Read the code in UIApplication.h. You will know how to do that. First: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions add Code like this if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) { #ifdef __IPHONE_8_0 UIUserNotificationSettings *settings = [UIUserNotificationSettings

didRegisterForRemoteNotificationsWithDeviceToken not called in ios8, but didRegister…Settings is

穿精又带淫゛_ 提交于 2019-11-26 16:38:06
I followed this thread , but the method didRegisterForRemoteNotificationsWithDeviceToken is still not called : the documentation says : After you call the registerForRemoteNotifications method of the UIApplication object, the app calls this method when device registration completes successfully didRegisterUser appears well, but not did register notif . Here is my code in the AppDelegate (the app version is 8.1) : - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { //register notif UIUserNotificationType userNotificationTypes =

Firebase FCM silent push notifications for iOS

白昼怎懂夜的黑 提交于 2019-11-26 16:26:32
问题 I have a problem with silent notifications on iOS. When my application is in background, I don't receive silent notification sent by FCM. But if I try to send directly to APNS, the notification is successfully received. This is the JSON sent to FCM: { "to" : "<token>", "priority": "high", "content_available": true, "data" : { "<key>" : "<string>", "<key2>" : "<string>" } } This is the JSON sent directly to APNS: { "aps": { "content-available": 1 }, "<key>": "<string>", "<key>": "<string>" } I