2017-05-19 74 views
1

我正在嘗試使用this plugin在iOS設備上的iOS設備上使用this plugin進行Firebase推送通知,但遇到問題後出現問題。我甚至不知道從哪裏開始,所以當我加載應用程序時,讓我告訴你我的控制檯日誌。Firebase for Cordova應用程序 - 無法獲取APNS令牌

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和本機代碼來查看。

我還能做什麼,我甚至不知道如何檢查我的所有證書是否正常,或者我缺少什麼東西,請幫助。

編輯:我已打開功能下的推送通知。

回答

0

我仍然不知道問題出在哪裏,但我試着用另一個插件cordova-plugin-fcm,當我確認應用程序有權接受推送,並且項目中的其他內容都配置正常後,我開始接收推動。

0

打開項目目標>功能下的推送通知。 它爲我工作。

+0

我已經做到了,讓我把它添加到我的問題 –

+0

推送通知,背景模式(遠程通知),鑰匙串共享必須啓用。 然後嘗試刪除Config.plist中的FirebaseAppDelegateProxyEnabledflag,如下所示:[https://developers.google.com/cloud-messaging/ios/ios-migrate-fcm](https://developers.google.com/cloud-消息/ ios/ios-migrate-fcm) – Frix33

+0

我啓用了所有這些,並且在後臺模式下選擇了推送通知,也嘗試了使用和不使用FirebaseAppDelegateProxyEnabled,仍然沒有任何結果。我甚至從Firebase控制檯進行測試,發送推送到單個設備或應用程序 –

相關問題