apple-push-notifications

Firebase silent apns notification

我是研究僧i 提交于 2019-12-17 04:31:22
问题 Is there a way to send a silent APNS using google's firebase? It seems that if the app is in the background it will always show a notification to the user. Thanks? 回答1: You can send silent APNS messages using the FCM server API https://firebase.google.com/docs/cloud-messaging/http-server-ref In particular you need to use: The data field: This parameter specifies the custom key-value pairs of the message's payload. For example, with data:{"score":"3x1"}: On iOS, if the message is sent via APNS

how to display image in ios push notification?

人走茶凉 提交于 2019-12-17 04:15:01
问题 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, 回答1: If you want to customize the appearance of local and remote notifications, perform the following steps: Create a

didRegisterForRemoteNotificationsWithDeviceToken not called in ios8, but didRegister…Settings is

空扰寡人 提交于 2019-12-17 03:41:27
问题 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:

DidReceiveNotificationRequest in not getting called

社会主义新天地 提交于 2019-12-14 03:54:01
问题 I have a xamarin forms application and ios Notification service extension is not getting called when I receive notification from server. I have done the following things so far: Have added the mutable-content = 1 in the apns payload. This is how I manipulate the apns payload in the service public class NotificationService : UNNotificationServiceExtension { Action<UNNotificationContent> ContentHandler { get; set; } UNMutableNotificationContent BestAttemptContent { get; set; } protected

How to run swift code after terminate app

Deadly 提交于 2019-12-14 03:37:23
问题 Is there a way to run ios application code unlimited/ long time while the user terminate my app from background? Please help me. I have searched a lot but did not find any proper solution. 回答1: No this is not possible. There are a bunch of services that you can run in the background such as Location Services BUT even for that you need to configure your app and have the CONSENT of the END USER to continue to monitor his/her location. Even if the user consents, he has a bunch of options like

How to handle/store push content to core data on background?

廉价感情. 提交于 2019-12-14 02:52:41
问题 In my app, We have a feature to store content receive from push notification to locally core-data and are facing data loss issues on background state, Steps we followed: 1 - Push received in didReceiveRemoteNotification method. 2 - Insert the new data from push in core data( All core data process handling in single class and single context only) self.getManagedContext().perform { do { if self.getManagedContext().hasChanges { print("Core Data class: saveChanges.....") try self

iOS notifications actions without opening the app

你离开我真会死。 提交于 2019-12-14 02:22:01
问题 Is there a way to intercept user's click on push notification or user's click on rich push notification action button, WITHOUT LAUNCHING THE APP? I have implemented all necessary settings to register for push notifications, to receive push notifications and to handle simple and rich push notifications, and user's click on some action button inside rich push notification. But, when user clicks on some action button, app launches, and I can handle it inside: @available(iOS 10.0, *) func

Production certificates not working for APNS but works for APNS_SANDBOX in AWS SNS

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-14 02:19:15
问题 We have one of our live iOS Application in the App store and we are facing following issue while integrating SNS : While creating a new Platform Application on SNS console , APNS does not accept the Production certificates but APNS_SANDBOX accepts both production and development certificates . the error which flashes is : Invalid parameter: Attributes Reason: Platform credentials are invalid (Service: AmazonSNS; Status Code: 400; Error Code: InvalidParameter; Request ID: 2f24bcbb-1b66-589f

How to send Push Notifications to test iOS PushKit integration online?

♀尐吖头ヾ 提交于 2019-12-14 00:17:15
问题 I have implemented PushKit. Now I want to get Push notifications. Is there nay way to get Push Notifications online as we have many online APNS services which accepts device tokens and .pem file to send remote notifications? 回答1: You can create your own php file. Source https://github.com/hasyapanchasara/PushKit_SilentPushNotification Use below structure to achieve your task. Use this simplepush.php file <?php // Put your device token here (without spaces): $deviceToken = '1234567890123456789

iOS send request directly to APNS without server

微笑、不失礼 提交于 2019-12-13 19:21:10
问题 On Android, to send a notification all you need to know is GCM id of a device you want to notify. Assuming my user knows the id of another user, he sends a message directly to GCM server, what decreases the load on my server. I don't have experience building iOS apps, so I want to know if the same approach is possible for iOS devices. If my user knows id of another apple device, can he send a request directly to APNS? 回答1: Sending a push is just a matter of posting data to apple servers. You