Skip to content

Commit ff8b167

Browse files
thorbenprimkeEvanBacon
authored andcommitted
feat(react-native-webrtc): add config mod for Android minSdkVersion 24
Summary: react-native-webrtc requires that the Android minSdkVersion is set to 24. Related issue on this here and also mentioned on Daily's RN SDK that has react-native-webrtc as a dependency. Adds withBuildScriptExtMinimumVersion same as the ffmpeg-kit-react-native config plugin. Maybe withBuildScriptExtMinimumVersion could be exported in `config-plugins` package so that it could be used directly.
1 parent eee366b commit ff8b167

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

packages/react-native-webrtc/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ export default {
5959
};
6060
```
6161

62-
This plugin will also disable desugaring in the Android `gradle.properties`: `android.enableDexingArtifactTransform.desugaring=false`, and disable iOS Bitcode for "Release" builds (required).
62+
## Important Notes
63+
64+
- For iOS, this plugin disables Bitcodes for all builds (required).
65+
- For Android, this plugin disables desugaring in `gradle.properties`: `android.enableDexingArtifactTransform.desugaring=false` and the [minimum deployment target is changed to `24`](https://github.com/react-native-webrtc/react-native-webrtc/issues/720#issuecomment-552374206) (from `21`) which may break other packages in your app!
6366

6467
## Manual Setup
6568

packages/react-native-webrtc/build/withWebRTC.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/react-native-webrtc/src/withWebRTC.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ const withWebRTC: ConfigPlugin<IOSPermissionsProps | void> = (
3131
"android.permission.SYSTEM_ALERT_WINDOW",
3232
"android.permission.WAKE_LOCK",
3333
]);
34-
34+
config = AndroidConfig.Version.withBuildScriptExtMinimumVersion(config,
35+
{
36+
name: "minSdkVersion",
37+
minVersion: 24,
38+
}
39+
)
3540
config = withDesugaring(config, true);
3641

3742
return config;

0 commit comments

Comments
 (0)