achorein / expo-share-intent-demo

React Native Expo Share Intent Demonstration
90 stars 9 forks source link

Expo 50 support #30

Closed troyshu closed 9 months ago

troyshu commented 9 months ago

Bump to expo 50 (https://expo.dev/changelog/2024/01-18-sdk-50)

Android Breaking Change

React Native 0.73 changed from Java to Kotlin for Android Main* classes: MainApplication.java/MainActivity.java are now MainApplication.kt/MainActivity.kt. If you depend on any config plugins that use dangerous modifications to change these files, they may need to be updated for SDK 50 support.

TODO

achorein commented 9 months ago

thanks for the PR, There is a breaking change for android, i'm testing a workaround

troyshu commented 9 months ago

Working now on my Android device! And my iOS simulator too. I can take a look at the README and propose some changes.

troyshu commented 9 months ago

There seems to be an issue on Android where even after resetting the share intent (e.g. on app background, or pressing the "reset" button in the demo), the share intent somehow gets set with the previous value again. Resetting the share intent works as expected on iOS.

Video:

https://github.com/achorein/expo-share-intent-demo/assets/1057286/8a7fa7b8-66c1-4ebf-841a-c423262d7691

achorein commented 9 months ago

@troyshu i just update the hook to clean native module when the app goes to background here : https://github.com/achorein/expo-share-intent-demo/blob/a906bf682649a55b90c9c668c876b0337558318a/hooks/useShareIntent.js#L66

Looks good to me, PR merged 🎉