jpush-phonegap-plugin ios端本地通知调用不生效

ios
第三方插件
jpush
标签: #<Tag:0x00007fb84daf2280> #<Tag:0x00007fb84daf2140> #<Tag:0x00007fb84daf1fd8>

( M) #1

使用jpush-phonegap-plugin插件版本3.6.1
xcode:9.2
证书极光后台上传了开发和生产证书

测试代码:

                               window.JPush.init();
				window.JPush.setDebugMode(true);
				
				if(window.JPush.isPlatformIOS()) {
				  // iOS
				  try{
				  	window.JPush.addLocalNotificationForIOS(
				  		0, 
				  		"JPush contrnt", 
				  		1, 
				  		"notiId1", 
				  		{data: "data"},
				  	);
				  	alert('suc')
				  }catch(e){
				  	alert(JSON.stringify(e))
				  }
				} else {
				  // Android
				}

( M) #2

调用后触发alert(‘suc’)


#3

看一下客户端日志信息,首先是你集成成功了没有


( M) #5

已经集成成功了,
这是部分日志:

[JIGUANGUdpSocket] close udp socket,info:
2019-01-08 11:57:33.333906+0800 房田网[8803:3969889]  | JIGUANG | D - [JIGUANGSessionController] current network, ipv4
2019-01-08 11:57:33.334219+0800 房田网[8803:3969889]  | JIGUANG | D - [JIGUANGSessionController] Action - connectTcp
2019-01-08 11:57:33.334535+0800 房田网[8803:3969889]  | JIGUANG | D - [JIGUANGSessionController] Action - connectTcpAddress:
2019-01-08 11:57:33.334865+0800 房田网[8803:3969889]  | JIGUANG | D - [JIGUANGSessionController] connectTcp:117.121.49.109:7010
2019-01-08 11:57:33.335210+0800 房田网[8803:3969891]  | JIGUANG | I - [JIGUANGSessionController] connecting with coreAddr 117.121.49.109,port 7010
2019-01-08 11:57:33.389350+0800 房田网[8803:3969890]  | JIGUANG | D - [JIGUANGTcpSocket] 连接主机成功
2019-01-08 11:57:33.389694+0800 房田网[8803:3969890]  | JIGUANG | D - [JIGUANGTcpAddressSis] Action - sisReport:port
2019-01-08 11:57:33.390519+0800 房田网[8803:3969890]  | JIGUANG | D - [JIGUANGUtilities] JCOREPostNotificationWithUserInfo name: kJPUSHNetworkDidSetupNotification (null)
2019-01-08 11:57:33.505757+0800 房田网[8803:3969890]  | JIGUANG | D - [JIGUANGSessionController] Action - doSendTcpRequest
2019-01-08 11:57:33.517397+0800 房田网[8803:3969891]  | JIGUANG | D - [JIGUANGReport] send report:(
        {
        date = "2019-01-08";
        duration = "41.8";
        itime = 1546919852;
        "session_id" = e4144b3227205748e88efaf6d82f1ba7;
        time = "10:58:28";
        timezone = "+8";
        type = "active_terminate";
    }
) log succed
2019-01-08 11:57:33.526059+0800 房田网[8803:3969893]  | JIGUANG | D - [JIGUANGReport] send report:(
        {
        date = "2019-01-08";
        itime = 1546919852;
        "session_id" = 459a9ccf71c7300638cff268b7535d99;
        time = "11:57:32";
        timezone = "+8";
        type = "active_launch";
    }
) log succed
2019-01-08 11:57:33.553973+0800 房田网[8803:3969891]  | JIGUANG | I - [JIGUANGLogin] 
----- login result -----

( M) #6

调用这个方法也能获取到ID:
window.JPush.getRegistrationID(function(data) {
console.log("JPushPlugin:registrationID is " + data)
})


#7

你调用了设置本地通知的 API 之后,日志打印了什么,你实际设置的本地通知的时间是多少


( M) #9

调用之后日志打印:
2019-01-08 13:24:37.771635+0800 房田网[8822:3989478] THREAD WARNING: [‘Console’] took ‘35.282227’ ms. Plugin should use a background thread.
2019-01-08 13:24:37.794625+0800 房田网[8822:3989745] | JIGUANG | D - [JIGUANGService] Action - setDebugMode
2019-01-08 13:24:37.819208+0800 房田网[8822:3989993] result
2019-01-08 13:25:00.026861+0800 房田网[8822:3989478] Status bar could not find cached time string image. Rendering in-process.

本地通知时间没有做其它的设置


( M) #10

你好我这个问题解决了


( M) #11

把原来没安装插件的app卸载后重新安装下,再运行就可以调用生效了