diff --git a/template/.flowconfig b/template/.flowconfig index 1319ea1..9edb1be 100644 --- a/template/.flowconfig +++ b/template/.flowconfig @@ -5,14 +5,6 @@ ; Ignore "BUCK" generated dirs /\.buckd/ -; Ignore unexpected extra "@providesModule" -.*/node_modules/.*/node_modules/fbjs/.* - -; Ignore duplicate module providers -; For RN Apps installed via npm, "Libraries" folder is inside -; "node_modules/react-native" but in the source repo it is in the root -node_modules/react-native/Libraries/react-native/React.js - ; Ignore polyfills node_modules/react-native/Libraries/polyfills/.* @@ -21,7 +13,7 @@ node_modules/react-native/Libraries/polyfills/.* node_modules/warning/.* ; Flow doesn't support platforms -.*/Libraries/Utilities/HMRLoadingView.js +.*/Libraries/Utilities/LoadingView.js [untyped] .*/node_modules/@react-native-community/cli/.*/.* @@ -42,27 +34,11 @@ module.file_ext=.js module.file_ext=.json module.file_ext=.ios.js -module.system=haste -module.system.haste.use_name_reducers=true -# get basename -module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1' -# strip .js or .js.flow suffix -module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1' -# strip .ios suffix -module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1' -module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1' -module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1' -module.system.haste.paths.blacklist=.*/__tests__/.* -module.system.haste.paths.blacklist=.*/__mocks__/.* -module.system.haste.paths.whitelist=/node_modules/react-native/Libraries/.* -module.system.haste.paths.whitelist=/node_modules/react-native/RNTester/.* -module.system.haste.paths.whitelist=/node_modules/react-native/IntegrationTests/.* -module.system.haste.paths.blacklist=/node_modules/react-native/Libraries/react-native/react-native-implementation.js -module.system.haste.paths.blacklist=/node_modules/react-native/Libraries/Animated/src/polyfills/.* - munge_underscores=true -module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' +module.name_mapper='^react-native$' -> '/node_modules/react-native/Libraries/react-native/react-native-implementation' +module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1' +module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub' suppress_type=$FlowIssue suppress_type=$FlowFixMe @@ -96,4 +72,4 @@ untyped-import untyped-type-import [version] -^0.98.0 +^0.105.0 \ No newline at end of file diff --git a/template/.gitignore b/template/.gitignore index 41e2564..570d275 100644 --- a/template/.gitignore +++ b/template/.gitignore @@ -20,7 +20,6 @@ DerivedData *.hmap *.ipa *.xcuserstate -project.xcworkspace # Android/IntelliJ # @@ -40,6 +39,7 @@ yarn-error.log buck-out/ \.buckd/ *.keystore +!debug.keystore # fastlane # diff --git a/template/.prettierrc.js b/template/.prettierrc.js new file mode 100644 index 0000000..6e29914 --- /dev/null +++ b/template/.prettierrc.js @@ -0,0 +1,6 @@ +module.exports = { + bracketSpacing: false, + jsxBracketSameLine: true, + singleQuote: true, + trailingComma: 'all', +}; \ No newline at end of file diff --git a/template/android/app/debug.keystore b/template/android/app/debug.keystore new file mode 100644 index 0000000..364e105 Binary files /dev/null and b/template/android/app/debug.keystore differ diff --git a/template/android/app/src/main/java/com/projectname/MainApplication.java b/template/android/app/src/main/java/com/projectname/MainApplication.java index c820cb9..952a0e3 100644 --- a/template/android/app/src/main/java/com/projectname/MainApplication.java +++ b/template/android/app/src/main/java/com/projectname/MainApplication.java @@ -2,7 +2,7 @@ import android.app.Application; import android.util.Log; - +import android.content.Context; import com.facebook.react.PackageList; import com.facebook.hermes.reactexecutor.HermesExecutorFactory; import com.facebook.react.bridge.JavaScriptExecutorFactory; @@ -10,7 +10,7 @@ import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.soloader.SoLoader; - +import java.lang.reflect.InvocationTargetException; import java.util.List; public class MainApplication extends Application implements ReactApplication { @@ -45,5 +45,32 @@ public ReactNativeHost getReactNativeHost() { public void onCreate() { super.onCreate(); SoLoader.init(this, /* native exopackage */ false); + initializeFlipper(this); // Remove this line if you don't want Flipper enabled + } + + /** + * Loads Flipper in React Native templates. + * + * @param context + */ + private static void initializeFlipper(Context context) { + if (BuildConfig.DEBUG) { + try { + /* + We use reflection here to pick up the class that initializes Flipper, + since Flipper library is not available in release mode + */ + Class aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper"); + aClass.getMethod("initializeFlipper", Context.class).invoke(null, context); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } + } } } diff --git a/template/android/build.gradle b/template/android/build.gradle index e7732fe..0c98ecc 100644 --- a/template/android/build.gradle +++ b/template/android/build.gradle @@ -13,7 +13,7 @@ buildscript { jcenter() } dependencies { - classpath("com.android.tools.build:gradle:3.4.1") + classpath("com.android.tools.build:gradle:3.4.2") // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -34,5 +34,6 @@ allprojects { google() jcenter() + maven { url 'https://jitpack.io' } } } diff --git a/template/android/gradle/wrapper/gradle-wrapper.properties b/template/android/gradle/wrapper/gradle-wrapper.properties index ee69dd6..e0c4de3 100644 --- a/template/android/gradle/wrapper/gradle-wrapper.properties +++ b/template/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/template/ios/Podfile b/template/ios/Podfile index f9c1295..f032e9b 100644 --- a/template/ios/Podfile +++ b/template/ios/Podfile @@ -3,9 +3,14 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ target 'ProjectName' do # Pods for ProjectName + pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" + pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" + pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired" + pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" pod 'React', :path => '../node_modules/react-native/' - pod 'React-Core', :path => '../node_modules/react-native/React' - pod 'React-DevSupport', :path => '../node_modules/react-native/React' + pod 'React-Core', :path => '../node_modules/react-native/' + pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules' + pod 'React-Core/DevSupport', :path => '../node_modules/react-native/' pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation' pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob' @@ -15,13 +20,15 @@ target 'ProjectName' do pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings' pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' - pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket' + pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/' pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' - pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga' + pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon" + pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon" + pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga' pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' diff --git a/template/ios/ProjectName.xcodeproj/project.pbxproj b/template/ios/ProjectName.xcodeproj/project.pbxproj index 7a652af..b77a067 100644 --- a/template/ios/ProjectName.xcodeproj/project.pbxproj +++ b/template/ios/ProjectName.xcodeproj/project.pbxproj @@ -16,10 +16,10 @@ 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 2DCD954D1E0B4F2C00145EB5 /* ProjectNameTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ProjectNameTests.m */; }; - 993F73E2AE0638536FF08C25 /* libPods-ProjectName.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 70483DD46857604157491EC5 /* libPods-ProjectName.a */; }; - A67CC673044118B3AE5C04F8 /* libPods-ProjectName-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C538171507E78A45958E5EFA /* libPods-ProjectName-tvOSTests.a */; }; - D2D4EFD839A1AC172E5FEC98 /* libPods-ProjectName-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B2BEDE61B2D7F3EA6B696820 /* libPods-ProjectName-tvOS.a */; }; - E6072964039B9B277D44D6D2 /* libPods-ProjectNameTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E1A88C7016EC8EED2C8F3C08 /* libPods-ProjectNameTests.a */; }; + 428E7C00A1DF1C1A2C1140EE /* libPods-ProjectNameTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 34E943675B55A190041D9BC6 /* libPods-ProjectNameTests.a */; }; + 5D9570ED1A0B682B5FF5E421 /* libPods-ProjectName-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 821EC82BD30472D6D387B788 /* libPods-ProjectName-tvOSTests.a */; }; + A50903E452D634CE572F43CD /* libPods-ProjectName.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8486CCD792395AAD80956F45 /* libPods-ProjectName.a */; }; + EFB606294F69E6FA304BD500 /* libPods-ProjectName-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D8370FC4C13D1AE1CC8852B /* libPods-ProjectName-tvOS.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -44,7 +44,6 @@ 00E356EE1AD99517003FC87E /* ProjectNameTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ProjectNameTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 00E356F21AD99517003FC87E /* ProjectNameTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ProjectNameTests.m; sourceTree = ""; }; - 030531C59EB0797AB01CBD32 /* Pods-ProjectName-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProjectName-tvOSTests.release.xcconfig"; path = "Target Support Files/Pods-ProjectName-tvOSTests/Pods-ProjectName-tvOSTests.release.xcconfig"; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* ProjectName.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProjectName.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ProjectName/AppDelegate.h; sourceTree = ""; }; 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = ProjectName/AppDelegate.m; sourceTree = ""; }; @@ -52,21 +51,22 @@ 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ProjectName/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ProjectName/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ProjectName/main.m; sourceTree = ""; }; + 150E6CAFA5EF11AE47ED825C /* Pods-ProjectNameTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProjectNameTests.release.xcconfig"; path = "Target Support Files/Pods-ProjectNameTests/Pods-ProjectNameTests.release.xcconfig"; sourceTree = ""; }; 2D02E47B1E0B4A5D006451C7 /* ProjectName-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ProjectName-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 2D02E4901E0B4A5D006451C7 /* ProjectName-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ProjectName-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 37603BD810D1058EE1F68258 /* Pods-ProjectName-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProjectName-tvOS.release.xcconfig"; path = "Target Support Files/Pods-ProjectName-tvOS/Pods-ProjectName-tvOS.release.xcconfig"; sourceTree = ""; }; - 3C54BFF328006DED66ACAF92 /* Pods-ProjectName-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProjectName-tvOS.debug.xcconfig"; path = "Target Support Files/Pods-ProjectName-tvOS/Pods-ProjectName-tvOS.debug.xcconfig"; sourceTree = ""; }; - 70483DD46857604157491EC5 /* libPods-ProjectName.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ProjectName.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 70D0BFA228A309372B8F50D7 /* Pods-ProjectName.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProjectName.release.xcconfig"; path = "Target Support Files/Pods-ProjectName/Pods-ProjectName.release.xcconfig"; sourceTree = ""; }; - 98A3105F2FF49DBDBE859F00 /* Pods-ProjectName.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProjectName.debug.xcconfig"; path = "Target Support Files/Pods-ProjectName/Pods-ProjectName.debug.xcconfig"; sourceTree = ""; }; - B2BEDE61B2D7F3EA6B696820 /* libPods-ProjectName-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ProjectName-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - C538171507E78A45958E5EFA /* libPods-ProjectName-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ProjectName-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - DDDEAD28F3A65F4B7405822D /* Pods-ProjectName-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProjectName-tvOSTests.debug.xcconfig"; path = "Target Support Files/Pods-ProjectName-tvOSTests/Pods-ProjectName-tvOSTests.debug.xcconfig"; sourceTree = ""; }; - DF6451A84D0D985A3364B8A3 /* Pods-ProjectNameTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProjectNameTests.debug.xcconfig"; path = "Target Support Files/Pods-ProjectNameTests/Pods-ProjectNameTests.debug.xcconfig"; sourceTree = ""; }; - E1A88C7016EC8EED2C8F3C08 /* libPods-ProjectNameTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ProjectNameTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - E5B3ECD0200DFE5438F3263A /* Pods-ProjectNameTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProjectNameTests.release.xcconfig"; path = "Target Support Files/Pods-ProjectNameTests/Pods-ProjectNameTests.release.xcconfig"; sourceTree = ""; }; + 34E943675B55A190041D9BC6 /* libPods-ProjectNameTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ProjectNameTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 43307E7576B385875B79FCDF /* Pods-ProjectNameTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProjectNameTests.debug.xcconfig"; path = "Target Support Files/Pods-ProjectNameTests/Pods-ProjectNameTests.debug.xcconfig"; sourceTree = ""; }; + 664C331A95B54FA5B7AD4267 /* Pods-ProjectName-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProjectName-tvOSTests.release.xcconfig"; path = "Target Support Files/Pods-ProjectName-tvOSTests/Pods-ProjectName-tvOSTests.release.xcconfig"; sourceTree = ""; }; + 821EC82BD30472D6D387B788 /* libPods-ProjectName-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ProjectName-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 8486CCD792395AAD80956F45 /* libPods-ProjectName.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ProjectName.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 914896C0CEFDAA592DADF952 /* Pods-ProjectName.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProjectName.release.xcconfig"; path = "Target Support Files/Pods-ProjectName/Pods-ProjectName.release.xcconfig"; sourceTree = ""; }; + 9D8370FC4C13D1AE1CC8852B /* libPods-ProjectName-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ProjectName-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + A74FCF62A73172586BCD1E8C /* Pods-ProjectName-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProjectName-tvOS.release.xcconfig"; path = "Target Support Files/Pods-ProjectName-tvOS/Pods-ProjectName-tvOS.release.xcconfig"; sourceTree = ""; }; + B932E4CF7C7ADA47E0C72933 /* Pods-ProjectName-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProjectName-tvOSTests.debug.xcconfig"; path = "Target Support Files/Pods-ProjectName-tvOSTests/Pods-ProjectName-tvOSTests.debug.xcconfig"; sourceTree = ""; }; + BB1DF6C3AB03F9FA00E48CAE /* Pods-ProjectName-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProjectName-tvOS.debug.xcconfig"; path = "Target Support Files/Pods-ProjectName-tvOS/Pods-ProjectName-tvOS.debug.xcconfig"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; + FFF78D79653DD86D05E4A780 /* Pods-ProjectName.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ProjectName.debug.xcconfig"; path = "Target Support Files/Pods-ProjectName/Pods-ProjectName.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -74,7 +74,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E6072964039B9B277D44D6D2 /* libPods-ProjectNameTests.a in Frameworks */, + 428E7C00A1DF1C1A2C1140EE /* libPods-ProjectNameTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -82,7 +82,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 993F73E2AE0638536FF08C25 /* libPods-ProjectName.a in Frameworks */, + A50903E452D634CE572F43CD /* libPods-ProjectName.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -90,7 +90,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D2D4EFD839A1AC172E5FEC98 /* libPods-ProjectName-tvOS.a in Frameworks */, + EFB606294F69E6FA304BD500 /* libPods-ProjectName-tvOS.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -98,7 +98,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A67CC673044118B3AE5C04F8 /* libPods-ProjectName-tvOSTests.a in Frameworks */, + 5D9570ED1A0B682B5FF5E421 /* libPods-ProjectName-tvOSTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -136,15 +136,31 @@ name = ProjectName; sourceTree = ""; }; + 258E34A3BDFFFBF80D598187 /* Pods */ = { + isa = PBXGroup; + children = ( + FFF78D79653DD86D05E4A780 /* Pods-ProjectName.debug.xcconfig */, + 914896C0CEFDAA592DADF952 /* Pods-ProjectName.release.xcconfig */, + BB1DF6C3AB03F9FA00E48CAE /* Pods-ProjectName-tvOS.debug.xcconfig */, + A74FCF62A73172586BCD1E8C /* Pods-ProjectName-tvOS.release.xcconfig */, + B932E4CF7C7ADA47E0C72933 /* Pods-ProjectName-tvOSTests.debug.xcconfig */, + 664C331A95B54FA5B7AD4267 /* Pods-ProjectName-tvOSTests.release.xcconfig */, + 43307E7576B385875B79FCDF /* Pods-ProjectNameTests.debug.xcconfig */, + 150E6CAFA5EF11AE47ED825C /* Pods-ProjectNameTests.release.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { isa = PBXGroup; children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, ED2971642150620600B7C4FE /* JavaScriptCore.framework */, - 70483DD46857604157491EC5 /* libPods-ProjectName.a */, - B2BEDE61B2D7F3EA6B696820 /* libPods-ProjectName-tvOS.a */, - C538171507E78A45958E5EFA /* libPods-ProjectName-tvOSTests.a */, - E1A88C7016EC8EED2C8F3C08 /* libPods-ProjectNameTests.a */, + 8486CCD792395AAD80956F45 /* libPods-ProjectName.a */, + 9D8370FC4C13D1AE1CC8852B /* libPods-ProjectName-tvOS.a */, + 821EC82BD30472D6D387B788 /* libPods-ProjectName-tvOSTests.a */, + 34E943675B55A190041D9BC6 /* libPods-ProjectNameTests.a */, ); name = Frameworks; sourceTree = ""; @@ -164,7 +180,7 @@ 00E356EF1AD99517003FC87E /* ProjectNameTests */, 83CBBA001A601CBA00E9B192 /* Products */, 2D16E6871FA4F8E400B85C8A /* Frameworks */, - A6616E0ACFEA1C16BD4EF62B /* Pods */, + 258E34A3BDFFFBF80D598187 /* Pods */, ); indentWidth = 2; sourceTree = ""; @@ -182,22 +198,6 @@ name = Products; sourceTree = ""; }; - A6616E0ACFEA1C16BD4EF62B /* Pods */ = { - isa = PBXGroup; - children = ( - 98A3105F2FF49DBDBE859F00 /* Pods-ProjectName.debug.xcconfig */, - 70D0BFA228A309372B8F50D7 /* Pods-ProjectName.release.xcconfig */, - 3C54BFF328006DED66ACAF92 /* Pods-ProjectName-tvOS.debug.xcconfig */, - 37603BD810D1058EE1F68258 /* Pods-ProjectName-tvOS.release.xcconfig */, - DDDEAD28F3A65F4B7405822D /* Pods-ProjectName-tvOSTests.debug.xcconfig */, - 030531C59EB0797AB01CBD32 /* Pods-ProjectName-tvOSTests.release.xcconfig */, - DF6451A84D0D985A3364B8A3 /* Pods-ProjectNameTests.debug.xcconfig */, - E5B3ECD0200DFE5438F3263A /* Pods-ProjectNameTests.release.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -205,7 +205,7 @@ isa = PBXNativeTarget; buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ProjectNameTests" */; buildPhases = ( - 35DDB224EF45CB87E3270F78 /* [CP] Check Pods Manifest.lock */, + D5C5B21107E23492DA9BDC94 /* [CP] Check Pods Manifest.lock */, 00E356EA1AD99517003FC87E /* Sources */, 00E356EB1AD99517003FC87E /* Frameworks */, 00E356EC1AD99517003FC87E /* Resources */, @@ -224,7 +224,7 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ProjectName" */; buildPhases = ( - 04A2A765B090D34D61FAC4C0 /* [CP] Check Pods Manifest.lock */, + CB3FE51FCBA30C6B8D6A3806 /* [CP] Check Pods Manifest.lock */, FD10A7F022414F080027D42C /* Start Packager */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, @@ -244,7 +244,7 @@ isa = PBXNativeTarget; buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "ProjectName-tvOS" */; buildPhases = ( - BFAC20A5777108CEEEAE66CF /* [CP] Check Pods Manifest.lock */, + 777B3928177A0EE7EA1ABCF9 /* [CP] Check Pods Manifest.lock */, FD10A7F122414F3F0027D42C /* Start Packager */, 2D02E4771E0B4A5D006451C7 /* Sources */, 2D02E4781E0B4A5D006451C7 /* Frameworks */, @@ -264,7 +264,7 @@ isa = PBXNativeTarget; buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "ProjectName-tvOSTests" */; buildPhases = ( - 9F633E8748CFDD62F2DEC906 /* [CP] Check Pods Manifest.lock */, + 57F4EECD4004FE3420E6DF92 /* [CP] Check Pods Manifest.lock */, 2D02E48C1E0B4A5D006451C7 /* Sources */, 2D02E48D1E0B4A5D006451C7 /* Frameworks */, 2D02E48E1E0B4A5D006451C7 /* Resources */, @@ -373,43 +373,43 @@ shellPath = /bin/sh; shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; }; - 04A2A765B090D34D61FAC4C0 /* [CP] Check Pods Manifest.lock */ = { + 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( ); + name = "Bundle React Native Code And Images"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ProjectName-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; }; - 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { + 57F4EECD4004FE3420E6DF92 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "Bundle React Native Code And Images"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-ProjectName-tvOSTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; }; - 35DDB224EF45CB87E3270F78 /* [CP] Check Pods Manifest.lock */ = { + 777B3928177A0EE7EA1ABCF9 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -424,14 +424,14 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ProjectNameTests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-ProjectName-tvOS-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 9F633E8748CFDD62F2DEC906 /* [CP] Check Pods Manifest.lock */ = { + CB3FE51FCBA30C6B8D6A3806 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -446,14 +446,14 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ProjectName-tvOSTests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-ProjectName-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - BFAC20A5777108CEEEAE66CF /* [CP] Check Pods Manifest.lock */ = { + D5C5B21107E23492DA9BDC94 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -468,7 +468,7 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-ProjectName-tvOS-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-ProjectNameTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -580,7 +580,7 @@ /* Begin XCBuildConfiguration section */ 00E356F61AD99517003FC87E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DF6451A84D0D985A3364B8A3 /* Pods-ProjectNameTests.debug.xcconfig */; + baseConfigurationReference = 43307E7576B385875B79FCDF /* Pods-ProjectNameTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -603,7 +603,7 @@ }; 00E356F71AD99517003FC87E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E5B3ECD0200DFE5438F3263A /* Pods-ProjectNameTests.release.xcconfig */; + baseConfigurationReference = 150E6CAFA5EF11AE47ED825C /* Pods-ProjectNameTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; @@ -623,7 +623,7 @@ }; 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 98A3105F2FF49DBDBE859F00 /* Pods-ProjectName.debug.xcconfig */; + baseConfigurationReference = FFF78D79653DD86D05E4A780 /* Pods-ProjectName.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CURRENT_PROJECT_VERSION = 1; @@ -643,7 +643,7 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 70D0BFA228A309372B8F50D7 /* Pods-ProjectName.release.xcconfig */; + baseConfigurationReference = 914896C0CEFDAA592DADF952 /* Pods-ProjectName.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CURRENT_PROJECT_VERSION = 1; @@ -662,7 +662,7 @@ }; 2D02E4971E0B4A5E006451C7 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3C54BFF328006DED66ACAF92 /* Pods-ProjectName-tvOS.debug.xcconfig */; + baseConfigurationReference = BB1DF6C3AB03F9FA00E48CAE /* Pods-ProjectName-tvOS.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; @@ -690,7 +690,7 @@ }; 2D02E4981E0B4A5E006451C7 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 37603BD810D1058EE1F68258 /* Pods-ProjectName-tvOS.release.xcconfig */; + baseConfigurationReference = A74FCF62A73172586BCD1E8C /* Pods-ProjectName-tvOS.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; @@ -718,7 +718,7 @@ }; 2D02E4991E0B4A5E006451C7 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DDDEAD28F3A65F4B7405822D /* Pods-ProjectName-tvOSTests.debug.xcconfig */; + baseConfigurationReference = B932E4CF7C7ADA47E0C72933 /* Pods-ProjectName-tvOSTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; @@ -745,7 +745,7 @@ }; 2D02E49A1E0B4A5E006451C7 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 030531C59EB0797AB01CBD32 /* Pods-ProjectName-tvOSTests.release.xcconfig */; + baseConfigurationReference = 664C331A95B54FA5B7AD4267 /* Pods-ProjectName-tvOSTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; @@ -920,4 +920,4 @@ /* End XCConfigurationList section */ }; rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} +} \ No newline at end of file diff --git a/template/ios/ProjectNameTests/ProjectNameTests.m b/template/ios/ProjectNameTests/ProjectNameTests.m index 1fc6b0d..499deef 100644 --- a/template/ios/ProjectNameTests/ProjectNameTests.m +++ b/template/ios/ProjectNameTests/ProjectNameTests.m @@ -12,7 +12,7 @@ #import #define TIMEOUT_SECONDS 600 -#define TEXT_TO_LOOK_FOR @"Welcome to React Native!" +#define TEXT_TO_LOOK_FOR @"Welcome to React" @interface ProjectNameTests : XCTestCase @@ -40,11 +40,13 @@ - (void)testRendersWelcomeScreen BOOL foundElement = NO; __block NSString *redboxError = nil; +#ifdef DEBUG RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { if (level >= RCTLogLevelError) { redboxError = message; } }); +#endif while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; @@ -57,9 +59,9 @@ - (void)testRendersWelcomeScreen return NO; }]; } - +#ifdef DEBUG RCTSetLogFunction(RCTDefaultLogFunction); - +#endif XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); } diff --git a/template/package.json b/template/package.json index 5d7f73a..92f04b6 100644 --- a/template/package.json +++ b/template/package.json @@ -12,20 +12,20 @@ "test": "jest" }, "dependencies": { - "react": "^16.8.0", - "react-native": "^0.60.0", + "react": "16.9.0", + "react-native": "0.61.5", "reason-react": "^0.7.0", - "reason-react-native": "^0.60.0" + "reason-react-native": "0.61.1" }, "devDependencies": { - "@babel/core": "^7.3.3", - "@babel/runtime": "^7.3.1", - "@react-native-community/eslint-config": "^0.0.3", - "babel-jest": "^24.1.0", + "@babel/core": "7.6.2", + "@babel/runtime": "7.6.2", + "@react-native-community/eslint-config": "^0.0.5", + "babel-jest": "24.9.0", "bs-platform": "^5.0.4", - "jest": "^24.1.0", - "metro-react-native-babel-preset": "^0.51.1", - "react-test-renderer": "16.8.1" + "jest": "24.9.0", + "metro-react-native-babel-preset": "^0.56.1", + "react-test-renderer": "16.9.0" }, "jest": { "preset": "react-native"