作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我已按照本文中的说明为推送通知设置有限设置:http://docs.ionic.io/v2.0.0-beta/docs/push-limited-setup
我有一个设备 ID,并且我已经向 Ionic 注册了一个 API token 。我的浏览器中正在运行该应用程序,并且正在尝试运行
curl -X POST -H "Authorization: Bearer API_TOKEN" -H "Content-Type: application/json" -d '{
"tokens": ["DEV_DEVICE_TOKEN"],
"profile": "fake_push_profile",
"notification": {
"message": "Hello World!"
}
}' "https://api.ionic.io/push/notifications"
在 bash 控制台中。但是我收到如下错误:
"error": {"link": null, "type": "BadRequest", "message": "Security Profile 'fake_push_profile' not found."}}
最佳答案
得到解决方案。
您需要在您的应用
仪表板中创建一个配置文件
。
导航到:Your app setup Page Online
创建一个配置文件并将其命名为fake_push_profile
。
在您发送推送的 .sh
文件中,您需要在 profile
键中输入 fake_push_profile
:
curl -X POST -H "Authorization: Bearer Your_Token" -H "Content-Type: application/json" -d '{
"tokens": ["Device_Token"],
"profile": "fake_push_profile",
"notification": {
"message": "Hello World!"
}
}' "https://api.ionic.io/push/notifications"
这就是您需要做的全部。
这是我所做的屏幕截图,效果非常好。
我为 iOS
做了这件事。
关于android - 在有限的设置中向应用程序发送推送通知 - 找不到 fake_push_profile Ionic,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37040079/
我已按照本文中的说明为推送通知设置有限设置:http://docs.ionic.io/v2.0.0-beta/docs/push-limited-setup 我有一个设备 ID,并且我已经向 Ioni
我是一名优秀的程序员,十分优秀!