From 4079dc77ac8c25e75bf25b56ed8229c32deab9d9 Mon Sep 17 00:00:00 2001 From: Chris Bobbe Date: Fri, 16 Oct 2020 12:47:02 -0700 Subject: [PATCH] ios: Update launch screen. Use a "Storyboard" instead of an "XIB", as has apparently [1] been required since 2020-04-30. A change like this is part of the RN v0.62 -> v0.63 changes to the template app [2], corresponding to facebook/react-native@33b3a1a14. Since it's simple to do (especially after adding the "Brand" color set in a recent commit), make it be a solid brand-color screen instead of solid white. It should match the color of our `LoadingScreen`, which is often the first thing that displays when you open the app. The changes in this commit coincide with the iOS-specific instructions from `expo-launch-screen` for how to set up a launch screen [3], with some exceptions: - We don't actually go on to set up `expo-launch-screen`; we currently don't intend to [4]. - We don't do anything marked "optional". - We don't add an image to the launch screen; we can do that later if we want to. - We set the `Storyboard ID` to `LaunchScreenViewController`, not `SplashScreenViewController`. Apple regularly calls the thing a "launch screen", not a "splash screen". [1] https://developer.apple.com/news/?id=03042020b [2] https://react-native-community.github.io/upgrade-helper/?from=0.62.2&to=0.63.3 [3] https://github.com/expo/expo/tree/master/packages/expo-splash-screen#manual-configuration [4] https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/React.20Navigation.20v5/near/1042794 [5] https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/launch-screen/ --- ios/ZulipMobile.xcodeproj/project.pbxproj | 15 ++++----- .../Base.lproj/LaunchScreen.storyboard | 33 +++++++++++++++++++ ios/ZulipMobile/Base.lproj/LaunchScreen.xib | 29 ---------------- 3 files changed, 40 insertions(+), 37 deletions(-) create mode 100644 ios/ZulipMobile/Base.lproj/LaunchScreen.storyboard delete mode 100644 ios/ZulipMobile/Base.lproj/LaunchScreen.xib diff --git a/ios/ZulipMobile.xcodeproj/project.pbxproj b/ios/ZulipMobile.xcodeproj/project.pbxproj index 9f48135cda2..bdc06efa806 100644 --- a/ios/ZulipMobile.xcodeproj/project.pbxproj +++ b/ios/ZulipMobile.xcodeproj/project.pbxproj @@ -8,10 +8,10 @@ /* Begin PBXBuildFile section */ 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 13B07FBF1A68108700A75B9A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Assets.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 42689E9C23466FF7007540AA /* webview in Resources */ = {isa = PBXBuildFile; fileRef = 42689E9B23466FF7007540AA /* webview */; }; + 8BE55043253A2B6600B0BC8A /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8BE55041253A2B6600B0BC8A /* LaunchScreen.storyboard */; }; 8BEA1EF024A6983D00674040 /* ZLPConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BEA1EEE24A6983D00674040 /* ZLPConstants.m */; }; A148FEFC1E9D8CB900479280 /* zulip.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = A148FEFB1E9D8CB900479280 /* zulip.mp3 */; }; C091D09FD11FDDB8E939257D /* libPods-ZulipMobile.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 74F3CD22CB932FA7EEE0BB66 /* libPods-ZulipMobile.a */; }; @@ -24,7 +24,6 @@ 13B07F961A680F5B00A75B9A /* ZulipMobile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ZulipMobile.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ZulipMobile/AppDelegate.h; sourceTree = ""; }; 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = ZulipMobile/AppDelegate.m; sourceTree = ""; }; - 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 13B07FB51A68108700A75B9A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = ZulipMobile/Assets.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ZulipMobile/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ZulipMobile/main.m; sourceTree = ""; }; @@ -33,6 +32,7 @@ 42689E9B23466FF7007540AA /* webview */ = {isa = PBXFileReference; lastKnownFileType = folder; path = webview; sourceTree = ""; }; 66E34CC6219226D10091B852 /* ZulipMobile-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ZulipMobile-Bridging-Header.h"; sourceTree = ""; }; 74F3CD22CB932FA7EEE0BB66 /* libPods-ZulipMobile.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ZulipMobile.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 8BE55042253A2B6600B0BC8A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = ZulipMobile/Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 8BEA1EEE24A6983D00674040 /* ZLPConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ZLPConstants.m; path = ZulipMobile/ZLPConstants.m; sourceTree = ""; }; 8BEA1EEF24A6983D00674040 /* ZLPConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZLPConstants.h; path = ZulipMobile/ZLPConstants.h; sourceTree = ""; }; A148FEFB1E9D8CB900479280 /* zulip.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = zulip.mp3; sourceTree = ""; }; @@ -67,11 +67,11 @@ 13B07FB01A68108700A75B9A /* AppDelegate.m */, 13B07FB51A68108700A75B9A /* Assets.xcassets */, 13B07FB61A68108700A75B9A /* Info.plist */, - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 13B07FB71A68108700A75B9A /* main.m */, CFA67D1F1EC23BCB0070048E /* UtilManager.m */, CFA67D211EC23BDD0070048E /* UtilManager.h */, 66E34CC6219226D10091B852 /* ZulipMobile-Bridging-Header.h */, + 8BE55041253A2B6600B0BC8A /* LaunchScreen.storyboard */, ); name = ZulipMobile; sourceTree = ""; @@ -215,8 +215,8 @@ files = ( 42689E9C23466FF7007540AA /* webview in Resources */, 13B07FBF1A68108700A75B9A /* Assets.xcassets in Resources */, - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, A148FEFC1E9D8CB900479280 /* zulip.mp3 in Resources */, + 8BE55043253A2B6600B0BC8A /* LaunchScreen.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -370,13 +370,12 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { + 8BE55041253A2B6600B0BC8A /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( - 13B07FB21A68108700A75B9A /* Base */, + 8BE55042253A2B6600B0BC8A /* Base */, ); - name = LaunchScreen.xib; - path = ZulipMobile; + name = LaunchScreen.storyboard; sourceTree = ""; }; /* End PBXVariantGroup section */ diff --git a/ios/ZulipMobile/Base.lproj/LaunchScreen.storyboard b/ios/ZulipMobile/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000000..5b021e29021 --- /dev/null +++ b/ios/ZulipMobile/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/ZulipMobile/Base.lproj/LaunchScreen.xib b/ios/ZulipMobile/Base.lproj/LaunchScreen.xib deleted file mode 100644 index 45a21e9b55f..00000000000 --- a/ios/ZulipMobile/Base.lproj/LaunchScreen.xib +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -