apns

Xcode8下快速集成极光推送并兼顾iOS10

北战南征 提交于 2019-12-03 16:42:06
前言 iOS10下,远程推送发生了变化,新增的 UserNotifications.framework 将本地推送和远程推送整合在一起。 最近刚刚更新了Xcode8,自动创建证书和配置文件确实方便许多。琰君分享下以开发环境为例(非生产环境)在Xcode8下,快速集成极光推送并兼顾iOS10。 注意:极光推送的远程推送是免费的,但相应的用户统计,终端统计等功能是不免费。如果你需要用户统计,终端统计这些功能意味着需要付费才能使用。 参考链接 开发证书配置 APNs 推送原理及问题 iOS 推送全解析,你不可不知的所有 Tips! 接下来假设你都了解证书相关的,推送的一些概念和极光推送的知识。那么相信你应该知道需要一台iOS设备和一个苹果开发者帐号才能去体验远程推送。如果你清楚远程推送的原理,那可以直接从以下第2步开始。 集成步骤 远程推送原理 Xcode8创建项目,配置自动创建 App ID / 证书 / 配置文件 创建APNs 推送证书 在极光推送后台创建应用,并上传APNs 推送证书 项目中集成极光推送SDK 获取 APNs(通知) 推送内容 极光推送后台发送远程推送测试 1. 远程推送原理 当iOS设备联网的情况下,苹果服务器和iOS设备建立了一个长链接,即便应用处于挂起和后台的状态,苹果可以给iOS设备中的应用发送通知。 远程推送原理 概念 iOS:iOS设备 APNS

iOS APNS Cert about to Expire (Firebase for Server Side)

匿名 (未验证) 提交于 2019-12-03 08:44:33
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an APNS certificate that is set to expire in Jan 2017 on a live application. I have renewed the certificate and created my .cer and .p12 files. I am using Firebase Cloud Messaging to handle my push notifications. If I add the new .p12 file to the firebase console now, will that overwrite the current one and break push notifications on the live app? If so how do I manage a seamless transition to the new certificates? Do I just wait until the new app is live in the app store and then upload the .p12 ? Thanks, 回答1: If the New push

iPhone certificate error in apns sharp A call to SSPI failed

匿名 (未验证) 提交于 2019-12-03 03:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: i have a data service hosted in azure from which i am sending notification to iphone but while establishing connection with apns i am getting following error "A call to SSPI failed. The message received was unexpected or badly formatted." i also refered following links for the same error but still getting the error apple push notification with APNS sharp and C# iPhone push server? try { using (TcpClient client = new TcpClient()) { try { client.Connect("gateway.sandbox.push.apple.com", 2195); Logging("TSSLProDi :Connected to Apple"); } catch

iOS APNS: sending the device token to the provider in string format

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need to send the APNS device token of my iOS app to my provider by calling a service that expects JSON data in my request. I'm reading Apple's Local and Push Notification Programming Guide and it only says that the application:didRegisterForRemoteNotificationsWithDeviceToken: delegate method passes the device token as NSData and you should pass it to your provider encoded in binary data. But I need it to be converted to string in order to be able to send a JSON request to my provider. I've also been reading several posts related to this,

How to generate valid APNS Certificate (.p12) for use in GCM for iOS?

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying Google Cloud Messaging sample app for iOS platform. https://developers.google.com/cloud-messaging/ios/start To generate GoogleServices-Info.plist APNS development and production certificates are needed (PKCS#12 file format). I have created .p12 file in MAC KeyChain Access (bundling both APNS dev certificate and private key). But when uploading the .p12 file, it says it is not in valid format (The certificate must be a valid PKCS12 file). 回答1: Here's my solution, without the terminal ! delete your actual certificate ( in Keychain

APNS (Apple Push Notification Service) reliability

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Our app uses APNS to receive Push Notifications. However, our client claims that some of their devices were not receiving notifications and argues to they 'must' make sure the notifications to be delivered 100%. But I have read somewhere that APNS is not 100% reliable and there should be cases which the notifications are not delivered. I'm currently panic at how we could make sure APNS to received anytime. I have read that a case which may APNS not delivered (device may offline). But our test showing that even the device is online

Read APNs in Android 4.2?

匿名 (未验证) 提交于 2019-12-03 02:24:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a problem reading APNs in Android v4.2 (Yes reading, not writing APNS) , it is throwing a security exception: No permission to write APN settings: Neither user 10068 nor current process has android.permission.WRITE_APN_SETTINGS. Same code used to work on all previous platforms, does anyone know of any work around to this? Thanks! 回答1: This appears to be an intentional change. The git commit where they added this defense includes the following comment: Since the DB may contain corp passwords, we should secure it. Using the same

SSL error while implementing Apple Push Notification

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to implement Apple Push Notification using python and django. i am using following library to implement it http://leepa.github.com/django-iphone-push/ Here is my code that create that send the message from django.http import HttpResponse from django.utils import simplejson import json from push.models import iPhone def SendMessage(request,data): t = iPhone('XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX ') # 64 digit token t.send_message("hi") # at this line i am getting ERROR return HttpResponse(data,mimetype='application

Couldn't able to connect to APNS Sandbox server

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to connect to Apple APNS server with the following observations: 1)port 2195 is open 2)With Valid key passphrase for APNS_SSLCertificate_Key.pem 3)Entrust certificate (2048) downloaded from https://www.entrust.net/downloads/binary/entrust_ssl_ca.cer 4)With the successful telnet response as below : $ telnet gateway.sandbox.push.apple.com 2195 Trying 17.172.232.226... Connected to gateway.sandbox.push-apple.com.akadns.net. Escape character is '^]'. But when i run the following openssl command in my server to test the APNS

apns http2 api not returning status 410 after uninstalling app

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Im using apns with http2 protocol for sending pushnotifications, the code i use is similar to this post: https://stackoverflow.com/a/34831873/1546652 When my app is correctly installed the apns http2 api works ok while sending messages, my reponse is something of the style : {"response":"","httpcode":200} The problem is that when i uninstall the app and send a pushnotification to the invalid registrationId i dont receive status 410 nor the response "reason:Unregistered" and still receive a true response with status 200. How can i