Firebase for Cordova app - 无法获取 APNS 令牌



我正在尝试使用此插件使Firebase推送通知在Cordova应用程序的iOS设备上工作,但是我遇到了一个又一个问题。我什至不知道从哪里开始,所以让我在加载应用程序时向您展示我的控制台日志。

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 身份验证密钥的 Firebase 设置中上传了一个 .p8 证书。

我还尝试使用调试控制台提供的推送令牌从 Firebase 通知控制台发送测试通知,但无论是在前台还是后台,设备上都没有任何东西到达。我正在调试javascript和本机代码来查看这一点。

还能做什么,我什至不知道如何检查我的所有证书是否正常,或者我是否缺少某些内容,请帮助。

编辑:我已经打开了功能下的推送通知。

打开项目目标>功能下的推送通知。它对我有用。

我仍然不知道问题是什么,但我尝试使用另一个插件 cordova-plugin-fcm,在我确保应用程序有权接收推送后,并且项目的其他一切都配置良好,我开始接收推送。

最新更新