bndkt / react-native-app-clip

Easily add an App Clip for iOS apps built with React Native
https://bndkt.com/blog/2022/react-native-app-clip
482 stars 22 forks source link

question: how does the app clip work with Expo OTA updates? #8

Closed PedroBern closed 1 year ago

PedroBern commented 1 year ago

Thanks for the amazing work @bndkt 🙏

I have a question: how does the app clip work with Expo OTA updates? Can we update the clip?

bndkt commented 1 year ago

@PedroBern sorry for leaving this unanswered for so long. My current hypothesis is that Expo OTA updates doesn't make sense for App Clips, but I'm happy to be proven wrong ;) What I'm certain about is that you can not update the initial App Clip experience - as the App Clip is streamed to the device the moment the user opens the App Clip (via link or App Clip Code for example) and what is streamed in this moment is the binary stored on Apple's servers, and that's the one generated when deploying the app to the App Store. It should theoretically be possible to load an update after the App Clip has been opened, but I have put this out of scope for now to reduce complexity. It doesn't make a lot of sense in my POV anyways, as App Clips are mostly meant for use cases where users interact immediately, so they will be using the initial version of the app. Expo Updates are only applied after an app is restarted, so they make sense for apps that are used continually and where the user opens an app today, an update is downloaded in the background and when the user opens the same app tomorrow they will have the updates version for example. Hope that is clear, let me know if you have other thoughts on this!