diff --git a/Example/.bundle/config b/Example/.bundle/config new file mode 100644 index 0000000..848943b --- /dev/null +++ b/Example/.bundle/config @@ -0,0 +1,2 @@ +BUNDLE_PATH: "vendor/bundle" +BUNDLE_FORCE_RUBY_PLATFORM: 1 diff --git a/Example/.flowconfig b/Example/.flowconfig index 786366c..3782e44 100644 --- a/Example/.flowconfig +++ b/Example/.flowconfig @@ -8,13 +8,11 @@ ; Ignore polyfills node_modules/react-native/Libraries/polyfills/.* -; These should not be required directly -; require from fbjs/lib instead: require('fbjs/lib/warning') -node_modules/warning/.* - ; Flow doesn't support platforms .*/Libraries/Utilities/LoadingView.js +.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$ + [untyped] .*/node_modules/@react-native-community/cli/.*/.* @@ -27,8 +25,9 @@ node_modules/react-native/flow/ [options] emoji=true -esproposal.optional_chaining=enable -esproposal.nullish_coalescing=enable +exact_by_default=true + +format.bracket_spacing=false module.file_ext=.js module.file_ext=.json @@ -44,10 +43,6 @@ suppress_type=$FlowFixMe suppress_type=$FlowFixMeProps suppress_type=$FlowFixMeState -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+ -suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError - [lints] sketchy-null-number=warn sketchy-null-mixed=warn @@ -56,10 +51,7 @@ untyped-type-import=warn nonstrict-import=warn deprecated-type=warn unsafe-getters-setters=warn -inexact-spread=warn unnecessary-invariant=warn -signature-verification-failure=warn -deprecated-utility=error [strict] deprecated-type @@ -71,4 +63,4 @@ untyped-import untyped-type-import [version] -^0.113.0 +^0.182.0 diff --git a/Example/.gitattributes b/Example/.gitattributes deleted file mode 100644 index d42ff18..0000000 --- a/Example/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.pbxproj -text diff --git a/Example/.gitignore b/Example/.gitignore index ad572e6..2423126 100644 --- a/Example/.gitignore +++ b/Example/.gitignore @@ -20,6 +20,7 @@ DerivedData *.hmap *.ipa *.xcuserstate +ios/.xcode.env.local # Android/IntelliJ # @@ -28,6 +29,8 @@ build/ .gradle local.properties *.iml +*.hprof +.cxx/ # node.js # @@ -48,12 +51,14 @@ buck-out/ # For more information about the recommended setup visit: # https://docs.fastlane.tools/best-practices/source-control/ -*/fastlane/report.xml -*/fastlane/Preview.html -*/fastlane/screenshots +**/fastlane/report.xml +**/fastlane/Preview.html +**/fastlane/screenshots +**/fastlane/test_output # Bundle artifact *.jsbundle -# CocoaPods +# Ruby / CocoaPods /ios/Pods/ +/vendor/bundle/ diff --git a/Example/.node-version b/Example/.node-version new file mode 100644 index 0000000..b6a7d89 --- /dev/null +++ b/Example/.node-version @@ -0,0 +1 @@ +16 diff --git a/Example/.ruby-version b/Example/.ruby-version new file mode 100644 index 0000000..a603bb5 --- /dev/null +++ b/Example/.ruby-version @@ -0,0 +1 @@ +2.7.5 diff --git a/Example/Gemfile b/Example/Gemfile new file mode 100644 index 0000000..5efda89 --- /dev/null +++ b/Example/Gemfile @@ -0,0 +1,6 @@ +source 'https://rubygems.org' + +# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version +ruby '2.7.5' + +gem 'cocoapods', '~> 1.11', '>= 1.11.2' diff --git a/Example/Gemfile.lock b/Example/Gemfile.lock new file mode 100644 index 0000000..795c801 --- /dev/null +++ b/Example/Gemfile.lock @@ -0,0 +1,100 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.5) + rexml + activesupport (6.1.7) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) + algoliasearch (1.27.5) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) + atomos (0.1.3) + claide (1.1.0) + cocoapods (1.11.3) + addressable (~> 2.8) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.11.3) + cocoapods-deintegrate (>= 1.0.3, < 2.0) + cocoapods-downloader (>= 1.4.0, < 2.0) + cocoapods-plugins (>= 1.0.0, < 2.0) + cocoapods-search (>= 1.0.0, < 2.0) + cocoapods-trunk (>= 1.4.0, < 2.0) + cocoapods-try (>= 1.1.0, < 2.0) + colored2 (~> 3.1) + escape (~> 0.0.4) + fourflusher (>= 2.3.0, < 3.0) + gh_inspector (~> 1.0) + molinillo (~> 0.8.0) + nap (~> 1.0) + ruby-macho (>= 1.0, < 3.0) + xcodeproj (>= 1.21.0, < 2.0) + cocoapods-core (1.11.3) + activesupport (>= 5.0, < 7) + addressable (~> 2.8) + algoliasearch (~> 1.0) + concurrent-ruby (~> 1.1) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + netrc (~> 0.11) + public_suffix (~> 4.0) + typhoeus (~> 1.0) + cocoapods-deintegrate (1.0.5) + cocoapods-downloader (1.6.3) + cocoapods-plugins (1.0.0) + nap + cocoapods-search (1.0.1) + cocoapods-trunk (1.6.0) + nap (>= 0.8, < 2.0) + netrc (~> 0.11) + cocoapods-try (1.2.0) + colored2 (3.1.2) + concurrent-ruby (1.1.10) + escape (0.0.4) + ethon (0.15.0) + ffi (>= 1.15.0) + ffi (1.15.5) + fourflusher (2.3.1) + fuzzy_match (2.0.4) + gh_inspector (1.1.3) + httpclient (2.8.3) + i18n (1.12.0) + concurrent-ruby (~> 1.0) + json (2.6.2) + minitest (5.16.3) + molinillo (0.8.0) + nanaimo (0.3.0) + nap (1.1.0) + netrc (0.11.0) + public_suffix (4.0.7) + rexml (3.2.5) + ruby-macho (2.5.1) + typhoeus (1.4.0) + ethon (>= 0.9.0) + tzinfo (2.0.5) + concurrent-ruby (~> 1.0) + xcodeproj (1.22.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.3.0) + rexml (~> 3.2.4) + zeitwerk (2.6.1) + +PLATFORMS + arm64-darwin-21 + +DEPENDENCIES + cocoapods (~> 1.11, >= 1.11.2) + +RUBY VERSION + ruby 2.7.5p203 + +BUNDLED WITH + 2.2.27 diff --git a/Example/android/app/build.gradle b/Example/android/app/build.gradle index 0b41e92..374e427 100644 --- a/Example/android/app/build.gradle +++ b/Example/android/app/build.gradle @@ -1,6 +1,7 @@ apply plugin: "com.android.application" import com.android.build.OutputFile +import org.apache.tools.ant.taskdefs.condition.Os /** * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets @@ -20,7 +21,7 @@ import com.android.build.OutputFile * // default. Can be overridden with ENTRY_FILE environment variable. * entryFile: "index.android.js", * - * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format + * // https://reactnative.dev/docs/performance#enable-the-ram-format * bundleCommand: "ram-bundle", * * // whether to bundle JS and assets in debug mode @@ -78,7 +79,7 @@ import com.android.build.OutputFile */ project.ext.react = [ - enableHermes: false, // clean and rebuild if changing + enableHermes: true, // clean and rebuild if changing ] apply from: "../../node_modules/react-native/react.gradle" @@ -114,19 +115,24 @@ def jscFlavor = 'org.webkit:android-jsc:+' /** * Whether to enable the Hermes VM. * - * This should be set on project.ext.react and mirrored here. If it is not set + * This should be set on project.ext.react and that value will be read here. If it is not set * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode * and the benefits of using Hermes will therefore be sharply reduced. */ def enableHermes = project.ext.react.get("enableHermes", false); +/** + * Architectures to build native code for. + */ +def reactNativeArchitectures() { + def value = project.getProperties().get("reactNativeArchitectures") + return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] +} + android { - compileSdkVersion rootProject.ext.compileSdkVersion + ndkVersion rootProject.ext.ndkVersion - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } + compileSdkVersion rootProject.ext.compileSdkVersion defaultConfig { applicationId "com.example" @@ -134,13 +140,74 @@ android { targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" + buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() + + if (isNewArchitectureEnabled()) { + // We configure the CMake build only if you decide to opt-in for the New Architecture. + externalNativeBuild { + cmake { + arguments "-DPROJECT_BUILD_DIR=$buildDir", + "-DREACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid", + "-DREACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build", + "-DNODE_MODULES_DIR=$rootDir/../node_modules", + "-DANDROID_STL=c++_shared" + } + } + if (!enableSeparateBuildPerCPUArchitecture) { + ndk { + abiFilters (*reactNativeArchitectures()) + } + } + } } + + if (isNewArchitectureEnabled()) { + // We configure the NDK build only if you decide to opt-in for the New Architecture. + externalNativeBuild { + cmake { + path "$projectDir/src/main/jni/CMakeLists.txt" + } + } + def reactAndroidProjectDir = project(':ReactAndroid').projectDir + def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) { + dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck") + from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") + into("$buildDir/react-ndk/exported") + } + def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) { + dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck") + from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib") + into("$buildDir/react-ndk/exported") + } + afterEvaluate { + // If you wish to add a custom TurboModule or component locally, + // you should uncomment this line. + // preBuild.dependsOn("generateCodegenArtifactsFromSchema") + preDebugBuild.dependsOn(packageReactNdkDebugLibs) + preReleaseBuild.dependsOn(packageReactNdkReleaseLibs) + + // Due to a bug inside AGP, we have to explicitly set a dependency + // between configureCMakeDebug* tasks and the preBuild tasks. + // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732 + configureCMakeRelWithDebInfo.dependsOn(preReleaseBuild) + configureCMakeDebug.dependsOn(preDebugBuild) + reactNativeArchitectures().each { architecture -> + tasks.findByName("configureCMakeDebug[${architecture}]")?.configure { + dependsOn("preDebugBuild") + } + tasks.findByName("configureCMakeRelWithDebInfo[${architecture}]")?.configure { + dependsOn("preReleaseBuild") + } + } + } + } + splits { abi { reset() enable enableSeparateBuildPerCPUArchitecture universalApk false // If true, also generate a universal APK - include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" + include (*reactNativeArchitectures()) } } signingConfigs { @@ -157,30 +224,24 @@ android { } release { // Caution! In production, you need to generate your own keystore file. - // see https://facebook.github.io/react-native/docs/signed-apk-android. + // see https://reactnative.dev/docs/signed-apk-android. signingConfig signingConfigs.debug minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } - packagingOptions { - pickFirst "lib/armeabi-v7a/libc++_shared.so" - pickFirst "lib/arm64-v8a/libc++_shared.so" - pickFirst "lib/x86/libc++_shared.so" - pickFirst "lib/x86_64/libc++_shared.so" - } - // applicationVariants are e.g. debug, release applicationVariants.all { variant -> variant.outputs.each { output -> // For each separate APK per architecture, set a unique version code as described here: // https://developer.android.com/studio/build/configure-apk-splits.html + // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] def abi = output.getFilter(OutputFile.ABI) if (abi != null) { // null for the universal-debug, universal-release variants output.versionCodeOverride = - versionCodes.get(abi) * 1048576 + defaultConfig.versionCode + defaultConfig.versionCode * 1000 + versionCodes.get(abi) } } @@ -189,17 +250,19 @@ android { dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) + //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" // From node_modules implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { - exclude group:'com.facebook.fbjni' + exclude group:'com.facebook.fbjni' } debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { exclude group:'com.facebook.flipper' + exclude group:'com.squareup.okhttp3', module:'okhttp' } debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { @@ -207,19 +270,44 @@ dependencies { } if (enableHermes) { - def hermesPath = "../../node_modules/hermes-engine/android/"; - debugImplementation files(hermesPath + "hermes-debug.aar") - releaseImplementation files(hermesPath + "hermes-release.aar") + //noinspection GradleDynamicVersion + implementation("com.facebook.react:hermes-engine:+") { // From node_modules + exclude group:'com.facebook.fbjni' + } } else { implementation jscFlavor } } +if (isNewArchitectureEnabled()) { + // If new architecture is enabled, we let you build RN from source + // Otherwise we fallback to a prebuilt .aar bundled in the NPM package. + // This will be applied to all the imported transtitive dependency. + configurations.all { + resolutionStrategy.dependencySubstitution { + substitute(module("com.facebook.react:react-native")) + .using(project(":ReactAndroid")) + .because("On New Architecture we're building React Native from source") + substitute(module("com.facebook.react:hermes-engine")) + .using(project(":ReactAndroid:hermes-engine")) + .because("On New Architecture we're building Hermes from source") + } + } +} + // Run this once to be able to run the application with BUCK // puts all compile dependencies into folder libs for BUCK to use task copyDownloadableDepsToLibs(type: Copy) { - from configurations.compile + from configurations.implementation into 'libs' } apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) + +def isNewArchitectureEnabled() { + // To opt-in for the New Architecture, you can either: + // - Set `newArchEnabled` to true inside the `gradle.properties` file + // - Invoke gradle with `-newArchEnabled=true` + // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true` + return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true" +} diff --git a/Example/android/app/src/debug/AndroidManifest.xml b/Example/android/app/src/debug/AndroidManifest.xml index fa26aa5..4b185bc 100644 --- a/Example/android/app/src/debug/AndroidManifest.xml +++ b/Example/android/app/src/debug/AndroidManifest.xml @@ -4,5 +4,10 @@ - + + + diff --git a/Example/android/app/src/debug/java/com/example/ReactNativeFlipper.java b/Example/android/app/src/debug/java/com/example/ReactNativeFlipper.java index a1b70b8..9ffdd88 100644 --- a/Example/android/app/src/debug/java/com/example/ReactNativeFlipper.java +++ b/Example/android/app/src/debug/java/com/example/ReactNativeFlipper.java @@ -1,5 +1,5 @@ /** - * Copyright (c) Facebook, Inc. and its affiliates. + * Copyright (c) Meta Platforms, Inc. and affiliates. * *

This source code is licensed under the MIT license found in the LICENSE file in the root * directory of this source tree. @@ -19,6 +19,7 @@ import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; import com.facebook.flipper.plugins.react.ReactFlipperPlugin; import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; +import com.facebook.react.ReactInstanceEventListener; import com.facebook.react.ReactInstanceManager; import com.facebook.react.bridge.ReactContext; import com.facebook.react.modules.network.NetworkingModule; @@ -51,7 +52,7 @@ public void apply(OkHttpClient.Builder builder) { ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); if (reactContext == null) { reactInstanceManager.addReactInstanceEventListener( - new ReactInstanceManager.ReactInstanceEventListener() { + new ReactInstanceEventListener() { @Override public void onReactContextInitialized(ReactContext reactContext) { reactInstanceManager.removeReactInstanceEventListener(this); diff --git a/Example/android/app/src/main/AndroidManifest.xml b/Example/android/app/src/main/AndroidManifest.xml index 6e27a2a..ef3c312 100644 --- a/Example/android/app/src/main/AndroidManifest.xml +++ b/Example/android/app/src/main/AndroidManifest.xml @@ -13,15 +13,14 @@ + android:windowSoftInputMode="adjustResize" + android:exported="true"> - - diff --git a/Example/android/app/src/main/java/com/example/MainActivity.java b/Example/android/app/src/main/java/com/example/MainActivity.java index 557797a..bc5238f 100644 --- a/Example/android/app/src/main/java/com/example/MainActivity.java +++ b/Example/android/app/src/main/java/com/example/MainActivity.java @@ -1,6 +1,8 @@ package com.example; import com.facebook.react.ReactActivity; +import com.facebook.react.ReactActivityDelegate; +import com.facebook.react.ReactRootView; public class MainActivity extends ReactActivity { @@ -12,4 +14,35 @@ public class MainActivity extends ReactActivity { protected String getMainComponentName() { return "Example"; } + + /** + * Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and + * you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer + * (Paper). + */ + @Override + protected ReactActivityDelegate createReactActivityDelegate() { + return new MainActivityDelegate(this, getMainComponentName()); + } + + public static class MainActivityDelegate extends ReactActivityDelegate { + public MainActivityDelegate(ReactActivity activity, String mainComponentName) { + super(activity, mainComponentName); + } + + @Override + protected ReactRootView createRootView() { + ReactRootView reactRootView = new ReactRootView(getContext()); + // If you opted-in for the New Architecture, we enable the Fabric Renderer. + reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED); + return reactRootView; + } + + @Override + protected boolean isConcurrentRootEnabled() { + // If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18). + // More on this on https://reactjs.org/blog/2022/03/29/react-v18.html + return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; + } + } } diff --git a/Example/android/app/src/main/java/com/example/MainApplication.java b/Example/android/app/src/main/java/com/example/MainApplication.java index fd8ec88..61f1d42 100644 --- a/Example/android/app/src/main/java/com/example/MainApplication.java +++ b/Example/android/app/src/main/java/com/example/MainApplication.java @@ -7,7 +7,9 @@ import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; +import com.facebook.react.config.ReactFeatureFlags; import com.facebook.soloader.SoLoader; +import com.example.newarchitecture.MainApplicationReactNativeHost; import java.lang.reflect.InvocationTargetException; import java.util.List; @@ -35,14 +37,23 @@ protected String getJSMainModuleName() { } }; + private final ReactNativeHost mNewArchitectureNativeHost = + new MainApplicationReactNativeHost(this); + @Override public ReactNativeHost getReactNativeHost() { - return mReactNativeHost; + if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { + return mNewArchitectureNativeHost; + } else { + return mReactNativeHost; + } } @Override public void onCreate() { super.onCreate(); + // If you opted-in for the New Architecture, we enable the TurboModule system + ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; SoLoader.init(this, /* native exopackage */ false); initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); } diff --git a/Example/android/app/src/main/java/com/example/newarchitecture/MainApplicationReactNativeHost.java b/Example/android/app/src/main/java/com/example/newarchitecture/MainApplicationReactNativeHost.java new file mode 100644 index 0000000..68aea28 --- /dev/null +++ b/Example/android/app/src/main/java/com/example/newarchitecture/MainApplicationReactNativeHost.java @@ -0,0 +1,116 @@ +package com.example.newarchitecture; + +import android.app.Application; +import androidx.annotation.NonNull; +import com.facebook.react.PackageList; +import com.facebook.react.ReactInstanceManager; +import com.facebook.react.ReactNativeHost; +import com.facebook.react.ReactPackage; +import com.facebook.react.ReactPackageTurboModuleManagerDelegate; +import com.facebook.react.bridge.JSIModulePackage; +import com.facebook.react.bridge.JSIModuleProvider; +import com.facebook.react.bridge.JSIModuleSpec; +import com.facebook.react.bridge.JSIModuleType; +import com.facebook.react.bridge.JavaScriptContextHolder; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.UIManager; +import com.facebook.react.fabric.ComponentFactory; +import com.facebook.react.fabric.CoreComponentsRegistry; +import com.facebook.react.fabric.FabricJSIModuleProvider; +import com.facebook.react.fabric.ReactNativeConfig; +import com.facebook.react.uimanager.ViewManagerRegistry; +import com.example.BuildConfig; +import com.example.newarchitecture.components.MainComponentsRegistry; +import com.example.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate; +import java.util.ArrayList; +import java.util.List; + +/** + * A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both + * TurboModule delegates and the Fabric Renderer. + * + *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the + * `newArchEnabled` property). Is ignored otherwise. + */ +public class MainApplicationReactNativeHost extends ReactNativeHost { + public MainApplicationReactNativeHost(Application application) { + super(application); + } + + @Override + public boolean getUseDeveloperSupport() { + return BuildConfig.DEBUG; + } + + @Override + protected List getPackages() { + List packages = new PackageList(this).getPackages(); + // Packages that cannot be autolinked yet can be added manually here, for example: + // packages.add(new MyReactNativePackage()); + // TurboModules must also be loaded here providing a valid TurboReactPackage implementation: + // packages.add(new TurboReactPackage() { ... }); + // If you have custom Fabric Components, their ViewManagers should also be loaded here + // inside a ReactPackage. + return packages; + } + + @Override + protected String getJSMainModuleName() { + return "index"; + } + + @NonNull + @Override + protected ReactPackageTurboModuleManagerDelegate.Builder + getReactPackageTurboModuleManagerDelegateBuilder() { + // Here we provide the ReactPackageTurboModuleManagerDelegate Builder. This is necessary + // for the new architecture and to use TurboModules correctly. + return new MainApplicationTurboModuleManagerDelegate.Builder(); + } + + @Override + protected JSIModulePackage getJSIModulePackage() { + return new JSIModulePackage() { + @Override + public List getJSIModules( + final ReactApplicationContext reactApplicationContext, + final JavaScriptContextHolder jsContext) { + final List specs = new ArrayList<>(); + + // Here we provide a new JSIModuleSpec that will be responsible of providing the + // custom Fabric Components. + specs.add( + new JSIModuleSpec() { + @Override + public JSIModuleType getJSIModuleType() { + return JSIModuleType.UIManager; + } + + @Override + public JSIModuleProvider getJSIModuleProvider() { + final ComponentFactory componentFactory = new ComponentFactory(); + CoreComponentsRegistry.register(componentFactory); + + // Here we register a Components Registry. + // The one that is generated with the template contains no components + // and just provides you the one from React Native core. + MainComponentsRegistry.register(componentFactory); + + final ReactInstanceManager reactInstanceManager = getReactInstanceManager(); + + ViewManagerRegistry viewManagerRegistry = + new ViewManagerRegistry( + reactInstanceManager.getOrCreateViewManagers(reactApplicationContext)); + + return new FabricJSIModuleProvider( + reactApplicationContext, + componentFactory, + ReactNativeConfig.DEFAULT_CONFIG, + viewManagerRegistry); + } + }); + return specs; + } + }; + } +} diff --git a/Example/android/app/src/main/java/com/example/newarchitecture/components/MainComponentsRegistry.java b/Example/android/app/src/main/java/com/example/newarchitecture/components/MainComponentsRegistry.java new file mode 100644 index 0000000..98ff973 --- /dev/null +++ b/Example/android/app/src/main/java/com/example/newarchitecture/components/MainComponentsRegistry.java @@ -0,0 +1,36 @@ +package com.example.newarchitecture.components; + +import com.facebook.jni.HybridData; +import com.facebook.proguard.annotations.DoNotStrip; +import com.facebook.react.fabric.ComponentFactory; +import com.facebook.soloader.SoLoader; + +/** + * Class responsible to load the custom Fabric Components. This class has native methods and needs a + * corresponding C++ implementation/header file to work correctly (already placed inside the jni/ + * folder for you). + * + *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the + * `newArchEnabled` property). Is ignored otherwise. + */ +@DoNotStrip +public class MainComponentsRegistry { + static { + SoLoader.loadLibrary("fabricjni"); + } + + @DoNotStrip private final HybridData mHybridData; + + @DoNotStrip + private native HybridData initHybrid(ComponentFactory componentFactory); + + @DoNotStrip + private MainComponentsRegistry(ComponentFactory componentFactory) { + mHybridData = initHybrid(componentFactory); + } + + @DoNotStrip + public static MainComponentsRegistry register(ComponentFactory componentFactory) { + return new MainComponentsRegistry(componentFactory); + } +} diff --git a/Example/android/app/src/main/java/com/example/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java b/Example/android/app/src/main/java/com/example/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java new file mode 100644 index 0000000..b30c50e --- /dev/null +++ b/Example/android/app/src/main/java/com/example/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java @@ -0,0 +1,48 @@ +package com.example.newarchitecture.modules; + +import com.facebook.jni.HybridData; +import com.facebook.react.ReactPackage; +import com.facebook.react.ReactPackageTurboModuleManagerDelegate; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.soloader.SoLoader; +import java.util.List; + +/** + * Class responsible to load the TurboModules. This class has native methods and needs a + * corresponding C++ implementation/header file to work correctly (already placed inside the jni/ + * folder for you). + * + *

Please note that this class is used ONLY if you opt-in for the New Architecture (see the + * `newArchEnabled` property). Is ignored otherwise. + */ +public class MainApplicationTurboModuleManagerDelegate + extends ReactPackageTurboModuleManagerDelegate { + + private static volatile boolean sIsSoLibraryLoaded; + + protected MainApplicationTurboModuleManagerDelegate( + ReactApplicationContext reactApplicationContext, List packages) { + super(reactApplicationContext, packages); + } + + protected native HybridData initHybrid(); + + native boolean canCreateTurboModule(String moduleName); + + public static class Builder extends ReactPackageTurboModuleManagerDelegate.Builder { + protected MainApplicationTurboModuleManagerDelegate build( + ReactApplicationContext context, List packages) { + return new MainApplicationTurboModuleManagerDelegate(context, packages); + } + } + + @Override + protected synchronized void maybeLoadOtherSoLibraries() { + if (!sIsSoLibraryLoaded) { + // If you change the name of your application .so file in the Android.mk file, + // make sure you update the name here as well. + SoLoader.loadLibrary("example_appmodules"); + sIsSoLibraryLoaded = true; + } + } +} diff --git a/Example/android/app/src/main/jni/CMakeLists.txt b/Example/android/app/src/main/jni/CMakeLists.txt new file mode 100644 index 0000000..9abdd49 --- /dev/null +++ b/Example/android/app/src/main/jni/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.13) + +# Define the library name here. +project(example_appmodules) + +# This file includes all the necessary to let you build your application with the New Architecture. +include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake) diff --git a/Example/android/app/src/main/jni/MainApplicationModuleProvider.cpp b/Example/android/app/src/main/jni/MainApplicationModuleProvider.cpp new file mode 100644 index 0000000..26162dd --- /dev/null +++ b/Example/android/app/src/main/jni/MainApplicationModuleProvider.cpp @@ -0,0 +1,32 @@ +#include "MainApplicationModuleProvider.h" + +#include +#include + +namespace facebook { +namespace react { + +std::shared_ptr MainApplicationModuleProvider( + const std::string &moduleName, + const JavaTurboModule::InitParams ¶ms) { + // Here you can provide your own module provider for TurboModules coming from + // either your application or from external libraries. The approach to follow + // is similar to the following (for a library called `samplelibrary`: + // + // auto module = samplelibrary_ModuleProvider(moduleName, params); + // if (module != nullptr) { + // return module; + // } + // return rncore_ModuleProvider(moduleName, params); + + // Module providers autolinked by RN CLI + auto rncli_module = rncli_ModuleProvider(moduleName, params); + if (rncli_module != nullptr) { + return rncli_module; + } + + return rncore_ModuleProvider(moduleName, params); +} + +} // namespace react +} // namespace facebook diff --git a/Example/android/app/src/main/jni/MainApplicationModuleProvider.h b/Example/android/app/src/main/jni/MainApplicationModuleProvider.h new file mode 100644 index 0000000..b38ccf5 --- /dev/null +++ b/Example/android/app/src/main/jni/MainApplicationModuleProvider.h @@ -0,0 +1,16 @@ +#pragma once + +#include +#include + +#include + +namespace facebook { +namespace react { + +std::shared_ptr MainApplicationModuleProvider( + const std::string &moduleName, + const JavaTurboModule::InitParams ¶ms); + +} // namespace react +} // namespace facebook diff --git a/Example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp b/Example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp new file mode 100644 index 0000000..5fd688c --- /dev/null +++ b/Example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp @@ -0,0 +1,45 @@ +#include "MainApplicationTurboModuleManagerDelegate.h" +#include "MainApplicationModuleProvider.h" + +namespace facebook { +namespace react { + +jni::local_ref +MainApplicationTurboModuleManagerDelegate::initHybrid( + jni::alias_ref) { + return makeCxxInstance(); +} + +void MainApplicationTurboModuleManagerDelegate::registerNatives() { + registerHybrid({ + makeNativeMethod( + "initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid), + makeNativeMethod( + "canCreateTurboModule", + MainApplicationTurboModuleManagerDelegate::canCreateTurboModule), + }); +} + +std::shared_ptr +MainApplicationTurboModuleManagerDelegate::getTurboModule( + const std::string &name, + const std::shared_ptr &jsInvoker) { + // Not implemented yet: provide pure-C++ NativeModules here. + return nullptr; +} + +std::shared_ptr +MainApplicationTurboModuleManagerDelegate::getTurboModule( + const std::string &name, + const JavaTurboModule::InitParams ¶ms) { + return MainApplicationModuleProvider(name, params); +} + +bool MainApplicationTurboModuleManagerDelegate::canCreateTurboModule( + const std::string &name) { + return getTurboModule(name, nullptr) != nullptr || + getTurboModule(name, {.moduleName = name}) != nullptr; +} + +} // namespace react +} // namespace facebook diff --git a/Example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h b/Example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h new file mode 100644 index 0000000..0ef746b --- /dev/null +++ b/Example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h @@ -0,0 +1,38 @@ +#include +#include + +#include +#include + +namespace facebook { +namespace react { + +class MainApplicationTurboModuleManagerDelegate + : public jni::HybridClass< + MainApplicationTurboModuleManagerDelegate, + TurboModuleManagerDelegate> { + public: + // Adapt it to the package you used for your Java class. + static constexpr auto kJavaDescriptor = + "Lcom/example/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate;"; + + static jni::local_ref initHybrid(jni::alias_ref); + + static void registerNatives(); + + std::shared_ptr getTurboModule( + const std::string &name, + const std::shared_ptr &jsInvoker) override; + std::shared_ptr getTurboModule( + const std::string &name, + const JavaTurboModule::InitParams ¶ms) override; + + /** + * Test-only method. Allows user to verify whether a TurboModule can be + * created by instances of this class. + */ + bool canCreateTurboModule(const std::string &name); +}; + +} // namespace react +} // namespace facebook diff --git a/Example/android/app/src/main/jni/MainComponentsRegistry.cpp b/Example/android/app/src/main/jni/MainComponentsRegistry.cpp new file mode 100644 index 0000000..54f598a --- /dev/null +++ b/Example/android/app/src/main/jni/MainComponentsRegistry.cpp @@ -0,0 +1,65 @@ +#include "MainComponentsRegistry.h" + +#include +#include +#include +#include +#include + +namespace facebook { +namespace react { + +MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) {} + +std::shared_ptr +MainComponentsRegistry::sharedProviderRegistry() { + auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry(); + + // Autolinked providers registered by RN CLI + rncli_registerProviders(providerRegistry); + + // Custom Fabric Components go here. You can register custom + // components coming from your App or from 3rd party libraries here. + // + // providerRegistry->add(concreteComponentDescriptorProvider< + // AocViewerComponentDescriptor>()); + return providerRegistry; +} + +jni::local_ref +MainComponentsRegistry::initHybrid( + jni::alias_ref, + ComponentFactory *delegate) { + auto instance = makeCxxInstance(delegate); + + auto buildRegistryFunction = + [](EventDispatcher::Weak const &eventDispatcher, + ContextContainer::Shared const &contextContainer) + -> ComponentDescriptorRegistry::Shared { + auto registry = MainComponentsRegistry::sharedProviderRegistry() + ->createComponentDescriptorRegistry( + {eventDispatcher, contextContainer}); + + auto mutableRegistry = + std::const_pointer_cast(registry); + + mutableRegistry->setFallbackComponentDescriptor( + std::make_shared( + ComponentDescriptorParameters{ + eventDispatcher, contextContainer, nullptr})); + + return registry; + }; + + delegate->buildRegistryFunction = buildRegistryFunction; + return instance; +} + +void MainComponentsRegistry::registerNatives() { + registerHybrid({ + makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid), + }); +} + +} // namespace react +} // namespace facebook diff --git a/Example/android/app/src/main/jni/MainComponentsRegistry.h b/Example/android/app/src/main/jni/MainComponentsRegistry.h new file mode 100644 index 0000000..23a9cac --- /dev/null +++ b/Example/android/app/src/main/jni/MainComponentsRegistry.h @@ -0,0 +1,32 @@ +#pragma once + +#include +#include +#include +#include + +namespace facebook { +namespace react { + +class MainComponentsRegistry + : public facebook::jni::HybridClass { + public: + // Adapt it to the package you used for your Java class. + constexpr static auto kJavaDescriptor = + "Lcom/example/newarchitecture/components/MainComponentsRegistry;"; + + static void registerNatives(); + + MainComponentsRegistry(ComponentFactory *delegate); + + private: + static std::shared_ptr + sharedProviderRegistry(); + + static jni::local_ref initHybrid( + jni::alias_ref, + ComponentFactory *delegate); +}; + +} // namespace react +} // namespace facebook diff --git a/Example/android/app/src/main/jni/OnLoad.cpp b/Example/android/app/src/main/jni/OnLoad.cpp new file mode 100644 index 0000000..c569b6e --- /dev/null +++ b/Example/android/app/src/main/jni/OnLoad.cpp @@ -0,0 +1,11 @@ +#include +#include "MainApplicationTurboModuleManagerDelegate.h" +#include "MainComponentsRegistry.h" + +JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) { + return facebook::jni::initialize(vm, [] { + facebook::react::MainApplicationTurboModuleManagerDelegate:: + registerNatives(); + facebook::react::MainComponentsRegistry::registerNatives(); + }); +} diff --git a/Example/android/app/src/main/res/drawable/rn_edit_text_material.xml b/Example/android/app/src/main/res/drawable/rn_edit_text_material.xml new file mode 100644 index 0000000..f35d996 --- /dev/null +++ b/Example/android/app/src/main/res/drawable/rn_edit_text_material.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + diff --git a/Example/android/app/src/main/res/values/styles.xml b/Example/android/app/src/main/res/values/styles.xml index 62fe59f..7ba83a2 100644 --- a/Example/android/app/src/main/res/values/styles.xml +++ b/Example/android/app/src/main/res/values/styles.xml @@ -1,9 +1,9 @@ - diff --git a/Example/android/build.gradle b/Example/android/build.gradle index 5d5d188..8569fee 100644 --- a/Example/android/build.gradle +++ b/Example/android/build.gradle @@ -2,18 +2,27 @@ buildscript { ext { - buildToolsVersion = "28.0.3" - minSdkVersion = 16 - compileSdkVersion = 28 - targetSdkVersion = 28 + buildToolsVersion = "31.0.0" + minSdkVersion = 21 + compileSdkVersion = 31 + targetSdkVersion = 31 + + if (System.properties['os.arch'] == "aarch64") { + // For M1 Users we need to use the NDK 24 which added support for aarch64 + ndkVersion = "24.0.8215888" + } else { + // Otherwise we default to the side-by-side NDK version from AGP. + ndkVersion = "21.4.7075529" + } } repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath("com.android.tools.build:gradle:3.5.2") - + classpath("com.android.tools.build:gradle:7.2.1") + classpath("com.facebook.react:react-native-gradle-plugin") + classpath("de.undercouch:gradle-download-task:5.0.1") // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } @@ -21,7 +30,6 @@ buildscript { allprojects { repositories { - mavenLocal() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url("$rootDir/../node_modules/react-native/android") @@ -30,9 +38,14 @@ allprojects { // Android JSC is installed from npm url("$rootDir/../node_modules/jsc-android/dist") } - + mavenCentral { + // We don't want to fetch react-native from Maven Central as there are + // older versions over there. + content { + excludeGroup "com.facebook.react" + } + } google() - jcenter() maven { url 'https://www.jitpack.io' } } } diff --git a/Example/android/gradle.properties b/Example/android/gradle.properties index 1bbc8cc..fa4feae 100644 --- a/Example/android/gradle.properties +++ b/Example/android/gradle.properties @@ -9,8 +9,8 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx10248m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m +org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit @@ -25,4 +25,16 @@ android.useAndroidX=true android.enableJetifier=true # Version of flipper SDK to use with React Native -FLIPPER_VERSION=0.33.1 +FLIPPER_VERSION=0.125.0 + +# Use this property to specify which architecture you want to build. +# You can also override it from the CLI using +# ./gradlew -PreactNativeArchitectures=x86_64 +reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 + +# Use this property to enable support to the new architecture. +# This will allow you to use TurboModules and the Fabric render in +# your application. You should enable this flag either if you want +# to write custom TurboModules/Fabric components OR use libraries that +# are providing them. +newArchEnabled=false diff --git a/Example/android/gradle/wrapper/gradle-wrapper.jar b/Example/android/gradle/wrapper/gradle-wrapper.jar index 5c2d1cf..41d9927 100644 Binary files a/Example/android/gradle/wrapper/gradle-wrapper.jar and b/Example/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/Example/android/gradle/wrapper/gradle-wrapper.properties b/Example/android/gradle/wrapper/gradle-wrapper.properties index 1ba7206..8fad3f5 100644 --- a/Example/android/gradle/wrapper/gradle-wrapper.properties +++ b/Example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/Example/android/gradlew b/Example/android/gradlew index 83f2acf..1b6c787 100755 --- a/Example/android/gradlew +++ b/Example/android/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,78 +17,113 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -97,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -105,84 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=$((i+1)) + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" -fi +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/Example/android/gradlew.bat b/Example/android/gradlew.bat index 24467a1..ac1b06f 100644 --- a/Example/android/gradlew.bat +++ b/Example/android/gradlew.bat @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @@ -37,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -51,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -61,28 +64,14 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell diff --git a/Example/android/settings.gradle b/Example/android/settings.gradle index 47725a0..db5781a 100644 --- a/Example/android/settings.gradle +++ b/Example/android/settings.gradle @@ -1,3 +1,11 @@ rootProject.name = 'Example' apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app' +includeBuild('../node_modules/react-native-gradle-plugin') + +if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") { + include(":ReactAndroid") + project(":ReactAndroid").projectDir = file('../node_modules/react-native/ReactAndroid') + include(":ReactAndroid:hermes-engine") + project(":ReactAndroid:hermes-engine").projectDir = file('../node_modules/react-native/ReactAndroid/hermes-engine') +} diff --git a/Example/app.js b/Example/app.js index 01e152e..89c7f99 100644 --- a/Example/app.js +++ b/Example/app.js @@ -1,5 +1,5 @@ import React from 'react'; -import { Image, StyleSheet, Text, View } from 'react-native'; +import { Image, StyleSheet, Text, View, Switch } from 'react-native'; import Shimmer from 'react-native-shimmer'; import logoSource from './react-logo.png'; @@ -16,12 +16,21 @@ const styles = StyleSheet.create({ fontWeight: '300', marginBottom: 20, }, + switch: { + marginBottom: 10, + flexDirection: 'row', + alignItems: 'center', + }, + switchLabel: { + fontSize: 16, + marginLeft: 10, + }, loading: { marginVertical: 10, }, loadingText: { textAlign: 'center', - fontSize: 16, + fontSize: 18, fontWeight: '500', }, reactLogo: { @@ -31,14 +40,20 @@ const styles = StyleSheet.create({ }); export default function Example(props) { + const [animating, setAnimating] = React.useState(true); + return ( Shimmer Example - - + + + Animating + + + Loading... - + diff --git a/Example/ios/.xcode.env b/Example/ios/.xcode.env new file mode 100644 index 0000000..3d5782c --- /dev/null +++ b/Example/ios/.xcode.env @@ -0,0 +1,11 @@ +# This `.xcode.env` file is versioned and is used to source the environment +# used when running script phases inside Xcode. +# To customize your local environment, you can create an `.xcode.env.local` +# file that is not versioned. + +# NODE_BINARY variable contains the PATH to the node executable. +# +# Customize the NODE_BINARY variable here. +# For example, to use nvm with brew, add the following line +# . "$(brew --prefix nvm)/nvm.sh" --no-use +export NODE_BINARY=$(command -v node) diff --git a/Example/ios/Example-tvOS/Info.plist b/Example/ios/Example-tvOS/Info.plist deleted file mode 100644 index ecbd496..0000000 --- a/Example/ios/Example-tvOS/Info.plist +++ /dev/null @@ -1,53 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSExceptionDomains - - localhost - - NSExceptionAllowsInsecureHTTPLoads - - - - - NSLocationWhenInUseUsageDescription - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/Example/ios/Example-tvOSTests/Info.plist b/Example/ios/Example-tvOSTests/Info.plist deleted file mode 100644 index 886825c..0000000 --- a/Example/ios/Example-tvOSTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/Example/ios/Example.xcodeproj/project.pbxproj b/Example/ios/Example.xcodeproj/project.pbxproj index 9f0d03c..b8100ef 100644 --- a/Example/ios/Example.xcodeproj/project.pbxproj +++ b/Example/ios/Example.xcodeproj/project.pbxproj @@ -3,23 +3,17 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ 00E356F31AD99517003FC87E /* ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExampleTests.m */; }; - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; + 0C80B921A6F3F58F76C31292 /* libPods-Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-Example.a */; }; + 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 19305E25DE2271225586643D /* libPods-Example-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E7BE12CCDB2237E2AB729348 /* libPods-Example-tvOSTests.a */; }; - 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; - 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 2DCD954D1E0B4F2C00145EB5 /* ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExampleTests.m */; }; - 37953C6AB0FC83F8E1A613BE /* libPods-Example-ExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D2E8338A3545DBED755DB064 /* libPods-Example-ExampleTests.a */; }; - 6E794DC0B92690A78B55715E /* libPods-Example-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA04185551DF20F29BBFAB28 /* libPods-Example-tvOS.a */; }; - CED62E9FFC86876417C13D89 /* libPods-Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 65523CF4A0EBE77C1AB62FAA /* libPods-Example.a */; }; + 7699B88040F8A987B510C191 /* libPods-Example-ExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-Example-ExampleTests.a */; }; + 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -30,43 +24,26 @@ remoteGlobalIDString = 13B07F861A680F5B00A75B9A; remoteInfo = Example; }; - 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; - remoteInfo = "Example-tvOS"; - }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 00E356EE1AD99517003FC87E /* ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 00E356F21AD99517003FC87E /* ExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleTests.m; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Example/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Example/AppDelegate.m; sourceTree = ""; }; - 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = Example/AppDelegate.mm; sourceTree = ""; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Example/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Example/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Example/main.m; sourceTree = ""; }; - 2D02E47B1E0B4A5D006451C7 /* Example-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Example-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 2D02E4901E0B4A5D006451C7 /* Example-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Example-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 2EAC8496A1F10DB5DBABD6FD /* Pods-Example-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-tvOS.debug.xcconfig"; path = "Target Support Files/Pods-Example-tvOS/Pods-Example-tvOS.debug.xcconfig"; sourceTree = ""; }; - 425A778373340C3CE5150F73 /* Pods-Example-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-tvOS.release.xcconfig"; path = "Target Support Files/Pods-Example-tvOS/Pods-Example-tvOS.release.xcconfig"; sourceTree = ""; }; - 49CBE772FF23962CA85E1B08 /* Pods-Example-ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-ExampleTests.release.xcconfig"; path = "Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests.release.xcconfig"; sourceTree = ""; }; - 4EF79DECA56CED596DFEC8AB /* Pods-Example-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-tvOSTests.release.xcconfig"; path = "Target Support Files/Pods-Example-tvOSTests/Pods-Example-tvOSTests.release.xcconfig"; sourceTree = ""; }; - 65523CF4A0EBE77C1AB62FAA /* libPods-Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - A88E643276ABBC9D67ED9B8C /* Pods-Example-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-ExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests.debug.xcconfig"; sourceTree = ""; }; - AA04185551DF20F29BBFAB28 /* libPods-Example-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - BA5E24D6732AC560698E8EAB /* Pods-Example-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-tvOSTests.debug.xcconfig"; path = "Target Support Files/Pods-Example-tvOSTests/Pods-Example-tvOSTests.debug.xcconfig"; sourceTree = ""; }; - D2E8338A3545DBED755DB064 /* libPods-Example-ExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example-ExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - E3C7759A50BF576CFB397E84 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; }; - E7BE12CCDB2237E2AB729348 /* libPods-Example-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 19F6CBCC0A4E27FBF8BF4A61 /* libPods-Example-ExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example-ExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B4392A12AC88292D35C810B /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; }; + 5709B34CF0A7D63546082F79 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; }; + 5B7EB9410499542E8C5724F5 /* Pods-Example-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-ExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests.debug.xcconfig"; sourceTree = ""; }; + 5DCACB8F33CDC322A6C60F78 /* libPods-Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = Example/LaunchScreen.storyboard; sourceTree = ""; }; + 89C6BE57DB24E9ADA2F236DE /* Pods-Example-ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-ExampleTests.release.xcconfig"; path = "Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests.release.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; }; - F8D31CB80E04F1621479C16A /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -74,7 +51,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 37953C6AB0FC83F8E1A613BE /* libPods-Example-ExampleTests.a in Frameworks */, + 7699B88040F8A987B510C191 /* libPods-Example-ExampleTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -82,23 +59,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - CED62E9FFC86876417C13D89 /* libPods-Example.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6E794DC0B92690A78B55715E /* libPods-Example-tvOS.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 19305E25DE2271225586643D /* libPods-Example-tvOSTests.a in Frameworks */, + 0C80B921A6F3F58F76C31292 /* libPods-Example.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -125,12 +86,11 @@ 13B07FAE1A68108700A75B9A /* Example */ = { isa = PBXGroup; children = ( - 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.m */, + 13B07FB01A68108700A75B9A /* AppDelegate.mm */, 13B07FB51A68108700A75B9A /* Images.xcassets */, 13B07FB61A68108700A75B9A /* Info.plist */, - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, + 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, 13B07FB71A68108700A75B9A /* main.m */, ); name = Example; @@ -140,11 +100,8 @@ isa = PBXGroup; children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - ED2971642150620600B7C4FE /* JavaScriptCore.framework */, - 65523CF4A0EBE77C1AB62FAA /* libPods-Example.a */, - D2E8338A3545DBED755DB064 /* libPods-Example-ExampleTests.a */, - AA04185551DF20F29BBFAB28 /* libPods-Example-tvOS.a */, - E7BE12CCDB2237E2AB729348 /* libPods-Example-tvOSTests.a */, + 5DCACB8F33CDC322A6C60F78 /* libPods-Example.a */, + 19F6CBCC0A4E27FBF8BF4A61 /* libPods-Example-ExampleTests.a */, ); name = Frameworks; sourceTree = ""; @@ -164,7 +121,7 @@ 00E356EF1AD99517003FC87E /* ExampleTests */, 83CBBA001A601CBA00E9B192 /* Products */, 2D16E6871FA4F8E400B85C8A /* Frameworks */, - D838CEEA3DE2EDFB80B04AC9 /* Pods */, + BBD78D7AC51CEA395F1C20DB /* Pods */, ); indentWidth = 2; sourceTree = ""; @@ -176,25 +133,18 @@ children = ( 13B07F961A680F5B00A75B9A /* Example.app */, 00E356EE1AD99517003FC87E /* ExampleTests.xctest */, - 2D02E47B1E0B4A5D006451C7 /* Example-tvOS.app */, - 2D02E4901E0B4A5D006451C7 /* Example-tvOSTests.xctest */, ); name = Products; sourceTree = ""; }; - D838CEEA3DE2EDFB80B04AC9 /* Pods */ = { + BBD78D7AC51CEA395F1C20DB /* Pods */ = { isa = PBXGroup; children = ( - E3C7759A50BF576CFB397E84 /* Pods-Example.debug.xcconfig */, - F8D31CB80E04F1621479C16A /* Pods-Example.release.xcconfig */, - A88E643276ABBC9D67ED9B8C /* Pods-Example-ExampleTests.debug.xcconfig */, - 49CBE772FF23962CA85E1B08 /* Pods-Example-ExampleTests.release.xcconfig */, - 2EAC8496A1F10DB5DBABD6FD /* Pods-Example-tvOS.debug.xcconfig */, - 425A778373340C3CE5150F73 /* Pods-Example-tvOS.release.xcconfig */, - BA5E24D6732AC560698E8EAB /* Pods-Example-tvOSTests.debug.xcconfig */, - 4EF79DECA56CED596DFEC8AB /* Pods-Example-tvOSTests.release.xcconfig */, - ); - name = Pods; + 3B4392A12AC88292D35C810B /* Pods-Example.debug.xcconfig */, + 5709B34CF0A7D63546082F79 /* Pods-Example.release.xcconfig */, + 5B7EB9410499542E8C5724F5 /* Pods-Example-ExampleTests.debug.xcconfig */, + 89C6BE57DB24E9ADA2F236DE /* Pods-Example-ExampleTests.release.xcconfig */, + ); path = Pods; sourceTree = ""; }; @@ -205,10 +155,12 @@ isa = PBXNativeTarget; buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ExampleTests" */; buildPhases = ( - D1BBA2CC07CF0A86ECDE4403 /* [CP] Check Pods Manifest.lock */, + A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, 00E356EA1AD99517003FC87E /* Sources */, 00E356EB1AD99517003FC87E /* Frameworks */, 00E356EC1AD99517003FC87E /* Resources */, + C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, + F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -224,12 +176,14 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Example" */; buildPhases = ( - E8547D9D82CE821D6449FA31 /* [CP] Check Pods Manifest.lock */, + C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, FD10A7F022414F080027D42C /* Start Packager */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, + 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, + E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -240,52 +194,13 @@ productReference = 13B07F961A680F5B00A75B9A /* Example.app */; productType = "com.apple.product-type.application"; }; - 2D02E47A1E0B4A5D006451C7 /* Example-tvOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "Example-tvOS" */; - buildPhases = ( - C677D6C88064E0DB3F7B5B54 /* [CP] Check Pods Manifest.lock */, - FD10A7F122414F3F0027D42C /* Start Packager */, - 2D02E4771E0B4A5D006451C7 /* Sources */, - 2D02E4781E0B4A5D006451C7 /* Frameworks */, - 2D02E4791E0B4A5D006451C7 /* Resources */, - 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Example-tvOS"; - productName = "Example-tvOS"; - productReference = 2D02E47B1E0B4A5D006451C7 /* Example-tvOS.app */; - productType = "com.apple.product-type.application"; - }; - 2D02E48F1E0B4A5D006451C7 /* Example-tvOSTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "Example-tvOSTests" */; - buildPhases = ( - A17E7C3F4D79820B85701C89 /* [CP] Check Pods Manifest.lock */, - 2D02E48C1E0B4A5D006451C7 /* Sources */, - 2D02E48D1E0B4A5D006451C7 /* Frameworks */, - 2D02E48E1E0B4A5D006451C7 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, - ); - name = "Example-tvOSTests"; - productName = "Example-tvOSTests"; - productReference = 2D02E4901E0B4A5D006451C7 /* Example-tvOSTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 83CBB9F71A601CBA00E9B192 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1130; + LastUpgradeCheck = 1210; TargetAttributes = { 00E356ED1AD99517003FC87E = { CreatedOnToolsVersion = 6.2; @@ -294,19 +209,10 @@ 13B07F861A680F5B00A75B9A = { LastSwiftMigration = 1120; }; - 2D02E47A1E0B4A5D006451C7 = { - CreatedOnToolsVersion = 8.2.1; - ProvisioningStyle = Automatic; - }; - 2D02E48F1E0B4A5D006451C7 = { - CreatedOnToolsVersion = 8.2.1; - ProvisioningStyle = Automatic; - TestTargetID = 2D02E47A1E0B4A5D006451C7; - }; }; }; buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Example" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 12.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -320,8 +226,6 @@ targets = ( 13B07F861A680F5B00A75B9A /* Example */, 00E356ED1AD99517003FC87E /* ExampleTests */, - 2D02E47A1E0B4A5D006451C7 /* Example-tvOS */, - 2D02E48F1E0B4A5D006451C7 /* Example-tvOSTests */, ); }; /* End PBXProject section */ @@ -338,23 +242,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D02E4791E0B4A5D006451C7 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D02E48E1E0B4A5D006451C7 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( ); runOnlyForDeploymentPostprocessing = 0; }; @@ -367,29 +256,34 @@ files = ( ); inputPaths = ( + "$(SRCROOT)/.xcode.env.local", + "$(SRCROOT)/.xcode.env", ); name = "Bundle React Native code and images"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; + shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; }; - 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { + 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "Bundle React Native Code And Images"; - outputPaths = ( + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n"; + showEnvVarsInLog = 0; }; - A17E7C3F4D79820B85701C89 /* [CP] Check Pods Manifest.lock */ = { + A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -404,14 +298,14 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Example-tvOSTests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Example-ExampleTests-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; }; - C677D6C88064E0DB3F7B5B54 /* [CP] Check Pods Manifest.lock */ = { + C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -426,77 +320,65 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Example-tvOS-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Example-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; }; - D1BBA2CC07CF0A86ECDE4403 /* [CP] Check Pods Manifest.lock */ = { + C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Example-ExampleTests-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); 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"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - E8547D9D82CE821D6449FA31 /* [CP] Check Pods Manifest.lock */ = { + E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-resources-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Copy Pods Resources"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-resources-${CONFIGURATION}-output-files.xcfilelist", ); 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"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-resources.sh\"\n"; showEnvVarsInLog = 0; }; - FD10A7F022414F080027D42C /* Start Packager */ = { + F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-resources-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - ); - name = "Start Packager"; + name = "[CP] Copy Pods Resources"; outputFileListPaths = ( - ); - outputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-resources.sh\"\n"; showEnvVarsInLog = 0; }; - FD10A7F122414F3F0027D42C /* Start Packager */ = { + FD10A7F022414F080027D42C /* Start Packager */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -530,28 +412,11 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, + 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, 13B07FC11A68108700A75B9A /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 2D02E4771E0B4A5D006451C7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, - 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2D02E48C1E0B4A5D006451C7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2DCD954D1E0B4F2C00145EB5 /* ExampleTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -560,29 +425,12 @@ target = 13B07F861A680F5B00A75B9A /* Example */; targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; }; - 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 2D02E47A1E0B4A5D006451C7 /* Example-tvOS */; - targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ -/* Begin PBXVariantGroup section */ - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - 13B07FB21A68108700A75B9A /* Base */, - ); - name = LaunchScreen.xib; - path = Example; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - /* Begin XCBuildConfiguration section */ 00E356F61AD99517003FC87E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A88E643276ABBC9D67ED9B8C /* Pods-Example-ExampleTests.debug.xcconfig */; + baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-Example-ExampleTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -590,8 +438,12 @@ "$(inherited)", ); INFOPLIST_FILE = ExampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); OTHER_LDFLAGS = ( "-ObjC", "-lc++", @@ -605,13 +457,17 @@ }; 00E356F71AD99517003FC87E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 49CBE772FF23962CA85E1B08 /* Pods-Example-ExampleTests.release.xcconfig */; + baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-Example-ExampleTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; INFOPLIST_FILE = ExampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); OTHER_LDFLAGS = ( "-ObjC", "-lc++", @@ -625,18 +481,17 @@ }; 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E3C7759A50BF576CFB397E84 /* Pods-Example.debug.xcconfig */; + baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; ENABLE_BITCODE = NO; - GCC_PREPROCESSOR_DEFINITIONS = ( + INFOPLIST_FILE = Example/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", - "FB_SONARKIT_ENABLED=1", + "@executable_path/Frameworks", ); - INFOPLIST_FILE = Example/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -652,13 +507,16 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F8D31CB80E04F1621479C16A /* Pods-Example.release.xcconfig */; + baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; INFOPLIST_FILE = Example/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -671,122 +529,12 @@ }; name = Release; }; - 2D02E4971E0B4A5E006451C7 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 2EAC8496A1F10DB5DBABD6FD /* Pods-Example-tvOS.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Example-tvOS/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.Example-tvOS"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.2; - }; - name = Debug; - }; - 2D02E4981E0B4A5E006451C7 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 425A778373340C3CE5150F73 /* Pods-Example-tvOS.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Example-tvOS/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.Example-tvOS"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 9.2; - }; - name = Release; - }; - 2D02E4991E0B4A5E006451C7 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = BA5E24D6732AC560698E8EAB /* Pods-Example-tvOSTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_TESTABILITY = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Example-tvOSTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.Example-tvOSTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example-tvOS.app/Example-tvOS"; - TVOS_DEPLOYMENT_TARGET = 10.1; - }; - name = Debug; - }; - 2D02E49A1E0B4A5E006451C7 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 4EF79DECA56CED596DFEC8AB /* Pods-Example-tvOSTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ANALYZER_NONNULL = YES; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Example-tvOSTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.Example-tvOSTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = appletvos; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example-tvOS.app/Example-tvOS"; - TVOS_DEPLOYMENT_TARGET = 10.1; - }; - name = Release; - }; 83CBBA201A601CBA00E9B192 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -804,6 +552,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -813,6 +562,7 @@ COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -828,15 +578,25 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); LIBRARY_SEARCH_PATHS = ( + "\"$(SDKROOT)/usr/lib/swift\"", "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", - "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", "\"$(inherited)\"", ); MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-DFOLLY_NO_CONFIG", + "-DFOLLY_MOBILE=1", + "-DFOLLY_USE_LIBCPP=1", + ); + REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; }; name = Debug; @@ -846,7 +606,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LANGUAGE_STANDARD = "c++17"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -864,6 +624,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -873,6 +634,7 @@ COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -881,14 +643,24 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); LIBRARY_SEARCH_PATHS = ( + "\"$(SDKROOT)/usr/lib/swift\"", "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", - "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", "\"$(inherited)\"", ); MTL_ENABLE_DEBUG_INFO = NO; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-DFOLLY_NO_CONFIG", + "-DFOLLY_MOBILE=1", + "-DFOLLY_USE_LIBCPP=1", + ); + REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; @@ -915,24 +687,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "Example-tvOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2D02E4971E0B4A5E006451C7 /* Debug */, - 2D02E4981E0B4A5E006451C7 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "Example-tvOSTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2D02E4991E0B4A5E006451C7 /* Debug */, - 2D02E49A1E0B4A5E006451C7 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Example" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example-tvOS.xcscheme b/Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example-tvOS.xcscheme deleted file mode 100644 index 9e5f979..0000000 --- a/Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example-tvOS.xcscheme +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme b/Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme index b28b842..2dbf021 100644 --- a/Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme +++ b/Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme @@ -1,6 +1,6 @@ -#import -#import - -#if DEBUG -#import -#import -#import -#import -#import -#import - -static void InitializeFlipper(UIApplication *application) { - FlipperClient *client = [FlipperClient sharedClient]; - SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; - [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; - [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; - [client addPlugin:[FlipperKitReactPlugin new]]; - [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; - [client start]; -} -#endif - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ -#if DEBUG - InitializeFlipper(application); -#endif - - RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; - RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge - moduleName:@"Example" - initialProperties:nil]; - - rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; - - self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; - UIViewController *rootViewController = [UIViewController new]; - rootViewController.view = rootView; - self.window.rootViewController = rootViewController; - [self.window makeKeyAndVisible]; - return YES; -} - -- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge -{ -#if DEBUG - return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; -#else - return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; -#endif -} - -@end diff --git a/Example/ios/Example/AppDelegate.mm b/Example/ios/Example/AppDelegate.mm new file mode 100644 index 0000000..6459858 --- /dev/null +++ b/Example/ios/Example/AppDelegate.mm @@ -0,0 +1,133 @@ +#import "AppDelegate.h" + +#import +#import +#import + +#import + +#if RCT_NEW_ARCH_ENABLED +#import +#import +#import +#import +#import +#import + +#import + +static NSString *const kRNConcurrentRoot = @"concurrentRoot"; + +@interface AppDelegate () { + RCTTurboModuleManager *_turboModuleManager; + RCTSurfacePresenterBridgeAdapter *_bridgeAdapter; + std::shared_ptr _reactNativeConfig; + facebook::react::ContextContainer::Shared _contextContainer; +} +@end +#endif + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + RCTAppSetupPrepareApp(application); + + RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; + +#if RCT_NEW_ARCH_ENABLED + _contextContainer = std::make_shared(); + _reactNativeConfig = std::make_shared(); + _contextContainer->insert("ReactNativeConfig", _reactNativeConfig); + _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer]; + bridge.surfacePresenter = _bridgeAdapter.surfacePresenter; +#endif + + NSDictionary *initProps = [self prepareInitialProps]; + UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"Example", initProps); + + if (@available(iOS 13.0, *)) { + rootView.backgroundColor = [UIColor systemBackgroundColor]; + } else { + rootView.backgroundColor = [UIColor whiteColor]; + } + + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + UIViewController *rootViewController = [UIViewController new]; + rootViewController.view = rootView; + self.window.rootViewController = rootViewController; + [self.window makeKeyAndVisible]; + return YES; +} + +/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. +/// +/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html +/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). +/// @return: `true` if the `concurrentRoot` feture is enabled. Otherwise, it returns `false`. +- (BOOL)concurrentRootEnabled +{ + // Switch this bool to turn on and off the concurrent root + return true; +} + +- (NSDictionary *)prepareInitialProps +{ + NSMutableDictionary *initProps = [NSMutableDictionary new]; + +#ifdef RCT_NEW_ARCH_ENABLED + initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]); +#endif + + return initProps; +} + +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ +#if DEBUG + return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; +#else + return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif +} + +#if RCT_NEW_ARCH_ENABLED + +#pragma mark - RCTCxxBridgeDelegate + +- (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge +{ + _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge + delegate:self + jsInvoker:bridge.jsCallInvoker]; + return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager); +} + +#pragma mark RCTTurboModuleManagerDelegate + +- (Class)getModuleClassFromName:(const char *)name +{ + return RCTCoreModulesClassProvider(name); +} + +- (std::shared_ptr)getTurboModule:(const std::string &)name + jsInvoker:(std::shared_ptr)jsInvoker +{ + return nullptr; +} + +- (std::shared_ptr)getTurboModule:(const std::string &)name + initParams: + (const facebook::react::ObjCTurboModule::InitParams &)params +{ + return nullptr; +} + +- (id)getModuleInstanceFromClass:(Class)moduleClass +{ + return RCTAppSetupDefaultModuleFromClass(moduleClass); +} + +#endif + +@end diff --git a/Example/ios/Example/Base.lproj/LaunchScreen.xib b/Example/ios/Example/Base.lproj/LaunchScreen.xib deleted file mode 100644 index 8c70b04..0000000 --- a/Example/ios/Example/Base.lproj/LaunchScreen.xib +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json index 118c98f..8121323 100644 --- a/Example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json @@ -2,37 +2,52 @@ "images" : [ { "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" + "scale" : "3x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" + "scale" : "3x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Example/ios/Example/Info.plist b/Example/ios/Example/Info.plist index 73888d9..4545344 100644 --- a/Example/ios/Example/Info.plist +++ b/Example/ios/Example/Info.plist @@ -26,8 +26,6 @@ NSAppTransportSecurity - NSAllowsArbitraryLoads - NSExceptionDomains localhost diff --git a/Example/ios/Example/LaunchScreen.storyboard b/Example/ios/Example/LaunchScreen.storyboard new file mode 100644 index 0000000..1103311 --- /dev/null +++ b/Example/ios/Example/LaunchScreen.storyboard @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/ios/Example/main.m b/Example/ios/Example/main.m index b1df44b..d645c72 100644 --- a/Example/ios/Example/main.m +++ b/Example/ios/Example/main.m @@ -2,7 +2,8 @@ #import "AppDelegate.h" -int main(int argc, char * argv[]) { +int main(int argc, char *argv[]) +{ @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } diff --git a/Example/ios/ExampleTests/ExampleTests.m b/Example/ios/ExampleTests/ExampleTests.m index 75eb311..8750e0c 100644 --- a/Example/ios/ExampleTests/ExampleTests.m +++ b/Example/ios/ExampleTests/ExampleTests.m @@ -13,7 +13,7 @@ @interface ExampleTests : XCTestCase @implementation ExampleTests -- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test +- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test { if (test(view)) { return YES; @@ -34,23 +34,25 @@ - (void)testRendersWelcomeScreen __block NSString *redboxError = nil; #ifdef DEBUG - RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { - if (level >= RCTLogLevelError) { - redboxError = message; - } - }); + 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]]; [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { - if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { - return YES; - } - return NO; - }]; + foundElement = [self findSubviewInView:vc.view + matching:^BOOL(UIView *view) { + if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { + return YES; + } + return NO; + }]; } #ifdef DEBUG @@ -61,5 +63,4 @@ - (void)testRendersWelcomeScreen XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); } - @end diff --git a/Example/ios/Podfile b/Example/ios/Podfile index e9c20e8..a141af5 100644 --- a/Example/ios/Podfile +++ b/Example/ios/Podfile @@ -1,81 +1,43 @@ -platform :ios, '9.0' +require_relative '../node_modules/react-native/scripts/react_native_pods' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' -def add_flipper_pods! - version = '~> 0.33.1' - pod 'FlipperKit', version, :configuration => 'Debug' - pod 'FlipperKit/FlipperKitLayoutPlugin', version, :configuration => 'Debug' - pod 'FlipperKit/SKIOSNetworkPlugin', version, :configuration => 'Debug' - pod 'FlipperKit/FlipperKitUserDefaultsPlugin', version, :configuration => 'Debug' - pod 'FlipperKit/FlipperKitReactPlugin', version, :configuration => 'Debug' -end - -# Post Install processing for Flipper -def flipper_post_install(installer) - installer.pods_project.targets.each do |target| - if target.name == 'YogaKit' - target.build_configurations.each do |config| - config.build_settings['SWIFT_VERSION'] = '4.1' - end - end - end -end +platform :ios, '12.4' +install! 'cocoapods', :deterministic_uuids => false target 'Example' do - # Pods for Example - 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/' - 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' - pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image' - pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS' - pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network' - 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-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 'ReactCommon/callinvoker', :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', :modular_headers => true - - pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' - pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' - pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' + config = use_native_modules! + + # Flags change depending on the env values. + flags = get_default_flags() + + use_react_native!( + :path => config[:reactNativePath], + # Hermes is now enabled by default. Disable by setting this flag to false. + # Upcoming versions of React Native may rely on get_default_flags(), but + # we make it explicit here to aid in the React Native upgrade process. + :hermes_enabled => true, + :fabric_enabled => flags[:fabric_enabled], + # Enables Flipper. + # + # Note that if you have use_frameworks! enabled, Flipper will not work and + # you should disable the next line. + :flipper_configuration => FlipperConfiguration.enabled, + # An absolute path to your application root. + :app_path => "#{Pod::Config.instance.installation_root}/.." + ) target 'ExampleTests' do inherit! :complete # Pods for testing end - use_native_modules! - - # Enables Flipper. - # - # Note that if you have use_frameworks! enabled, Flipper will not work and - # you should disable these next few lines. - add_flipper_pods! post_install do |installer| - flipper_post_install(installer) - end -end - -target 'Example-tvOS' do - # Pods for Example-tvOS - - target 'Example-tvOSTests' do - inherit! :search_paths - # Pods for testing + react_native_post_install( + installer, + # Set `mac_catalyst_enabled` to `true` in order to apply patches + # necessary for Mac Catalyst builds + :mac_catalyst_enabled => false + ) + __apply_Xcode_12_5_M1_post_install_workaround(installer) end end diff --git a/Example/ios/Podfile.lock b/Example/ios/Podfile.lock index afa88e8..62cbe0e 100644 --- a/Example/ios/Podfile.lock +++ b/Example/ios/Podfile.lock @@ -1,328 +1,431 @@ PODS: - - boost-for-react-native (1.63.0) - - CocoaAsyncSocket (7.6.4) - - CocoaLibEvent (1.0.0) + - boost (1.76.0) + - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.62.0) - - FBReactNativeSpec (0.62.0): - - Folly (= 2018.10.22.00) - - RCTRequired (= 0.62.0) - - RCTTypeSafety (= 0.62.0) - - React-Core (= 0.62.0) - - React-jsi (= 0.62.0) - - ReactCommon/turbomodule/core (= 0.62.0) - - Flipper (0.33.1): - - Flipper-Folly (~> 2.1) - - Flipper-RSocket (~> 1.0) - - Flipper-DoubleConversion (1.1.7) - - Flipper-Folly (2.1.1): - - boost-for-react-native - - CocoaLibEvent (~> 1.0) + - FBLazyVector (0.70.2) + - FBReactNativeSpec (0.70.2): + - RCT-Folly (= 2021.07.22.00) + - RCTRequired (= 0.70.2) + - RCTTypeSafety (= 0.70.2) + - React-Core (= 0.70.2) + - React-jsi (= 0.70.2) + - ReactCommon/turbomodule/core (= 0.70.2) + - Flipper (0.125.0): + - Flipper-Folly (~> 2.6) + - Flipper-RSocket (~> 1.4) + - Flipper-Boost-iOSX (1.76.0.1.11) + - Flipper-DoubleConversion (3.2.0.1) + - Flipper-Fmt (7.1.7) + - Flipper-Folly (2.6.10): + - Flipper-Boost-iOSX - Flipper-DoubleConversion + - Flipper-Fmt (= 7.1.7) - Flipper-Glog - - OpenSSL-Universal (= 1.0.2.19) - - Flipper-Glog (0.3.6) + - libevent (~> 2.1.12) + - OpenSSL-Universal (= 1.1.1100) + - Flipper-Glog (0.5.0.5) - Flipper-PeerTalk (0.0.4) - - Flipper-RSocket (1.0.0): - - Flipper-Folly (~> 2.0) - - FlipperKit (0.33.1): - - FlipperKit/Core (= 0.33.1) - - FlipperKit/Core (0.33.1): - - Flipper (~> 0.33.1) + - Flipper-RSocket (1.4.3): + - Flipper-Folly (~> 2.6) + - FlipperKit (0.125.0): + - FlipperKit/Core (= 0.125.0) + - FlipperKit/Core (0.125.0): + - Flipper (~> 0.125.0) - FlipperKit/CppBridge - FlipperKit/FBCxxFollyDynamicConvert - FlipperKit/FBDefines - FlipperKit/FKPortForwarding - - FlipperKit/CppBridge (0.33.1): - - Flipper (~> 0.33.1) - - FlipperKit/FBCxxFollyDynamicConvert (0.33.1): - - Flipper-Folly (~> 2.1) - - FlipperKit/FBDefines (0.33.1) - - FlipperKit/FKPortForwarding (0.33.1): + - SocketRocket (~> 0.6.0) + - FlipperKit/CppBridge (0.125.0): + - Flipper (~> 0.125.0) + - FlipperKit/FBCxxFollyDynamicConvert (0.125.0): + - Flipper-Folly (~> 2.6) + - FlipperKit/FBDefines (0.125.0) + - FlipperKit/FKPortForwarding (0.125.0): - CocoaAsyncSocket (~> 7.6) - Flipper-PeerTalk (~> 0.0.4) - - FlipperKit/FlipperKitHighlightOverlay (0.33.1) - - FlipperKit/FlipperKitLayoutPlugin (0.33.1): + - FlipperKit/FlipperKitHighlightOverlay (0.125.0) + - FlipperKit/FlipperKitLayoutHelpers (0.125.0): - FlipperKit/Core - FlipperKit/FlipperKitHighlightOverlay - FlipperKit/FlipperKitLayoutTextSearchable + - FlipperKit/FlipperKitLayoutIOSDescriptors (0.125.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutHelpers - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutTextSearchable (0.33.1) - - FlipperKit/FlipperKitNetworkPlugin (0.33.1): + - FlipperKit/FlipperKitLayoutPlugin (0.125.0): - FlipperKit/Core - - FlipperKit/FlipperKitReactPlugin (0.33.1): + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutHelpers + - FlipperKit/FlipperKitLayoutIOSDescriptors + - FlipperKit/FlipperKitLayoutTextSearchable + - YogaKit (~> 1.18) + - FlipperKit/FlipperKitLayoutTextSearchable (0.125.0) + - FlipperKit/FlipperKitNetworkPlugin (0.125.0): + - FlipperKit/Core + - FlipperKit/FlipperKitReactPlugin (0.125.0): - FlipperKit/Core - - FlipperKit/FlipperKitUserDefaultsPlugin (0.33.1): + - FlipperKit/FlipperKitUserDefaultsPlugin (0.125.0): - FlipperKit/Core - - FlipperKit/SKIOSNetworkPlugin (0.33.1): + - FlipperKit/SKIOSNetworkPlugin (0.125.0): - FlipperKit/Core - FlipperKit/FlipperKitNetworkPlugin - - Folly (2018.10.22.00): - - boost-for-react-native + - fmt (6.2.1) + - glog (0.3.5) + - hermes-engine (0.70.2) + - libevent (2.1.12) + - OpenSSL-Universal (1.1.1100) + - RCT-Folly (2021.07.22.00): + - boost - DoubleConversion - - Folly/Default (= 2018.10.22.00) + - fmt (~> 6.2.1) - glog - - Folly/Default (2018.10.22.00): - - boost-for-react-native + - RCT-Folly/Default (= 2021.07.22.00) + - RCT-Folly/Default (2021.07.22.00): + - boost - DoubleConversion + - fmt (~> 6.2.1) - glog - - glog (0.3.5) - - OpenSSL-Universal (1.0.2.19): - - OpenSSL-Universal/Static (= 1.0.2.19) - - OpenSSL-Universal/Static (1.0.2.19) - - RCTRequired (0.62.0) - - RCTTypeSafety (0.62.0): - - FBLazyVector (= 0.62.0) - - Folly (= 2018.10.22.00) - - RCTRequired (= 0.62.0) - - React-Core (= 0.62.0) - - React (0.62.0): - - React-Core (= 0.62.0) - - React-Core/DevSupport (= 0.62.0) - - React-Core/RCTWebSocket (= 0.62.0) - - React-RCTActionSheet (= 0.62.0) - - React-RCTAnimation (= 0.62.0) - - React-RCTBlob (= 0.62.0) - - React-RCTImage (= 0.62.0) - - React-RCTLinking (= 0.62.0) - - React-RCTNetwork (= 0.62.0) - - React-RCTSettings (= 0.62.0) - - React-RCTText (= 0.62.0) - - React-RCTVibration (= 0.62.0) - - React-Core (0.62.0): - - Folly (= 2018.10.22.00) + - RCT-Folly/Futures (2021.07.22.00): + - boost + - DoubleConversion + - fmt (~> 6.2.1) - glog - - React-Core/Default (= 0.62.0) - - React-cxxreact (= 0.62.0) - - React-jsi (= 0.62.0) - - React-jsiexecutor (= 0.62.0) + - libevent + - RCTRequired (0.70.2) + - RCTTypeSafety (0.70.2): + - FBLazyVector (= 0.70.2) + - RCTRequired (= 0.70.2) + - React-Core (= 0.70.2) + - React (0.70.2): + - React-Core (= 0.70.2) + - React-Core/DevSupport (= 0.70.2) + - React-Core/RCTWebSocket (= 0.70.2) + - React-RCTActionSheet (= 0.70.2) + - React-RCTAnimation (= 0.70.2) + - React-RCTBlob (= 0.70.2) + - React-RCTImage (= 0.70.2) + - React-RCTLinking (= 0.70.2) + - React-RCTNetwork (= 0.70.2) + - React-RCTSettings (= 0.70.2) + - React-RCTText (= 0.70.2) + - React-RCTVibration (= 0.70.2) + - React-bridging (0.70.2): + - RCT-Folly (= 2021.07.22.00) + - React-jsi (= 0.70.2) + - React-callinvoker (0.70.2) + - React-Codegen (0.70.2): + - FBReactNativeSpec (= 0.70.2) + - RCT-Folly (= 2021.07.22.00) + - RCTRequired (= 0.70.2) + - RCTTypeSafety (= 0.70.2) + - React-Core (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsiexecutor (= 0.70.2) + - ReactCommon/turbomodule/core (= 0.70.2) + - React-Core (0.70.2): + - glog + - RCT-Folly (= 2021.07.22.00) + - React-Core/Default (= 0.70.2) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsiexecutor (= 0.70.2) + - React-perflogger (= 0.70.2) - Yoga - - React-Core/CoreModulesHeaders (0.62.0): - - Folly (= 2018.10.22.00) + - React-Core/CoreModulesHeaders (0.70.2): - glog + - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.62.0) - - React-jsi (= 0.62.0) - - React-jsiexecutor (= 0.62.0) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsiexecutor (= 0.70.2) + - React-perflogger (= 0.70.2) - Yoga - - React-Core/Default (0.62.0): - - Folly (= 2018.10.22.00) + - React-Core/Default (0.70.2): - glog - - React-cxxreact (= 0.62.0) - - React-jsi (= 0.62.0) - - React-jsiexecutor (= 0.62.0) + - RCT-Folly (= 2021.07.22.00) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsiexecutor (= 0.70.2) + - React-perflogger (= 0.70.2) - Yoga - - React-Core/DevSupport (0.62.0): - - Folly (= 2018.10.22.00) + - React-Core/DevSupport (0.70.2): - glog - - React-Core/Default (= 0.62.0) - - React-Core/RCTWebSocket (= 0.62.0) - - React-cxxreact (= 0.62.0) - - React-jsi (= 0.62.0) - - React-jsiexecutor (= 0.62.0) - - React-jsinspector (= 0.62.0) + - RCT-Folly (= 2021.07.22.00) + - React-Core/Default (= 0.70.2) + - React-Core/RCTWebSocket (= 0.70.2) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsiexecutor (= 0.70.2) + - React-jsinspector (= 0.70.2) + - React-perflogger (= 0.70.2) - Yoga - - React-Core/RCTActionSheetHeaders (0.62.0): - - Folly (= 2018.10.22.00) + - React-Core/RCTActionSheetHeaders (0.70.2): - glog + - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.62.0) - - React-jsi (= 0.62.0) - - React-jsiexecutor (= 0.62.0) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsiexecutor (= 0.70.2) + - React-perflogger (= 0.70.2) - Yoga - - React-Core/RCTAnimationHeaders (0.62.0): - - Folly (= 2018.10.22.00) + - React-Core/RCTAnimationHeaders (0.70.2): - glog + - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.62.0) - - React-jsi (= 0.62.0) - - React-jsiexecutor (= 0.62.0) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsiexecutor (= 0.70.2) + - React-perflogger (= 0.70.2) - Yoga - - React-Core/RCTBlobHeaders (0.62.0): - - Folly (= 2018.10.22.00) + - React-Core/RCTBlobHeaders (0.70.2): - glog + - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.62.0) - - React-jsi (= 0.62.0) - - React-jsiexecutor (= 0.62.0) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsiexecutor (= 0.70.2) + - React-perflogger (= 0.70.2) - Yoga - - React-Core/RCTImageHeaders (0.62.0): - - Folly (= 2018.10.22.00) + - React-Core/RCTImageHeaders (0.70.2): - glog + - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.62.0) - - React-jsi (= 0.62.0) - - React-jsiexecutor (= 0.62.0) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsiexecutor (= 0.70.2) + - React-perflogger (= 0.70.2) - Yoga - - React-Core/RCTLinkingHeaders (0.62.0): - - Folly (= 2018.10.22.00) + - React-Core/RCTLinkingHeaders (0.70.2): - glog + - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.62.0) - - React-jsi (= 0.62.0) - - React-jsiexecutor (= 0.62.0) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsiexecutor (= 0.70.2) + - React-perflogger (= 0.70.2) - Yoga - - React-Core/RCTNetworkHeaders (0.62.0): - - Folly (= 2018.10.22.00) + - React-Core/RCTNetworkHeaders (0.70.2): - glog + - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.62.0) - - React-jsi (= 0.62.0) - - React-jsiexecutor (= 0.62.0) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsiexecutor (= 0.70.2) + - React-perflogger (= 0.70.2) - Yoga - - React-Core/RCTSettingsHeaders (0.62.0): - - Folly (= 2018.10.22.00) + - React-Core/RCTSettingsHeaders (0.70.2): - glog + - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.62.0) - - React-jsi (= 0.62.0) - - React-jsiexecutor (= 0.62.0) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsiexecutor (= 0.70.2) + - React-perflogger (= 0.70.2) - Yoga - - React-Core/RCTTextHeaders (0.62.0): - - Folly (= 2018.10.22.00) + - React-Core/RCTTextHeaders (0.70.2): - glog + - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.62.0) - - React-jsi (= 0.62.0) - - React-jsiexecutor (= 0.62.0) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsiexecutor (= 0.70.2) + - React-perflogger (= 0.70.2) - Yoga - - React-Core/RCTVibrationHeaders (0.62.0): - - Folly (= 2018.10.22.00) + - React-Core/RCTVibrationHeaders (0.70.2): - glog + - RCT-Folly (= 2021.07.22.00) - React-Core/Default - - React-cxxreact (= 0.62.0) - - React-jsi (= 0.62.0) - - React-jsiexecutor (= 0.62.0) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsiexecutor (= 0.70.2) + - React-perflogger (= 0.70.2) - Yoga - - React-Core/RCTWebSocket (0.62.0): - - Folly (= 2018.10.22.00) + - React-Core/RCTWebSocket (0.70.2): - glog - - React-Core/Default (= 0.62.0) - - React-cxxreact (= 0.62.0) - - React-jsi (= 0.62.0) - - React-jsiexecutor (= 0.62.0) + - RCT-Folly (= 2021.07.22.00) + - React-Core/Default (= 0.70.2) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsiexecutor (= 0.70.2) + - React-perflogger (= 0.70.2) - Yoga - - React-CoreModules (0.62.0): - - FBReactNativeSpec (= 0.62.0) - - Folly (= 2018.10.22.00) - - RCTTypeSafety (= 0.62.0) - - React-Core/CoreModulesHeaders (= 0.62.0) - - React-RCTImage (= 0.62.0) - - ReactCommon/turbomodule/core (= 0.62.0) - - React-cxxreact (0.62.0): - - boost-for-react-native (= 1.63.0) + - React-CoreModules (0.70.2): + - RCT-Folly (= 2021.07.22.00) + - RCTTypeSafety (= 0.70.2) + - React-Codegen (= 0.70.2) + - React-Core/CoreModulesHeaders (= 0.70.2) + - React-jsi (= 0.70.2) + - React-RCTImage (= 0.70.2) + - ReactCommon/turbomodule/core (= 0.70.2) + - React-cxxreact (0.70.2): + - boost (= 1.76.0) - DoubleConversion - - Folly (= 2018.10.22.00) - glog - - React-jsinspector (= 0.62.0) - - React-jsi (0.62.0): - - boost-for-react-native (= 1.63.0) + - RCT-Folly (= 2021.07.22.00) + - React-callinvoker (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsinspector (= 0.70.2) + - React-logger (= 0.70.2) + - React-perflogger (= 0.70.2) + - React-runtimeexecutor (= 0.70.2) + - React-hermes (0.70.2): - DoubleConversion - - Folly (= 2018.10.22.00) - glog - - React-jsi/Default (= 0.62.0) - - React-jsi/Default (0.62.0): - - boost-for-react-native (= 1.63.0) + - hermes-engine + - RCT-Folly (= 2021.07.22.00) + - RCT-Folly/Futures (= 2021.07.22.00) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-jsiexecutor (= 0.70.2) + - React-jsinspector (= 0.70.2) + - React-perflogger (= 0.70.2) + - React-jsi (0.70.2): + - boost (= 1.76.0) - DoubleConversion - - Folly (= 2018.10.22.00) - glog - - React-jsiexecutor (0.62.0): + - RCT-Folly (= 2021.07.22.00) + - React-jsi/Default (= 0.70.2) + - React-jsi/Default (0.70.2): + - boost (= 1.76.0) - DoubleConversion - - Folly (= 2018.10.22.00) - glog - - React-cxxreact (= 0.62.0) - - React-jsi (= 0.62.0) - - React-jsinspector (0.62.0) - - react-native-shimmer (0.5.0): - - React (>= 0.45.1) - - Shimmer (~> 1) - - React-RCTActionSheet (0.62.0): - - React-Core/RCTActionSheetHeaders (= 0.62.0) - - React-RCTAnimation (0.62.0): - - FBReactNativeSpec (= 0.62.0) - - Folly (= 2018.10.22.00) - - RCTTypeSafety (= 0.62.0) - - React-Core/RCTAnimationHeaders (= 0.62.0) - - ReactCommon/turbomodule/core (= 0.62.0) - - React-RCTBlob (0.62.0): - - FBReactNativeSpec (= 0.62.0) - - Folly (= 2018.10.22.00) - - React-Core/RCTBlobHeaders (= 0.62.0) - - React-Core/RCTWebSocket (= 0.62.0) - - React-jsi (= 0.62.0) - - React-RCTNetwork (= 0.62.0) - - ReactCommon/turbomodule/core (= 0.62.0) - - React-RCTImage (0.62.0): - - FBReactNativeSpec (= 0.62.0) - - Folly (= 2018.10.22.00) - - RCTTypeSafety (= 0.62.0) - - React-Core/RCTImageHeaders (= 0.62.0) - - React-RCTNetwork (= 0.62.0) - - ReactCommon/turbomodule/core (= 0.62.0) - - React-RCTLinking (0.62.0): - - FBReactNativeSpec (= 0.62.0) - - React-Core/RCTLinkingHeaders (= 0.62.0) - - ReactCommon/turbomodule/core (= 0.62.0) - - React-RCTNetwork (0.62.0): - - FBReactNativeSpec (= 0.62.0) - - Folly (= 2018.10.22.00) - - RCTTypeSafety (= 0.62.0) - - React-Core/RCTNetworkHeaders (= 0.62.0) - - ReactCommon/turbomodule/core (= 0.62.0) - - React-RCTSettings (0.62.0): - - FBReactNativeSpec (= 0.62.0) - - Folly (= 2018.10.22.00) - - RCTTypeSafety (= 0.62.0) - - React-Core/RCTSettingsHeaders (= 0.62.0) - - ReactCommon/turbomodule/core (= 0.62.0) - - React-RCTText (0.62.0): - - React-Core/RCTTextHeaders (= 0.62.0) - - React-RCTVibration (0.62.0): - - FBReactNativeSpec (= 0.62.0) - - Folly (= 2018.10.22.00) - - React-Core/RCTVibrationHeaders (= 0.62.0) - - ReactCommon/turbomodule/core (= 0.62.0) - - ReactCommon/callinvoker (0.62.0): + - RCT-Folly (= 2021.07.22.00) + - React-jsiexecutor (0.70.2): - DoubleConversion - - Folly (= 2018.10.22.00) - glog - - React-cxxreact (= 0.62.0) - - ReactCommon/turbomodule/core (0.62.0): + - RCT-Folly (= 2021.07.22.00) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-perflogger (= 0.70.2) + - React-jsinspector (0.70.2) + - React-logger (0.70.2): + - glog + - react-native-shimmer (0.6.0): + - React-Core + - Shimmer (~> 1) + - React-perflogger (0.70.2) + - React-RCTActionSheet (0.70.2): + - React-Core/RCTActionSheetHeaders (= 0.70.2) + - React-RCTAnimation (0.70.2): + - RCT-Folly (= 2021.07.22.00) + - RCTTypeSafety (= 0.70.2) + - React-Codegen (= 0.70.2) + - React-Core/RCTAnimationHeaders (= 0.70.2) + - React-jsi (= 0.70.2) + - ReactCommon/turbomodule/core (= 0.70.2) + - React-RCTBlob (0.70.2): + - RCT-Folly (= 2021.07.22.00) + - React-Codegen (= 0.70.2) + - React-Core/RCTBlobHeaders (= 0.70.2) + - React-Core/RCTWebSocket (= 0.70.2) + - React-jsi (= 0.70.2) + - React-RCTNetwork (= 0.70.2) + - ReactCommon/turbomodule/core (= 0.70.2) + - React-RCTImage (0.70.2): + - RCT-Folly (= 2021.07.22.00) + - RCTTypeSafety (= 0.70.2) + - React-Codegen (= 0.70.2) + - React-Core/RCTImageHeaders (= 0.70.2) + - React-jsi (= 0.70.2) + - React-RCTNetwork (= 0.70.2) + - ReactCommon/turbomodule/core (= 0.70.2) + - React-RCTLinking (0.70.2): + - React-Codegen (= 0.70.2) + - React-Core/RCTLinkingHeaders (= 0.70.2) + - React-jsi (= 0.70.2) + - ReactCommon/turbomodule/core (= 0.70.2) + - React-RCTNetwork (0.70.2): + - RCT-Folly (= 2021.07.22.00) + - RCTTypeSafety (= 0.70.2) + - React-Codegen (= 0.70.2) + - React-Core/RCTNetworkHeaders (= 0.70.2) + - React-jsi (= 0.70.2) + - ReactCommon/turbomodule/core (= 0.70.2) + - React-RCTSettings (0.70.2): + - RCT-Folly (= 2021.07.22.00) + - RCTTypeSafety (= 0.70.2) + - React-Codegen (= 0.70.2) + - React-Core/RCTSettingsHeaders (= 0.70.2) + - React-jsi (= 0.70.2) + - ReactCommon/turbomodule/core (= 0.70.2) + - React-RCTText (0.70.2): + - React-Core/RCTTextHeaders (= 0.70.2) + - React-RCTVibration (0.70.2): + - RCT-Folly (= 2021.07.22.00) + - React-Codegen (= 0.70.2) + - React-Core/RCTVibrationHeaders (= 0.70.2) + - React-jsi (= 0.70.2) + - ReactCommon/turbomodule/core (= 0.70.2) + - React-runtimeexecutor (0.70.2): + - React-jsi (= 0.70.2) + - ReactCommon/turbomodule/core (0.70.2): - DoubleConversion - - Folly (= 2018.10.22.00) - glog - - React-Core (= 0.62.0) - - React-cxxreact (= 0.62.0) - - React-jsi (= 0.62.0) - - ReactCommon/callinvoker (= 0.62.0) + - RCT-Folly (= 2021.07.22.00) + - React-bridging (= 0.70.2) + - React-callinvoker (= 0.70.2) + - React-Core (= 0.70.2) + - React-cxxreact (= 0.70.2) + - React-jsi (= 0.70.2) + - React-logger (= 0.70.2) + - React-perflogger (= 0.70.2) - Shimmer (1.0.2) + - SocketRocket (0.6.0) - Yoga (1.14.0) - YogaKit (1.18.1): - Yoga (~> 1.14) DEPENDENCIES: + - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) - - FlipperKit (~> 0.33.1) - - FlipperKit/FlipperKitLayoutPlugin (~> 0.33.1) - - FlipperKit/FlipperKitReactPlugin (~> 0.33.1) - - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.33.1) - - FlipperKit/SKIOSNetworkPlugin (~> 0.33.1) - - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`) + - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) + - Flipper (= 0.125.0) + - Flipper-Boost-iOSX (= 1.76.0.1.11) + - Flipper-DoubleConversion (= 3.2.0.1) + - Flipper-Fmt (= 7.1.7) + - Flipper-Folly (= 2.6.10) + - Flipper-Glog (= 0.5.0.5) + - Flipper-PeerTalk (= 0.0.4) + - Flipper-RSocket (= 1.4.3) + - FlipperKit (= 0.125.0) + - FlipperKit/Core (= 0.125.0) + - FlipperKit/CppBridge (= 0.125.0) + - FlipperKit/FBCxxFollyDynamicConvert (= 0.125.0) + - FlipperKit/FBDefines (= 0.125.0) + - FlipperKit/FKPortForwarding (= 0.125.0) + - FlipperKit/FlipperKitHighlightOverlay (= 0.125.0) + - FlipperKit/FlipperKitLayoutPlugin (= 0.125.0) + - FlipperKit/FlipperKitLayoutTextSearchable (= 0.125.0) + - FlipperKit/FlipperKitNetworkPlugin (= 0.125.0) + - FlipperKit/FlipperKitReactPlugin (= 0.125.0) + - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0) + - FlipperKit/SKIOSNetworkPlugin (= 0.125.0) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) + - hermes-engine (from `../node_modules/react-native/sdks/hermes/hermes-engine.podspec`) + - libevent (~> 2.1.12) + - OpenSSL-Universal (= 1.1.1100) + - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) - React (from `../node_modules/react-native/`) + - React-bridging (from `../node_modules/react-native/ReactCommon`) + - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) + - React-Codegen (from `build/generated/ios`) - React-Core (from `../node_modules/react-native/`) - React-Core/DevSupport (from `../node_modules/react-native/`) - React-Core/RCTWebSocket (from `../node_modules/react-native/`) - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) + - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) + - React-logger (from `../node_modules/react-native/ReactCommon/logger`) - react-native-shimmer (from `../node_modules/react-native-shimmer`) + - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) @@ -332,57 +435,76 @@ DEPENDENCIES: - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) - React-RCTText (from `../node_modules/react-native/Libraries/Text`) - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) - - ReactCommon/callinvoker (from `../node_modules/react-native/ReactCommon`) + - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: trunk: - - boost-for-react-native - CocoaAsyncSocket - - CocoaLibEvent - Flipper + - Flipper-Boost-iOSX - Flipper-DoubleConversion + - Flipper-Fmt - Flipper-Folly - Flipper-Glog - Flipper-PeerTalk - Flipper-RSocket - FlipperKit + - fmt + - libevent - OpenSSL-Universal - Shimmer + - SocketRocket - YogaKit EXTERNAL SOURCES: + boost: + :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" DoubleConversion: :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" FBLazyVector: :path: "../node_modules/react-native/Libraries/FBLazyVector" FBReactNativeSpec: - :path: "../node_modules/react-native/Libraries/FBReactNativeSpec" - Folly: - :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec" + :path: "../node_modules/react-native/React/FBReactNativeSpec" glog: :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" + hermes-engine: + :podspec: "../node_modules/react-native/sdks/hermes/hermes-engine.podspec" + RCT-Folly: + :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" RCTRequired: :path: "../node_modules/react-native/Libraries/RCTRequired" RCTTypeSafety: :path: "../node_modules/react-native/Libraries/TypeSafety" React: :path: "../node_modules/react-native/" + React-bridging: + :path: "../node_modules/react-native/ReactCommon" + React-callinvoker: + :path: "../node_modules/react-native/ReactCommon/callinvoker" + React-Codegen: + :path: build/generated/ios React-Core: :path: "../node_modules/react-native/" React-CoreModules: :path: "../node_modules/react-native/React/CoreModules" React-cxxreact: :path: "../node_modules/react-native/ReactCommon/cxxreact" + React-hermes: + :path: "../node_modules/react-native/ReactCommon/hermes" React-jsi: :path: "../node_modules/react-native/ReactCommon/jsi" React-jsiexecutor: :path: "../node_modules/react-native/ReactCommon/jsiexecutor" React-jsinspector: :path: "../node_modules/react-native/ReactCommon/jsinspector" + React-logger: + :path: "../node_modules/react-native/ReactCommon/logger" react-native-shimmer: :path: "../node_modules/react-native-shimmer" + React-perflogger: + :path: "../node_modules/react-native/ReactCommon/reactperflogger" React-RCTActionSheet: :path: "../node_modules/react-native/Libraries/ActionSheetIOS" React-RCTAnimation: @@ -401,52 +523,66 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/Libraries/Text" React-RCTVibration: :path: "../node_modules/react-native/Libraries/Vibration" + React-runtimeexecutor: + :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" ReactCommon: :path: "../node_modules/react-native/ReactCommon" Yoga: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c - CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845 - CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f - DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2 - FBLazyVector: 545eccf4f6ef2de8fd450fd8a1edb3f913c7371a - FBReactNativeSpec: 85c7f8347f4a6e911742228e89e245187afa298e - Flipper: 6c1f484f9a88d30ab3e272800d53688439e50f69 - Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 - Flipper-Folly: 2de3d03e0acc7064d5e4ed9f730e2f217486f162 - Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 + boost: a7c83b31436843459a1961bfd74b96033dc77234 + CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 + DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 + FBLazyVector: 0507edc21c06f1650c591f0981c846445469373b + FBReactNativeSpec: 698ef8604615cfa7ae2119e9ca4ed7687a6ae62e + Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0 + Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c + Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 + Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b + Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 + Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 - Flipper-RSocket: 1260a31c05c238eabfa9bb8a64e3983049048371 - FlipperKit: 6dc9b8f4ef60d9e5ded7f0264db299c91f18832e - Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51 - glog: 1f3da668190260b06b429bb211bfbee5cd790c28 - OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355 - RCTRequired: 0873f5bdb1762d2b9b1ae16a01c4f91d6ee3b6dd - RCTTypeSafety: a605e0cc0e4220f6e65896bd9e675073c2978f35 - React: 8abf6bdd2b05538e9445f7bbda800df744068bfe - React-Core: d6daa0d60a4180915e889a5e81f28522cb30359a - React-CoreModules: 9d5343b095a52e830954a1dd7ae1cb9321ceeddc - React-cxxreact: c108ca236585b9c802f1eeab11fed1a023faac3a - React-jsi: bc8166d6833cdcb0848c80710b26ce63fad2c099 - React-jsiexecutor: 8bf0b2707f05865113415088c398a7f98c0cf546 - React-jsinspector: 8e5913c4c6c54f0d3f9c9fc630c465a89cded65d - react-native-shimmer: d9e6f436e8b0318da2b6f391e04725363b01c2d9 - React-RCTActionSheet: 674afbc8b9c76e0a83520e0a51da29a70802c03f - React-RCTAnimation: f5f24330d09ee677fb49e0782f8321868f4df431 - React-RCTBlob: b773ce6138ab0d172ebd8a455fd4efd200a92549 - React-RCTImage: 8dbaa77916f9d21ff8faa0f3f5f06d4069c28e93 - React-RCTLinking: 312a2b3511e2829e68c300c2cdcae4282fefc7ef - React-RCTNetwork: 4b87acf29c38b8819bea67dad3edeca7b9a20718 - React-RCTSettings: be798c8b33392a90d9d551644610ffa349a89255 - React-RCTText: 91a0d0ae5434aa28fe0c89c03eb9d660ff53bd9b - React-RCTVibration: 0630aeb11e22f87c180ca9c0c3a0a0aba780cc62 - ReactCommon: d22162ab8f1358c53dfcd0f9c4d82d38facdbc48 + Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 + FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86 + fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 + glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b + hermes-engine: f9312a2ea8036d03b63568ebf392314f4fa8b474 + libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 + OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c + RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda + RCTRequired: d4033a367d0bfd1f23f67b501f8cdabf9afe617e + RCTTypeSafety: b112b2ccc59309a65284280c0a53baf1ce4b5860 + React: 04474547a4729eef1fb378ca42f302f4b3219eb8 + React-bridging: 1c8695b292b4a9baaca3960f6166d9766e20492d + React-callinvoker: 4d91e2db7773ee3fcea2d3a5c6beb52a5bfd4d71 + React-Codegen: 33356335c6f3b0869cb4434055fdec219139f635 + React-Core: 634b8aa20e1dad445425ee9581f4719bcfd1b19b + React-CoreModules: 746825283de4b54dcb4fd88703ff516297a5f60d + React-cxxreact: f8d2686d98b5ffed1b1de3aa62e1f81db4903153 + React-hermes: 4e9f5f9cfff42a23e7d6d8083e6c8a3f6f4926ee + React-jsi: 198b9b3e0a85e68cb6898265400fd8bf34cacda4 + React-jsiexecutor: 53bd208e5c27939c6e6365528393445a596a9a2b + React-jsinspector: 26c42646ab0bb69e29e837e23754fe7121eeaf94 + React-logger: 1bfd109a0ffa4c0989bbfac0c2d8c4abe4637faa + react-native-shimmer: 1c06d2f0bc09e415e0a9691301d4515a4d2b8f3f + React-perflogger: 6009895616a455781293950bbd63d53cfc7ffbc5 + React-RCTActionSheet: 5e90aa5712af18bfc86c2c6d97d4dbe0e5451c1d + React-RCTAnimation: 50c44d6501f8bfb2fe885e544501f8798b4ff3d6 + React-RCTBlob: 3cc08e7112dd7b77faf3fa481ba22ca2bba5f20a + React-RCTImage: ca8335860b5f64c383ad27f52a28d85089d49b7a + React-RCTLinking: 297cd91bdbf427efc861fc7943e6d683e61860fa + React-RCTNetwork: 8a197bff6f1dc5353484507a4cdcd47e9356316f + React-RCTSettings: d3db1f1e61a5ad8deb50f44f5cb6c7c3ef32b3ac + React-RCTText: c2c05ab3dbfb1cf5855b14802f392148970e48da + React-RCTVibration: 89e2cbea456ac5ec623943661d00e4dc45fe74b9 + React-runtimeexecutor: 80065f60af4f4b05603661070c8622bb3740bf16 + ReactCommon: 1209130f460e4aa9d255ddc75fa0a827ebf93dfb Shimmer: c5374be1c2b0c9e292fb05b339a513cf291cac86 - Yoga: 9db9ff2025ad21d1ac0a8b3c85d5ac4e7c29d525 + SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 + Yoga: 043f8eb97345d0171f27fead4d1849cacf0472a5 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 08584089fa8dca39531d18c61b78f160733a0e1f +PODFILE CHECKSUM: cceedf60c4793e5bccd88c162b1395e76e7ea8f8 -COCOAPODS: 1.8.4 +COCOAPODS: 1.11.3 diff --git a/Example/metro.config.js b/Example/metro.config.js index 13a9642..e91aba9 100644 --- a/Example/metro.config.js +++ b/Example/metro.config.js @@ -10,7 +10,7 @@ module.exports = { getTransformOptions: async () => ({ transform: { experimentalImportSupport: false, - inlineRequires: false, + inlineRequires: true, }, }), }, diff --git a/Example/package.json b/Example/package.json index 4bdd3b1..aa564e8 100644 --- a/Example/package.json +++ b/Example/package.json @@ -1,5 +1,5 @@ { - "name": "Example", + "name": "example", "version": "0.0.1", "private": true, "scripts": { @@ -7,22 +7,23 @@ "ios": "react-native run-ios", "start": "react-native start", "test": "jest", + "postinstall": "DESTINATION='node_modules/react-native-shimmer' LIB_FILE=`cd .. && echo \\`pwd\\`/\\`npm pack\\`` && (rm -rf $DESTINATION || true) && mkdir $DESTINATION && tar -xvzf $LIB_FILE -C $DESTINATION --strip-components 1 && rm $LIB_FILE", "lint": "eslint ." }, "dependencies": { - "react": "16.11.0", - "react-native": "0.62.0", + "react": "18.1.0", + "react-native": "0.70.2", "react-native-shimmer": "*" }, "devDependencies": { - "@babel/core": "^7.9.0", - "@babel/runtime": "^7.9.2", - "@react-native-community/eslint-config": "^1.0.0", - "babel-jest": "^25.2.4", - "eslint": "^6.8.0", - "jest": "^25.2.4", - "metro-react-native-babel-preset": "^0.59.0", - "react-test-renderer": "16.11.0" + "@babel/core": "^7.12.9", + "@babel/runtime": "^7.12.5", + "@react-native-community/eslint-config": "^2.0.0", + "babel-jest": "^26.6.3", + "eslint": "^7.32.0", + "jest": "^26.6.3", + "metro-react-native-babel-preset": "0.72.3", + "react-test-renderer": "18.1.0" }, "jest": { "preset": "react-native" diff --git a/package.json b/package.json index 0a9ee58..4dbfd94 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "prettier": "^1.16.1" }, "peerDependencies": { - "react": ">=16.0.0", - "react-native": ">=0.45.1 <1.0.0" + "react": "*", + "react-native": "*" }, "dependencies": { "prop-types": "^15.6.0" diff --git a/react-native-shimmer.podspec b/react-native-shimmer.podspec index 4e7db41..b057635 100644 --- a/react-native-shimmer.podspec +++ b/react-native-shimmer.podspec @@ -16,6 +16,6 @@ Pod::Spec.new do |s| s.requires_arc = true s.platform = :ios, "9.0" - s.dependency 'React', '>= 0.45.1' + s.dependency 'React-Core' s.dependency 'Shimmer', '~> 1' end