Skip to content

Commit b22f7bc

Browse files
authored
Merge pull request #1083 from mendix/moo/dependency-update/react-native-bootsplash
migrate to react native boot splash
2 parents 64c4bfe + 3e6a5da commit b22f7bc

17 files changed

Lines changed: 1186 additions & 88 deletions

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
- We have migrated from `react-native-splash-screen@3.2.0` to `react-native-bootsplash@^7.7.0` for better splash screen support and autolinking compatibility.
10+
911
- We added a new property to gradle.properties for scanning QR codes.
1012

1113
- We have migrated from react-native-push-notification to @notifee/react-native for better new architecture compatibility and enhanced push notification features

android/app/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ dependencies {
120120
implementation("com.facebook.react:hermes-android")
121121

122122
implementation project(':react-native-localize')
123-
implementation project(":react-native-splash-screen")
124123
implementation project(":mendixnative-release")
125124

126125
// Explicit add okhttp

android/app/src/appstore/java/com/mendix/nativetemplate/MainActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
import com.mendix.mendixnative.config.AppUrl;
1111
import com.mendix.mendixnative.react.MendixApp;
1212
import com.mendix.mendixnative.react.MxConfiguration;
13+
import com.zoontek.rnbootsplash.RNBootSplash;
1314

14-
import org.devio.rn.splashscreen.SplashScreen;
1515

1616
public class MainActivity extends MendixReactActivity {
1717
@Override
1818
protected void onCreate(@Nullable Bundle savedInstanceState) {
19-
SplashScreen.show(this);
19+
RNBootSplash.init(this, R.style.BootTheme);
2020
this.getLifecycle().addObserver(new MendixActivityObserver(this));
2121
boolean hasDeveloperSupport = ((MainApplication) getApplication()).getUseDeveloperSupport();
2222
mendixApp = new MendixApp(AppUrl.getUrlFromResource(this), MxConfiguration.WarningsFilter.none, hasDeveloperSupport, false);

android/app/src/dev/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
<application
66
android:name="com.mendix.nativetemplate.DevApplication"
7+
android:label="@string/app_name"
78
tools:replace="android:name">
89
<activity
910
android:name="com.mendix.nativetemplate.MainActivity"

android/app/src/main/java/com/mendix/nativetemplate/MainApplication.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
import com.mendix.mendixnative.MendixReactApplication;
1010
import com.mendix.mendixnative.react.splash.MendixSplashScreenPresenter;
1111

12-
import org.devio.rn.splashscreen.SplashScreen;
13-
import org.devio.rn.splashscreen.SplashScreenReactPackage;
12+
import com.zoontek.rnbootsplash.RNBootSplash;
1413

1514
import java.util.List;
1615

@@ -27,7 +26,6 @@ public List<ReactPackage> getPackages() {
2726

2827
// Packages that cannot be autolinked yet can be added manually here, for example:
2928
// packages.add(new MyReactNativePackage());
30-
packages.add(new SplashScreenReactPackage());
3129

3230
return packages;
3331
}
@@ -38,12 +36,12 @@ public MendixSplashScreenPresenter createSplashScreenPresenter() {
3836
@Override
3937
public void show(@NonNull Activity activity) {
4038
hide(activity);
41-
SplashScreen.show(activity, true);
39+
RNBootSplash.init(activity, R.style.BootTheme);
4240
}
4341

4442
@Override
4543
public void hide(@NonNull Activity activity) {
46-
SplashScreen.hide(activity);
44+
RNBootSplash.hide(activity);
4745
}
4846
};
4947
}

android/app/src/main/res/values/styles.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,9 @@
2020
<item name="android:background">@android:color/transparent</item>
2121
</style>
2222

23+
<!-- BootSplash theme. -->
24+
<style name="BootTheme" parent="Theme.AppCompat.Light.NoActionBar">
25+
<item name="android:windowBackground">@drawable/splash_screen</item>
26+
</style>
27+
2328
</resources>

android/settings.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ rootProject.name = 'nativeTemplate'
66

77
includeBuild('../node_modules/@react-native/gradle-plugin')
88

9-
include ':react-native-splash-screen'
10-
project(':react-native-splash-screen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-splash-screen/android')
119
include ':mendixnative-release'
1210
project(':mendixnative-release').projectDir = new File(rootProject.projectDir, '../node_modules/@mendix/native/androidlib')
1311

ios/Podfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def common_pods
5353
# RN pods end
5454

5555
# Manually linked dependencies
56-
pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
5756

5857
# Third party dependencies of dependencies
5958
pod 'IQKeyboardManager'

ios/Podfile.lock

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,8 +1301,6 @@ PODS:
13011301
- Yoga
13021302
- react-native-safe-area-context (5.2.0):
13031303
- React-Core
1304-
- react-native-splash-screen (3.2.0):
1305-
- React
13061304
- react-native-video (6.10.0):
13071305
- DoubleConversion
13081306
- glog
@@ -1635,6 +1633,8 @@ PODS:
16351633
- React-logger (= 0.77.3)
16361634
- React-perflogger (= 0.77.3)
16371635
- React-utils (= 0.77.3)
1636+
- RNBootSplash (6.3.10):
1637+
- React-Core
16381638
- RNCAsyncStorage (2.0.0):
16391639
- React-Core
16401640
- RNCPicker (2.11.0):
@@ -1871,7 +1871,6 @@ DEPENDENCIES:
18711871
- react-native-image-picker (from `../node_modules/react-native-image-picker`)
18721872
- react-native-pager-view (from `../node_modules/react-native-pager-view`)
18731873
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
1874-
- react-native-splash-screen (from `../node_modules/react-native-splash-screen`)
18751874
- react-native-video (from `../node_modules/react-native-video`)
18761875
- React-nativeconfig (from `../node_modules/react-native/ReactCommon`)
18771876
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
@@ -1902,6 +1901,7 @@ DEPENDENCIES:
19021901
- ReactAppDependencyProvider (from `build/generated/ios`)
19031902
- ReactCodegen (from `build/generated/ios`)
19041903
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
1904+
- RNBootSplash (from `../node_modules/react-native-bootsplash`)
19051905
- "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
19061906
- "RNCPicker (from `../node_modules/@react-native-picker/picker`)"
19071907
- "RNDateTimePicker (from `../node_modules/@react-native-community/datetimepicker`)"
@@ -2017,8 +2017,6 @@ EXTERNAL SOURCES:
20172017
:path: "../node_modules/react-native-pager-view"
20182018
react-native-safe-area-context:
20192019
:path: "../node_modules/react-native-safe-area-context"
2020-
react-native-splash-screen:
2021-
:path: "../node_modules/react-native-splash-screen"
20222020
react-native-video:
20232021
:path: "../node_modules/react-native-video"
20242022
React-nativeconfig:
@@ -2079,6 +2077,8 @@ EXTERNAL SOURCES:
20792077
:path: build/generated/ios
20802078
ReactCommon:
20812079
:path: "../node_modules/react-native/ReactCommon"
2080+
RNBootSplash:
2081+
:path: "../node_modules/react-native-bootsplash"
20822082
RNCAsyncStorage:
20832083
:path: "../node_modules/@react-native-async-storage/async-storage"
20842084
RNCPicker:
@@ -2110,17 +2110,17 @@ EXTERNAL SOURCES:
21102110

21112111
SPEC CHECKSUMS:
21122112
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
2113-
DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb
2113+
DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
21142114
fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6
21152115
FBLazyVector: 23d8c5470c648a635893dc0956c6dbaead54b656
21162116
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
2117-
glog: eb93e2f488219332457c3c4eafd2738ddc7e80b8
2117+
glog: 69ef571f3de08433d766d614c73a9838a06bf7eb
21182118
hermes-engine: b2187dbe13edb0db8fcb2a93a69c1987a30d98a4
21192119
IQKeyboardManager: c8665b3396bd0b79402b4c573eac345a31c7d485
21202120
libavif: 84bbb62fb232c3018d6f1bab79beea87e35de7b7
21212121
libdav1d: 23581a4d8ec811ff171ed5e2e05cd27bad64c39f
21222122
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
2123-
op-sqlite: 137cd6d3df9b86e147fb7e2f70c8d6f97bd0941b
2123+
op-sqlite: 7c3a6a7f84f0969b96266dbd143a3793bc2bc9cf
21242124
OpenSSL-Universal: 6082b0bf950e5636fe0d78def171184e2b3899c2
21252125
RCT-Folly: 36fe2295e44b10d831836cc0d1daec5f8abcf809
21262126
RCTDeprecation: 6ee92578d332db1d4e03267d3ae98bcf8b780863
@@ -2156,7 +2156,6 @@ SPEC CHECKSUMS:
21562156
react-native-image-picker: f104798044ef2c9211c42a48025d0693b5f34981
21572157
react-native-pager-view: c3b8efd9000368320e3710c01f38a83bd2170779
21582158
react-native-safe-area-context: 849d7df29ecb2a7155c769c0b76849ba952c2aa3
2159-
react-native-splash-screen: 200d11d188e2e78cea3ad319964f6142b6384865
21602159
react-native-video: fcf88c7e93d7736a529f97f70ce92269684596ec
21612160
React-nativeconfig: f77b4627803bf7886a1f2e96b33b8af34e583cc4
21622161
React-NativeModulesApple: 6bfb56c8a05c9181727a4375c6fce152171c038d
@@ -2187,6 +2186,7 @@ SPEC CHECKSUMS:
21872186
ReactAppDependencyProvider: 9b3704075c2fe8fd7c739779655fb88700a1ca30
21882187
ReactCodegen: c9645fb81bcaf5afebaebb25874bcd5224cd40f1
21892188
ReactCommon: 271491c2343c91609d3dc18bb4b4ebe67160de03
2189+
RNBootSplash: 2c6b226e3ad3c97d16b6d53bd75d0cd281646bfb
21902190
RNCAsyncStorage: d35c79ffba52c1013013e16b1fc295aec2feabb6
21912191
RNCPicker: 4f6d5e8d107064be32dfc8f1bcb5a3741135db0b
21922192
RNDateTimePicker: 40ffda97d071a98a10fdca4fa97e3977102ccd14
@@ -2205,8 +2205,8 @@ SPEC CHECKSUMS:
22052205
SDWebImageWebPCoder: e38c0a70396191361d60c092933e22c20d5b1380
22062206
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
22072207
SSZipArchive: 8a6ee5677c8e304bebc109e39cf0da91ccef22ea
2208-
Yoga: 92f3bb322c40a86b7233b815854730442e01b8c4
2208+
Yoga: 7d51419602153919f32aec72812e324d495ee49d
22092209

2210-
PODFILE CHECKSUM: 0721d8defdcee9bbb168ccd39c73b4972842a2af
2210+
PODFILE CHECKSUM: 3a8acfa5ed60e25f017b7a2eeb4be9c332572cf6
22112211

22122212
COCOAPODS: 1.16.2
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#import <Foundation/Foundation.h>
2-
#import "RNSplashScreen.h"
3-
4-
@interface RNSplashScreen (StoryBoardSplash)
2+
#import "RNBootSplash.h"
3+
4+
@interface RNBootSplash (StoryBoardSplash)
55
+ (void)showStoryBoard:(NSString *)name inRootView:(UIView *)rootView;
66
+ (void)hideStoryBoard;
77
@end

0 commit comments

Comments
 (0)