weixin_39524703 2020-11-30 12:41
浏览 0

Start using @react-native-community/push-notification-ios

And remove our dependency on wix/react-native-notifications.

Fixes: https://github.com/zulip/zulip-mobile/issues/4115

I took this up before I saw Greg's comment here about https://github.com/zulip/zulip/pull/15179:

I think this issue is actually a lot simpler than that. The PR will cause the server to start sending the information, and it's doing it in a way that iOS should already respond to even without any client-side code of ours.

Ah, well; that particular need doesn't seem to require any code changes on mobile. But I've been really wanting to get this done because

(1) I've often been kind of confused by our dependency on two different libraries for different iOS push notification needs, when there's no obvious reason why everything couldn't be done by one library, and (2) some peace and clarity comes from being on the latest versions of things. PushNotificationIOS from RN core is deprecated, and there are complaints about how well the Wix library is maintained; see the issue, and discussion linked from there.

So I went ahead and put this together.

该提问来源于开源项目:zulip/zulip-mobile

  • 写回答

5条回答 默认 最新

  • weixin_39524703 2020-11-30 12:41
    关注

    Hmm, for the big picture, I've actually just remembered that Expo has this whole thing set up that we may (or more likely may not) want to buy into, where you can send push notifications through Expo's servers: https://github.com/expo/expo/tree/master/packages/expo-notifications#add-your-projects-credentials-to-expo-server-optional

    Apparently expo-notifications is a thing, and you can install it just like any other Unimodule, without having to be in an Expo-"managed" project. The setup with Expo's servers is a completely optional part of this. This didn't occur to me to check when I followed the deprecation notice at https://reactnative.dev/docs/0.60/pushnotificationios, oops.

    评论

报告相同问题?