react-native-bootsplash 6.3.10 → 7.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/README.md +16 -41
  2. package/android/build.gradle +10 -17
  3. package/android/src/main/AndroidManifest.xml +1 -1
  4. package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashModuleImpl.kt +2 -2
  5. package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashPackage.kt +0 -1
  6. package/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashQueue.kt +1 -1
  7. package/android/src/main/res/drawable/compat_splash_screen.xml +11 -6
  8. package/android/src/main/res/drawable/compat_splash_screen_oneui_4.xml +13 -6
  9. package/android/src/main/res/values/colors.xml +1 -3
  10. package/android/src/main/res/values/public.xml +0 -2
  11. package/android/src/main/res/values/styles.xml +13 -19
  12. package/android/src/main/res/values-night/styles.xml +1 -1
  13. package/android/src/main/res/values-v27/colors.xml +4 -0
  14. package/android/src/main/res/values-v27/styles.xml +1 -6
  15. package/android/src/main/res/values-v29/styles.xml +1 -11
  16. package/android/src/main/res/values-v30/styles.xml +1 -9
  17. package/android/src/main/res/values-v31/styles.xml +1 -1
  18. package/android/src/newarch/com/zoontek/rnbootsplash/RNBootSplashModule.kt +2 -2
  19. package/android/src/oldarch/com/zoontek/rnbootsplash/RNBootSplashModule.kt +3 -3
  20. package/app.plugin.js +1 -1
  21. package/cli.js +2 -11
  22. package/dist/commonjs/addon/index.js +49 -49
  23. package/dist/commonjs/addon/index.js.map +1 -1
  24. package/dist/commonjs/generate.js +811 -541
  25. package/dist/commonjs/generate.js.map +1 -1
  26. package/dist/commonjs/index.js +1 -1
  27. package/dist/commonjs/index.js.map +1 -1
  28. package/dist/commonjs/specs/NativeRNBootSplash.js.map +1 -0
  29. package/dist/commonjs/{NativeRNBootSplash.web.js → specs/NativeRNBootSplash.web.js} +1 -1
  30. package/dist/commonjs/specs/NativeRNBootSplash.web.js.map +1 -0
  31. package/dist/module/addon/index.js +49 -49
  32. package/dist/module/addon/index.js.map +1 -1
  33. package/dist/module/generate.js +807 -539
  34. package/dist/module/generate.js.map +1 -1
  35. package/dist/module/index.js +1 -1
  36. package/dist/module/index.js.map +1 -1
  37. package/dist/module/specs/NativeRNBootSplash.js.map +1 -0
  38. package/dist/module/{NativeRNBootSplash.web.js → specs/NativeRNBootSplash.web.js} +1 -1
  39. package/dist/module/specs/NativeRNBootSplash.web.js.map +1 -0
  40. package/dist/typescript/addon/index.d.ts +8 -2
  41. package/dist/typescript/addon/index.d.ts.map +1 -1
  42. package/dist/typescript/generate.d.ts +90 -35
  43. package/dist/typescript/generate.d.ts.map +1 -1
  44. package/dist/typescript/index.d.ts +2 -2
  45. package/dist/typescript/index.d.ts.map +1 -1
  46. package/dist/typescript/{NativeRNBootSplash.d.ts → specs/NativeRNBootSplash.d.ts} +1 -1
  47. package/dist/typescript/specs/NativeRNBootSplash.d.ts.map +1 -0
  48. package/dist/typescript/{NativeRNBootSplash.web.d.ts → specs/NativeRNBootSplash.web.d.ts} +1 -1
  49. package/dist/typescript/specs/NativeRNBootSplash.web.d.ts.map +1 -0
  50. package/ios/RNBootSplash.mm +4 -10
  51. package/package.json +24 -29
  52. package/src/generate.ts +1048 -782
  53. package/src/index.ts +7 -7
  54. package/src/{NativeRNBootSplash.ts → specs/NativeRNBootSplash.ts} +1 -1
  55. package/src/{NativeRNBootSplash.web.ts → specs/NativeRNBootSplash.web.ts} +1 -1
  56. package/android/src/main/AndroidManifestNew.xml +0 -3
  57. package/android/src/main/res/drawable-v23/compat_splash_screen.xml +0 -19
  58. package/android/src/main/res/drawable-v23/compat_splash_screen_oneui_4.xml +0 -21
  59. package/android/src/main/res/values-v23/styles.xml +0 -13
  60. package/dist/commonjs/NativeRNBootSplash.js.map +0 -1
  61. package/dist/commonjs/NativeRNBootSplash.web.js.map +0 -1
  62. package/dist/commonjs/expo.js +0 -348
  63. package/dist/commonjs/expo.js.map +0 -1
  64. package/dist/module/NativeRNBootSplash.js.map +0 -1
  65. package/dist/module/NativeRNBootSplash.web.js.map +0 -1
  66. package/dist/module/expo.js +0 -341
  67. package/dist/module/expo.js.map +0 -1
  68. package/dist/typescript/NativeRNBootSplash.d.ts.map +0 -1
  69. package/dist/typescript/NativeRNBootSplash.web.d.ts.map +0 -1
  70. package/dist/typescript/expo.d.ts +0 -11
  71. package/dist/typescript/expo.d.ts.map +0 -1
  72. package/react-native.config.js +0 -101
  73. package/src/expo.ts +0 -439
  74. /package/dist/commonjs/{NativeRNBootSplash.js → specs/NativeRNBootSplash.js} +0 -0
  75. /package/dist/module/{NativeRNBootSplash.js → specs/NativeRNBootSplash.js} +0 -0
package/README.md CHANGED
@@ -49,14 +49,17 @@ Usage: react-native-bootsplash generate [options] <logo>
49
49
 
50
50
  Generate a launch screen using a logo file path (PNG or SVG)
51
51
 
52
+ Arguments:
53
+ logo Logo file path (PNG or SVG)
54
+
52
55
  Options:
53
- --project-type <string> Project type ("detect", "bare" or "expo") (default: "detect")
54
56
  --platforms <list> Platforms to generate for, separated by a comma (default: "android,ios,web")
55
57
  --background <string> Background color (in hexadecimal format) (default: "#fff")
56
58
  --logo-width <number> Logo width at @1x (in dp - we recommend approximately ~100) (default: 100)
57
59
  --assets-output <string> Assets output directory path (default: "assets/bootsplash")
58
60
  --flavor <string> Android flavor build variant (where your resource directory is) (default: "main")
59
61
  --html <string> HTML template file path (your web app entry point) (default: "public/index.html")
62
+ --plist <string> Custom Info.plist file path
60
63
  --license-key <string> License key to enable brand and dark mode assets generation
61
64
  --brand <string> Brand file path (PNG or SVG)
62
65
  --brand-width <number> Brand width at @1x (in dp - we recommend approximately ~80) (default: 80)
@@ -167,7 +170,7 @@ $ yarn remove expo-splash-screen
167
170
  - "backgroundColor": "#ffffff"
168
171
  - }
169
172
  - ],
170
- + ["react-native-bootsplash", { "assetsDir": "assets/bootsplash" }]
173
+ + ["react-native-bootsplash", { "assetsOutput": "assets/bootsplash" }]
171
174
  ]
172
175
  }
173
176
  }
@@ -177,9 +180,8 @@ _📌 The available plugins options are:_
177
180
 
178
181
  ```ts
179
182
  type PluginOptions = {
180
- assetsDir?: string; // optional, default is "assets/bootsplash"
183
+ assetsOutput?: string; // optional, default is "assets/bootsplash"
181
184
  android?: {
182
- parentTheme?: "TransparentStatus" | "EdgeToEdge"; // optional, default is `undefined` (`Theme.BootSplash`)
183
185
  darkContentBarsStyle?: boolean; // optional, default is `undefined`
184
186
  };
185
187
  };
@@ -187,7 +189,7 @@ type PluginOptions = {
187
189
 
188
190
  ### With bare React Native
189
191
 
190
- #### iOS (react-native 0.79+)
192
+ #### iOS
191
193
 
192
194
  Edit your `ios/YourApp/AppDelegate.swift` file:
193
195
 
@@ -209,29 +211,6 @@ class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
209
211
  }
210
212
  ```
211
213
 
212
- #### iOS (react-native 0.77+)
213
-
214
- Edit your `ios/YourApp/AppDelegate.swift` file:
215
-
216
- ```swift
217
- import ReactAppDependencyProvider
218
- import RNBootSplash // ⬅️ add this import
219
-
220
- // …
221
-
222
- @main
223
- class AppDelegate: RCTAppDelegate {
224
-
225
- // …
226
-
227
- // ⬇️ override this method
228
- override func customize(_ rootView: RCTRootView!) {
229
- super.customize(rootView)
230
- RNBootSplash.initWithStoryboard("BootSplash", rootView: rootView) // ⬅️ initialize the splash screen
231
- }
232
- }
233
- ```
234
-
235
214
  #### Android
236
215
 
237
216
  Edit your `android/app/src/main/java/com/yourapp/MainActivity.kt` file:
@@ -254,7 +233,7 @@ class MainActivity : ReactActivity() {
254
233
  }
255
234
  ```
256
235
 
257
- _ℹ️ Refer to [previous package documentation](https://github.com/zoontek/react-native-bootsplash/tree/6.3.4?tab=readme-ov-file#with-bare-react-native) for setup steps with React Native < 0.77._
236
+ _ℹ️ Refer to [previous package documentation](https://github.com/zoontek/react-native-bootsplash/tree/6.3.11?tab=readme-ov-file#with-bare-react-native) for setup steps with React Native < 0.79._
258
237
 
259
238
  ## API
260
239
 
@@ -298,7 +277,7 @@ Return the current visibility status of the native splash screen.
298
277
  #### Method type
299
278
 
300
279
  ```ts
301
- type isVisible = () => Promise<boolean>;
280
+ type isVisible = () => boolean;
302
281
  ```
303
282
 
304
283
  #### Usage
@@ -306,7 +285,9 @@ type isVisible = () => Promise<boolean>;
306
285
  ```ts
307
286
  import BootSplash from "react-native-bootsplash";
308
287
 
309
- BootSplash.isVisible().then((value) => console.log(value));
288
+ if (BootSplash.isVisible()) {
289
+ // Do something
290
+ }
310
291
  ```
311
292
 
312
293
  ### useHideAnimation()
@@ -408,24 +389,18 @@ const App = () => {
408
389
 
409
390
  ## FAQ
410
391
 
411
- ### How can I have a transparent status bar, or [edge-to-edge layout](https://developer.android.com/develop/ui/views/layout/edge-to-edge)?
392
+ ### How can I enforce the splash screen system bar colors?
412
393
 
413
- Edit your `values/styles.xml` file to inherit from `Theme.BootSplash.TransparentStatus` / `Theme.BootSplash.EdgeToEdge` instead of `Theme.BootSplash`:
394
+ By default, the system bars `dark-content` in light mode and `light-content` in dark mode. To enforce a specific value, edit your `values/styles.xml` file:
414
395
 
415
396
  ```xml
416
397
  <resources>
417
-
418
398
  <!-- … -->
419
399
 
420
- <!-- make BootTheme inherit from Theme.BootSplash.TransparentStatus / Theme.BootSplash.EdgeToEdge -->
421
- <style name="BootTheme" parent="Theme.BootSplash.EdgeToEdge">
422
- <!-- … -->
423
-
424
- <!-- optional, used to enforce the initial bars styles -->
425
- <!-- default is true in light mode, false in dark mode -->
400
+ <style name="BootTheme" parent="Theme.BootSplash">
426
401
  <item name="darkContentBarsStyle">true</item>
402
+ <!-- … -->
427
403
  </style>
428
-
429
404
  </resources>
430
405
  ```
431
406
 
@@ -7,8 +7,8 @@ buildscript {
7
7
  gradlePluginPortal()
8
8
  }
9
9
  dependencies {
10
- classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet("kotlinVersion", "1.8.0")}")
11
- classpath("com.android.tools.build:gradle:7.3.1")
10
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet("kotlinVersion", "2.1.20")}")
11
+ classpath("com.android.tools.build:gradle:8.13.0")
12
12
  }
13
13
  }
14
14
 
@@ -24,25 +24,18 @@ if (isNewArchitectureEnabled()) {
24
24
  }
25
25
 
26
26
  android {
27
- buildToolsVersion safeExtGet("buildToolsVersion", "34.0.0")
28
- compileSdkVersion safeExtGet("compileSdkVersion", 34)
27
+ namespace "com.zoontek.rnbootsplash"
29
28
 
30
- if (project.android.hasProperty("namespace")) {
31
- namespace "com.zoontek.rnbootsplash"
29
+ buildToolsVersion safeExtGet("buildToolsVersion", "35.0.0")
30
+ compileSdkVersion safeExtGet("compileSdkVersion", 35)
32
31
 
33
- buildFeatures {
34
- buildConfig true
35
- }
36
- sourceSets {
37
- main {
38
- manifest.srcFile "src/main/AndroidManifestNew.xml"
39
- }
40
- }
32
+ buildFeatures {
33
+ buildConfig true
41
34
  }
42
35
  defaultConfig {
43
36
  buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())
44
- minSdkVersion safeExtGet("minSdkVersion", 23)
45
- targetSdkVersion safeExtGet("targetSdkVersion", 34)
37
+ minSdkVersion safeExtGet("minSdkVersion", 24)
38
+ targetSdkVersion safeExtGet("targetSdkVersion", 35)
46
39
  }
47
40
  lintOptions {
48
41
  abortOnError false
@@ -63,8 +56,8 @@ repositories {
63
56
  // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
64
57
  url("$rootDir/../node_modules/react-native/android")
65
58
  }
66
- mavenCentral()
67
59
  google()
60
+ mavenCentral()
68
61
  }
69
62
 
70
63
  dependencies {
@@ -1,3 +1,3 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.zoontek.rnbootsplash">
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
3
3
  </manifest>
@@ -236,7 +236,7 @@ object RNBootSplashModuleImpl {
236
236
  hideAndClearPromiseQueue(reactContext, fade)
237
237
  }
238
238
 
239
- fun isVisible(promise: Promise) {
240
- promise.resolve(mStatus != Status.HIDDEN)
239
+ fun isVisible(): Boolean {
240
+ return mStatus != Status.HIDDEN
241
241
  }
242
242
  }
@@ -25,7 +25,6 @@ class RNBootSplashPackage : TurboReactPackage() {
25
25
  RNBootSplashModuleImpl.NAME,
26
26
  false,
27
27
  false,
28
- true,
29
28
  false,
30
29
  isTurboModule
31
30
  )
@@ -10,7 +10,7 @@ class RNBootSplashQueue<E> : Vector<E>() {
10
10
 
11
11
  @Synchronized
12
12
  fun shift(): E? {
13
- if (size == 0) {
13
+ if (isEmpty()) {
14
14
  return null
15
15
  }
16
16
 
@@ -4,11 +4,16 @@
4
4
  <color android:color="?attr/bootSplashBackground" />
5
5
  </item>
6
6
 
7
- <item android:gravity="fill">
8
- <bitmap android:src="?bootSplashLogo" android:gravity="center" />
9
- </item>
7
+ <item
8
+ android:drawable="?bootSplashLogo"
9
+ android:gravity="center"
10
+ android:width="288dp"
11
+ android:height="288dp" />
10
12
 
11
- <item android:gravity="fill" android:bottom="60dp">
12
- <bitmap android:src="?bootSplashBrand" android:gravity="bottom|center_horizontal" />
13
- </item>
13
+ <item
14
+ android:drawable="?bootSplashBrand"
15
+ android:gravity="bottom|center_horizontal"
16
+ android:width="200dp"
17
+ android:height="80dp"
18
+ android:bottom="60dp" />
14
19
  </layer-list>
@@ -4,11 +4,18 @@
4
4
  <color android:color="?attr/bootSplashBackground" />
5
5
  </item>
6
6
 
7
- <item android:gravity="fill">
8
- <bitmap android:src="?bootSplashLogo" android:gravity="center" />
9
- </item>
7
+ <!-- There's an issue with logo size on Samsung OneUI v4
8
+ We need to render it 2 times smaller (288 / 2 = 144) -->
9
+ <item
10
+ android:drawable="?bootSplashLogo"
11
+ android:gravity="center"
12
+ android:width="144dp"
13
+ android:height="144dp" />
10
14
 
11
- <item android:gravity="fill" android:bottom="60dp">
12
- <bitmap android:src="?bootSplashBrand" android:gravity="bottom|center_horizontal" />
13
- </item>
15
+ <item
16
+ android:drawable="?bootSplashBrand"
17
+ android:gravity="bottom|center_horizontal"
18
+ android:width="200dp"
19
+ android:height="80dp"
20
+ android:bottom="60dp" />
14
21
  </layer-list>
@@ -2,7 +2,5 @@
2
2
  <resources>
3
3
  <!-- https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/res/remote_color_resources_res/values/colors.xml;l=67 -->
4
4
  <!-- https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/res/res/color/system_bar_background_semi_transparent.xml -->
5
- <color name="systemBarDarkScrim">#801b1b1b</color>
6
- <!-- https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/com/android/internal/policy/DecorView.java;l=142 -->
7
- <color name="systemBarLightScrim">#e6ffffff</color>
5
+ <color name="navigationBarColor">#801b1b1b</color>
8
6
  </resources>
@@ -7,6 +7,4 @@
7
7
  <public name="postBootSplashTheme" type="attr" />
8
8
 
9
9
  <public name="Theme.BootSplash" type="style" />
10
- <public name="Theme.BootSplash.TransparentStatus" type="style" />
11
- <public name="Theme.BootSplash.EdgeToEdge" type="style" />
12
10
  </resources>
@@ -10,35 +10,29 @@
10
10
  <item name="android:windowExitAnimation">@anim/bootsplash_fade_out</item>
11
11
  </style>
12
12
 
13
- <style name="Theme.BootSplash.DayNight" parent="Theme.AppCompat.DayNight.NoActionBar">
14
- </style>
15
-
16
- <style name="Theme.BootSplash.Base" parent="Theme.BootSplash.DayNight">
13
+ <style name="Theme.BootSplash.Attr" parent="Theme.AppCompat.DayNight.NoActionBar">
17
14
  <item name="darkContentBarsStyle">true</item>
18
15
  </style>
19
16
 
20
- <style name="Theme.BootSplash.Common" parent="Theme.BootSplash.Base">
17
+ <style name="Theme.BootSplash.Base" parent="Theme.BootSplash.Attr">
21
18
  <item name="android:opacity">opaque</item>
22
19
  <item name="android:windowBackground">@drawable/compat_splash_screen</item>
23
20
  <item name="bootSplashBrand">@drawable/transparent_pixel</item>
21
+
22
+ <item name="android:windowDrawsSystemBarBackgrounds">true</item>
23
+ <item name="android:fitsSystemWindows">false</item>
24
+ <item name="android:navigationBarColor">@color/navigationBarColor</item>
25
+ <item name="android:statusBarColor">@android:color/transparent</item>
26
+ <item name="android:windowLightStatusBar">?darkContentBarsStyle</item>
24
27
  </style>
25
28
 
26
- <style name="Theme.BootSplash" parent="Theme.BootSplash.Common">
29
+ <style name="Theme.BootSplash.v27" parent="Theme.BootSplash.Base" />
30
+ <style name="Theme.BootSplash.v29" parent="Theme.BootSplash.v27" />
31
+ <style name="Theme.BootSplash.v30" parent="Theme.BootSplash.v29" />
32
+
33
+ <style name="Theme.BootSplash" parent="Theme.BootSplash.v30">
27
34
  <item name="bootSplashBackground">?android:colorBackground</item>
28
35
  <item name="bootSplashLogo">@android:drawable/sym_def_app_icon</item>
29
36
  <item name="postBootSplashTheme">?android:attr/theme</item>
30
37
  </style>
31
-
32
- <style name="Theme.BootSplash.TransparentStatus" parent="Theme.BootSplash">
33
- </style>
34
-
35
- <style name="Theme.BootSplash.EdgeToEdge.Common" parent="Theme.BootSplash">
36
- <item name="android:fitsSystemWindows">false</item>
37
- <item name="android:windowDrawsSystemBarBackgrounds">true</item>
38
- </style>
39
-
40
- <style name="Theme.BootSplash.EdgeToEdge" parent="Theme.BootSplash.EdgeToEdge.Common">
41
- <item name="android:statusBarColor">@color/systemBarDarkScrim</item>
42
- <item name="android:navigationBarColor">@color/systemBarDarkScrim</item>
43
- </style>
44
38
  </resources>
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <resources>
3
- <style name="Theme.BootSplash.Base" parent="Theme.BootSplash.DayNight">
3
+ <style name="Theme.BootSplash.Attr" parent="Theme.AppCompat.DayNight.NoActionBar">
4
4
  <item name="darkContentBarsStyle">false</item>
5
5
  </style>
6
6
  </resources>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <resources>
3
+ <color name="navigationBarColor">@android:color/transparent</color>
4
+ </resources>
@@ -1,12 +1,7 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <resources>
3
- <style name="Theme.BootSplash.EdgeToEdge" parent="Theme.BootSplash.EdgeToEdge.Common">
3
+ <style name="Theme.BootSplash.v27" parent="Theme.BootSplash.Base">
4
4
  <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
5
-
6
- <item name="android:statusBarColor">@android:color/transparent</item>
7
- <item name="android:windowLightStatusBar">?darkContentBarsStyle</item>
8
-
9
- <item name="android:navigationBarColor">@android:color/transparent</item>
10
5
  <item name="android:windowLightNavigationBar">?darkContentBarsStyle</item>
11
6
  </style>
12
7
  </resources>
@@ -1,18 +1,8 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <resources>
3
- <style name="Theme.BootSplash.DayNight" parent="Theme.AppCompat.DayNight.NoActionBar">
3
+ <style name="Theme.BootSplash.v29" parent="Theme.BootSplash.v27">
4
4
  <item name="android:forceDarkAllowed">false</item>
5
- </style>
6
-
7
- <style name="Theme.BootSplash.EdgeToEdge" parent="Theme.BootSplash.EdgeToEdge.Common">
8
- <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
9
-
10
5
  <item name="android:enforceStatusBarContrast">false</item>
11
- <item name="android:statusBarColor">@android:color/transparent</item>
12
- <item name="android:windowLightStatusBar">?darkContentBarsStyle</item>
13
-
14
6
  <item name="android:enforceNavigationBarContrast">false</item>
15
- <item name="android:navigationBarColor">@android:color/transparent</item>
16
- <item name="android:windowLightNavigationBar">?darkContentBarsStyle</item>
17
7
  </style>
18
8
  </resources>
@@ -1,14 +1,6 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <resources>
3
- <style name="Theme.BootSplash.EdgeToEdge" parent="Theme.BootSplash.EdgeToEdge.Common">
3
+ <style name="Theme.BootSplash.v30" parent="Theme.BootSplash.v29">
4
4
  <item name="android:windowLayoutInDisplayCutoutMode">always</item>
5
-
6
- <item name="android:enforceStatusBarContrast">false</item>
7
- <item name="android:statusBarColor">@android:color/transparent</item>
8
- <item name="android:windowLightStatusBar">?darkContentBarsStyle</item>
9
-
10
- <item name="android:enforceNavigationBarContrast">false</item>
11
- <item name="android:navigationBarColor">@android:color/transparent</item>
12
- <item name="android:windowLightNavigationBar">?darkContentBarsStyle</item>
13
5
  </style>
14
6
  </resources>
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
2
  <resources>
3
- <style name="Theme.BootSplash" parent="Theme.BootSplash.Common">
3
+ <style name="Theme.BootSplash" parent="Theme.BootSplash.v30">
4
4
  <item name="android:windowSplashScreenBackground">?bootSplashBackground</item>
5
5
  <item name="android:windowSplashScreenAnimatedIcon">?bootSplashLogo</item>
6
6
  <item name="android:windowSplashScreenBrandingImage">?bootSplashBrand</item>
@@ -33,7 +33,7 @@ class RNBootSplashModule(reactContext: ReactApplicationContext) :
33
33
  RNBootSplashModuleImpl.hide(reactApplicationContext, fade, promise)
34
34
  }
35
35
 
36
- override fun isVisible(promise: Promise) {
37
- RNBootSplashModuleImpl.isVisible(promise)
36
+ override fun isVisible(): Boolean {
37
+ return RNBootSplashModuleImpl.isVisible()
38
38
  }
39
39
  }
@@ -36,8 +36,8 @@ class RNBootSplashModule(reactContext: ReactApplicationContext) :
36
36
  RNBootSplashModuleImpl.hide(reactApplicationContext, fade, promise)
37
37
  }
38
38
 
39
- @ReactMethod
40
- fun isVisible(promise: Promise) {
41
- RNBootSplashModuleImpl.isVisible(promise)
39
+ @ReactMethod(isBlockingSynchronousMethod = true)
40
+ fun isVisible(): Boolean {
41
+ return RNBootSplashModuleImpl.isVisible()
42
42
  }
43
43
  }
package/app.plugin.js CHANGED
@@ -1,2 +1,2 @@
1
- const { withBootSplash } = require("./dist/commonjs/expo");
1
+ const { withBootSplash } = require("./dist/commonjs/generate");
2
2
  module.exports = withBootSplash;
package/cli.js CHANGED
@@ -5,7 +5,6 @@ const { Command } = require("commander");
5
5
  const program = new Command();
6
6
  const pkg = require("./package.json");
7
7
 
8
- const validProjectTypes = ["detect", "bare", "expo"];
9
8
  const validPlatforms = ["android", "ios", "web"];
10
9
 
11
10
  program
@@ -15,11 +14,6 @@ program
15
14
  .command("generate", { isDefault: true })
16
15
  .description("Generate a launch screen using a logo file path (PNG or SVG)")
17
16
  .argument("<logo>", "Logo file path (PNG or SVG)")
18
- .option(
19
- "--project-type <string>",
20
- 'Project type ("detect", "bare" or "expo")',
21
- "detect",
22
- )
23
17
  .option(
24
18
  "--platforms <list>",
25
19
  "Platforms to generate for, separated by a comma",
@@ -50,6 +44,7 @@ program
50
44
  "HTML template file path (your web app entry point)",
51
45
  "public/index.html",
52
46
  )
47
+ .option("--plist <string>", "Custom Info.plist file path")
53
48
  .option(
54
49
  "--license-key <string>",
55
50
  "License key to enable brand and dark mode assets generation",
@@ -67,15 +62,11 @@ program
67
62
  .option("--dark-logo <string>", "[dark mode] Logo file path (PNG or SVG)")
68
63
  .option("--dark-brand <string>", "[dark mode] Brand file path (PNG or SVG)")
69
64
  .action((logo, options) => {
70
- const { projectType, platforms, logoWidth, brandWidth, ...rest } = options;
65
+ const { platforms, logoWidth, brandWidth, ...rest } = options;
71
66
 
72
67
  const args = {
73
68
  ...rest,
74
69
 
75
- projectType: validProjectTypes.includes(projectType.toLowerCase())
76
- ? projectType.toLowerCase()
77
- : "detect",
78
-
79
70
  platforms: [
80
71
  ...new Set(
81
72
  platforms