gpt4 book ai didi

ios - 如何在 iOS 中使用 Google Firebase 向特定用户发送推送通知?

转载 作者:行者123 更新时间:2023-11-29 11:49:12 24 4
gpt4 key购买 nike

我需要使用 FCM(Firebase 云消息传递)向特定设备发送推送通知。如何在 Objective C 中发送通知?

如果有人知道任何教程,请给我链接。

提前致谢。

最佳答案

  1. 添加您要安装的 pods,从 Firebase 控制台下载 GoogleService-Info.plist 文件。
  2. 将您的 APNs 证书上传到 Firebase。
  3. 注册您的应用以获取远程通知。调用 registerForRemoteNotifications
  4. 检索当前注册 token ,调用:
    NSString *refreshedToken = [[FIRInstanceID instanceID] token];
  5. 最后,您使用该 token 从 Firebase 控制台发送通知。

为了更好地说明,请参阅 documentation

关于ios - 如何在 iOS 中使用 Google Firebase 向特定用户发送推送通知?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41994385/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com