Not receiving Push Notifications Using firebase and Objective C

前端 未结 3 1571
心在旅途
心在旅途 2021-01-27 16:45

I am trying to use Firebase for push notification. i have successfully installed the Firebase And Firebase messaging via Cocoapods

3条回答
  •  被撕碎了的回忆
    2021-01-27 17:39

    You should be calling (iOS 8+) registerForRemoteNotifications, not isRegisteredForRemoteNotifications.

    Otherwise, you'll never get "high priority" messages from the Firebase server, delivered natively using APNS.

    Please note that when you're running in XCode, you are running in sandbox mode, so be sure to register with the proper parameters.

    Try sending it in "high priority" and see if your payload is in the proper APNS format:

    {
        "aps" : {
            "alert" : "You got your emails.",
            "badge" : 9,
            "sound" : "bingbong.aiff"
        },
    }
    

    Note that your payload may have = instead of :, which is acceptable.

提交回复
热议问题