请问setBadge返回false是因为什么原因?

badge
jpush
标签: #<Tag:0x00007fb846d33b90> #<Tag:0x00007fb846d337f8>

(新手上路) #1

在IOS下发现badge退出时并没有清空,然后在触发事件时可以正常用getBadge获取badge值,但setBadge却失败了,是什么原因导致的呢?


#2

看日志,前前后后报了些什么错,有什么提示信息


(新手上路) #3
2018-01-09 16:03:17.246 [info][tid:main][RCTCxxBridge.mm:905 

] Invalidating <RCTCxxBridge: 0x6000003d4a00> (parent: <RCTBridge: 0x6040000c5860>, executor: RCTWebSocketExecutor)
2018-01-09 16:03:17.246685+0800 jianyanapp[60096:153731913] Invalidating <RCTCxxBridge: 0x6000003d4a00> (parent: <RCTBridge: 0x6040000c5860>, executor: RCTWebSocketExecutor)
2018-01-09 16:03:17.247 [info][tid:main][RCTCxxBridge.mm:213 

] Initializing <RCTCxxBridge: 0x6000009d21b0> (parent: <RCTBridge: 0x6040000c5860>, executor: RCTWebSocketExecutor)
2018-01-09 16:03:17.248253+0800 jianyanapp[60096:153731913] Initializing <RCTCxxBridge: 0x6000009d21b0> (parent: <RCTBridge: 0x6040000c5860>, executor: RCTWebSocketExecutor)
2018-01-09 16:03:17.250 [warn][tid:main][RCTModuleData.mm:69 

] Module RCTJPushModule 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.
2018-01-09 16:03:17.249741+0800 jianyanapp[60096:153731913] Module RCTJPushModule 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.
2018-01-09 16:03:17.747 [info][tid:main][RCTCxxBridge.mm:905 

] Invalidating <RCTCxxBridge: 0x6000009d21b0> (parent: <RCTBridge: 0x6040000c5860>, executor: RCTWebSocketExecutor)
2018-01-09 16:03:17.747048+0800 jianyanapp[60096:153731913] Invalidating <RCTCxxBridge: 0x6000009d21b0> (parent: <RCTBridge: 0x6040000c5860>, executor: RCTWebSocketExecutor)
2018-01-09 16:03:17.747 [info][tid:main][RCTCxxBridge.mm:213 

] Initializing <RCTCxxBridge: 0x6000003d6ad0> (parent: <RCTBridge: 0x6040000c5860>, executor: RCTWebSocketExecutor)
2018-01-09 16:03:17.747726+0800 jianyanapp[60096:153731913] Initializing <RCTCxxBridge: 0x6000003d6ad0> (parent: <RCTBridge: 0x6040000c5860>, executor: RCTWebSocketExecutor)
2018-01-09 16:03:17.748 [warn][tid:main][RCTModuleData.mm:69 

] Module RCTJPushModule 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.
2018-01-09 16:03:17.748512+0800 jianyanapp[60096:153731913] Module RCTJPushModule 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.
2018-01-09 16:03:18.040280+0800 jianyanapp[60096:154135869] [] nw_proxy_resolver_create_parsed_array PAC evaluation error: NSURLErrorDomain: -1004
2018-01-09 16:03:18.054698+0800 jianyanapp[60096:154135825] [] nw_proxy_resolver_create_parsed_array PAC evaluation error: NSURLErrorDomain: -1004
2018-01-09 16:03:18.059861+0800 jianyanapp[60096:154135825] [] nw_proxy_resolver_create_parsed_array PAC evaluation error: NSURLErrorDomain: -1004
2018-01-09 16:03:18.063706+0800 jianyanapp[60096:154135825] [] nw_proxy_resolver_create_parsed_array PAC evaluation error: NSURLErrorDomain: -1004

#4

没有什么极光角标相关的日志呀


(新手上路) #5

知道是什么原因了,笑哭,我又犯了老错误,我在模拟器上鼓捣个什么劲啊,直接上真机不就完了。我服了- -


#6

:joy:模拟器上不支持测试推送相关的,因为取不到token的。


(新手上路) #7

嗯,我就说嘛,可以了,郁闷!