react-native-bootsplash 6.3.4 → 6.3.5

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.
package/src/expo.ts CHANGED
@@ -3,6 +3,7 @@ import { assignColorValue } from "@expo/config-plugins/build/android/Colors";
3
3
  import { addImports } from "@expo/config-plugins/build/android/codeMod";
4
4
  import { mergeContents } from "@expo/config-plugins/build/utils/generateCode";
5
5
  import path from "path";
6
+ import semver from "semver";
6
7
  import { dedent } from "ts-dedent";
7
8
  import { Manifest } from ".";
8
9
  import { cleanIOSAssets, getExpoConfig, hfs, log } from "./generate";
@@ -276,7 +277,7 @@ const withIOSAssets: Expo.ConfigPlugin<Props> = (config, props) =>
276
277
 
277
278
  const withAppDelegate: Expo.ConfigPlugin<Props> = (config) =>
278
279
  Expo.withAppDelegate(config, (config) => {
279
- const { modResults } = config;
280
+ const { modResults, sdkVersion = "0.1.0" } = config;
280
281
  const { language } = modResults;
281
282
 
282
283
  if (language !== "objc" && language !== "objcpp" && language !== "swift") {
@@ -303,18 +304,25 @@ const withAppDelegate: Expo.ConfigPlugin<Props> = (config) =>
303
304
  offset: swift ? 1 : 0,
304
305
  anchor: swift ? /public class AppDelegate: ExpoAppDelegate {/ : /@end/,
305
306
  newSrc: swift
306
- ? dedent`
307
- override func customize(_ rootView: RCTRootView!) {
308
- super.customize(rootView)
309
- RNBootSplash.initWithStoryboard("BootSplash", rootView: rootView)
310
- }
311
- `
307
+ ? semver.major(sdkVersion) >= 53
308
+ ? dedent`
309
+ public override func customize(_ rootView: RCTRootView) {
310
+ super.customize(rootView)
311
+ RNBootSplash.initWithStoryboard("BootSplash", rootView: rootView)
312
+ }
313
+ `
314
+ : dedent`
315
+ override func customize(_ rootView: RCTRootView!) {
316
+ super.customize(rootView)
317
+ RNBootSplash.initWithStoryboard("BootSplash", rootView: rootView)
318
+ }
319
+ `
312
320
  : dedent`
313
- - (void)customizeRootView:(RCTRootView *)rootView {
314
- [super customizeRootView:rootView];
315
- [RNBootSplash initWithStoryboard:@"BootSplash" rootView:rootView];
316
- }
317
- `,
321
+ - (void)customizeRootView:(RCTRootView *)rootView {
322
+ [super customizeRootView:rootView];
323
+ [RNBootSplash initWithStoryboard:@"BootSplash" rootView:rootView];
324
+ }
325
+ `,
318
326
  });
319
327
 
320
328
  return {
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _reactNative = require("react-native");
8
- var _default = exports.default = _reactNative.TurboModuleRegistry.getEnforcing("RNBootSplash");
9
- //# sourceMappingURL=NativeRNBootSplash.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeRNBootSplash.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAapCC,gCAAmB,CAACC,YAAY,CAAO,cAAc,CAAC","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- import { TurboModuleRegistry } from "react-native";
4
- export default TurboModuleRegistry.getEnforcing("RNBootSplash");
5
- //# sourceMappingURL=NativeRNBootSplash.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeRNBootSplash.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AAalD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,cAAc,CAAC","ignoreList":[]}