achorein / expo-share-intent

🚀 Simple share intent in an Expo Native Module
MIT License
119 stars 10 forks source link

fix: missing scheme on runtime when using expo-updates #48

Closed achorein closed 2 months ago

achorein commented 3 months ago

Summary

When using expo-updates in a release build, sometimes the scheme is no availaible in the runtime (Constants.expoConfig?.scheme)

similar issue : https://github.com/expo/custom-expo-updates-server/issues/12

Todo

Issue

Fixes https://github.com/achorein/expo-share-intent/issues/46

Testing

https://docs.expo.dev/eas-update/debug-advanced/#ios-local-builds

yarn ios ---configuration Release
felixaa commented 3 months ago

Awesome job, and great find! I guess another possibility could be to include the app scheme in the plugin config 🤔 . But I think your suggestion putting it in the config options makes sense

        [
            'expo-share-intent',
            {
                iosAppScheme: 'myAwesomeApp'
                iosActivationRules: { ... },
                androidIntentFilters: [ ... ],
            },
        ],
achorein commented 3 months ago

Indeed, we should be able to get the scheme from the app config.

The plugin already have the scheme but it run on the prebuild phase and only manage native code and generation for build.

Need to find a solution for the runtime without adding a boller plate in the native code.

I will try to use the Linking.createUrl() API