最新消息:20210917 已从crifan.com换到crifan.org

[已解决]JPUSH开发环境的离线推送不工作

iOS crifan 1923浏览 0评论

后来去试了试,确定是换了Bundle ID后,JPUSH的开发环境的推送都不工作了。然后去找原因。

参考了之前的设置:

发现此处,Identities in Keychain中,没有develop的push service可选:

但是其实此处的keychain是有push services的:

但是Xcode中,却没法选择

搜:

xcode code signing identity not showing

XCode doesn’t honor the "iOS Distribution" Code Signing Entity setting – Stack Overflow

ios – Distribution Profile not showing under Code Signing Identity BUT shows up in Accounts – Stack Overflow

让删除了重新创建

xcode5 – iPhone Developer Code Signing Identity not showing up for iOS 7 – Stack Overflow

ios – Code Signing not showing Provisioning Profile – Xcode 5.1. – Stack Overflow

确认此处选择了All,而不是Basic,结果也不出现:

搜:

Identities in Keychain not show iOS Push Services

Identities in Keychain not show Push 

然后删除KeyChain中的,

重新双击对应的:

aps_im.jiandao.app_development_larry.cer

aps_im.jiandao.app_production_larry.cer

而导入到KeyChain中:

然后终于在Code Signing-》Code Signing identity-》Debug中可以看到对应的:

Apple Development iOS Push Services:im.jiandao.app

了:

然后设置先只去设置开发环境的:

Code Signing identity

Provisioning Profile

但是还是输出:

2016-04-10 13:28:01.111 | JPUSH | W – [JPUSHClientController] Not get deviceToken yet. Maybe: your certificate not configured APNs? or current network is not so good so APNs registration failed?  or there is no APNs register code? Please refer to JPush docs.

推送还是不成功

JPUSH 开发环境 无法推送

而之前通过JPUSH服务器后台手动推送开发环境的消息,是OK的:

所以现在是:

官网控制台中,通过设置alias推送,设备是可以收到推送的

但是通过API收不到推送

JPUSH 开发环境 无法推送 单独发送可以收到

JPUSH 开发环境 收不到推送

IOS推送开发环境收不到 – 极光推送问答

Ios 收不到推送 – 技术问题 / JPush – 极光社区

收不到消息标签最近问题 – 极光推送问答

开发环境收不到通知标签最近问题 – 极光推送问答

现在,根据:

iOS SDK 教程 – 极光文档

此处已经满足了一些条件了:

1.App 是开发环境打包(开发证书 Development):

2.上传了开发证书并验证通过

3.Portal 上的应用设置为开发环境

4.JPUSH上的Bundle ID和Xcode(以及Apple Member Center)中一致:

5.Xcode中,Run时候选择的是Debug模式

(注意:我之前是为了发布改为Release了,记得要改回来)

5.代码中和网站上的appkey也一致,环境设置也一样:

let JpushAppKey:String      = "54ab761c3b571e2cf7dcdb47"
let JpushChannel:String    = "iOS-AppStore"
let JpushIsProduction:Bool  = false

但是还是不行

bundle id都一致

code signing中都设置好了

是iPhone真机,而非iOS模拟器

手机中也是允许通知的:

此处,也可以打印出device token:

2016-04-11 10:15:03.689 [Debug] [main] [AppDelegate.swift:116] application(_:didRegisterForRemoteNotificationsWithDeviceToken:) > deviceToken=<774e0e7d ffd0c6f1 54a348bd 27d588ca 0beb7be1 d7cb7230 d4288d07 afe3f55c>

去搜:

JPUSH 开发环境 Not get deviceToken yet

not get devicetoken yet – 极光推送问答

push证书都是绿灯的但提示Not get deviceToken yet. | iOS开发 – CocoaChina CocoaChina_让移动开发更简单

官网文档解释的很全:

iOS 常见问题 – 极光推送开发 – JPush 开发文档

-》常见问题 – 极光文档

但是我都符合条件了,不知道为何还是无法收到推送

但是:通过alias单独推送,设备是可以收到的。

licrifandeMacBook-Pro:~ crifan$ telnet 1-courier.push.apple.com 5223
Trying 17.252.236.62…
Connected to asia-courier.push-apple.com.akadns.net.
Escape character is ‘^]’.
^]
telnet> quit
Connection closed.
licrifandeMacBook-Pro:~ crifan$ 

Not get deviceToken yet极光推送出错 – David的专栏 – 博客频道 – CSDN.NET

此处app也已经添加了Push Notifications的权限了:

其实,此处:

虽然是:

log输出中输出:

2016-04-11 11:10:54.386 | JPUSH | W – [JPUSHClientController] Not get deviceToken yet. Maybe: your certificate not configured APNs? or current network is not so good so APNs registration failed?  or there is no APNs register code? Please refer to JPush docs.

但是实际上,远程推送,是可以工作的。。。

远程发送消息,设备端是可以收到消息的:

转载请注明:在路上 » [已解决]JPUSH开发环境的离线推送不工作

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
93 queries in 0.197 seconds, using 23.46MB memory