diff --git a/.re-natal b/.re-natal index 9fc06c60ed..bff3b630fb 100644 --- a/.re-natal +++ b/.re-natal @@ -1,7 +1,7 @@ { "name": "StatusIm", "interface": "reagent", - "androidHost": "10.0.2.2", + "androidHost": "localhost", "modules": [ "react-native-contacts", "react-native-invertible-scroll-view", @@ -16,6 +16,7 @@ "react-native-randombytes", "dismissKeyboard", "react-native-linear-gradient", + "react-native-splash-screen", "react-native-android-sms-listener", "react-native-status", "react-native-camera", diff --git a/android/app/build.gradle b/android/app/build.gradle index c8dd3f3aad..ba0a7e2e97 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -133,6 +133,7 @@ android { dependencies { compile project(':instabug-reactnative') + compile project(':react-native-splash-screen') compile project(':react-native-image-resizer') compile project(':react-native-dialogs') compile project(':react-native-randombytes') diff --git a/android/app/src/main/java/com/statusim/MainActivity.java b/android/app/src/main/java/com/statusim/MainActivity.java index 190c4055a9..104f9ea552 100644 --- a/android/app/src/main/java/com/statusim/MainActivity.java +++ b/android/app/src/main/java/com/statusim/MainActivity.java @@ -8,6 +8,7 @@ import android.content.Intent; import android.content.res.Configuration; import android.os.Bundle; import com.facebook.react.ReactActivity; +import com.cboy.rn.splashscreen.SplashScreen; import java.util.Properties; @@ -23,6 +24,7 @@ public class MainActivity extends ReactActivity { @Override protected void onCreate(Bundle savedInstanceState) { + SplashScreen.show(this); super.onCreate(savedInstanceState); if (!RootUtil.isDeviceRooted()) { diff --git a/android/app/src/main/java/com/statusim/MainApplication.java b/android/app/src/main/java/com/statusim/MainApplication.java index 536fdfbe01..dd8a307511 100644 --- a/android/app/src/main/java/com/statusim/MainApplication.java +++ b/android/app/src/main/java/com/statusim/MainApplication.java @@ -4,6 +4,7 @@ import android.app.Application; import com.facebook.react.ReactApplication; import com.instabug.reactlibrary.RNInstabugReactnativePackage; +import com.cboy.rn.splashscreen.SplashScreenReactPackage; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.react.shell.MainReactPackage; @@ -40,6 +41,7 @@ public class MainApplication extends Application implements ReactApplication { return Arrays.asList( new MainReactPackage(), new RNInstabugReactnativePackage("b239f82a9cb00464e4c72cc703e6821e",MainApplication.this,"shake"), + new SplashScreenReactPackage(), new StatusPackage(), new RealmReactPackage(), new VectorIconsPackage(), diff --git a/android/app/src/main/res/drawable-xhdpi/launch_screen.png b/android/app/src/main/res/drawable-xhdpi/launch_screen.png new file mode 100644 index 0000000000..a5b604993e Binary files /dev/null and b/android/app/src/main/res/drawable-xhdpi/launch_screen.png differ diff --git a/android/app/src/main/res/drawable-xxhdpi/launch_screen.png b/android/app/src/main/res/drawable-xxhdpi/launch_screen.png new file mode 100644 index 0000000000..f4f55e5095 Binary files /dev/null and b/android/app/src/main/res/drawable-xxhdpi/launch_screen.png differ diff --git a/android/app/src/main/res/layout/launch_screen.xml b/android/app/src/main/res/layout/launch_screen.xml new file mode 100644 index 0000000000..86d6a72e7f --- /dev/null +++ b/android/app/src/main/res/layout/launch_screen.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/android/settings.gradle b/android/settings.gradle index 9652fb493b..3378056450 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -3,6 +3,8 @@ rootProject.name = 'StatusIm' include ':app' include ':instabug-reactnative' project(':instabug-reactnative').projectDir = new File(rootProject.projectDir, '../node_modules/instabug-reactnative/android') +include ':react-native-splash-screen' +project(':react-native-splash-screen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-splash-screen/android') include ':react-native-image-resizer' project(':react-native-image-resizer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-resizer/android') include ':react-native-dialogs' diff --git a/env/dev/env/android/main.cljs b/env/dev/env/android/main.cljs index a26f34785c..6813b594fe 100644 --- a/env/dev/env/android/main.cljs +++ b/env/dev/env/android/main.cljs @@ -14,7 +14,7 @@ (re-frame.core/dispatch [:load-commands!])) (figwheel/watch-and-reload - :websocket-url "ws://10.0.3.2:3449/figwheel-ws" + :websocket-url "ws://localhost:3449/figwheel-ws" :heads-up-display false :jsload-callback callback) diff --git a/ios/StatusIm.xcodeproj/project.pbxproj b/ios/StatusIm.xcodeproj/project.pbxproj index 2a2d397ab4..00242aef5e 100644 --- a/ios/StatusIm.xcodeproj/project.pbxproj +++ b/ios/StatusIm.xcodeproj/project.pbxproj @@ -18,7 +18,6 @@ 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 2028DFF91D4275B600227DCD /* SF-UI-Display-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = 2028DFF51D4275B600227DCD /* SF-UI-Display-Medium.otf */; }; @@ -34,6 +33,7 @@ 213311F38CA74CE280FD09AD /* libRNI18n.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 52F6ED6465184513A082652B /* libRNI18n.a */; }; 22118DE1207A419FBFE7B62D /* libRealmReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CD48A32459B64E96843BB238 /* libRealmReact.a */; }; 25DC9C9DC25846BD8D084888 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */; }; + 3A7EB04F1DD9CAFC00A4FCC8 /* libSplashScreen.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A7EB04E1DD9CABC00A4FCC8 /* libSplashScreen.a */; }; 3E15DFEC1F6F4D7CAE088F49 /* libTcpSockets.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C2A4E93F6B154AEFA3485B45 /* libTcpSockets.a */; }; 4D3D740D5EFA4F8592B048D7 /* libBVLinearGradient.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DF1CD4C3D1254774ACCAE4E8 /* libBVLinearGradient.a */; }; 4FFAE7B0414A463991039A2E /* libRNRandomBytes.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C55F15EB4D4DAF9202A662 /* libRNRandomBytes.a */; }; @@ -226,6 +226,62 @@ remoteGlobalIDString = F60690131CA2766F0003FB26; remoteInfo = RealmReact; }; + 3A7EB01D1DD9C37800A4FCC8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; + remoteInfo = "RCTImage-tvOS"; + }; + 3A7EB0221DD9C37800A4FCC8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28471D9B043800D4039D; + remoteInfo = "RCTLinking-tvOS"; + }; + 3A7EB0261DD9C37800A4FCC8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28541D9B044C00D4039D; + remoteInfo = "RCTNetwork-tvOS"; + }; + 3A7EB02B1DD9C37800A4FCC8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28611D9B046600D4039D; + remoteInfo = "RCTSettings-tvOS"; + }; + 3A7EB0301DD9C37800A4FCC8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A287B1D9B048500D4039D; + remoteInfo = "RCTText-tvOS"; + }; + 3A7EB0351DD9C37800A4FCC8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28881D9B049200D4039D; + remoteInfo = "RCTWebSocket-tvOS"; + }; + 3A7EB03A1DD9C37800A4FCC8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28131D9B038B00D4039D; + remoteInfo = "React-tvOS"; + }; + 3A7EB04D1DD9CABC00A4FCC8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3A7EB0491DD9CABC00A4FCC8 /* SplashScreen.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D7682761D8E76B80014119E; + remoteInfo = SplashScreen; + }; 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; @@ -347,7 +403,6 @@ 13B07F961A680F5B00A75B9A /* StatusIm.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StatusIm.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = StatusIm/AppDelegate.h; sourceTree = ""; }; 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = StatusIm/AppDelegate.m; sourceTree = ""; }; - 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = StatusIm/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = StatusIm/main.m; sourceTree = ""; }; 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; @@ -368,6 +423,7 @@ 359B076A658B4FBAB5128B03 /* Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = ""; }; 38A44830EC5708E89387F641 /* Pods-StatusIm.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StatusIm.release.xcconfig"; path = "Pods/Target Support Files/Pods-StatusIm/Pods-StatusIm.release.xcconfig"; sourceTree = ""; }; 38E1A2C8D0734EE99E2B16CE /* TcpSockets.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = TcpSockets.xcodeproj; path = "../node_modules/react-native-tcp/ios/TcpSockets.xcodeproj"; sourceTree = ""; }; + 3A7EB0491DD9CABC00A4FCC8 /* SplashScreen.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SplashScreen.xcodeproj; path = "../node_modules/react-native-splash-screen/ios/SplashScreen.xcodeproj"; sourceTree = ""; }; 439B6B4B407A4E2AACAFE5BE /* RCTStatus.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RCTStatus.xcodeproj; path = "../modules/react-native-status/ios/RCTStatus/RCTStatus.xcodeproj"; sourceTree = ""; }; 43A6FA689D844B0BAF3AA8B4 /* RCTOrientation.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RCTOrientation.xcodeproj; path = "../node_modules/react-native-orientation/iOS/RCTOrientation.xcodeproj"; sourceTree = ""; }; 45FB5F523DE04BDE9877869C /* RNRandomBytes.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNRandomBytes.xcodeproj; path = "../node_modules/react-native-randombytes/RNRandomBytes.xcodeproj"; sourceTree = ""; }; @@ -421,6 +477,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 3A7EB04F1DD9CAFC00A4FCC8 /* libSplashScreen.a in Frameworks */, 20A5C9711D9283A2002C4965 /* libimageCropPicker.a in Frameworks */, 9E3AB6D01D87DB2B008846B4 /* libReact-Native-Webview-Bridge.a in Frameworks */, 20B6B6841D92C42600CC5C6A /* RSKImageCropper.framework in Frameworks */, @@ -544,7 +601,6 @@ 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 13B07FB01A68108700A75B9A /* AppDelegate.m */, 13B07FB61A68108700A75B9A /* Info.plist */, - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 13B07FB71A68108700A75B9A /* main.m */, ); name = StatusIm; @@ -717,6 +773,7 @@ 832341AE1AAA6A7D00B99B32 /* Libraries */ = { isa = PBXGroup; children = ( + 3A7EB0491DD9CABC00A4FCC8 /* SplashScreen.xcodeproj */, 20A5C94B1D927137002C4965 /* imageCropPicker.xcodeproj */, 9E3AB6B21D87DA2A008846B4 /* React-Native-Webview-Bridge.xcodeproj */, 146833FF1AC3E56700842450 /* React.xcodeproj */, @@ -992,6 +1049,10 @@ ProductGroup = 20B7D0FF1D3F74CD00B70F14 /* Products */; ProjectRef = 8AE71EE8751F4652B13BFE83 /* RNVectorIcons.xcodeproj */; }, + { + ProductGroup = 3A7EB04A1DD9CABC00A4FCC8 /* Products */; + ProjectRef = 3A7EB0491DD9CABC00A4FCC8 /* SplashScreen.xcodeproj */; + }, { ProductGroup = 201067551D477F5E00FA83B6 /* Products */; ProjectRef = 38E1A2C8D0734EE99E2B16CE /* TcpSockets.xcodeproj */; @@ -1164,6 +1225,62 @@ remoteRef = 20B7D1281D3F74CD00B70F14 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + 3A7EB01E1DD9C37800A4FCC8 /* libRCTImage-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTImage-tvOS.a"; + remoteRef = 3A7EB01D1DD9C37800A4FCC8 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3A7EB0231DD9C37800A4FCC8 /* libRCTLinking-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTLinking-tvOS.a"; + remoteRef = 3A7EB0221DD9C37800A4FCC8 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3A7EB0271DD9C37800A4FCC8 /* libRCTNetwork-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTNetwork-tvOS.a"; + remoteRef = 3A7EB0261DD9C37800A4FCC8 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3A7EB02C1DD9C37800A4FCC8 /* libRCTSettings-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTSettings-tvOS.a"; + remoteRef = 3A7EB02B1DD9C37800A4FCC8 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3A7EB0311DD9C37800A4FCC8 /* libRCTText-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTText-tvOS.a"; + remoteRef = 3A7EB0301DD9C37800A4FCC8 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3A7EB0361DD9C37800A4FCC8 /* libRCTWebSocket-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTWebSocket-tvOS.a"; + remoteRef = 3A7EB0351DD9C37800A4FCC8 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3A7EB03B1DD9C37800A4FCC8 /* libReact-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libReact-tvOS.a"; + remoteRef = 3A7EB03A1DD9C37800A4FCC8 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3A7EB04E1DD9CABC00A4FCC8 /* libSplashScreen.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libSplashScreen.a; + remoteRef = 3A7EB04D1DD9CABC00A4FCC8 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; @@ -1265,7 +1382,6 @@ 9ED2F4611D9D579900B36508 /* SF-UI-Text-Bold.otf in Resources */, 9ED2F45E1D9D535A00B36508 /* SF-UI-Text-Regular.otf in Resources */, 9ED2F45F1D9D535A00B36508 /* SF-UI-Text-Medium.otf in Resources */, - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 2028DFFA1D4275B600227DCD /* SF-UI-Display-Regular.otf in Resources */, 2028DFF91D4275B600227DCD /* SF-UI-Display-Medium.otf in Resources */, 2028DFFC1D4275B600227DCD /* SF-UI-Display-Thin.otf in Resources */, @@ -1419,18 +1535,6 @@ }; /* End PBXTargetDependency section */ -/* Begin PBXVariantGroup section */ - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - 13B07FB21A68108700A75B9A /* Base */, - ); - name = LaunchScreen.xib; - path = StatusIm; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - /* Begin XCBuildConfiguration section */ 00E356F61AD99517003FC87E /* Debug */ = { isa = XCBuildConfiguration; @@ -1516,6 +1620,7 @@ x86_64, ); ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = ""; @@ -1542,6 +1647,7 @@ "$(SRCROOT)/../modules/react-native-status/ios/RCTStatus/**", "$(SRCROOT)/../node_modules/react-native-image-resizer/ios/RCTImageResizer", "$(SRCROOT)/../node_modules/instabug-reactnative/ios/RNInstabug", + "$(SRCROOT)/../node_modules/react-native-splash-screen/ios", ); INFOPLIST_FILE = StatusIm/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; @@ -1566,6 +1672,7 @@ x86_64, ); ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = ""; @@ -1592,6 +1699,7 @@ "$(SRCROOT)/../modules/react-native-status/ios/RCTStatus/**", "$(SRCROOT)/../node_modules/react-native-image-resizer/ios/RCTImageResizer", "$(SRCROOT)/../node_modules/instabug-reactnative/ios/RNInstabug", + "$(SRCROOT)/../node_modules/react-native-splash-screen/ios", ); INFOPLIST_FILE = StatusIm/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; @@ -1660,6 +1768,7 @@ "$(SRCROOT)/../modules/react-native-status/ios/RCTStatus/**", "$(SRCROOT)/../node_modules/react-native-image-resizer/ios/RCTImageResizer", "$(SRCROOT)/../node_modules/instabug-reactnative/ios/RNInstabug", + "$(SRCROOT)/../node_modules/react-native-splash-screen/ios", ); IPHONEOS_DEPLOYMENT_TARGET = 7.0; MTL_ENABLE_DEBUG_INFO = YES; @@ -1715,6 +1824,7 @@ "$(SRCROOT)/../modules/react-native-status/ios/RCTStatus/**", "$(SRCROOT)/../node_modules/react-native-image-resizer/ios/RCTImageResizer", "$(SRCROOT)/../node_modules/instabug-reactnative/ios/RNInstabug", + "$(SRCROOT)/../node_modules/react-native-splash-screen/ios", ); IPHONEOS_DEPLOYMENT_TARGET = 7.0; MTL_ENABLE_DEBUG_INFO = NO; diff --git a/ios/StatusIm/AppDelegate.m b/ios/StatusIm/AppDelegate.m index 27595f0bc2..046211fb9a 100644 --- a/ios/StatusIm/AppDelegate.m +++ b/ios/StatusIm/AppDelegate.m @@ -12,6 +12,7 @@ #import "RCTBundleURLProvider.h" #import "RCTRootView.h" #import +#import "SplashScreen.h" @implementation AppDelegate @@ -33,6 +34,7 @@ self.window.rootViewController = rootViewController; [self.window makeKeyAndVisible]; [Instabug startWithToken:@"5534212f4a44f477c9ab270ab5cd2062" invocationEvent:IBGInvocationEventShake]; + [SplashScreen show]; return YES; } diff --git a/ios/StatusIm/Base.lproj/LaunchScreen.xib b/ios/StatusIm/Base.lproj/LaunchScreen.xib deleted file mode 100644 index 99ee1ebed3..0000000000 --- a/ios/StatusIm/Base.lproj/LaunchScreen.xib +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/Contents.json b/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/Contents.json new file mode 100755 index 0000000000..f4f35aa35b --- /dev/null +++ b/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,66 @@ +{ + "images" : [ + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "736h", + "filename" : "LaunchScreen1242x2208.png", + "minimum-system-version" : "8.0", + "orientation" : "portrait", + "scale" : "3x" + }, + { + "orientation" : "landscape", + "idiom" : "iphone", + "extent" : "full-screen", + "minimum-system-version" : "8.0", + "subtype" : "736h", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "667h", + "filename" : "LaunchScreen750x1334-1.png", + "minimum-system-version" : "8.0", + "orientation" : "portrait", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "LaunchScreen_640_960.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "retina4", + "filename" : "LaunchScreen-1.png", + "minimum-system-version" : "7.0", + "orientation" : "portrait", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "LaunchScreen_640_960-1.png", + "extent" : "full-screen", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "LaunchScreen-2.png", + "extent" : "full-screen", + "subtype" : "retina4", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen-1.png b/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen-1.png new file mode 100644 index 0000000000..2cd83e9e3c Binary files /dev/null and b/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen-1.png differ diff --git a/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen-2.png b/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen-2.png new file mode 100644 index 0000000000..2cd83e9e3c Binary files /dev/null and b/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen-2.png differ diff --git a/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen1242x2208.png b/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen1242x2208.png new file mode 100644 index 0000000000..83f7db19d2 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen1242x2208.png differ diff --git a/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen750x1334-1.png b/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen750x1334-1.png new file mode 100644 index 0000000000..35646a6588 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen750x1334-1.png differ diff --git a/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen_640_960-1.png b/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen_640_960-1.png new file mode 100644 index 0000000000..3b46c36976 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen_640_960-1.png differ diff --git a/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen_640_960.png b/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen_640_960.png new file mode 100644 index 0000000000..3b46c36976 Binary files /dev/null and b/ios/StatusIm/Images.xcassets/LaunchImage.launchimage/LaunchScreen_640_960.png differ diff --git a/ios/StatusIm/Info.plist b/ios/StatusIm/Info.plist index 5e53449670..756e64c116 100644 --- a/ios/StatusIm/Info.plist +++ b/ios/StatusIm/Info.plist @@ -2,14 +2,6 @@ - NSCameraUsageDescription - We need to access your camera - NSPhotoLibraryUsageDescription - We need to access your photo storage to give you an ability to select photos - NSMicrophoneUsageDescription - We need to access your microphone - NSContactsUsageDescription - We need to access your contacts CFBundleDevelopmentRegion en CFBundleExecutable @@ -30,22 +22,6 @@ 1 LSRequiresIPhoneOS - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - NSLocationWhenInUseUsageDescription - NSAppTransportSecurity NSAllowsArbitraryLoads @@ -64,6 +40,14 @@ + NSCameraUsageDescription + We need to access your camera + NSContactsUsageDescription + We need to access your contacts + NSLocationWhenInUseUsageDescription + + NSPhotoLibraryUsageDescription + We need to access your photo storage to give you an ability to select photos UIAppFonts SF-UI-Text-Bold.otf @@ -82,5 +66,17 @@ Octicons.ttf Zocial.ttf + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + diff --git a/package.json b/package.json index 07e1a03c86..c33906ec1f 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "react-native-orientation": "github:youennPennarun/react-native-orientation", "react-native-qrcode": "^0.2.2", "react-native-randombytes": "^2.1.0", + "react-native-splash-screen": "^1.0.9", "react-native-tcp": "^2.0.4", "react-native-udp": "^1.2.6", "react-native-vector-icons": "^2.0.3", diff --git a/src/status_im/android/core.cljs b/src/status_im/android/core.cljs index 125540b281..0bba7c9d72 100644 --- a/src/status_im/android/core.cljs +++ b/src/status_im/android/core.cljs @@ -9,7 +9,8 @@ keyboard orientation view - modal]] + modal + splash-screen]] [status-im.components.main-tabs :refer [main-tabs]] [status-im.contacts.views.contact-list :refer [contact-list]] [status-im.contacts.views.new-contact :refer [new-contact]] @@ -80,7 +81,8 @@ (.addListener keyboard "keyboardDidHide" #(when-not (= 0 @keyboard-height) - (dispatch [:set :keyboard-height 0])))) + (dispatch [:set :keyboard-height 0]))) + (.hide splash-screen)) :render (fn [] (when @view-id diff --git a/src/status_im/components/react.cljs b/src/status_im/components/react.cljs index e9142ad656..0ac642c557 100644 --- a/src/status_im/components/react.cljs +++ b/src/status_im/components/react.cljs @@ -14,6 +14,8 @@ (def orientation (js/require "react-native-orientation")) (def drawer (js/require "react-native-drawer-layout")) +(def splash-screen (.-SplashScreen native-modules)) + ;; React Components (def app-registry (get-react-property "AppRegistry")) diff --git a/src/status_im/ios/core.cljs b/src/status_im/ios/core.cljs index 6f0a1ce0c0..c369f96860 100644 --- a/src/status_im/ios/core.cljs +++ b/src/status_im/ios/core.cljs @@ -7,7 +7,8 @@ modal app-registry keyboard - orientation]] + orientation + splash-screen]] [status-im.components.main-tabs :refer [main-tabs]] [status-im.contacts.views.contact-list :refer [contact-list]] [status-im.contacts.views.new-contact :refer [new-contact]] @@ -65,7 +66,8 @@ (.addListener keyboard "keyboardWillHide" (when-not (= 0 @keyboard-height) - #(dispatch [:set :keyboard-height 0])))) + #(dispatch [:set :keyboard-height 0]))) + (.hide splash-screen)) :render (fn [] (when @view-id