apple-push-notifications

Ionic native push registration format changed?

和自甴很熟 提交于 2020-01-25 07:00:05
问题 I am not sure why but it seems that the interface for push registration changed? My app follows the logic from https://ionicframework.com/docs/v3/native/push/ with pushObject.on('registration').subscribe((registration: any) => console.log('Device registered', registration)); where registration used to be of below type export interface PushDevice{ registrationId: string; registrationType: string; } but now I am getting {"registrationId":"{length=32,bytes=0x459ca46ab66f4fe790220809215176d6..

Unable to load client certificate private key file

空扰寡人 提交于 2020-01-25 05:51:30
问题 I am unable to create Apple Push Notification cert files. When I test .pem files I get an error. openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert pushapp_cert_dev.pem -key pushapp_key_dev.pem will give an error: unable to load client certificate private key file 140735327015760:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: ANY PRIVATE KEY I am following these instructions: https://github.com/raix/push/wiki/iOS-Micro-Walkthrough pushapp_cert

Trigger a push notification from inside the app

China☆狼群 提交于 2020-01-24 00:28:08
问题 Is it possible to trigger a push notification from inside the app itself? I need to build a function that compares a remote file to a cached file and if there is any new content on the remote file it updates the cache and triggers a push notification from the app itself. I was wondering if this is possible? And if so how would I go about building it? Note: the cached file will be in JSON format. 回答1: To make this possible, you would have to permanently check for updates, which would drain the

Apple Push Message

强颜欢笑 提交于 2020-01-23 02:06:26
问题 I am integrating a Push Provider Server with the codes (php-apns) from google codes. Everything seems to be fine except the number of bytes per message. The number of bytes per payload should be maximum 256 characters. If some Chinse characters or UTF8 characters are sent. After JSON_enode, each character would occupy 6 bytes. Am I right ? So the maximum number of UTF8 characters in each push message is around 38. But ... Whatsapp (iPhone application) uses PUSH too, but it can push more

Apple Push Notifications in tvOS

雨燕双飞 提交于 2020-01-23 01:55:29
问题 Hi i am a newbie to tvOS. I have an TV application which is registered for APNS. But while i push a notification i am not able to get the notifications. i am getting the device token but not the notification. While i try with the Mobile Devices i am getting the notifications,But not in the tvOS why is it so...? How can i solve this..? let center = UNUserNotificationCenter.current() center.requestAuthorization(options: [.alert, .sound, .badge]) { (granted, error) in if granted == true { print(

Changing password on p12 file

陌路散爱 提交于 2020-01-22 08:51:09
问题 I was forwarded a p12 file from a client with the push cert. Can I change the password of this p12 file without any ramifications and if yes, can I use something like this: openssl pkcs12 -in Certificates.p12 -out temp.pem -passin pass: -passout pass:temppassword openssl pkcs12 -export -in temp.pem -out Certificates-final.p12 -passin pass:temppassword -passout pass:newpa­ssword rm -rf temp.pem I found this on this website here 回答1: There will be no problem. PFX is an encrypted container,

Get Apple's remote push notifications even after app terminates

倖福魔咒の 提交于 2020-01-20 08:18:27
问题 I am developing an iOS app which receives apple's remote push notifications at a particular time interval. The notifications are received successfully when app is active as well as when app is in background. But when app is terminated from app switcher/dock, notifications are not received until the app is started again. I have tried following code to keep app alive in background. This same code is implemented in applicationWillTerminate: method, but it did not work. __block

Get Apple's remote push notifications even after app terminates

孤街醉人 提交于 2020-01-20 08:18:05
问题 I am developing an iOS app which receives apple's remote push notifications at a particular time interval. The notifications are received successfully when app is active as well as when app is in background. But when app is terminated from app switcher/dock, notifications are not received until the app is started again. I have tried following code to keep app alive in background. This same code is implemented in applicationWillTerminate: method, but it did not work. __block

Send Apple Push Notifications via PHP (curl)

为君一笑 提交于 2020-01-16 22:13:05
问题 Tell me how to send a message by means of a push on the CURL php? This commitment does not work: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,'https://gateway.push.apple.com:2195'); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json")); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_SSLCERT,'1.pem'); curl_setopt($ch, CURLOPT

Send Apple Push Notifications via PHP (curl)

你。 提交于 2020-01-16 22:11:45
问题 Tell me how to send a message by means of a push on the CURL php? This commitment does not work: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,'https://gateway.push.apple.com:2195'); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json")); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_SSLCERT,'1.pem'); curl_setopt($ch, CURLOPT