expo-splash-screen 0.22.0 → 0.23.1

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/CHANGELOG.md CHANGED
@@ -10,6 +10,20 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 0.23.1 — 2023-09-18
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 0.23.0 — 2023-09-15
18
+
19
+ ### 🎉 New features
20
+
21
+ - Added support for Apple tvOS. ([#24329](https://github.com/expo/expo/pull/24329) by [@douglowder](https://github.com/douglowder))
22
+
23
+ ### 💡 Others
24
+
25
+ - Delete deprecated `hide` and `preventAutoHide` methods. ([#24296](https://github.com/expo/expo/pull/24296) by [@EvanBacon](https://github.com/EvanBacon))
26
+
13
27
  ## 0.22.0 — 2023-09-04
14
28
 
15
29
  ### 🎉 New features
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '0.22.0'
6
+ version = '0.23.1'
7
7
 
8
8
  buildscript {
9
9
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
@@ -70,7 +70,7 @@ android {
70
70
  minSdkVersion safeExtGet('minSdkVersion', 21)
71
71
  targetSdkVersion safeExtGet("targetSdkVersion", 33)
72
72
  versionCode 17
73
- versionName '0.22.0'
73
+ versionName '0.23.1'
74
74
  }
75
75
  lintOptions {
76
76
  abortOnError false
package/build/index.d.ts CHANGED
@@ -1,2 +1,26 @@
1
- export * from './SplashScreen';
1
+ /**
2
+ * Makes the native splash screen (configured in `app.json`) remain visible until `hideAsync` is called.
3
+ *
4
+ * > **Important note**: It is recommended to call this in global scope without awaiting, rather than
5
+ * > inside React components or hooks, because otherwise this might be called too late,
6
+ * > when the splash screen is already hidden.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * import * as SplashScreen from 'expo-splash-screen';
11
+ *
12
+ * SplashScreen.preventAutoHideAsync();
13
+ *
14
+ * export default function App() {
15
+ * // ...
16
+ * }
17
+ * ```
18
+ */
19
+ export declare function preventAutoHideAsync(): Promise<boolean>;
20
+ /**
21
+ * Hides the native splash screen immediately. Be careful to ensure that your app has content ready
22
+ * to display when you hide the splash screen, or you may see a blank screen briefly. See the
23
+ * ["Usage"](#usage) section for an example.
24
+ */
25
+ export declare function hideAsync(): Promise<boolean>;
2
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,OAAO,CAAC,CAE7D;AAGD;;;;GAIG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAElD"}
package/build/index.js CHANGED
@@ -1,2 +1,32 @@
1
- export * from './SplashScreen';
1
+ // @needsAudit
2
+ /**
3
+ * Makes the native splash screen (configured in `app.json`) remain visible until `hideAsync` is called.
4
+ *
5
+ * > **Important note**: It is recommended to call this in global scope without awaiting, rather than
6
+ * > inside React components or hooks, because otherwise this might be called too late,
7
+ * > when the splash screen is already hidden.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * import * as SplashScreen from 'expo-splash-screen';
12
+ *
13
+ * SplashScreen.preventAutoHideAsync();
14
+ *
15
+ * export default function App() {
16
+ * // ...
17
+ * }
18
+ * ```
19
+ */
20
+ export async function preventAutoHideAsync() {
21
+ return false;
22
+ }
23
+ // @needsAudit
24
+ /**
25
+ * Hides the native splash screen immediately. Be careful to ensure that your app has content ready
26
+ * to display when you hide the splash screen, or you may see a blank screen briefly. See the
27
+ * ["Usage"](#usage) section for an example.
28
+ */
29
+ export async function hideAsync() {
30
+ return false;
31
+ }
2
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './SplashScreen';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,OAAO,KAAK,CAAC;AACf,CAAC;AAED,cAAc;AACd;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["// @needsAudit\n/**\n * Makes the native splash screen (configured in `app.json`) remain visible until `hideAsync` is called.\n *\n * > **Important note**: It is recommended to call this in global scope without awaiting, rather than\n * > inside React components or hooks, because otherwise this might be called too late,\n * > when the splash screen is already hidden.\n *\n * @example\n * ```ts\n * import * as SplashScreen from 'expo-splash-screen';\n *\n * SplashScreen.preventAutoHideAsync();\n *\n * export default function App() {\n * // ...\n * }\n * ```\n */\nexport async function preventAutoHideAsync(): Promise<boolean> {\n return false;\n}\n\n// @needsAudit\n/**\n * Hides the native splash screen immediately. Be careful to ensure that your app has content ready\n * to display when you hide the splash screen, or you may see a blank screen briefly. See the\n * [\"Usage\"](#usage) section for an example.\n */\nexport async function hideAsync(): Promise<boolean> {\n return false;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const preventAutoHideAsync: () => Promise<boolean>, hideAsync: () => Promise<boolean>;
2
+ //# sourceMappingURL=index.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"AAEA,eAAO,MAAQ,oBAAoB,QACL,QAAQ,OAAO,CAAC,EADT,SAAS,QAE3B,QAAQ,OAAO,CACjC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { requireNativeModule } from 'expo-modules-core';
2
+ export const { preventAutoHideAsync, hideAsync } = requireNativeModule('ExpoSplashScreen');
3
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.native.js","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,CAAC,MAAM,EAAE,oBAAoB,EAAE,SAAS,EAAE,GAAG,mBAAmB,CAAC,kBAAkB,CAGxF,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\n\nexport const { preventAutoHideAsync, hideAsync } = requireNativeModule('ExpoSplashScreen') as {\n preventAutoHideAsync: () => Promise<boolean>;\n hideAsync: () => Promise<boolean>;\n};\n"]}
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
10
10
  s.license = package['license']
11
11
  s.author = package['author']
12
12
  s.homepage = package['homepage']
13
- s.platform = :ios, '13.0'
13
+ s.platforms = { :ios => '13.0', :tvos => '13.0' }
14
14
  s.source = { git: 'https://github.com/expo/expo.git' }
15
15
  s.static_framework = true
16
16
 
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "expo-splash-screen",
3
- "version": "0.22.0",
3
+ "version": "0.23.1",
4
4
  "description": "Provides a module to allow keeping the native Splash Screen visible until you choose to hide it.",
5
- "main": "build/index.js",
6
- "types": "build/index.d.ts",
5
+ "main": "build",
6
+ "types": "build",
7
7
  "scripts": {
8
8
  "build": "expo-module build",
9
9
  "clean": "expo-module clean",
@@ -33,11 +33,8 @@
33
33
  "author": "650 Industries, Inc.",
34
34
  "license": "MIT",
35
35
  "homepage": "https://docs.expo.dev/versions/latest/sdk/splash-screen/",
36
- "jest": {
37
- "preset": "expo-module-scripts"
38
- },
39
36
  "dependencies": {
40
- "@expo/prebuild-config": "6.4.0"
37
+ "@expo/prebuild-config": "6.4.1"
41
38
  },
42
39
  "devDependencies": {
43
40
  "expo-module-scripts": "^3.0.0"
@@ -45,5 +42,5 @@
45
42
  "peerDependencies": {
46
43
  "expo": "*"
47
44
  },
48
- "gitHead": "79607a7325f47aa17c36d266100d09a4ff2cc544"
45
+ "gitHead": "62f76105dfb436f7144440d6e6077d4ff3263842"
49
46
  }
@@ -0,0 +1,6 @@
1
+ import { requireNativeModule } from 'expo-modules-core';
2
+
3
+ export const { preventAutoHideAsync, hideAsync } = requireNativeModule('ExpoSplashScreen') as {
4
+ preventAutoHideAsync: () => Promise<boolean>;
5
+ hideAsync: () => Promise<boolean>;
6
+ };
package/src/index.ts CHANGED
@@ -1 +1,32 @@
1
- export * from './SplashScreen';
1
+ // @needsAudit
2
+ /**
3
+ * Makes the native splash screen (configured in `app.json`) remain visible until `hideAsync` is called.
4
+ *
5
+ * > **Important note**: It is recommended to call this in global scope without awaiting, rather than
6
+ * > inside React components or hooks, because otherwise this might be called too late,
7
+ * > when the splash screen is already hidden.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * import * as SplashScreen from 'expo-splash-screen';
12
+ *
13
+ * SplashScreen.preventAutoHideAsync();
14
+ *
15
+ * export default function App() {
16
+ * // ...
17
+ * }
18
+ * ```
19
+ */
20
+ export async function preventAutoHideAsync(): Promise<boolean> {
21
+ return false;
22
+ }
23
+
24
+ // @needsAudit
25
+ /**
26
+ * Hides the native splash screen immediately. Be careful to ensure that your app has content ready
27
+ * to display when you hide the splash screen, or you may see a blank screen briefly. See the
28
+ * ["Usage"](#usage) section for an example.
29
+ */
30
+ export async function hideAsync(): Promise<boolean> {
31
+ return false;
32
+ }
@@ -1,3 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
3
- //# sourceMappingURL=ExpoSplashScreen.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpoSplashScreen.d.ts","sourceRoot":"","sources":["../src/ExpoSplashScreen.ts"],"names":[],"mappings":";AACA,wBAAuD"}
@@ -1,3 +0,0 @@
1
- import { requireNativeModule } from 'expo-modules-core';
2
- export default requireNativeModule('ExpoSplashScreen');
3
- //# sourceMappingURL=ExpoSplashScreen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpoSplashScreen.js","sourceRoot":"","sources":["../src/ExpoSplashScreen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,eAAe,mBAAmB,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import { requireNativeModule } from 'expo-modules-core';\nexport default requireNativeModule('ExpoSplashScreen');\n"]}
@@ -1,7 +0,0 @@
1
- declare const _default: {
2
- readonly name: string;
3
- preventAutoHideAsync(): boolean;
4
- hideAsync(): boolean;
5
- };
6
- export default _default;
7
- //# sourceMappingURL=ExpoSplashScreen.web.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpoSplashScreen.web.d.ts","sourceRoot":"","sources":["../src/ExpoSplashScreen.web.ts"],"names":[],"mappings":";;;;;AAAA,wBAUE"}
@@ -1,12 +0,0 @@
1
- export default {
2
- get name() {
3
- return 'ExpoSplashScreen';
4
- },
5
- preventAutoHideAsync() {
6
- return false;
7
- },
8
- hideAsync() {
9
- return false;
10
- },
11
- };
12
- //# sourceMappingURL=ExpoSplashScreen.web.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpoSplashScreen.web.js","sourceRoot":"","sources":["../src/ExpoSplashScreen.web.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,IAAI,IAAI;QACN,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,oBAAoB;QAClB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,SAAS;QACP,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC","sourcesContent":["export default {\n get name(): string {\n return 'ExpoSplashScreen';\n },\n preventAutoHideAsync() {\n return false;\n },\n hideAsync() {\n return false;\n },\n};\n"]}
@@ -1,36 +0,0 @@
1
- /**
2
- * Makes the native splash screen (configured in `app.json`) remain visible until `hideAsync` is called.
3
- *
4
- * > **Important note**: It is recommended to call this in global scope without awaiting, rather than
5
- * > inside React components or hooks, because otherwise this might be called too late,
6
- * > when the splash screen is already hidden.
7
- *
8
- * @example
9
- * ```ts
10
- * import * as SplashScreen from 'expo-splash-screen';
11
- *
12
- * SplashScreen.preventAutoHideAsync();
13
- *
14
- * export default function App() {
15
- * // ...
16
- * }
17
- * ```
18
- */
19
- export declare function preventAutoHideAsync(): Promise<boolean>;
20
- /**
21
- * Hides the native splash screen immediately. Be careful to ensure that your app has content ready
22
- * to display when you hide the splash screen, or you may see a blank screen briefly. See the
23
- * ["Usage"](#usage) section for an example.
24
- */
25
- export declare function hideAsync(): Promise<boolean>;
26
- /**
27
- * @deprecated Use `SplashScreen.hideAsync()` instead
28
- * @ignore
29
- */
30
- export declare function hide(): void;
31
- /**
32
- * @deprecated Use `SplashScreen.preventAutoHideAsync()` instead
33
- * @ignore
34
- */
35
- export declare function preventAutoHide(): void;
36
- //# sourceMappingURL=SplashScreen.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SplashScreen.d.ts","sourceRoot":"","sources":["../src/SplashScreen.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,OAAO,CAAC,CAK7D;AAGD;;;;GAIG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAKlD;AAED;;;GAGG;AACH,wBAAgB,IAAI,IAAI,IAAI,CAG3B;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAKtC"}
@@ -1,56 +0,0 @@
1
- import { UnavailabilityError } from 'expo-modules-core';
2
- import ExpoSplashScreen from './ExpoSplashScreen';
3
- // @needsAudit
4
- /**
5
- * Makes the native splash screen (configured in `app.json`) remain visible until `hideAsync` is called.
6
- *
7
- * > **Important note**: It is recommended to call this in global scope without awaiting, rather than
8
- * > inside React components or hooks, because otherwise this might be called too late,
9
- * > when the splash screen is already hidden.
10
- *
11
- * @example
12
- * ```ts
13
- * import * as SplashScreen from 'expo-splash-screen';
14
- *
15
- * SplashScreen.preventAutoHideAsync();
16
- *
17
- * export default function App() {
18
- * // ...
19
- * }
20
- * ```
21
- */
22
- export async function preventAutoHideAsync() {
23
- if (!ExpoSplashScreen.preventAutoHideAsync) {
24
- throw new UnavailabilityError('expo-splash-screen', 'preventAutoHideAsync');
25
- }
26
- return await ExpoSplashScreen.preventAutoHideAsync();
27
- }
28
- // @needsAudit
29
- /**
30
- * Hides the native splash screen immediately. Be careful to ensure that your app has content ready
31
- * to display when you hide the splash screen, or you may see a blank screen briefly. See the
32
- * ["Usage"](#usage) section for an example.
33
- */
34
- export async function hideAsync() {
35
- if (!ExpoSplashScreen.hideAsync) {
36
- throw new UnavailabilityError('expo-splash-screen', 'hideAsync');
37
- }
38
- return await ExpoSplashScreen.hideAsync();
39
- }
40
- /**
41
- * @deprecated Use `SplashScreen.hideAsync()` instead
42
- * @ignore
43
- */
44
- export function hide() {
45
- console.warn('SplashScreen.hide() is deprecated in favour of SplashScreen.hideAsync()');
46
- hideAsync();
47
- }
48
- /**
49
- * @deprecated Use `SplashScreen.preventAutoHideAsync()` instead
50
- * @ignore
51
- */
52
- export function preventAutoHide() {
53
- console.warn('SplashScreen.preventAutoHide() is deprecated in favour of SplashScreen.preventAutoHideAsync()');
54
- preventAutoHideAsync();
55
- }
56
- //# sourceMappingURL=SplashScreen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SplashScreen.js","sourceRoot":"","sources":["../src/SplashScreen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,cAAc;AACd;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,IAAI,CAAC,gBAAgB,CAAC,oBAAoB,EAAE;QAC1C,MAAM,IAAI,mBAAmB,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;KAC7E;IACD,OAAO,MAAM,gBAAgB,CAAC,oBAAoB,EAAE,CAAC;AACvD,CAAC;AAED,cAAc;AACd;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE;QAC/B,MAAM,IAAI,mBAAmB,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAC;KAClE;IACD,OAAO,MAAM,gBAAgB,CAAC,SAAS,EAAE,CAAC;AAC5C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,IAAI;IAClB,OAAO,CAAC,IAAI,CAAC,yEAAyE,CAAC,CAAC;IACxF,SAAS,EAAE,CAAC;AACd,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,CAAC,IAAI,CACV,+FAA+F,CAChG,CAAC;IACF,oBAAoB,EAAE,CAAC;AACzB,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\n\nimport ExpoSplashScreen from './ExpoSplashScreen';\n\n// @needsAudit\n/**\n * Makes the native splash screen (configured in `app.json`) remain visible until `hideAsync` is called.\n *\n * > **Important note**: It is recommended to call this in global scope without awaiting, rather than\n * > inside React components or hooks, because otherwise this might be called too late,\n * > when the splash screen is already hidden.\n *\n * @example\n * ```ts\n * import * as SplashScreen from 'expo-splash-screen';\n *\n * SplashScreen.preventAutoHideAsync();\n *\n * export default function App() {\n * // ...\n * }\n * ```\n */\nexport async function preventAutoHideAsync(): Promise<boolean> {\n if (!ExpoSplashScreen.preventAutoHideAsync) {\n throw new UnavailabilityError('expo-splash-screen', 'preventAutoHideAsync');\n }\n return await ExpoSplashScreen.preventAutoHideAsync();\n}\n\n// @needsAudit\n/**\n * Hides the native splash screen immediately. Be careful to ensure that your app has content ready\n * to display when you hide the splash screen, or you may see a blank screen briefly. See the\n * [\"Usage\"](#usage) section for an example.\n */\nexport async function hideAsync(): Promise<boolean> {\n if (!ExpoSplashScreen.hideAsync) {\n throw new UnavailabilityError('expo-splash-screen', 'hideAsync');\n }\n return await ExpoSplashScreen.hideAsync();\n}\n\n/**\n * @deprecated Use `SplashScreen.hideAsync()` instead\n * @ignore\n */\nexport function hide(): void {\n console.warn('SplashScreen.hide() is deprecated in favour of SplashScreen.hideAsync()');\n hideAsync();\n}\n\n/**\n * @deprecated Use `SplashScreen.preventAutoHideAsync()` instead\n * @ignore\n */\nexport function preventAutoHide(): void {\n console.warn(\n 'SplashScreen.preventAutoHide() is deprecated in favour of SplashScreen.preventAutoHideAsync()'\n );\n preventAutoHideAsync();\n}\n"]}
@@ -1,2 +0,0 @@
1
- import { requireNativeModule } from 'expo-modules-core';
2
- export default requireNativeModule('ExpoSplashScreen');
@@ -1,11 +0,0 @@
1
- export default {
2
- get name(): string {
3
- return 'ExpoSplashScreen';
4
- },
5
- preventAutoHideAsync() {
6
- return false;
7
- },
8
- hideAsync() {
9
- return false;
10
- },
11
- };
@@ -1,62 +0,0 @@
1
- import { UnavailabilityError } from 'expo-modules-core';
2
-
3
- import ExpoSplashScreen from './ExpoSplashScreen';
4
-
5
- // @needsAudit
6
- /**
7
- * Makes the native splash screen (configured in `app.json`) remain visible until `hideAsync` is called.
8
- *
9
- * > **Important note**: It is recommended to call this in global scope without awaiting, rather than
10
- * > inside React components or hooks, because otherwise this might be called too late,
11
- * > when the splash screen is already hidden.
12
- *
13
- * @example
14
- * ```ts
15
- * import * as SplashScreen from 'expo-splash-screen';
16
- *
17
- * SplashScreen.preventAutoHideAsync();
18
- *
19
- * export default function App() {
20
- * // ...
21
- * }
22
- * ```
23
- */
24
- export async function preventAutoHideAsync(): Promise<boolean> {
25
- if (!ExpoSplashScreen.preventAutoHideAsync) {
26
- throw new UnavailabilityError('expo-splash-screen', 'preventAutoHideAsync');
27
- }
28
- return await ExpoSplashScreen.preventAutoHideAsync();
29
- }
30
-
31
- // @needsAudit
32
- /**
33
- * Hides the native splash screen immediately. Be careful to ensure that your app has content ready
34
- * to display when you hide the splash screen, or you may see a blank screen briefly. See the
35
- * ["Usage"](#usage) section for an example.
36
- */
37
- export async function hideAsync(): Promise<boolean> {
38
- if (!ExpoSplashScreen.hideAsync) {
39
- throw new UnavailabilityError('expo-splash-screen', 'hideAsync');
40
- }
41
- return await ExpoSplashScreen.hideAsync();
42
- }
43
-
44
- /**
45
- * @deprecated Use `SplashScreen.hideAsync()` instead
46
- * @ignore
47
- */
48
- export function hide(): void {
49
- console.warn('SplashScreen.hide() is deprecated in favour of SplashScreen.hideAsync()');
50
- hideAsync();
51
- }
52
-
53
- /**
54
- * @deprecated Use `SplashScreen.preventAutoHideAsync()` instead
55
- * @ignore
56
- */
57
- export function preventAutoHide(): void {
58
- console.warn(
59
- 'SplashScreen.preventAutoHide() is deprecated in favour of SplashScreen.preventAutoHideAsync()'
60
- );
61
- preventAutoHideAsync();
62
- }
@@ -1,4 +0,0 @@
1
- export default {
2
- preventAutoHideAsync: async () => true,
3
- hideAsync: async () => true,
4
- };
@@ -1,4 +0,0 @@
1
- export default {
2
- preventAutoHideAsync: async () => false,
3
- hideAsync: async () => false,
4
- };
@@ -1,17 +0,0 @@
1
- import { Platform } from 'react-native';
2
-
3
- import * as SplashScreen from '../';
4
-
5
- // Test that nothing happens on web and SSR
6
- // also ensure that no errors are thrown.
7
- const works = Platform.OS !== 'web';
8
-
9
- jest.mock('../ExpoSplashScreen');
10
-
11
- it(`preventAutoHideAsync doesn't throw`, async () => {
12
- expect(await SplashScreen.preventAutoHideAsync()).toBe(works);
13
- });
14
-
15
- it(`hideAsync doesn't throw`, async () => {
16
- expect(await SplashScreen.hideAsync()).toBe(works);
17
- });