JPush React-Native APNS的token失败

GitBiao
5年前 544 1

使用github的example项目成功获取 device toke并成功推送
集成后,没有获取成功token
本项目与example的react-native版本一致 为 0.60.5
比对集成需要注意的地方,应该没有遗漏
appkey:3447269d794c5fc41c367bc2
项目集成了JMessage React-Native + JPUSH React-Native
jmessage-react-plugin": "^3.1.7
jpush-react-native": "^2.7.5
测试机型 iphone6 plus ios 12.4
iphoneX ios 13.1
ipad mini5 ipados 13.2

已查询过社区的获取devicetoken的解决方案并全部尝试
https://community.jiguang.cn/article/56461 一问的方案中
0、xcode11 PUSH notification无需打开
1、pushconfig -- react-native的appkey在AppDelegate.m中设置,未看到pushconfig--代码如下

[JPUSHService setupWithOption:launchOptions appKey:@"3447269d794c5fc41c367bc2"
                        channel:@"dev" apsForProduction:YES];

2、bundle核查完毕,id一致
3、provisions profile是我的文件
4、手机通知设置允许app发送通知
5、代码中未存在其他使用devicetoken 的内容
6、公司直接接通的公网,且尝试过蜂窝移动网络
7、尝试切换过两台ios设备,同样不可
8、无unity
9、测试环境和生产环境均不可

日志内容 : Not get deviceToken yet

2020-03-25 15:08:57.778250+0800 peachWork[402:22556] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
2020-03-25 15:08:57.782791+0800 peachWork[402:22776]  | JIGUANG | I - [JIGUANGService] 
--------------------------- JPush Log ----------------------------
--------------------JPush SDK Version:3.2.8--build:106----------
--------------------JCore Lib Version:2.1.8--build:101----------
-----------------AppKey:3447269d794c5fc41c367bc2----------------
----------------------------------------------------------------
2020-03-25 15:08:57.786646+0800 peachWork[402:22774]  | JIGUANG | DD - [JIGUANGUtilities] idfa version
2020-03-25 15:08:57.832236+0800 peachWork[402:22764]  | JIGUANG | E - [JIGUANGConfigController] advertisingIdentifier无效,将不上报advertisingIdentifier值。请检查'启动SDK方法'中的参数值,或者是否限制广告跟踪
2020-03-25 15:08:57.843244+0800 peachWork[402:22775]  | JIGUANG | I - [JIGUANGConnectManager] Action - closeConection
2020-03-25 15:08:57.845542+0800 peachWork[402:22775]  | JIGUANG | D - [JIGUANGHelper] +[JPUSHHelper postNotification:withUserInfo:] name: kJPFNetworkIsConnectingNotification (null)
2020-03-25 15:08:57.846406+0800 peachWork[402:22775]  | JIGUANG | D - [JIGUANGSisManager] Action - isSisOnProtect
2020-03-25 15:08:57.846886+0800 peachWork[402:22775]  | JIGUANG | D - [JIGUANGSisManager] sis is not on protect
2020-03-25 15:08:57.849475+0800 peachWork[402:22768]  | JIGUANG | I - [JIGUANGClientController] Action - jpush setup
2020-03-25 15:08:58.006908+0800 peachWork[402:22779] [NetworkInfo] Signal strength query returned error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied", descriptor: <CTServiceDescriptor 0x2812df720, domain=1, instance=1>
2020-03-25 15:08:58.011198+0800 peachWork[402:22764]  | JIGUANG | D - [JIGUANGUdpSocket] send udp data
2020-03-25 15:08:58.012236+0800 peachWork[402:22764]  | JIGUANG | D - [JIGUANGUdpSocket] send udp data succeed
2020-03-25 15:08:58.012599+0800 peachWork[402:22764]  | JIGUANG | D - [JIGUANGUdpSocket] udp socket begin send behavior
2020-03-25 15:08:58.083115+0800 peachWork[402:22764]  | JIGUANG | DD - [JIGUANGSdkController] sdk info not change
2020-03-25 15:08:58.403 [info][tid:main][RCTCxxBridge.mm:236] Initializing <RCTCxxBridge: 0x123d0d1f0> (parent: <RCTBridge: 0x2839c31e0>, executor: (null))
2020-03-25 15:08:58.406202+0800 peachWork[402:22556] Initializing <RCTCxxBridge: 0x123d0d1f0> (parent: <RCTBridge: 0x2839c31e0>, executor: (null))
2020-03-25 15:08:58.515 [warn][tid:main][RCTModuleData.mm:67] Module RCTJMessageModule requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
2020-03-25 15:08:58.514765+0800 peachWork[402:22556] Module RCTJMessageModule requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
2020-03-25 15:08:58.516 [warn][tid:main][RCTModuleData.mm:67] Module AudioRecorderManager requires main queue setup since it overrides `constantsToExport` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
2020-03-25 15:08:58.516538+0800 peachWork[402:22556] Module AudioRecorderManager requires main queue setup since it overrides `constantsToExport` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
2020-03-25 15:08:58.527 [info][tid:main][RCTRootView.m:293] Running application peachWork ({
    initialProps =     {
    };
    rootTag = 1;
})
2020-03-25 15:08:58.526971+0800 peachWork[402:22556] Running application peachWork ({
    initialProps =     {
    };
    rootTag = 1;
})
2020-03-25 15:08:58.539992+0800 peachWork[402:22782]  | JIGUANG | W - [JIGUANGService] 请将JPush的初始化方法,添加到[UIApplication application: didFinishLaunchingWithOptions:]方法中,否则JPush将不能准确的统计到通知的点击数量。参考文档:https://docs.jiguang.cn/jpush/client/iOS/ios_guide_new/#_6
2020-03-25 15:08:58.610088+0800 peachWork[402:22764]  | JIGUANG | DD - [JIGUANGLocationController] locationManager didChangeAuthorizationStatus:0
2020-03-25 15:08:59.855158+0800 peachWork[402:22782]  | JIGUANG | W - [JIGUANGDeviceTokenController] Not get deviceToken yet. After successful login, a custom message can be sent, but the APNs notification cannot. Until the deviceToken is obtained and reported successfully, the APNs notification can be used normally.
2020-03-25 15:09:00.021093+0800 peachWork[402:22779] [NetworkInfo] Signal strength query returned error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied", descriptor: <CTServiceDescriptor 0x2812ef900, domain=1, instance=1>
2020-03-25 15:09:00.031853+0800 peachWork[402:22774]  | JIGUANG | D - [JIGUANGUdpSocket] send udp data
2020-03-25 15:09:00.032932+0800 peachWork[402:22774]  | JIGUANG | D - [JIGUANGUdpSocket] send udp data succeed
2020-03-25 15:09:00.033492+0800 peachWork[402:22774]  | JIGUANG | D - [JIGUANGUdpSocket] udp socket begin send behavior
2020-03-25 15:09:00.038728+0800 peachWork[402:22774]  | JIGUANG | D - [JIGUANGUdpSis] Action - parse
2020-03-25 15:09:00.117487+0800 peachWork[402:22782]  | JIGUANG | D - [JIGUANGUdpSocket] close udp socket
2020-03-25 15:09:00.120708+0800 peachWork[402:22782]  | JIGUANG | D - [JIGUANGUdpSocket] close udp socket
2020-03-25 15:09:00.127132+0800 peachWork[402:22779] [NetworkInfo] Signal strength query returned error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied", descriptor: <CTServiceDescriptor 0x2812ebde0, domain=1, instance=1>
2020-03-25 15:09:00.134446+0800 peachWork[402:22779] [NetworkInfo] Signal strength query returned error: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied", descriptor: <CTServiceDescriptor 0x2812eb120, domain=1, instance=1>
2020-03-25 15:09:00.171267+0800 peachWork[402:22764]  | JIGUANG | D - [JIGUANGTcpSocket] 连接主机成功
2020-03-25 15:09:00.175015+0800 peachWork[402:22764]  | JIGUANG | D - [JIGUANGHelper] +[JPUSHHelper postNotification:withUserInfo:] name: kJPUSHNetworkDidSetupNotification (null)
2020-03-25 15:09:00.179273+0800 peachWork[402:22764]  | JIGUANG | D - [JIGUANGTcpChannelController] Action - doSendTcpRequest
2020-03-25 15:09:00.191714+0800 peachWork[402:22764]  | JIGUANG | D - [JIGUANGClientInfo] current login flag is:login
2020-03-25 15:09:00.413293+0800 peachWork[402:22764]  | JIGUANG | I - [JIGUANGTcpEventController] 
----- login result -----
uid:37807817386 
registrationID:1a1018970a3842e5817 
idc:1
2020-03-25 15:09:00.414385+0800 peachWork[402:22764]  | JIGUANG | D - [JMSGReceiver] Action - p_didJPushDidLoginNotification:
2020-03-25 15:09:00.416616+0800 peachWork[402:22764]  | JIGUANG | D - [JMessage] Action - init - JMessage
2020-03-25 15:09:00.424169+0800 peachWork[402:22764]  | JIGUANG | D - [JIGUANGHelper] +[JPUSHHelper postNotification:withUserInfo:] name: kJPUSHNetworkDidLoginNotification {
    time = 1585120140;
    version = 1;
}

1个回答

热门排序
gptbots-widget