apple-push-notifications

Firebase: Cannot upload production APNs certificate

ε祈祈猫儿з 提交于 2019-11-26 16:11:07
问题 I am currently testing an app in TestFlight and need a production APNs certificate in order to test Notifications in Firebase. I have followed all of the steps in this video and successfully configured the development APNs certificate: https://www.youtube.com/watch?v=LBw5tuTvKd4 I've also checked that my steps following the Firebase support guide. Although I note that the Apple Developer site has changed slightly since this guide was written: https://firebase.google.com/docs/cloud-messaging

IP Address ranges for APNS servers? [closed]

左心房为你撑大大i 提交于 2019-11-26 16:02:23
问题 Does anyone have a complete list of all IP addresses used by the Apple Push Notification Service? I know that Apple uses a content delivery network to spread out these requests, and DNS lookups will return servers close to the requestor's location - the problem I have is in locating all of these servers that handle content for the United States. For example: $ nslookup gateway.push.apple.com Non-authoritative answer: canonical name = gateway.push-apple.com.akadns.net. Address: 17.172.238.216

APN (Apple Push Notification) payload size limit

醉酒当歌 提交于 2019-11-26 15:31:45
问题 In official documentation you can find the info: Each push notification includes a payload. The payload contains information about how the system should alert the user as well as any custom data you provide. The maximum size allowed for a notification payload is 256 bytes ; Apple Push Notification Service refuses any notification that exceeds this limit. However in WWDC 14 we can see this screenshot: I wonder if there is any official Apple statement about the size limit of push notification.

generate MDM certificate

£可爱£侵袭症+ 提交于 2019-11-26 15:28:16
问题 I am new to iOS development. I have to create MDM certificate for utilize default iOS MDM capabilities. I have gone through the documents ,how to generate APNS certificate for MDM Server,but I am not getting clear idea how to generate MDM Certificate which can be used to provide MDM service for all the devices registered with the MDM server. 回答1: To MDM capabilities of iOS you need to get MDM certificate using your Enterprise developer account.The generated APNS certificate for MDM will be

How to handle push notifications if the application is already running?

不想你离开。 提交于 2019-11-26 15:05:59
问题 How do we handle push notifications if the application is already running ? I want to show an alert if the application is running (instead of a push notification alert). Only if the application is not running, then show a push notification alert. Also, if I send a payload to APNs, how can I create an alert with a cancel button? 回答1: You can implement application:didReceiveRemoteNotification: Here is a possible sample code: - (void)application:(UIApplication *)application

Alternative to UserNotificationCenterDelegate's willPresent when app is in background

走远了吗. 提交于 2019-11-26 14:49:16
问题 I am trying to figure out whether I can accomplish my goal through Local Notifications, or whether I need to switch to Remote Notifications. I'm practicing iOS 10 / Swift 3 by building an alarm program that plays the latest episode of a RSS-updated radio show at a set time of day. When the app is in the foreground, this is easy to execute through UNUserNotificationCenterDelegate's willPresent function. I just use willPresent to fetch the latest episode, and play it through an AVAudio Player.

“verify error:num=20” when connecting to gateway.sandbox.push.apple.com

☆樱花仙子☆ 提交于 2019-11-26 14:15:29
I am attempting to run the Ray Wenderlich tutorial found at Apple Push Notification Services in iOS 6 Tutorial: Part 1/2 . I created an AppID and SSL certificate and keys and PEM files in a local directory. Afterwards, I got to the step to test whether the certificate works, and I invoked the following command from this local directory: $ openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert PushChatCert.pem -key PushChatKey.pem This produced a lot of output. In the middle of the output was the following: verify error:num=20:unable to get local issuer certificate verify return:0

Displaying a stock iOS notification banner when your app is open and in the foreground?

痞子三分冷 提交于 2019-11-26 14:09:42
When Apple's official iOS Messages app is open and in the foreground, new messages from other contacts trigger a stock, native iOS notification alert banner. See image below. Is this possible in 3rd party apps on the App Store? Local and/or Push Notifications for your app while your app is open and in the foreground ? When testing my app , notifications are received but no iOS alert UI is shown . But this behavior is seen in Apple's official Messages app: The Local and Remote Notification Programming Guide says: When the operating system delivers a local notification or remote notification and

application:didReceiveRemoteNotification:fetchCompletionHandler Not Called

狂风中的少年 提交于 2019-11-26 13:47:33
问题 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? 回答1: application

registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later

被刻印的时光 ゝ 提交于 2019-11-26 12:49:24
问题 When trying to register for push notifications under iOS 8.x: application.registerForRemoteNotificationTypes(UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound) I get the following error: registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later. Any ideas what is the new way of doing it? It does work when I run this Swift app on iOS 7.x. EDIT On iOS 7.x when I include the conditional code I get (either SystemVersion conditional or