apple-push-notifications

Missing Push Notification Entitlement

℡╲_俬逩灬. 提交于 2019-11-26 03:50:02
问题 I have an app for submission when it got rejected and I got the message Missing Push Notification Entitlement - Your app appears 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 provisioning profile that

Does the APNS device token ever change, once created?

喜你入骨 提交于 2019-11-26 03:26:00
问题 Once created does the push notification device token ever change? Example when the app is updated? or in any other case it can change?? 回答1: From [Apple Documentation ApplePushService]2 The form of this phase of token trust ensures that only APNs generates the token which it will later honor, and it can assure itself that a token handed to it by a device is the same token that it previously provisioned for that particular device—and only for that device. If the user restores backup data to a

Update badge with push notification while app in background

旧巷老猫 提交于 2019-11-26 02:56:21
问题 I have got push notification working and managed to update icon badge count when app is brought to foreground. I am a bit confused about this though...the iPhone receives the notification and the pop up message appears to activate my app, and the badge only updates after me starting the app. This does not sound right in terms of user experience. My understanding is that the badge count should notify the user of what needs action, through incremented count, but this doe not happen until a

Detect if the app was launched/opened from a push notification

試著忘記壹切 提交于 2019-11-26 02:28:30
问题 Is it possible to know if the app was launched/opened from a push notification? I guess the launching event can be caught here: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { if (launchOptions != nil) { // Launched from push notification NSDictionary *notification = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; } } However, how can I detect it was opened from a push notification when the app was in

iOS application: how to clear notifications?

感情迁移 提交于 2019-11-26 02:16:28
问题 I\'ve an iOS application where some Push Notification are sent to. My problem is, that the messages/notifications stays in the Notification Center in iOS after then are tapped. How can I remove a notification for my application in the Notification Center next time the application opens? I came across posts where people are calling setApplicationIconBadgeNumber to a zero-value to clear the notifications. That\'s seems very weird to me, so I believe that maybe another solution exists? EDIT1: I\

Determine on iPhone if user has enabled push notifications

人盡茶涼 提交于 2019-11-26 01:51:01
问题 I\'m looking for a way to determine if the user has, via settings, enabled or disabled their push notifications for my application. 回答1: Call enabledRemoteNotificationsTypes and check the mask. For example: UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; if (types == UIRemoteNotificationTypeNone) // blah blah blah iOS8 and above: [[UIApplication sharedApplication] isRegisteredForRemoteNotifications] 回答2: quantumpotato's issue: Where types

This certificate has an invalid issuer Apple Push Services

余生长醉 提交于 2019-11-26 01:35:03
问题 I have created certificate to enable Push Services in my app, but every time I try to add certificate in my Keychain, after adding certificate it shows me following error: This certificate has an invalid issuer 回答1: I think I've figured this one out. I imported the new WWDR Certificate that expires in 2023, but I was still getting problems building and my developer certificates were still showing the invalid issuer error. In keychain access, go to View -> Show Expired Certificates . Then in

What is Silent Push Notification? When does the device receive it?

我的未来我决定 提交于 2019-11-26 00:54:52
问题 I want to clear my local notification in notification tray. For this to be implemented, I am thinking to use the silent push notification. So I want to confirm when the device receives it and which things I can do with it? 回答1: They can be used to inform the application of new content without having the user informed. Instead of displaying a notification alert, the application will be awakened in background (iOS does not automatically launch your app if the user has force-quit it) and

Generate .pem file used to set up Apple Push Notifications

半世苍凉 提交于 2019-11-26 00:20:05
问题 I tried and tried to generate a .pem file, every time generating certificates from the client\'s account and then generating the .pem file using the terminal, but it\'s of no use. Can anyone give a step-by-step procedure? 回答1: To enable Push Notification for your iOS app, you will need to create and upload the Apple Push Notification Certificate (.pem file) to us so we will be able to connect to Apple Push Server on your behalf. ( Updated version with updated screen shots Here ) Step 1: Login

What is difference between remote notification and silent notification in iOS?

痞子三分冷 提交于 2019-11-25 23:46:22
问题 When I read Apple Docs, they mention 3 types of notification: local, remote, and silent. Local notification can be inferred from its name, that is sent by the app locally. However, what is the difference of the other two types? 回答1: EDIT: While this answer is fully applicable, there are some additions (not changes) to notifications in iOS 12. I highly recommend watching WWDC 2018: What’s New in User Notifications and see here. Main changes are: group notifications provisional notifications