我编写了使用FCM主题按摩来接收来自服务器的推送通知的应用程序.
我的HTTP请求是:
https://fcm.googleapis.com/fcm/send
Content-Type:application/json
Authorization:key=AIzaSyZ-1u...0GBYzPu7Udno5aA
{
"to":"/topics/Foo-bar",
"priority":"high",
"content_available": true,
"data":{
"notification-type":"chat",
"target":"Current User",
"title":"Current User has sent you a message",
"text": "hello1",
"badge": 5 //Badge you want to show on app icon
}
}
Run Code Online (Sandbox Code Playgroud)
我得到了回应:
{
"message_id": 6199072048907273657
}
Run Code Online (Sandbox Code Playgroud)
但它不会在设备上收到通知.
以及如何在调试器中打印通知数据?
push-notification firebase ios9.2 firebase-cloud-messaging swift3.2
我有一个关于格式化卢比货币的问题(印度卢比 - INR)
例如,这里的数字表示为:
1
10
100
1,000
10,000
1,00,000
10,00,000
1,00,00,000
10,00,00,000
Run Code Online (Sandbox Code Playgroud)
我试过这个代码:
var intString = 1000000
let asd = NumberFormatter.localizedString(from: NSNumber(value: Double(intString)!), number: NumberFormatter.Style.currency)
Run Code Online (Sandbox Code Playgroud)
但这似乎并不能解决问题。在这方面的任何帮助将不胜感激