Tag: 苹果推通知

didRegisterForRemoteNotificationsWithDeviceToken何时被调用?

关于didRegisterForRemoteNotificationsWithDeviceToken有很多问题,但他们都回避了一个非常直接的问题,我似乎无法find确切的答案。 对于以其他方式正确设置通知并具有适当networking连接的应用程序:什么时候调用了RegistryRemoteNotificationsWithDeviceToken? 一些可能的select可能是: 每次应用程序启动 只有在初始提示后才能接受推送通知 别的东西?

推送通知不发送到某些设备

我在推送通知服务中有一个非常奇怪的行为。 我正在20个设备上testing一个新的应用程序,但是我有3个设备没有收到任何推送通知。 我有我自己的服务器在这里pipe理推订阅,在这个服务我有这些设备的令牌。 但奇怪的是,我使用相同的服务发送推送通知到我build立的其他应用程序,它工作得很好。 而且我也可以向你保证,这些设备的推送通知设置启用此应用程序。 我没有任何想法是什么问题。 我已经为这些应用程序生成了一个新的推送证书,我将debugging放置在服务器上,以确保推送通知已成功发送到苹果。 但是,如果同一应用程序在其他设备上收到推送通知,为什么它不适用于这些特定的设备。 每个想法都欢迎。 谢谢。

如何将iOS徽章通知颜色从默认红色更改为其他颜色?

默认的APNS允许一个数字(徽章)出现在我们的应用程序图标顶部的红色背景中,以表明有新的通知。 有没有办法将红色背景更改为基于后端服务器输出的其他颜色?

Apple推送通知不在共享服务器上工作

我想从PHP脚本发送APN(Apple推送通知)。 我的PHP脚本工作正常,我收到通知在iphone设备以及从本地主机发送时,但是当我上传相同的脚本具有相同的.pem文件到shared server它返回错误… Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.push.apple.com:2195 (Connection refused) in /mypath/SendPushNotification.php on line 28 Failed to connect: 111 Connection refused 从某些来源,我知道发送APN端口2195必须打开这是共享服务器计划中不可能的。 所以我尝试使用专用服务器,它的工作完美,我收到设备上的通知。 我努力寻找共享服务器的解决scheme,但没有find任何解决scheme。 我的问题:是否有可能发送APN而不从共享服务器打开端口2195? 如果是给一些指导。

推送通知 – 抓住他们?

好吧,这是交易。 我的应用程序正在使用iOS通知。 在应用程序委托我赶上他们在didReceiveRemoteNotification如果应用程序在前台,我抓住它在didBecomeActive如果应用程序在后台 ,我点击推送通知。 然而! 如果我的应用程序是在后台 ,我收到推送通知,如果我不点击推送通知(或只是“取消”在iOS中less于5.0),并打开应用程序在说,几分钟,我无法弄清楚我如何find这个推送通知。 有什么build议么? 谢谢!

亚马逊SNS(推送通知)不会发送到IOS应用程序

最近应用程序无法收到通知,android方面工作正常,但ios一个失败 所以这里是我所尝试的: 1) generate token from apple apn service 2) create the endpoint at amazon backend 3) publish the message at amazon backend 4) it does not receive message and the endpoint will go to disabled after a while. 我已经检查了以下内容: 1) try serveal ios device , including iphone/ ipad/ipod touch also the same result 2) […]

什么是使用APN推送服务时的“keyID”

通常有3个信息我需要提供,使用苹果APNs: key, keyId, teamId ,就像这里 。 我明白key (笔文件位置)和teamId ,但我在哪里可以findkeyId ? 这是在https://developer.apple.com某处吗? 这是包ID吗?

通过php脚本发送iOS通知:“无法设置私钥文件”

我已经使用众所周知的Ray Wanderlich 教程中的php脚本在开发阶段发送推送通知。 在创buildpem文件(来自p12和aps_development.cer文件)之后,它们被正确触发,并在php脚本中提到了设备标记。 但是,当我使用生产p12和aps_production.cer文件的pem文件时,通知甚至不能到达APNS服务器。 它在本地服务器端本身显示下面的错误。 Unable to set private key file `/Users/administrator/Desktop/SimplePush/ck.pem' in /Users/administrator/Desktop/SimplePush/simplepush.php on line 22 Warning: stream_socket_client(): failed to create an SSL handle in /Users/administrator/Desktop/SimplePush/simplepush.php on line 22 Warning: stream_socket_client(): Failed to enable crypto in /Users/administrator/Desktop/SimplePush/simplepush.php on line 22 Warning: stream_socket_client(): unable to connect to ssl://gateway.push.apple.com:2195 (Unknown error) in /Users/administrator/Desktop/SimplePush/simplepush.php on line […]

如何从iOS AppDelegate调用视图控制器函数?

我正在接收来自远程推送通知的呼叫,其中包含要显示的图像的path。 AppDelegate是: func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) { // get url from notification payload (shortened version) let url = alert["imgurl"] as? NSString let vc = ViewController() vc.loadImage(url as String) // cannot find the imageView inside } …视图看起来像这样: func loadImage(url:String) { downloadImage(url, imgView: self.poolImage) } // http://stackoverflow.com/a/28942299/1011227 func getDataFromUrl(url:String, completion: ((data: NSData?) -> […]

失去互联网访问后推送通知会发生什么?

如果应用程序正在等待推送通知并且无法连接到互联网,会发生什么情况? 例如,我告诉服务器执行任务“A”,并在任务准备就绪时通过APNS通知我。 但是,在将任务发送到服务器之后,应用程序将失去互联网连接。