Skip to content

docs(android): add required Proguard rule for CodePush#39

Open
jackyrusly wants to merge 1 commit intoCodePushNext:masterfrom
jackyrusly:master
Open

docs(android): add required Proguard rule for CodePush#39
jackyrusly wants to merge 1 commit intoCodePushNext:masterfrom
jackyrusly:master

Conversation

@jackyrusly
Copy link

Description

When Proguard / R8 is enabled, react-native-code-push may fail to apply the updated JS bundle on the first restart after an update.

This happens because getReactHostDelegate uses reflection to access reactHostDelegate from ReactHostImpl:

Field field = clazz.getDeclaredField("reactHostDelegate");

If Proguard obfuscates or removes this field, the reflection lookup fails at runtime and the CodePush bundle is not applied on first restart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant