apple-push-notifications

APN (Apple Push Notification) payload size limit

冷暖自知 提交于 2019-11-27 11:20:16
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. I tested it and larger that 256 bytes works, but documentation said it shouldn't. Can someone confirm

generate MDM certificate

不想你离开。 提交于 2019-11-27 11:09:30
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. User97693321 To MDM capabilities of iOS you need to get MDM certificate using your Enterprise developer account.The generated APNS certificate for MDM will be used as MDM certificate.You can get more details in third party MDM vendors site about how to

How can I generate pem file for push notifications in iphone?

青春壹個敷衍的年華 提交于 2019-11-27 10:59:48
问题 Using this link for generate pem file for push notification, but I can't understand following steps... Installing the SSL Certificate and Key on the Server You should install the SSL distribution certificate and private cryptographic key you obtained earlier on the server computer on which the provider code runs and from which it connects with the sandbox or production versions of APNs. To do so, complete the following steps: Open Keychain Access utility and click the My Certificates category

How to write an Apple Push Notification Provider in C#?

梦想与她 提交于 2019-11-27 10:32:26
Apple really had bad documentation about how the provider connects and communicates to their service (at the time of writing - 2009). I am confused about the protocol. How is this done in C#? shader Working code example: int port = 2195; String hostname = "gateway.sandbox.push.apple.com"; //load certificate string certificatePath = @"cert.p12"; string certificatePassword = ""; X509Certificate2 clientCertificate = new X509Certificate2(certificatePath, certificatePassword); X509Certificate2Collection certificatesCollection = new X509Certificate2Collection(clientCertificate); TcpClient client =

Silent push notifications only delivered if device is charging and/or app is foreground

ぐ巨炮叔叔 提交于 2019-11-27 10:21:25
I have implemented silent push notifications but I have noticed some strange behaviour. The silent push notifications are handled via: - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler The silent push messages only seem to be received if the device is charging (ie cable connected) and/or if my app is foreground. If I disconnect the device from the charger (or Mac) then the silent push notifications are no longer received unless the app is foreground. I get non-silent

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

折月煮酒 提交于 2019-11-27 10:15:16
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? notnoop You can implement application:didReceiveRemoteNotification: Here is a possible sample code: - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { NSString *message = nil; id alert = [userInfo objectForKey:@

Firebase causes issue “Missing Push Notification Entitlement” after delivery to itunes connect

风格不统一 提交于 2019-11-27 09:58:40
问题 As you may be aware, Google starts to use Firebase as analytics so I want to use it in my current project. I succesfully finished the implementation and upload project to iTunes Connect. But I got mail below. I do not want to use push notificaiton option of Firebase but its included in SDK. Do I need to remove it?how? Will it cause to get rejection from review? Dear developer, We have discovered one or more issues with your recent delivery for "Instant Baby Dream". Your delivery was

Controlling which view controller loads after receiving a push notification in SWIFT

半世苍凉 提交于 2019-11-27 09:52:04
问题 Once I receive a push notification and swipe to open it, it just opens my app and not the VC I want. So my question is how do I load the VC I want? I know if the app is open I would move the VC over to another inside the didReceiveRemoteNotification but how do I do it if the app isn't open? or if it is in background mode? Also I have TWO different push notifications, so therefore I need it to move ONE of TWO different VCs. How can I tell the difference between different push notifactions?

Apple Push Notification Service

让人想犯罪 __ 提交于 2019-11-27 09:47:36
问题 i tried to run using local mac machine but go the following errors Warning: stream_socket_client() [function.stream-socket-client]: Unable to set private key file `/Applications/XAMPP/xamppfiles/htdocs/apns/apns-dev.pem’ in /Applications/XAMPP/xamppfiles/htdocs/apns/apns.php on line 9 Warning: stream_socket_client() [function.stream-socket-client]: failed to create an SSL handle in /Applications/XAMPP/xamppfiles/htdocs/apns/apns.php on line 9 Warning: stream_socket_client() [function.stream

Alternative to UserNotificationCenterDelegate's willPresent when app is in background

南楼画角 提交于 2019-11-27 09:37:20
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. Of course, if the app only works in the foreground, this functionality is very limited. I would want