我正在尝试使用this plugin在Cordova应用上的iOS设备上运行Firebase推送通知,但问题出现后我遇到了问题。我甚至不知道从哪里开始,所以让我在加载应用程序时只显示我的控制台日志。
MyApp[754:298085] Starting Firebase plugin
MyApp[754:298085] [CDVTimer][firebaseplugin] 0.200033ms
MyApp[754:298085] [CDVTimer][TotalPluginStartup] 73.943019ms
MyApp[754:298119] [Firebase/Core][I-COR000001] Configuring the default app.
MyApp[754] <Debug> [Firebase/Core][I-COR000001] Configuring the default app.
MyApp[754:298117] <FIRAnalytics/INFO> Firebase Analytics v.3404000 started
MyApp[754:] <FIRAnalytics/INFO> Firebase Analytics v.3404000 started
MyApp[754:298117] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see some link here)
MyApp[754:] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see some link here)
MyApp[754:298085] Firebase Crash Reporting: Successfully enabled
<FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"
<FIRMessaging/INFO> FIRMessaging library version 1.2.0
MyApp[754:298118] [Firebase/Core][I-COR000018] Already sending logs.
MyApp[754] <Debug> [Firebase/Core][I-COR000018] Already sending logs.
MyApp[754:298118] libMobileGestalt MobileGestaltSupport.m:153: pid 754 (MyApp) does not have sandbox access for frZQaeyWLUvLjeuEK43hmg and IS NOT appropriately entitled
MyApp[754:298118] libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see <rdar://problem/11744455>)
MyApp[754:298124] <FIRAnalytics/WARNING> The AdSupport Framework is not currently linked. Some features will not function properly. Learn more at some link here
MyApp[754:] <FIRAnalytics/WARNING> The AdSupport Framework is not currently linked. Some features will not function properly. Learn more at some link here
MyApp[754:298119] <FIRAnalytics/INFO> Firebase Analytics enabled
MyApp[754:] <FIRAnalytics/INFO> Firebase Analytics enabled
MyApp[754:298085] Resetting plugins due to page load.
MyApp[754:298119] [Firebase/Core][I-COR000019] Clearcut post completed.
MyApp[754] <Debug> [Firebase/Core][I-COR000019] Clearcut post completed.
MyApp[754:298085] Connected to FCM.
MyApp[754:298085] InstanceID token: eD1pW3DsaUA:APA91bGSKxvd6VRf-3O1_AgQcdCL3ZLERsWDShsFy8LE6MlNLTgFl-sYH9EzvPZJn9JH-oRjvhwQrwp-h6YukJ86IQP0Q4iLnOf4GwoPgR5dV1ozLX1Fnc7bpJDMOtukAriLT8NZSAVl
MyApp[754:298132] [Firebase/Core][I-COR000019] Clearcut post completed.
2017-05-19 16:05:39.389 MyApp[754] <Debug> [Firebase/Core][I-COR000019] Clearcut post completed.
MyApp[754:298085] Finished load of: file:///var/containers/Bundle/Application/0A7C5C10-135D-4E34-A2BC-D64528786544/MyApp.app/www/index.html
MyApp[754:298085] THREAD WARNING: ['FirebasePlugin'] took '4102.684082' ms. Plugin should use a background thread.
从所有这些崩溃中可以看出**我得到的是FCM令牌,但不是APNS。我想我已经上传了各种所需的证书,甚至是APNS Auth Key的Firebase设置中的.p8证书。
我还尝试使用调试控制台提供的推送令牌从Firebase Notification控制台发送测试通知,但在前台或后台时,设备上没有任何内容。我正在调试javascript和本机代码以查看它。
我还能做什么,我甚至不知道如何检查我的所有证书是否合适,或者我是否遗漏了某些东西,请帮忙。
编辑:我已打开功能下的推送通知。
答案 0 :(得分:0)
启用项目目标下的推送通知&gt;能力。 它对我有用。
答案 1 :(得分:0)
我仍然不知道问题是什么,但我尝试使用另一个插件cordova-plugin-fcm,在确定应用程序有权接收推送后,项目中的其他所有内容都配置正常,我开始接受推动。