邮递员 - Firebase通知ios [英] Postman - Firebase notification ios
问题描述
< HTML>< p>
< HEAD>
< TITLE>未经授权的< / title>
< / HEAD>
< BODY BGCOLOR =#FFFFFFTEXT =#000000>
< H1>未经授权< / H1>
< H2>错误401< / H2>
< / BODY>
< / HTML>
这是我的正文和标题。
对于授权,我不确定,我把我的ios Firebase项目的api服务器密钥。
我想发送它,并在我的设备上显示通知。
$ b $ p
感谢您的帮助。
当我用xcode启动应用程序时,我得到了APNS的错误,但最后:连接到FCM。
< FIRAnalytics / INFO> Firebase Analytics v.3200000开始
2016-08-25 07:58:06.690 HelloCordova [2426:]< FIRAnalytics / INFO>要启用调试日志记录设置以下应用程序参数:-FIRAnalyticsDebugEnabled
2016-08-25 07:58:06.741 HelloCordova [2426:671139] Firebase崩溃报告:已成功启用
2016-08-25 07:58 :06.754:< FIRInstanceID / WARNING> FIRInstanceID启用了AppDelegate代理,将swizzle应用程序委托给远程通知处理程序。要禁用将FirebaseAppDelegateProxyEnabled添加到Info.plist并将其设置为NO
2016-08-25 07:58:06.755:< FIRInstanceID / WARNING>无法获取APNS令牌Error Domain = com.firebase.iid Code = 1001(null)
2016-08-25 07:58:06.764:< FIRMessaging / INFO> FIRMessaging库版本1.1.0
2016-08-25 07:58:06.776:< FIRMessaging / WARNING> FIRMessaging启用AppDelegate代理,将swizzle app委托给远程通知接收处理程序。添加FirebaseAppDelegateProxyEnabled到你的Info.plist并设置为NO
2016-08-25 07:58:06.780 HelloCordova [2426:]< FIRAnalytics / INFO>成功自动创建Firebase Analytics应用程序委托代理。要禁用代理,请将Info.plist
2016-08-25 07:58:07.361中的标志FirebaseAppDelegateProxyEnabled设置为NO:< FIRInstanceID / WARNING> APNS环境在配置文件:开发
2016-08-25 07:58:07.574 HelloCordova [2426:671139]重置页面加载的插件。
2016-08-25 07:58:07.796 HelloCordova [2426:]< FIRAnalytics / INFO>启用Firebase Analytics
2016-08-25 07:58:07.819 HelloCordova [2426:671139]连接到FCM。
2016-08-25 07:58:08.316 HelloCordova [2426:671139]完成载入:file:///var/containers/Bundle/Application/1DE45D4B-AFB3-4F6D-83D7-71D1A6FE8F44/HelloCordova.app /www/index.html#/connected
2016-08-25 07:58:10.094 HelloCordova [2426:671139] THREAD WARNING:['GoogleMaps']'472.765137'ms。插件应该使用后台线程。
2016-08-25 07:58:33.836 HelloCordova [2426:671139]收到内存警告。
code> Postman 中的code>标签,您需要将格式设置为 key = YOUR_SERVER_KEY
。
获取服务器密钥
:转到您在Firebase控制台中的项目设置。
点击Cloud Messaging并复制该页面提到的 Server Key
。
I tried to send POST to firebase with Postman but i have an error :
<HTML>
<HEAD>
<TITLE>Unauthorized</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Unauthorized</H1>
<H2>Error 401</H2>
</BODY>
</HTML>
Here is my body and header. For authorization I am not sure, I put the api server key of my ios firebase project. I'd like to send it and show the notification on my device.
Thank you for the help.
When I launch the app with xcode, I got fail to fecth APNS but at the end : connected to FCM.
<FIRAnalytics/INFO> Firebase Analytics v.3200000 started
2016-08-25 07:58:06.690 HelloCordova[2426:] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled
2016-08-25 07:58:06.741 HelloCordova[2426:671139] Firebase Crash Reporting: Successfully enabled
2016-08-25 07:58:06.754: <FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2016-08-25 07:58:06.755: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"
2016-08-25 07:58:06.764: <FIRMessaging/INFO> FIRMessaging library version 1.1.0
2016-08-25 07:58:06.776: <FIRMessaging/WARNING> FIRMessaging AppDelegate proxy enabled, will swizzle app delegate remote notification receiver handlers. Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2016-08-25 07:58:06.780 HelloCordova[2426:] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
2016-08-25 07:58:07.361: <FIRInstanceID/WARNING> APNS Environment in profile: development
2016-08-25 07:58:07.574 HelloCordova[2426:671139] Resetting plugins due to page load.
2016-08-25 07:58:07.796 HelloCordova[2426:] <FIRAnalytics/INFO> Firebase Analytics enabled
2016-08-25 07:58:07.819 HelloCordova[2426:671139] Connected to FCM.
2016-08-25 07:58:08.316 HelloCordova[2426:671139] Finished load of: file:///var/containers/Bundle/Application/1DE45D4B-AFB3-4F6D-83D7-71D1A6FE8F44/HelloCordova.app/www/index.html#/connected
2016-08-25 07:58:10.094 HelloCordova[2426:671139] THREAD WARNING: ['GoogleMaps'] took '472.765137' ms. Plugin should use a background thread.
2016-08-25 07:58:33.836 HelloCordova[2426:671139] Received memory warning.
In your Authorization
tag in Postman
, you'll need to put format like key=YOUR_SERVER_KEY
.
To get the Server Key
: Go to your project settings in firebase console.
Click on Cloud Messaging and copy Server Key
mentioned in that page.
这篇关于邮递员 - Firebase通知ios的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!