react-native: push notifications + parse

前端 未结 3 1394
难免孤独
难免孤独 2021-01-31 22:33

I am currently working on a small app project to learn and try out react-native on iOS. I have some experience with parse (parse.com) and would love to integreate parse in the n

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-31 23:01

    The official PushNotificationIOS has register event, which we can obtain token from. So, with having @MrMuetze's REST API, I could install the device to Parse.

    PushNotificationIOS.addEventListener('register', function(token){
     registerInstallation({
       "deviceType": "ios",
       "deviceToken": token,
       "channels": ["global"]
     })
    });
    

提交回复
热议问题