-
-
Notifications
You must be signed in to change notification settings - Fork 656
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: Update to latest and properly set up
expo-splash-screen
.
This package lets us control when the splash/launch screen hides. Soon, we may want it to show during the Redux store rehydration time [1]. On iOS, we've stuck to the term "launch screen", since Apple uses it consistently [2]. I don't see a clear pattern for Android, so we've kept to "splash screen" to match `expo-splash-screen`. Finish following the extra instructions for bare React Native apps [3], linked to from the main Expo doc [4]. Most of it is setup that's not specific to `expo-splash-screen` and has been done in recent commits. Here, we do the steps that involve invoking code from `expo-splash-screen`. On iOS, this package removes the need to set RCTRootView's `loadingView` property, which we started using in a recent commit -- it seems that `expo-splash-screen` automatically makes sure that the splash screen persists until our React Native views have first rendered. [1] https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/React.20Navigation.20v5/near/1039507 [2] https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/launch-screen/ [3] https://github.com/expo/expo/tree/master/packages/expo-splash-screen#-installation-in-bare-react-native-projects [4] https://docs.expo.io/versions/latest/sdk/splash-screen/ Fixes: #2756
- Loading branch information
1 parent
f5d6947
commit b60c1fb
Showing
6 changed files
with
69 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copied / converted by hand from | ||
// node_modules/expo-splash-screen/SplashScreen.ts. | ||
|
||
declare module 'expo-splash-screen' { | ||
/** | ||
* Makes the native splash screen stay visible until `SplashScreen.hideAsync()` is called. | ||
* It has to be called before any view is rendered. | ||
* | ||
* @example | ||
* ``` | ||
* // top level component | ||
* | ||
* SplashScreen.preventAutoHideAsync() | ||
* .then(result => console.log(`SplashScreen.preventAutoHideAsync() succeeded: ${result}`)) | ||
* .catch(console.warn); // it's good to explicitly catch and inspect any error | ||
* | ||
* class App extends React.Component { | ||
* ... | ||
* // Hide SplashScreen once your app content is ready to be displayed. | ||
* await SplashScreen.hideAsync() | ||
* ... | ||
* } | ||
* ``` | ||
*/ | ||
declare export function preventAutoHideAsync(): Promise<boolean>; | ||
|
||
declare export function hideAsync(): Promise<boolean>; | ||
|
||
/** | ||
* @deprecated | ||
*/ | ||
declare export function preventAutoHide(): void; | ||
|
||
/** | ||
* @deprecated | ||
*/ | ||
declare export function hide(): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1088,10 +1088,10 @@ | |
xcode "^2.1.0" | ||
xml2js "^0.4.23" | ||
|
||
"@expo/[email protected].13": | ||
version "0.1.13" | ||
resolved "https://registry.yarnpkg.com/@expo/configure-splash-screen/-/configure-splash-screen-0.1.13.tgz#9f974146d716ffc03461e4d2deb7bfb22826e56a" | ||
integrity sha512-1AYaHDJlAXfS7K/i2kI7U5+dELfKnFrXti97cIC5PkHOwEQVti8Uw1/KXO0+Pih7g8BNDvDPjHlMNDqn7AnBCA== | ||
"@expo/[email protected].17": | ||
version "0.1.17" | ||
resolved "https://registry.yarnpkg.com/@expo/configure-splash-screen/-/configure-splash-screen-0.1.17.tgz#74534e475546a2e67228a3741bcf908e7b06e439" | ||
integrity sha512-TKQ6bUAGkRvMvU8f3PjF6C1Z3pP7jotFZnbrXV1Y1Jua9lofJ5Wt15zqgbIcBIEDFDd2BFIUhsczSd0PPfivAQ== | ||
dependencies: | ||
"@react-native-community/cli-platform-android" "^4.10.0" | ||
"@react-native-community/cli-platform-ios" "^4.10.0" | ||
|
@@ -1100,14 +1100,15 @@ | |
core-js "^3.6.5" | ||
deep-equal "^2.0.3" | ||
fs-extra "^9.0.0" | ||
lodash "^4.17.15" | ||
pngjs "^5.0.0" | ||
xcode "^3.0.0" | ||
xml-js "^1.6.11" | ||
|
||
"@expo/configure-splash-screen@0.1.17": | ||
version "0.1.17" | ||
resolved "https://registry.yarnpkg.com/@expo/configure-splash-screen/-/configure-splash-screen-0.1.17.tgz#74534e475546a2e67228a3741bcf908e7b06e439" | ||
integrity sha512-TKQ6bUAGkRvMvU8f3PjF6C1Z3pP7jotFZnbrXV1Y1Jua9lofJ5Wt15zqgbIcBIEDFDd2BFIUhsczSd0PPfivAQ== | ||
"@expo/configure-splash-screen@0.2.0": | ||
version "0.2.0" | ||
resolved "https://registry.yarnpkg.com/@expo/configure-splash-screen/-/configure-splash-screen-0.2.0.tgz#84f9f71363259f16fd0073636a198c750a3cdd7c" | ||
integrity sha512-2RG0NOeXZAGKNJXVEEA9wukDsxjmMdDTclZP9FPb15r3+siWI/GZaC36IqoQ8/mw4wzX5Y+OvZ2cHhc0J8t+0A== | ||
dependencies: | ||
"@react-native-community/cli-platform-android" "^4.10.0" | ||
"@react-native-community/cli-platform-ios" "^4.10.0" | ||
|
@@ -5081,12 +5082,12 @@ expo-screen-orientation@^1.0.0: | |
resolved "https://registry.yarnpkg.com/expo-screen-orientation/-/expo-screen-orientation-1.0.0.tgz#a168b7493e7a7b45da2c80b1b0d4e89e1f8e7698" | ||
integrity sha512-McYHWSA3KVgh3IeztKg0oxkHtSRzDfqGRSHg6GgIici5C93LOF4tGzO38tLNVGXIjbu8EdvBRB7pslKS73AXGg== | ||
|
||
expo-splash-screen@^0.5.0: | ||
version "0.5.0" | ||
resolved "https://registry.yarnpkg.com/expo-splash-screen/-/expo-splash-screen-0.5.0.tgz#cad0eb77a3eade2c7101d169b8655e7ee8053c2f" | ||
integrity sha512-MqYHCbqGtmnA/b+D2JQHxeQzlSfbU4SAGQ2DmzmaBekqRMkRrVrsiBXF7b3wpHTW6R3pC5lsXoH9vq91e5a9xg== | ||
expo-splash-screen@^0.6.2: | ||
version "0.6.2" | ||
resolved "https://registry.yarnpkg.com/expo-splash-screen/-/expo-splash-screen-0.6.2.tgz#2be7fc28ad62549e870c69f1fe133ebe756c524f" | ||
integrity sha512-Rvi+aiVDztFyLh5fYJYcZxVuQNDCy6ATSTfxuch5uVQ1jA9/vjVzUKG4iZCoChaSCnMV56aFftHBWSDNWPvLFQ== | ||
dependencies: | ||
"@expo/configure-splash-screen" "0.1.13" | ||
"@expo/configure-splash-screen" "0.2.0" | ||
|
||
extend-shallow@^1.1.2: | ||
version "1.1.4" | ||
|