getTurboModule(
27 | const std::string name,
28 | const JavaTurboModule::InitParams ¶ms) override;
29 |
30 | /**
31 | * Test-only method. Allows user to verify whether a TurboModule can be
32 | * created by instances of this class.
33 | */
34 | bool canCreateTurboModule(std::string name);
35 | };
36 |
37 | } // namespace react
38 | } // namespace facebook
39 |
--------------------------------------------------------------------------------
/Example/android/app/src/main/java/com/example/newarchitecture/components/MainComponentsRegistry.java:
--------------------------------------------------------------------------------
1 | package com.example.newarchitecture.components;
2 |
3 | import com.facebook.jni.HybridData;
4 | import com.facebook.proguard.annotations.DoNotStrip;
5 | import com.facebook.react.fabric.ComponentFactory;
6 | import com.facebook.soloader.SoLoader;
7 |
8 | /**
9 | * Class responsible to load the custom Fabric Components. This class has native methods and needs a
10 | * corresponding C++ implementation/header file to work correctly (already placed inside the jni/
11 | * folder for you).
12 | *
13 | * Please note that this class is used ONLY if you opt-in for the New Architecture (see the
14 | * `newArchEnabled` property). Is ignored otherwise.
15 | */
16 | @DoNotStrip
17 | public class MainComponentsRegistry {
18 | static {
19 | SoLoader.loadLibrary("fabricjni");
20 | }
21 |
22 | @DoNotStrip private final HybridData mHybridData;
23 |
24 | @DoNotStrip
25 | private native HybridData initHybrid(ComponentFactory componentFactory);
26 |
27 | @DoNotStrip
28 | private MainComponentsRegistry(ComponentFactory componentFactory) {
29 | mHybridData = initHybrid(componentFactory);
30 | }
31 |
32 | @DoNotStrip
33 | public static MainComponentsRegistry register(ComponentFactory componentFactory) {
34 | return new MainComponentsRegistry(componentFactory);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/gradient-component/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rnx-gradient",
3 | "version": "0.1.1",
4 | "description": "Linear Gradient for React Native Fabric",
5 | "react-native": "src/index",
6 | "source": "src/index",
7 | "files": [
8 | "src",
9 | "android",
10 | "ios",
11 | "react-native-gradient.podspec",
12 | "!android/build",
13 | "!ios/build",
14 | "!**/__tests__",
15 | "!**/__fixtures__",
16 | "!**/__mocks__"
17 | ],
18 | "keywords": [
19 | "react-native",
20 | "ios",
21 | "android",
22 | "linear-gradient"
23 | ],
24 | "repository": "https://github.com/FyndX/react-native-gradient",
25 | "author": " (https://github.com/chakrihacker)",
26 | "license": "MIT",
27 | "bugs": {
28 | "url": "https://github.com/FyndX/react-native-gradient/issues"
29 | },
30 | "homepage": "https://github.com/FyndX/react-native-gradient#readme",
31 | "devDependencies": {
32 | "@babel/core": "^7.18.2",
33 | "@babel/runtime": "^7.18.3"
34 | },
35 | "peerDependencies": {
36 | "react": "*",
37 | "react-native": "*"
38 | },
39 | "codegenConfig": {
40 | "libraries": [
41 | {
42 | "name": "rnx-gradient",
43 | "type": "components",
44 | "jsSrcsDir": "src"
45 | }
46 | ]
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/Example/android/app/_BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12 |
13 | lib_deps = []
14 |
15 | create_aar_targets(glob(["libs/*.aar"]))
16 |
17 | create_jar_targets(glob(["libs/*.jar"]))
18 |
19 | android_library(
20 | name = "all-libs",
21 | exported_deps = lib_deps,
22 | )
23 |
24 | android_library(
25 | name = "app-code",
26 | srcs = glob([
27 | "src/main/java/**/*.java",
28 | ]),
29 | deps = [
30 | ":all-libs",
31 | ":build_config",
32 | ":res",
33 | ],
34 | )
35 |
36 | android_build_config(
37 | name = "build_config",
38 | package = "com.example",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "com.example",
44 | res = "src/main/res",
45 | )
46 |
47 | android_binary(
48 | name = "app",
49 | keystore = "//android/keystores:debug",
50 | manifest = "src/main/AndroidManifest.xml",
51 | package_type = "debug",
52 | deps = [
53 | ":app-code",
54 | ],
55 | )
56 |
--------------------------------------------------------------------------------
/Example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp:
--------------------------------------------------------------------------------
1 | #include "MainApplicationTurboModuleManagerDelegate.h"
2 | #include "MainApplicationModuleProvider.h"
3 |
4 | namespace facebook {
5 | namespace react {
6 |
7 | jni::local_ref
8 | MainApplicationTurboModuleManagerDelegate::initHybrid(
9 | jni::alias_ref) {
10 | return makeCxxInstance();
11 | }
12 |
13 | void MainApplicationTurboModuleManagerDelegate::registerNatives() {
14 | registerHybrid({
15 | makeNativeMethod(
16 | "initHybrid", MainApplicationTurboModuleManagerDelegate::initHybrid),
17 | makeNativeMethod(
18 | "canCreateTurboModule",
19 | MainApplicationTurboModuleManagerDelegate::canCreateTurboModule),
20 | });
21 | }
22 |
23 | std::shared_ptr
24 | MainApplicationTurboModuleManagerDelegate::getTurboModule(
25 | const std::string name,
26 | const std::shared_ptr jsInvoker) {
27 | // Not implemented yet: provide pure-C++ NativeModules here.
28 | return nullptr;
29 | }
30 |
31 | std::shared_ptr
32 | MainApplicationTurboModuleManagerDelegate::getTurboModule(
33 | const std::string name,
34 | const JavaTurboModule::InitParams ¶ms) {
35 | return MainApplicationModuleProvider(name, params);
36 | }
37 |
38 | bool MainApplicationTurboModuleManagerDelegate::canCreateTurboModule(
39 | std::string name) {
40 | return getTurboModule(name, nullptr) != nullptr ||
41 | getTurboModule(name, {.moduleName = name}) != nullptr;
42 | }
43 |
44 | } // namespace react
45 | } // namespace facebook
46 |
--------------------------------------------------------------------------------
/Example/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore polyfills
9 | node_modules/react-native/Libraries/polyfills/.*
10 |
11 | ; Flow doesn't support platforms
12 | .*/Libraries/Utilities/LoadingView.js
13 |
14 | .*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
15 |
16 | [untyped]
17 | .*/node_modules/@react-native-community/cli/.*/.*
18 |
19 | [include]
20 |
21 | [libs]
22 | node_modules/react-native/interface.js
23 | node_modules/react-native/flow/
24 |
25 | [options]
26 | emoji=true
27 |
28 | exact_by_default=true
29 |
30 | format.bracket_spacing=false
31 |
32 | module.file_ext=.js
33 | module.file_ext=.json
34 | module.file_ext=.ios.js
35 |
36 | munge_underscores=true
37 |
38 | module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1'
39 | module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub'
40 |
41 | suppress_type=$FlowIssue
42 | suppress_type=$FlowFixMe
43 | suppress_type=$FlowFixMeProps
44 | suppress_type=$FlowFixMeState
45 |
46 | [lints]
47 | sketchy-null-number=warn
48 | sketchy-null-mixed=warn
49 | sketchy-number=warn
50 | untyped-type-import=warn
51 | nonstrict-import=warn
52 | deprecated-type=warn
53 | unsafe-getters-setters=warn
54 | unnecessary-invariant=warn
55 |
56 | [strict]
57 | deprecated-type
58 | nonstrict-import
59 | sketchy-null
60 | unclear-type
61 | unsafe-getters-setters
62 | untyped-import
63 | untyped-type-import
64 |
65 | [version]
66 | ^0.176.3
67 |
--------------------------------------------------------------------------------
/Example/ios/Example/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | Example
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSExceptionDomains
30 |
31 | localhost
32 |
33 | NSExceptionAllowsInsecureHTTPLoads
34 |
35 |
36 |
37 |
38 | NSLocationWhenInUseUsageDescription
39 |
40 | UILaunchStoryboardName
41 | LaunchScreen
42 | UIRequiredDeviceCapabilities
43 |
44 | armv7
45 |
46 | UISupportedInterfaceOrientations
47 |
48 | UIInterfaceOrientationPortrait
49 | UIInterfaceOrientationLandscapeLeft
50 | UIInterfaceOrientationLandscapeRight
51 |
52 | UIViewControllerBasedStatusBarAppearance
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/Example/android/app/src/main/java/com/example/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example;
2 |
3 | import com.facebook.react.ReactActivity;
4 | import com.facebook.react.ReactActivityDelegate;
5 | import com.facebook.react.ReactRootView;
6 |
7 | public class MainActivity extends ReactActivity {
8 |
9 | /**
10 | * Returns the name of the main component registered from JavaScript. This is used to schedule
11 | * rendering of the component.
12 | */
13 | @Override
14 | protected String getMainComponentName() {
15 | return "Example";
16 | }
17 |
18 | /**
19 | * Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and
20 | * you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer
21 | * (Paper).
22 | */
23 | @Override
24 | protected ReactActivityDelegate createReactActivityDelegate() {
25 | return new MainActivityDelegate(this, getMainComponentName());
26 | }
27 |
28 | public static class MainActivityDelegate extends ReactActivityDelegate {
29 | public MainActivityDelegate(ReactActivity activity, String mainComponentName) {
30 | super(activity, mainComponentName);
31 | }
32 |
33 | @Override
34 | protected ReactRootView createRootView() {
35 | ReactRootView reactRootView = new ReactRootView(getContext());
36 | // If you opted-in for the New Architecture, we enable the Fabric Renderer.
37 | reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
38 | return reactRootView;
39 | }
40 |
41 | @Override
42 | protected boolean isConcurrentRootEnabled() {
43 | // If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18).
44 | // More on this on https://reactjs.org/blog/2022/03/29/react-v18.html
45 | return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/Example/android/app/src/main/jni/Android.mk:
--------------------------------------------------------------------------------
1 | THIS_DIR := $(call my-dir)
2 |
3 | include $(REACT_ANDROID_DIR)/Android-prebuilt.mk
4 |
5 | # If you wish to add a custom TurboModule or Fabric component in your app you
6 | # will have to include the following autogenerated makefile.
7 | # include $(GENERATED_SRC_DIR)/codegen/jni/Android.mk
8 |
9 | include $(NODE_MODULES_DIR)/rnx-gradient/android/build/generated/source/codegen/jni/Android.mk
10 | include $(CLEAR_VARS)
11 |
12 | LOCAL_PATH := $(THIS_DIR)
13 |
14 | # You can customize the name of your application .so file here.
15 | LOCAL_MODULE := example_appmodules
16 |
17 | LOCAL_C_INCLUDES := $(LOCAL_PATH)
18 | LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
19 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
20 |
21 | # If you wish to add a custom TurboModule or Fabric component in your app you
22 | # will have to uncomment those lines to include the generated source
23 | # files from the codegen (placed in $(GENERATED_SRC_DIR)/codegen/jni)
24 | #
25 | # LOCAL_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
26 | # LOCAL_SRC_FILES += $(wildcard $(GENERATED_SRC_DIR)/codegen/jni/*.cpp)
27 | # LOCAL_EXPORT_C_INCLUDES += $(GENERATED_SRC_DIR)/codegen/jni
28 |
29 | # Here you should add any native library you wish to depend on.
30 | LOCAL_SHARED_LIBRARIES := \
31 | libfabricjni \
32 | libfbjni \
33 | libfolly_runtime \
34 | libglog \
35 | libjsi \
36 | libreact_codegen_rncore \
37 | libreact_codegen_lineargradientview \
38 | libreact_debug \
39 | libreact_nativemodule_core \
40 | libreact_render_componentregistry \
41 | libreact_render_core \
42 | libreact_render_debug \
43 | libreact_render_graphics \
44 | librrc_view \
45 | libruntimeexecutor \
46 | libturbomodulejsijni \
47 | libyoga
48 |
49 | LOCAL_CFLAGS := -DLOG_TAG=\"ReactNative\" -fexceptions -frtti -std=c++17 -Wall
50 |
51 | include $(BUILD_SHARED_LIBRARY)
52 |
--------------------------------------------------------------------------------
/Example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | # AndroidX package structure to make it clearer which packages are bundled with the
21 | # Android operating system, and which are packaged with your app's APK
22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
23 | android.useAndroidX=true
24 | # Automatically convert third-party libraries to use AndroidX
25 | android.enableJetifier=true
26 |
27 | # Version of flipper SDK to use with React Native
28 | FLIPPER_VERSION=0.125.0
29 |
30 | # Use this property to specify which architecture you want to build.
31 | # You can also override it from the CLI using
32 | # ./gradlew -PreactNativeArchitectures=x86_64
33 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
34 |
35 | # Use this property to enable support to the new architecture.
36 | # This will allow you to use TurboModules and the Fabric render in
37 | # your application. You should enable this flag either if you want
38 | # to write custom TurboModules/Fabric components OR use libraries that
39 | # are providing them.
40 | newArchEnabled=true
41 |
--------------------------------------------------------------------------------
/Example/android/build.gradle:
--------------------------------------------------------------------------------
1 | import org.apache.tools.ant.taskdefs.condition.Os
2 |
3 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
4 |
5 | buildscript {
6 | ext {
7 | buildToolsVersion = "31.0.0"
8 | minSdkVersion = 21
9 | compileSdkVersion = 31
10 | targetSdkVersion = 31
11 |
12 | if (System.properties['os.arch'] == "aarch64") {
13 | // For M1 Users we need to use the NDK 24 which added support for aarch64
14 | ndkVersion = "24.0.8215888"
15 | } else {
16 | // Otherwise we default to the side-by-side NDK version from AGP.
17 | ndkVersion = "21.4.7075529"
18 | }
19 | }
20 | repositories {
21 | google()
22 | mavenCentral()
23 | }
24 | dependencies {
25 | classpath("com.android.tools.build:gradle:7.1.1")
26 | classpath("com.facebook.react:react-native-gradle-plugin")
27 | classpath("de.undercouch:gradle-download-task:5.0.1")
28 | // NOTE: Do not place your application dependencies here; they belong
29 | // in the individual module build.gradle files
30 | }
31 | }
32 |
33 | allprojects {
34 | repositories {
35 | maven {
36 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
37 | url("$rootDir/../node_modules/react-native/android")
38 | }
39 | maven {
40 | // Android JSC is installed from npm
41 | url("$rootDir/../node_modules/jsc-android/dist")
42 | }
43 | mavenCentral {
44 | // We don't want to fetch react-native from Maven Central as there are
45 | // older versions over there.
46 | content {
47 | excludeGroup "com.facebook.react"
48 | }
49 | }
50 | google()
51 | maven { url 'https://www.jitpack.io' }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Example/android/app/src/main/java/com/example/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java:
--------------------------------------------------------------------------------
1 | package com.example.newarchitecture.modules;
2 |
3 | import com.facebook.jni.HybridData;
4 | import com.facebook.react.ReactPackage;
5 | import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
6 | import com.facebook.react.bridge.ReactApplicationContext;
7 | import com.facebook.soloader.SoLoader;
8 | import java.util.List;
9 |
10 | /**
11 | * Class responsible to load the TurboModules. This class has native methods and needs a
12 | * corresponding C++ implementation/header file to work correctly (already placed inside the jni/
13 | * folder for you).
14 | *
15 | * Please note that this class is used ONLY if you opt-in for the New Architecture (see the
16 | * `newArchEnabled` property). Is ignored otherwise.
17 | */
18 | public class MainApplicationTurboModuleManagerDelegate
19 | extends ReactPackageTurboModuleManagerDelegate {
20 |
21 | private static volatile boolean sIsSoLibraryLoaded;
22 |
23 | protected MainApplicationTurboModuleManagerDelegate(
24 | ReactApplicationContext reactApplicationContext, List packages) {
25 | super(reactApplicationContext, packages);
26 | }
27 |
28 | protected native HybridData initHybrid();
29 |
30 | native boolean canCreateTurboModule(String moduleName);
31 |
32 | public static class Builder extends ReactPackageTurboModuleManagerDelegate.Builder {
33 | protected MainApplicationTurboModuleManagerDelegate build(
34 | ReactApplicationContext context, List packages) {
35 | return new MainApplicationTurboModuleManagerDelegate(context, packages);
36 | }
37 | }
38 |
39 | @Override
40 | protected synchronized void maybeLoadOtherSoLibraries() {
41 | if (!sIsSoLibraryLoaded) {
42 | // If you change the name of your application .so file in the Android.mk file,
43 | // make sure you update the name here as well.
44 | SoLoader.loadLibrary("example_appmodules");
45 | sIsSoLibraryLoaded = true;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/Example/android/app/src/main/res/drawable/rn_edit_text_material.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
21 |
22 |
23 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/Example/App.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | * @flow strict-local
7 | */
8 |
9 | import React, {useState} from 'react';
10 | import {
11 | Button,
12 | SafeAreaView,
13 | ScrollView,
14 | StatusBar,
15 | StyleSheet,
16 | useColorScheme,
17 | View,
18 | } from 'react-native';
19 |
20 | import {LinearGradient} from '@fyndx/react-native-gradient';
21 |
22 | import {Colors, Header} from 'react-native/Libraries/NewAppScreen';
23 |
24 | function getRandomColor() {
25 | var letters = '0123456789ABCDEF';
26 | var color = '#';
27 | for (var i = 0; i < 6; i++) {
28 | color += letters[Math.floor(Math.random() * 16)];
29 | }
30 | return color;
31 | }
32 |
33 | // TODO: improve example with options to set props
34 | const App = () => {
35 | const isDarkMode = useColorScheme() === 'dark';
36 |
37 | const [colors, setColors] = useState(['#A770EF', '#CF8BF3', '#FDB99B']);
38 |
39 | const backgroundStyle = {
40 | backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
41 | };
42 |
43 | const handlePress = () => {
44 | setColors([getRandomColor(), getRandomColor(), getRandomColor()]);
45 | };
46 |
47 | return (
48 |
49 |
50 |
53 |
54 |
58 |
68 |
69 |
70 |
71 |
72 | );
73 | };
74 |
75 | const styles = StyleSheet.create({
76 | gradient: {
77 | width: 200,
78 | height: 200,
79 | },
80 | });
81 |
82 | export default App;
83 |
--------------------------------------------------------------------------------
/Example/ios/ExampleTests/ExampleTests.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #import
5 | #import
6 |
7 | #define TIMEOUT_SECONDS 600
8 | #define TEXT_TO_LOOK_FOR @"Welcome to React"
9 |
10 | @interface ExampleTests : XCTestCase
11 |
12 | @end
13 |
14 | @implementation ExampleTests
15 |
16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
17 | {
18 | if (test(view)) {
19 | return YES;
20 | }
21 | for (UIView *subview in [view subviews]) {
22 | if ([self findSubviewInView:subview matching:test]) {
23 | return YES;
24 | }
25 | }
26 | return NO;
27 | }
28 |
29 | - (void)testRendersWelcomeScreen
30 | {
31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33 | BOOL foundElement = NO;
34 |
35 | __block NSString *redboxError = nil;
36 | #ifdef DEBUG
37 | RCTSetLogFunction(
38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
39 | if (level >= RCTLogLevelError) {
40 | redboxError = message;
41 | }
42 | });
43 | #endif
44 |
45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
48 |
49 | foundElement = [self findSubviewInView:vc.view
50 | matching:^BOOL(UIView *view) {
51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
52 | return YES;
53 | }
54 | return NO;
55 | }];
56 | }
57 |
58 | #ifdef DEBUG
59 | RCTSetLogFunction(RCTDefaultLogFunction);
60 | #endif
61 |
62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
64 | }
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/Example/android/app/src/main/jni/MainComponentsRegistry.cpp:
--------------------------------------------------------------------------------
1 | #include "MainComponentsRegistry.h"
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 | namespace facebook {
10 | namespace react {
11 |
12 | MainComponentsRegistry::MainComponentsRegistry(ComponentFactory *delegate) {}
13 |
14 | std::shared_ptr
15 | MainComponentsRegistry::sharedProviderRegistry() {
16 | auto providerRegistry = CoreComponentsRegistry::sharedProviderRegistry();
17 |
18 | // Custom Fabric Components go here. You can register custom
19 | // components coming from your App or from 3rd party libraries here.
20 | //
21 | providerRegistry->add(concreteComponentDescriptorProvider());
22 | return providerRegistry;
23 | }
24 |
25 | jni::local_ref
26 | MainComponentsRegistry::initHybrid(
27 | jni::alias_ref,
28 | ComponentFactory *delegate) {
29 | auto instance = makeCxxInstance(delegate);
30 |
31 | auto buildRegistryFunction =
32 | [](EventDispatcher::Weak const &eventDispatcher,
33 | ContextContainer::Shared const &contextContainer)
34 | -> ComponentDescriptorRegistry::Shared {
35 | auto registry = MainComponentsRegistry::sharedProviderRegistry()
36 | ->createComponentDescriptorRegistry(
37 | {eventDispatcher, contextContainer});
38 |
39 | auto mutableRegistry =
40 | std::const_pointer_cast(registry);
41 |
42 | mutableRegistry->setFallbackComponentDescriptor(
43 | std::make_shared(
44 | ComponentDescriptorParameters{
45 | eventDispatcher, contextContainer, nullptr}));
46 |
47 | return registry;
48 | };
49 |
50 | delegate->buildRegistryFunction = buildRegistryFunction;
51 | return instance;
52 | }
53 |
54 | void MainComponentsRegistry::registerNatives() {
55 | registerHybrid({
56 | makeNativeMethod("initHybrid", MainComponentsRegistry::initHybrid),
57 | });
58 | }
59 |
60 | } // namespace react
61 | } // namespace facebook
62 |
--------------------------------------------------------------------------------
/gradient-component/android/src/main/java/com/fyndx/LinearGradient/LinearGradientViewManager.java:
--------------------------------------------------------------------------------
1 | package com.fyndx.LinearGradient;
2 |
3 | import android.graphics.Color;
4 |
5 | import androidx.annotation.NonNull;
6 | import androidx.annotation.Nullable;
7 |
8 | import com.facebook.react.bridge.ReadableArray;
9 | import com.facebook.react.bridge.ReactApplicationContext;
10 | import com.facebook.react.bridge.ReadableMap;
11 | import com.facebook.react.module.annotations.ReactModule;
12 | import com.facebook.react.uimanager.SimpleViewManager;
13 | import com.facebook.react.uimanager.ThemedReactContext;
14 | import com.facebook.react.uimanager.ViewManagerDelegate;
15 | import com.facebook.react.uimanager.annotations.ReactProp;
16 | import com.facebook.react.viewmanagers.LinearGradientViewManagerDelegate;
17 | import com.facebook.react.viewmanagers.LinearGradientViewManagerInterface;
18 |
19 | @ReactModule(name = LinearGradientViewManager.NAME)
20 | public class LinearGradientViewManager extends SimpleViewManager
21 | implements LinearGradientViewManagerInterface {
22 |
23 | public static final String NAME = "LinearGradientView";
24 |
25 |
26 | private final ViewManagerDelegate mDelegate;
27 |
28 | public LinearGradientViewManager(ReactApplicationContext reactContext) {
29 | mDelegate = new LinearGradientViewManagerDelegate<>(this);
30 | }
31 |
32 | @Nullable
33 | @Override
34 | protected ViewManagerDelegate getDelegate() {
35 | return mDelegate;
36 | }
37 |
38 | @NonNull
39 | @Override
40 | public String getName() {
41 | return NAME;
42 | }
43 |
44 | @Override
45 | public LinearGradientView createViewInstance(@NonNull ThemedReactContext context) {
46 | return new LinearGradientView(context);
47 | }
48 |
49 | @Override
50 | @ReactProp(name = "start")
51 | public void setStart(LinearGradientView view, @Nullable ReadableMap startPos) {
52 | view.setStartPosition(startPos);
53 | }
54 |
55 | @Override
56 | @ReactProp(name = "end")
57 | public void setEnd(LinearGradientView view, @Nullable ReadableMap endPos) {
58 | view.setEndPosition(endPos);
59 | }
60 |
61 | @Override
62 | @ReactProp(name = "colors")
63 | public void setColors(LinearGradientView view, @Nullable ReadableArray colors) {
64 | view.setColors(colors);
65 | }
66 |
67 | @Override
68 | @ReactProp(name = "locations")
69 | public void setLocations(LinearGradientView view, @Nullable ReadableArray locations) {
70 | view.setLocations(locations);
71 | }
72 |
73 | @Override
74 | @ReactProp(name = "useAngle")
75 | public void setUseAngle(LinearGradientView view, boolean useAngle) {
76 | view.setUseAngle(useAngle);
77 | }
78 |
79 | @Override
80 | @ReactProp(name = "angleCenter")
81 | public void setAngleCenter(LinearGradientView view, @Nullable ReadableMap angleCenter) {
82 | view.setAngleCenter(angleCenter);
83 | }
84 |
85 | @Override
86 | @ReactProp(name = "angle")
87 | public void setAngle(LinearGradientView view, float angle) {
88 | view.setAngle(angle);
89 | }
90 | }
--------------------------------------------------------------------------------
/Example/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/Example/android/app/src/main/java/com/example/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.example;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 | import com.facebook.react.PackageList;
6 | import com.facebook.react.ReactApplication;
7 | import com.facebook.react.ReactInstanceManager;
8 | import com.facebook.react.ReactNativeHost;
9 | import com.facebook.react.ReactPackage;
10 | import com.facebook.react.config.ReactFeatureFlags;
11 | import com.facebook.soloader.SoLoader;
12 | import com.example.newarchitecture.MainApplicationReactNativeHost;
13 | import java.lang.reflect.InvocationTargetException;
14 | import java.util.List;
15 |
16 | public class MainApplication extends Application implements ReactApplication {
17 |
18 | private final ReactNativeHost mReactNativeHost =
19 | new ReactNativeHost(this) {
20 | @Override
21 | public boolean getUseDeveloperSupport() {
22 | return BuildConfig.DEBUG;
23 | }
24 |
25 | @Override
26 | protected List getPackages() {
27 | @SuppressWarnings("UnnecessaryLocalVariable")
28 | List packages = new PackageList(this).getPackages();
29 | // Packages that cannot be autolinked yet can be added manually here, for example:
30 | // packages.add(new MyReactNativePackage());
31 | return packages;
32 | }
33 |
34 | @Override
35 | protected String getJSMainModuleName() {
36 | return "index";
37 | }
38 | };
39 |
40 | private final ReactNativeHost mNewArchitectureNativeHost =
41 | new MainApplicationReactNativeHost(this);
42 |
43 | @Override
44 | public ReactNativeHost getReactNativeHost() {
45 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
46 | return mNewArchitectureNativeHost;
47 | } else {
48 | return mReactNativeHost;
49 | }
50 | }
51 |
52 | @Override
53 | public void onCreate() {
54 | super.onCreate();
55 | // If you opted-in for the New Architecture, we enable the TurboModule system
56 | ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
57 | SoLoader.init(this, /* native exopackage */ false);
58 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
59 | }
60 |
61 | /**
62 | * Loads Flipper in React Native templates. Call this in the onCreate method with something like
63 | * initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
64 | *
65 | * @param context
66 | * @param reactInstanceManager
67 | */
68 | private static void initializeFlipper(
69 | Context context, ReactInstanceManager reactInstanceManager) {
70 | if (BuildConfig.DEBUG) {
71 | try {
72 | /*
73 | We use reflection here to pick up the class that initializes Flipper,
74 | since Flipper library is not available in release mode
75 | */
76 | Class> aClass = Class.forName("com.example.ReactNativeFlipper");
77 | aClass
78 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
79 | .invoke(null, context, reactInstanceManager);
80 | } catch (ClassNotFoundException e) {
81 | e.printStackTrace();
82 | } catch (NoSuchMethodException e) {
83 | e.printStackTrace();
84 | } catch (IllegalAccessException e) {
85 | e.printStackTrace();
86 | } catch (InvocationTargetException e) {
87 | e.printStackTrace();
88 | }
89 | }
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/Example/android/app/src/debug/java/com/example/ReactNativeFlipper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the LICENSE file in the root
5 | * directory of this source tree.
6 | */
7 | package com.example;
8 |
9 | import android.content.Context;
10 | import com.facebook.flipper.android.AndroidFlipperClient;
11 | import com.facebook.flipper.android.utils.FlipperUtils;
12 | import com.facebook.flipper.core.FlipperClient;
13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping;
17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
22 | import com.facebook.react.ReactInstanceEventListener;
23 | import com.facebook.react.ReactInstanceManager;
24 | import com.facebook.react.bridge.ReactContext;
25 | import com.facebook.react.modules.network.NetworkingModule;
26 | import okhttp3.OkHttpClient;
27 |
28 | public class ReactNativeFlipper {
29 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
30 | if (FlipperUtils.shouldEnableFlipper(context)) {
31 | final FlipperClient client = AndroidFlipperClient.getInstance(context);
32 |
33 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
34 | client.addPlugin(new ReactFlipperPlugin());
35 | client.addPlugin(new DatabasesFlipperPlugin(context));
36 | client.addPlugin(new SharedPreferencesFlipperPlugin(context));
37 | client.addPlugin(CrashReporterPlugin.getInstance());
38 |
39 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
40 | NetworkingModule.setCustomClientBuilder(
41 | new NetworkingModule.CustomClientBuilder() {
42 | @Override
43 | public void apply(OkHttpClient.Builder builder) {
44 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
45 | }
46 | });
47 | client.addPlugin(networkFlipperPlugin);
48 | client.start();
49 |
50 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
51 | // Hence we run if after all native modules have been initialized
52 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
53 | if (reactContext == null) {
54 | reactInstanceManager.addReactInstanceEventListener(
55 | new ReactInstanceEventListener() {
56 | @Override
57 | public void onReactContextInitialized(ReactContext reactContext) {
58 | reactInstanceManager.removeReactInstanceEventListener(this);
59 | reactContext.runOnNativeModulesQueueThread(
60 | new Runnable() {
61 | @Override
62 | public void run() {
63 | client.addPlugin(new FrescoFlipperPlugin());
64 | }
65 | });
66 | }
67 | });
68 | } else {
69 | client.addPlugin(new FrescoFlipperPlugin());
70 | }
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
53 |
55 |
61 |
62 |
63 |
64 |
70 |
72 |
78 |
79 |
80 |
81 |
83 |
84 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/Example/ios/Example/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
24 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/gradient-component/ios/RNLinearGradientView/RNLinearGradientView/RNLinearGradientView.mm:
--------------------------------------------------------------------------------
1 | //
2 | // RNLinearGradientView.m
3 | // RNLinearGradientView
4 | //
5 |
6 | // This guard prevent the code from being compiled in the old architecture
7 | #ifdef RCT_NEW_ARCH_ENABLED
8 | #import "RNLinearGradientView.h"
9 | #import "LinearGradientLayer.h"
10 |
11 | #import
12 | #import
13 | #import
14 | #import
15 | #import
16 | #import
17 |
18 | #import "RCTFabricComponentsPlugins.h"
19 |
20 | using namespace facebook::react;
21 |
22 | @interface RNLinearGradientView ()
23 |
24 | @end
25 |
26 | @implementation RNLinearGradientView {
27 | UIView * _view;
28 | LinearGradientLayer * layer;
29 | }
30 |
31 | + (Class)layerClass {
32 | return [LinearGradientLayer class];
33 | }
34 |
35 | + (ComponentDescriptorProvider)componentDescriptorProvider
36 | {
37 | return concreteComponentDescriptorProvider();
38 | }
39 |
40 | - (instancetype)initWithFrame:(CGRect)frame
41 | {
42 | if (self = [super initWithFrame:frame]) {
43 | static const auto defaultProps = std::make_shared();
44 | _props = defaultProps;
45 |
46 | layer = (LinearGradientLayer *)self.layer;
47 | _view = [[UIView alloc] init];
48 |
49 | self.contentView = _view;
50 | }
51 |
52 | return self;
53 | }
54 |
55 | - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
56 | {
57 | const auto &oldViewProps = *std::static_pointer_cast(_props);
58 | const auto &newViewProps = *std::static_pointer_cast(props);
59 |
60 | if(oldViewProps.start.x != newViewProps.start.x || oldViewProps.start.y != newViewProps.start.y) {
61 | layer.startPoint = CGPointMake(newViewProps.start.x, newViewProps.start.y);
62 | }
63 |
64 | if(oldViewProps.end.x != newViewProps.end.x || oldViewProps.end.y != newViewProps.end.y) {
65 | layer.endPoint = CGPointMake(newViewProps.end.x, newViewProps.end.y);
66 | }
67 |
68 |
69 | if(oldViewProps.useAngle != newViewProps.useAngle) {
70 | layer.useAngle = newViewProps.useAngle;
71 | }
72 |
73 | if(oldViewProps.angle != newViewProps.angle) {
74 | layer.angle = CGFloat(newViewProps.angle);
75 | }
76 |
77 | if(oldViewProps.angleCenter.x != newViewProps.angleCenter.x || oldViewProps.angleCenter.y != newViewProps.angleCenter.y) {
78 | layer.angleCenter = CGPointMake(newViewProps.angleCenter.x, newViewProps.angleCenter.y);
79 | }
80 |
81 | NSArray *locations = convertCxxVectorNumberToNsArrayNumber(newViewProps.locations);
82 | layer.locations = locations;
83 |
84 | // We cannot compare SharedColor because it is shared value.
85 | // We could compare color value, but it is more performant to just assign new value
86 | NSArray *colors = convertCxxVectorColorsToNSArrayColors(newViewProps.colors);
87 | [self setColors:colors];
88 |
89 | [super updateProps:props oldProps:oldProps];
90 | }
91 |
92 | - (void)setColors:(NSArray*)colorStrings
93 | {
94 | NSMutableArray *colors = [NSMutableArray arrayWithCapacity:colorStrings.count];
95 | for (NSString *colorString in colorStrings)
96 | {
97 | if ([colorString isKindOfClass:UIColor.class])
98 | {
99 | [colors addObject:(UIColor *)colorString];
100 | }
101 | else
102 | {
103 | [colors addObject:[RCTConvert UIColor:colorString]];
104 | }
105 | }
106 | layer.colors = colors;
107 | }
108 |
109 | static NSArray *convertCxxVectorColorsToNSArrayColors(const std::vector &colors)
110 | {
111 | size_t size = colors.size();
112 | NSLog(@"%zu", size);
113 | NSMutableArray *result = [NSMutableArray new];
114 | for(size_t i = 0; i < size; i++) {
115 | UIColor *color = RCTUIColorFromSharedColor(colors[i]);
116 | [result addObject:color];
117 | }
118 | return [result copy];
119 | }
120 |
121 |
122 | static NSArray *convertCxxVectorNumberToNsArrayNumber(const std::vector &value)
123 | {
124 | size_t size = value.size();
125 | NSMutableArray *result = [NSMutableArray new];
126 | for(size_t i = 0; i < size; i++) {
127 | NSNumber *number = @(value[i]);
128 | [result addObject:number];
129 | }
130 | return [result copy];
131 | }
132 |
133 | Class LinearGradientViewCls(void)
134 | {
135 | return RNLinearGradientView.class;
136 | }
137 |
138 | @end
139 | #endif
140 |
--------------------------------------------------------------------------------
/Example/ios/Example/AppDelegate.mm:
--------------------------------------------------------------------------------
1 | #import "AppDelegate.h"
2 |
3 | #import
4 | #import
5 | #import
6 |
7 | #import
8 |
9 | #if RCT_NEW_ARCH_ENABLED
10 | #import
11 | #import
12 | #import
13 | #import
14 | #import
15 | #import
16 |
17 | #import
18 |
19 | static NSString *const kRNConcurrentRoot = @"concurrentRoot";
20 |
21 | @interface AppDelegate () {
22 | RCTTurboModuleManager *_turboModuleManager;
23 | RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
24 | std::shared_ptr _reactNativeConfig;
25 | facebook::react::ContextContainer::Shared _contextContainer;
26 | }
27 | @end
28 | #endif
29 |
30 | @implementation AppDelegate
31 |
32 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
33 | {
34 | RCTAppSetupPrepareApp(application);
35 |
36 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
37 |
38 | #if RCT_NEW_ARCH_ENABLED
39 | _contextContainer = std::make_shared();
40 | _reactNativeConfig = std::make_shared();
41 | _contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
42 | _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
43 | bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
44 | #endif
45 |
46 | NSDictionary *initProps = [self prepareInitialProps];
47 | UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"Example", initProps);
48 |
49 | if (@available(iOS 13.0, *)) {
50 | rootView.backgroundColor = [UIColor systemBackgroundColor];
51 | } else {
52 | rootView.backgroundColor = [UIColor whiteColor];
53 | }
54 |
55 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
56 | UIViewController *rootViewController = [UIViewController new];
57 | rootViewController.view = rootView;
58 | self.window.rootViewController = rootViewController;
59 | [self.window makeKeyAndVisible];
60 | return YES;
61 | }
62 |
63 | /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
64 | ///
65 | /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
66 | /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
67 | /// @return: `true` if the `concurrentRoot` feture is enabled. Otherwise, it returns `false`.
68 | - (BOOL)concurrentRootEnabled
69 | {
70 | // Switch this bool to turn on and off the concurrent root
71 | return true;
72 | }
73 |
74 | - (NSDictionary *)prepareInitialProps
75 | {
76 | NSMutableDictionary *initProps = [NSMutableDictionary new];
77 |
78 | #ifdef RCT_NEW_ARCH_ENABLED
79 | initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]);
80 | #endif
81 |
82 | return initProps;
83 | }
84 |
85 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
86 | {
87 | #if DEBUG
88 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
89 | #else
90 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
91 | #endif
92 | }
93 |
94 | #if RCT_NEW_ARCH_ENABLED
95 |
96 | #pragma mark - RCTCxxBridgeDelegate
97 |
98 | - (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge
99 | {
100 | _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
101 | delegate:self
102 | jsInvoker:bridge.jsCallInvoker];
103 | return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
104 | }
105 |
106 | #pragma mark RCTTurboModuleManagerDelegate
107 |
108 | - (Class)getModuleClassFromName:(const char *)name
109 | {
110 | return RCTCoreModulesClassProvider(name);
111 | }
112 |
113 | - (std::shared_ptr)getTurboModule:(const std::string &)name
114 | jsInvoker:(std::shared_ptr)jsInvoker
115 | {
116 | return nullptr;
117 | }
118 |
119 | - (std::shared_ptr)getTurboModule:(const std::string &)name
120 | initParams:
121 | (const facebook::react::ObjCTurboModule::InitParams &)params
122 | {
123 | return nullptr;
124 | }
125 |
126 | - (id)getModuleInstanceFromClass:(Class)moduleClass
127 | {
128 | return RCTAppSetupDefaultModuleFromClass(moduleClass);
129 | }
130 |
131 | #endif
132 |
133 | @end
134 |
--------------------------------------------------------------------------------
/Example/android/app/src/main/java/com/example/newarchitecture/MainApplicationReactNativeHost.java:
--------------------------------------------------------------------------------
1 | package com.example.newarchitecture;
2 |
3 | import android.app.Application;
4 | import androidx.annotation.NonNull;
5 | import com.facebook.react.PackageList;
6 | import com.facebook.react.ReactInstanceManager;
7 | import com.facebook.react.ReactNativeHost;
8 | import com.facebook.react.ReactPackage;
9 | import com.facebook.react.ReactPackageTurboModuleManagerDelegate;
10 | import com.facebook.react.bridge.JSIModulePackage;
11 | import com.facebook.react.bridge.JSIModuleProvider;
12 | import com.facebook.react.bridge.JSIModuleSpec;
13 | import com.facebook.react.bridge.JSIModuleType;
14 | import com.facebook.react.bridge.JavaScriptContextHolder;
15 | import com.facebook.react.bridge.ReactApplicationContext;
16 | import com.facebook.react.bridge.UIManager;
17 | import com.facebook.react.fabric.ComponentFactory;
18 | import com.facebook.react.fabric.CoreComponentsRegistry;
19 | import com.facebook.react.fabric.FabricJSIModuleProvider;
20 | import com.facebook.react.fabric.ReactNativeConfig;
21 | import com.facebook.react.uimanager.ViewManagerRegistry;
22 | import com.example.BuildConfig;
23 | import com.example.newarchitecture.components.MainComponentsRegistry;
24 | import com.example.newarchitecture.modules.MainApplicationTurboModuleManagerDelegate;
25 | import java.util.ArrayList;
26 | import java.util.List;
27 |
28 | /**
29 | * A {@link ReactNativeHost} that helps you load everything needed for the New Architecture, both
30 | * TurboModule delegates and the Fabric Renderer.
31 | *
32 | * Please note that this class is used ONLY if you opt-in for the New Architecture (see the
33 | * `newArchEnabled` property). Is ignored otherwise.
34 | */
35 | public class MainApplicationReactNativeHost extends ReactNativeHost {
36 | public MainApplicationReactNativeHost(Application application) {
37 | super(application);
38 | }
39 |
40 | @Override
41 | public boolean getUseDeveloperSupport() {
42 | return BuildConfig.DEBUG;
43 | }
44 |
45 | @Override
46 | protected List getPackages() {
47 | List packages = new PackageList(this).getPackages();
48 | // Packages that cannot be autolinked yet can be added manually here, for example:
49 | // packages.add(new MyReactNativePackage());
50 | // TurboModules must also be loaded here providing a valid TurboReactPackage implementation:
51 | // packages.add(new TurboReactPackage() { ... });
52 | // If you have custom Fabric Components, their ViewManagers should also be loaded here
53 | // inside a ReactPackage.
54 | return packages;
55 | }
56 |
57 | @Override
58 | protected String getJSMainModuleName() {
59 | return "index";
60 | }
61 |
62 | @NonNull
63 | @Override
64 | protected ReactPackageTurboModuleManagerDelegate.Builder
65 | getReactPackageTurboModuleManagerDelegateBuilder() {
66 | // Here we provide the ReactPackageTurboModuleManagerDelegate Builder. This is necessary
67 | // for the new architecture and to use TurboModules correctly.
68 | return new MainApplicationTurboModuleManagerDelegate.Builder();
69 | }
70 |
71 | @Override
72 | protected JSIModulePackage getJSIModulePackage() {
73 | return new JSIModulePackage() {
74 | @Override
75 | public List getJSIModules(
76 | final ReactApplicationContext reactApplicationContext,
77 | final JavaScriptContextHolder jsContext) {
78 | final List specs = new ArrayList<>();
79 |
80 | // Here we provide a new JSIModuleSpec that will be responsible of providing the
81 | // custom Fabric Components.
82 | specs.add(
83 | new JSIModuleSpec() {
84 | @Override
85 | public JSIModuleType getJSIModuleType() {
86 | return JSIModuleType.UIManager;
87 | }
88 |
89 | @Override
90 | public JSIModuleProvider getJSIModuleProvider() {
91 | final ComponentFactory componentFactory = new ComponentFactory();
92 | CoreComponentsRegistry.register(componentFactory);
93 |
94 | // Here we register a Components Registry.
95 | // The one that is generated with the template contains no components
96 | // and just provides you the one from React Native core.
97 | MainComponentsRegistry.register(componentFactory);
98 |
99 | final ReactInstanceManager reactInstanceManager = getReactInstanceManager();
100 |
101 | ViewManagerRegistry viewManagerRegistry =
102 | new ViewManagerRegistry(
103 | reactInstanceManager.getOrCreateViewManagers(reactApplicationContext));
104 |
105 | return new FabricJSIModuleProvider(
106 | reactApplicationContext,
107 | componentFactory,
108 | ReactNativeConfig.DEFAULT_CONFIG,
109 | viewManagerRegistry);
110 | }
111 | });
112 | return specs;
113 | }
114 | };
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # rnx-gradient
2 |
3 | A `` element for React Native above 0.68.
4 |
5 | > **Warning**: This Package is only for New Architecture.
6 |
7 | [![npm version][1]][2]
8 | [![npm downloads][3]][2]
9 |
10 | ## Table of Contents
11 |
12 | - [Installation](#installation)
13 | - [Usage and Examples](#examples)
14 | - [Props](#props)
15 | - [Example App](#an-example-app)
16 | - [Troubleshooting](#troubleshooting)
17 | - [Other Platforms](#other-platforms)
18 |
19 | ## Installation
20 |
21 | Using Yarn
22 |
23 | ```sh
24 | yarn add rnx-gradient
25 | npx pod-install
26 | ```
27 |
28 | Using npm
29 |
30 | ```sh
31 | npm install rnx-gradient --save
32 | npx pod-install
33 | ```
34 |
35 | ## Examples
36 |
37 | [react-native-login](https://github.com/brentvatne/react-native-login) is a
38 | legacy component which showcases the use of ``.
39 |
40 | ### Simple
41 |
42 | The following code will produce something like this:
43 |
44 | 
45 |
46 | ```javascript
47 | import { LinearGradient } from "rnx-gradient";
48 |
49 | // Within your render function
50 |
54 | Sign in with Facebook
55 | ;
56 |
57 | // Later on in your styles..
58 | var styles = StyleSheet.create({
59 | linearGradient: {
60 | flex: 1,
61 | paddingLeft: 15,
62 | paddingRight: 15,
63 | borderRadius: 5,
64 | },
65 | buttonText: {
66 | fontSize: 18,
67 | fontFamily: "Gill Sans",
68 | textAlign: "center",
69 | margin: 10,
70 | color: "#ffffff",
71 | backgroundColor: "transparent",
72 | },
73 | });
74 | ```
75 |
76 | ### Horizontal gradient
77 |
78 | Using the styles from above, set `start` and `end` like this to make the gradient go from left to right, instead of from top to bottom:
79 |
80 | ```javascript
81 |
87 | Sign in with Facebook
88 |
89 | ```
90 |
91 | ### Text gradient (iOS)
92 |
93 | On iOS you can use the `MaskedViewIOS` to display text with a gradient. The trick here is to render the text twice; once for the mask, and once to let the gradient have the correct size (hence the `opacity: 0`):
94 |
95 | ```jsx
96 | }>
97 |
102 |
103 |
104 |
105 | ```
106 |
107 | ### Animated Gradient
108 |
109 | TODO:
110 |
111 | ### Transparent Gradient
112 |
113 | The use of `transparent` color will most likely not lead to the expected result. `transparent` is actually a transparent black color (`rgba(0, 0, 0, 0)`). If you need a gradient in which the color is "fading", you need to have the same color with changing alpha channel. Example:
114 |
115 | ```jsx
116 | // RGBA
117 |
118 |
119 |
120 | // Hex
121 |
122 |
123 | ```
124 |
125 | ## Props
126 |
127 | In addition to regular `View` props, you can also provide additional props to customize your gradient look:
128 |
129 | #### colors
130 |
131 | An array of at least two color values that represent gradient colors. Example: `['red', 'blue']` sets gradient from red to blue.
132 |
133 | #### start
134 |
135 | An optional object of the following type: `{ x: number, y: number }`. Coordinates declare the position that the gradient starts at, as a fraction of the overall size of the gradient, starting from the top left corner. Example: `{ x: 0.1, y: 0.1 }` means that the gradient will start 10% from the top and 10% from the left.
136 |
137 | #### end
138 |
139 | Same as start, but for the end of the gradient.
140 |
141 | #### locations
142 |
143 | An optional array of numbers defining the location of each gradient color stop, mapping to the color with the same index in `colors` prop. Example: `[0.1, 0.75, 1]` means that first color will take 0% - 10%, second color will take 10% - 75% and finally third color will occupy 75% - 100%.
144 |
145 | ```javascript
146 |
153 | Sign in with Facebook
154 |
155 | ```
156 |
157 | 
158 |
159 | #### useAngle / angle / angleCenter
160 |
161 | You may want to achieve an angled gradient effect, similar to those in image editors like Photoshop.
162 | One issue is that you have to calculate the angle based on the view's size, which only happens asynchronously and will cause unwanted flickr.
163 |
164 | In order to do that correctly you can set `{ useAngle: true, angle: 45, angleCenter: { x: 0.5, y: 0.5} }`, to achieve a gradient with a 45 degrees angle, with its center positioned in the view's exact center.
165 |
166 | `useAngle` is used to turn on/off angle based calculation (as opposed to `start`/`end`).
167 | `angle` is the angle in degrees.
168 | `angleCenter` is the center point of the angle (will control the weight and stretch of the gradient like it does in photoshop.
169 |
170 | ## An example app
171 |
172 | You can see this component in action in [brentvatne/react-native-login](https://github.com/brentvatne/react-native-login/blob/master/App/Screens/LoginScreen.js#L58-L62).
173 |
174 | ## Troubleshooting
175 |
176 | TODO:
177 |
178 | ### Invariant Violation: Element type is invalid
179 |
180 | Ensure you import the `LinearGradient` correctly:
181 |
182 | ```javascript
183 | // Like that:
184 | import { LinearGradient } from "rnx-gradient";
185 |
186 | // Not like that:
187 | import LinearGradient from "rnx-gradient";
188 | ```
189 |
190 | ### Other
191 |
192 | Clearing build caches and reinstalling dependencies sometimes solve some issues. Try next steps:
193 |
194 | 1. Reinstalling `node_modules` with `rm -rf node_modules && yarn`
195 | 2. Clearing Android Gradle cache with `(cd android && ./gradlew clean)`
196 | 3. Reinstalling iOS CocoaPods with `(cd ios && rm -rf ./ios/Pods/**) && npx pod-install`
197 | 4. Clearing Xcode Build cache (open Xcode and go to Product -> Clean Build Folder)
198 |
199 | For other troubleshooting issues, go to [React Native Troubleshooting](https://reactnative.dev/docs/troubleshooting.html)
200 |
201 | ## Other platforms
202 |
203 | - Web: [react-native-web-community/react-native-web-linear-gradient](https://github.com/react-native-web-community/react-native-web-linear-gradient)
204 |
205 | ## License
206 |
207 | MIT
208 |
209 | [1]: https://img.shields.io/npm/v/rnx-gradient.svg
210 | [2]: https://www.npmjs.com/package/rnx-gradient
211 | [3]: https://img.shields.io/npm/dm/rnx-gradient.svg
212 |
--------------------------------------------------------------------------------
/gradient-component/ios/RNLinearGradientView/RNLinearGradientView/LinearGradientLayer.mm:
--------------------------------------------------------------------------------
1 | //
2 | // LinearGradientLayer.m
3 | // RNLinearGradientView
4 | //
5 |
6 | #import "LinearGradientLayer.h"
7 |
8 | #include
9 | #import
10 |
11 | @interface LinearGradientLayer()
12 |
13 | @end
14 |
15 | @implementation LinearGradientLayer {
16 |
17 | }
18 |
19 | - (instancetype)init
20 | {
21 | self = [super init];
22 |
23 | if (self)
24 | {
25 | self.needsDisplayOnBoundsChange = YES;
26 | self.masksToBounds = YES;
27 | _startPoint = CGPointMake(0.5, 0.0);
28 | _endPoint = CGPointMake(0.5, 1.0);
29 | _angleCenter = CGPointMake(0.5, 0.5);
30 | _angle = 45.0;
31 | }
32 |
33 | return self;
34 | }
35 |
36 | - (void)setColors:(NSArray *)colors
37 | {
38 | _colors = colors;
39 | [self setNeedsDisplay];
40 | }
41 |
42 | - (void)setLocations:(NSArray *)locations
43 | {
44 | _locations = locations;
45 | [self setNeedsDisplay];
46 | }
47 |
48 | - (void)setStartPoint:(CGPoint)startPoint
49 | {
50 | _startPoint = startPoint;
51 | [self setNeedsDisplay];
52 | }
53 |
54 | - (void)setEndPoint:(CGPoint)endPoint
55 | {
56 | _endPoint = endPoint;
57 | [self setNeedsDisplay];
58 | }
59 |
60 | - (void)display {
61 | [super display];
62 |
63 | BOOL hasAlpha = NO;
64 |
65 | for (NSInteger i = 0; i < self.colors.count; i++) {
66 | hasAlpha = hasAlpha || CGColorGetAlpha(self.colors[i].CGColor) < 1.0;
67 | }
68 |
69 | UIGraphicsBeginImageContextWithOptions(self.bounds.size, !hasAlpha, 0.0);
70 | CGContextRef ref = UIGraphicsGetCurrentContext();
71 | [self drawInContext:ref];
72 |
73 | UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
74 | self.contents = (__bridge id _Nullable)(image.CGImage);
75 | self.contentsScale = image.scale;
76 |
77 | UIGraphicsEndImageContext();
78 | }
79 |
80 | - (void)setUseAngle:(BOOL)useAngle
81 | {
82 | _useAngle = useAngle;
83 | [self setNeedsDisplay];
84 | }
85 |
86 | - (void)setAngleCenter:(CGPoint)angleCenter
87 | {
88 | _angleCenter = angleCenter;
89 | [self setNeedsDisplay];
90 | }
91 |
92 | - (void)setAngle:(CGFloat)angle
93 | {
94 | _angle = angle;
95 | [self setNeedsDisplay];
96 | }
97 |
98 | + (CGPoint) getStartCornerToIntersectFromAngle:(CGFloat)angle AndSize:(CGSize)size
99 | {
100 | float halfHeight = size.height / 2.0;
101 | float halfWidth = size.width / 2.0;
102 | if (angle < 90)
103 | return CGPointMake(-halfWidth, -halfHeight);
104 | else if (angle < 180)
105 | return CGPointMake(halfWidth, -halfHeight);
106 | else if (angle < 270)
107 | return CGPointMake(halfWidth, halfHeight);
108 | else
109 | return CGPointMake(-halfWidth, halfHeight);
110 | }
111 |
112 | + (CGPoint) getHorizontalOrVerticalStartPointFromAngle:(CGFloat)angle AndSize:(CGSize)size
113 | {
114 | float halfWidth = size.width / 2;
115 | float halfHeight = size.height / 2;
116 | if (angle == 0) {
117 | // Horizontal, left-to-right
118 | return CGPointMake(-halfWidth, 0);
119 | } else if (angle == 90) {
120 | // Vertical, bottom-to-top
121 | return CGPointMake(0, -halfHeight);
122 | } else if (angle == 180) {
123 | // Horizontal, right-to-left
124 | return CGPointMake(halfWidth, 0);
125 | } else {
126 | // Vertical, top to bottom
127 | return CGPointMake(0, halfHeight);
128 | }
129 | }
130 |
131 | + (CGPoint) getGradientStartPointFromAngle:(CGFloat)angle AndSize:(CGSize)size
132 | {
133 | // Bound angle to [0, 360)
134 | angle = fmodf(angle, 360);
135 | if (angle < 0)
136 | angle += 360;
137 |
138 | // Explicitly check for horizontal or vertical gradients, as slopes of
139 | // the gradient line or a line perpendicular will be undefined in that case
140 | if (fmodf(angle, 90) == 0)
141 | return [LinearGradientLayer getHorizontalOrVerticalStartPointFromAngle:angle AndSize:size];
142 |
143 | // Get the equivalent slope of the gradient line as tan = opposite/adjacent = y/x
144 | float slope = tan(angle * M_PI / 180.0);
145 |
146 | // Find the start point by computing the intersection of the gradient line
147 | // and a line perpendicular to it that intersects the nearest corner
148 | float perpendicularSlope = -1 / slope;
149 |
150 | // Get the start corner to intersect relative to center, in cartesian space (+y = up)
151 | CGPoint startCorner = [LinearGradientLayer getStartCornerToIntersectFromAngle:angle AndSize:size];
152 |
153 | // Compute b (of y = mx + b) to get the equation for the perpendicular line
154 | float b = startCorner.y - perpendicularSlope * startCorner.x;
155 |
156 | // Solve the intersection of the gradient line and the perpendicular line:
157 | float startX = b / (slope - perpendicularSlope);
158 | float startY = slope * startX;
159 |
160 | return CGPointMake(startX, startY);
161 | }
162 |
163 | - (void)drawInContext:(CGContextRef)ctx
164 | {
165 | [super drawInContext:ctx];
166 |
167 | CGContextSaveGState(ctx);
168 |
169 | CGSize size = self.bounds.size;
170 | if (!self.colors || self.colors.count == 0 || size.width == 0.0 || size.height == 0.0)
171 | return;
172 |
173 |
174 | CGFloat *locations = nil;
175 |
176 | locations = (CGFloat*)malloc(sizeof(CGFloat) * self.colors.count);
177 |
178 | for (NSInteger i = 0; i < self.colors.count; i++)
179 | {
180 | if (self.locations.count > i)
181 | {
182 | locations[i] = self.locations[i].floatValue;
183 | }
184 | else
185 | {
186 | locations[i] = (1.0 / (self.colors.count - 1)) * i;
187 | }
188 | }
189 |
190 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
191 | NSMutableArray *colors = [[NSMutableArray alloc] initWithCapacity:self.colors.count];
192 | for (UIColor *color in self.colors) {
193 | [colors addObject:(id)color.CGColor];
194 | }
195 |
196 | CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (CFArrayRef)colors, locations);
197 |
198 | free(locations);
199 |
200 | CGPoint start, end;
201 |
202 | if (_useAngle)
203 | {
204 | // Angle is in bearing degrees (North = 0, East = 90)
205 | // convert it to cartesian (N = 90, E = 0)
206 | float angle = (90 - _angle);
207 | CGPoint relativeStartPoint = [LinearGradientLayer getGradientStartPointFromAngle:angle AndSize:size];
208 |
209 | // Get true angleCenter
210 | CGPoint angleCenter = CGPointMake(
211 | _angleCenter.x * size.width,
212 | _angleCenter.y * size.height
213 | );
214 | // Translate to center on angle center
215 | // Flip Y coordinate to convert from cartesian
216 | start = CGPointMake(
217 | angleCenter.x + relativeStartPoint.x,
218 | angleCenter.y - relativeStartPoint.y
219 | );
220 | // Reflect across the center to get the end point
221 | end = CGPointMake(
222 | angleCenter.x - relativeStartPoint.x,
223 | angleCenter.y + relativeStartPoint.y
224 | );
225 | }
226 | else
227 | {
228 | start = CGPointMake(self.startPoint.x * size.width, self.startPoint.y * size.height);
229 | end = CGPointMake(self.endPoint.x * size.width, self.endPoint.y * size.height);
230 | }
231 |
232 | CGContextDrawLinearGradient(ctx, gradient,
233 | start,
234 | end,
235 | kCGGradientDrawsBeforeStartLocation | kCGGradientDrawsAfterEndLocation);
236 | CGGradientRelease(gradient);
237 | CGColorSpaceRelease(colorSpace);
238 |
239 | CGContextRestoreGState(ctx);
240 | }
241 |
242 | @end
243 |
--------------------------------------------------------------------------------
/Example/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # Copyright © 2015-2021 the original authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | #
21 | # Gradle start up script for POSIX generated by Gradle.
22 | #
23 | # Important for running:
24 | #
25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26 | # noncompliant, but you have some other compliant shell such as ksh or
27 | # bash, then to run this script, type that shell name before the whole
28 | # command line, like:
29 | #
30 | # ksh Gradle
31 | #
32 | # Busybox and similar reduced shells will NOT work, because this script
33 | # requires all of these POSIX shell features:
34 | # * functions;
35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37 | # * compound commands having a testable exit status, especially «case»;
38 | # * various built-in commands including «command», «set», and «ulimit».
39 | #
40 | # Important for patching:
41 | #
42 | # (2) This script targets any POSIX shell, so it avoids extensions provided
43 | # by Bash, Ksh, etc; in particular arrays are avoided.
44 | #
45 | # The "traditional" practice of packing multiple parameters into a
46 | # space-separated string is a well documented source of bugs and security
47 | # problems, so this is (mostly) avoided, by progressively accumulating
48 | # options in "$@", and eventually passing that to Java.
49 | #
50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52 | # see the in-line comments for details.
53 | #
54 | # There are tweaks for specific operating systems such as AIX, CygWin,
55 | # Darwin, MinGW, and NonStop.
56 | #
57 | # (3) This script is generated from the Groovy template
58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59 | # within the Gradle project.
60 | #
61 | # You can find Gradle at https://github.com/gradle/gradle/.
62 | #
63 | ##############################################################################
64 |
65 | # Attempt to set APP_HOME
66 |
67 | # Resolve links: $0 may be a link
68 | app_path=$0
69 |
70 | # Need this for daisy-chained symlinks.
71 | while
72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73 | [ -h "$app_path" ]
74 | do
75 | ls=$( ls -ld "$app_path" )
76 | link=${ls#*' -> '}
77 | case $link in #(
78 | /*) app_path=$link ;; #(
79 | *) app_path=$APP_HOME$link ;;
80 | esac
81 | done
82 |
83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84 |
85 | APP_NAME="Gradle"
86 | APP_BASE_NAME=${0##*/}
87 |
88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90 |
91 | # Use the maximum available, or set MAX_FD != -1 to use that value.
92 | MAX_FD=maximum
93 |
94 | warn () {
95 | echo "$*"
96 | } >&2
97 |
98 | die () {
99 | echo
100 | echo "$*"
101 | echo
102 | exit 1
103 | } >&2
104 |
105 | # OS specific support (must be 'true' or 'false').
106 | cygwin=false
107 | msys=false
108 | darwin=false
109 | nonstop=false
110 | case "$( uname )" in #(
111 | CYGWIN* ) cygwin=true ;; #(
112 | Darwin* ) darwin=true ;; #(
113 | MSYS* | MINGW* ) msys=true ;; #(
114 | NONSTOP* ) nonstop=true ;;
115 | esac
116 |
117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118 |
119 |
120 | # Determine the Java command to use to start the JVM.
121 | if [ -n "$JAVA_HOME" ] ; then
122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
123 | # IBM's JDK on AIX uses strange locations for the executables
124 | JAVACMD=$JAVA_HOME/jre/sh/java
125 | else
126 | JAVACMD=$JAVA_HOME/bin/java
127 | fi
128 | if [ ! -x "$JAVACMD" ] ; then
129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
130 |
131 | Please set the JAVA_HOME variable in your environment to match the
132 | location of your Java installation."
133 | fi
134 | else
135 | JAVACMD=java
136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137 |
138 | Please set the JAVA_HOME variable in your environment to match the
139 | location of your Java installation."
140 | fi
141 |
142 | # Increase the maximum file descriptors if we can.
143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144 | case $MAX_FD in #(
145 | max*)
146 | MAX_FD=$( ulimit -H -n ) ||
147 | warn "Could not query maximum file descriptor limit"
148 | esac
149 | case $MAX_FD in #(
150 | '' | soft) :;; #(
151 | *)
152 | ulimit -n "$MAX_FD" ||
153 | warn "Could not set maximum file descriptor limit to $MAX_FD"
154 | esac
155 | fi
156 |
157 | # Collect all arguments for the java command, stacking in reverse order:
158 | # * args from the command line
159 | # * the main class name
160 | # * -classpath
161 | # * -D...appname settings
162 | # * --module-path (only if needed)
163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
164 |
165 | # For Cygwin or MSYS, switch paths to Windows format before running java
166 | if "$cygwin" || "$msys" ; then
167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
169 |
170 | JAVACMD=$( cygpath --unix "$JAVACMD" )
171 |
172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
173 | for arg do
174 | if
175 | case $arg in #(
176 | -*) false ;; # don't mess with options #(
177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
178 | [ -e "$t" ] ;; #(
179 | *) false ;;
180 | esac
181 | then
182 | arg=$( cygpath --path --ignore --mixed "$arg" )
183 | fi
184 | # Roll the args list around exactly as many times as the number of
185 | # args, so each arg winds up back in the position where it started, but
186 | # possibly modified.
187 | #
188 | # NB: a `for` loop captures its iteration list before it begins, so
189 | # changing the positional parameters here affects neither the number of
190 | # iterations, nor the values presented in `arg`.
191 | shift # remove old arg
192 | set -- "$@" "$arg" # push replacement arg
193 | done
194 | fi
195 |
196 | # Collect all arguments for the java command;
197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198 | # shell script including quotes and variable substitutions, so put them in
199 | # double quotes to make sure that they get re-expanded; and
200 | # * put everything else in single quotes, so that it's not re-expanded.
201 |
202 | set -- \
203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \
204 | -classpath "$CLASSPATH" \
205 | org.gradle.wrapper.GradleWrapperMain \
206 | "$@"
207 |
208 | # Use "xargs" to parse quoted args.
209 | #
210 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
211 | #
212 | # In Bash we could simply go:
213 | #
214 | # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
215 | # set -- "${ARGS[@]}" "$@"
216 | #
217 | # but POSIX shell has neither arrays nor command substitution, so instead we
218 | # post-process each arg (as a line of input to sed) to backslash-escape any
219 | # character that might be a shell metacharacter, then use eval to reverse
220 | # that process (while maintaining the separation between arguments), and wrap
221 | # the whole thing up as a single "set" statement.
222 | #
223 | # This will of course break if any of these variables contains a newline or
224 | # an unmatched quote.
225 | #
226 |
227 | eval "set -- $(
228 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
229 | xargs -n1 |
230 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
231 | tr '\n' ' '
232 | )" '"$@"'
233 |
234 | exec "$JAVACMD" "$@"
235 |
--------------------------------------------------------------------------------
/gradient-component/android/src/main/java/com/fyndx/LinearGradient/LinearGradientView.java:
--------------------------------------------------------------------------------
1 | package com.fyndx.LinearGradient;
2 |
3 | import com.facebook.react.bridge.ReadableArray;
4 | import com.facebook.react.bridge.ReadableMap;
5 | import com.facebook.react.uimanager.PixelUtil;
6 |
7 | import androidx.annotation.Nullable;
8 | import android.content.Context;
9 | import android.graphics.Canvas;
10 | import android.graphics.LinearGradient;
11 | import android.graphics.Paint;
12 | import android.graphics.Path;
13 | import android.graphics.RectF;
14 | import android.util.AttributeSet;
15 | import android.view.View;
16 |
17 | public class LinearGradientView extends View {
18 | private final Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
19 | private Path mPathForBorderRadius;
20 | private RectF mTempRectForBorderRadius;
21 | private LinearGradient mShader;
22 |
23 | private float[] mLocations;
24 | private float[] mStartPos = {0, 0};
25 | private float[] mEndPos = {0, 1};
26 | private int[] mColors;
27 | private boolean mUseAngle = false;
28 | private float[] mAngleCenter = new float[]{0.5f, 0.5f};
29 | private float mAngle = 45f;
30 | private int[] mSize = {0, 0};
31 | private float[] mBorderRadii = {0, 0, 0, 0, 0, 0, 0, 0};
32 |
33 | public LinearGradientView(Context context) {
34 | super(context);
35 | }
36 |
37 | public LinearGradientView(Context context, @Nullable AttributeSet attrs) {
38 | super(context, attrs);
39 | }
40 |
41 | public LinearGradientView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
42 | super(context, attrs, defStyleAttr);
43 | }
44 |
45 | /**
46 | * Gets the start point assuming the angle is a multiple of 90 degrees
47 | *
48 | * @param angle the gradient line angle, in cartesian degrees
49 | * @param size the size of the element
50 | * @return the start point, relative to the angle center in cartesian
51 | */
52 | static private float[] getHorizontalOrVerticalStartPoint(float angle, int[] size) {
53 | float halfWidth = size[0] / 2f;
54 | float halfHeight = size[1] / 2f;
55 | if (angle == 0f) {
56 | // Horizontal, left-to-right
57 | return new float[]{-halfWidth, 0};
58 | } else if (angle == 90f) {
59 | // Vertical, bottom-to-top
60 | return new float[]{0, -halfHeight};
61 | } else if (angle == 180f) {
62 | // Horizontal, right-to-left
63 | return new float[]{halfWidth, 0};
64 | } else {
65 | // Vertical, top to bottom
66 | return new float[]{0, halfHeight};
67 | }
68 | }
69 |
70 | /**
71 | * Gets the point of the element that a line perpendicular to the gradient line
72 | * intersects first. This will always be a corner.
73 | *
74 | * @param angle the gradient line angle, in cartesian degrees
75 | * @param size the size of the element
76 | * @return the corner X and Y coordinates relative to the element center in cartesian
77 | */
78 | static private float[] getStartCornerToIntersect(float angle, int[] size) {
79 | float halfWidth = size[0] / 2f;
80 | float halfHeight = size[1] / 2f;
81 | if (angle < 90f) {
82 | // Bottom left
83 | return new float[]{-halfWidth, -halfHeight};
84 | } else if (angle < 180f) {
85 | // Bottom right
86 | return new float[]{halfWidth, -halfHeight};
87 | } else if (angle < 270f) {
88 | // Top right
89 | return new float[]{halfWidth, halfHeight};
90 | } else {
91 | // Top left
92 | return new float[]{-halfWidth, halfHeight};
93 | }
94 | }
95 |
96 | /**
97 | * Gets the gradient start point for an angle
98 | *
99 | * @param angle the gradient line angle, in cartesian degrees
100 | * @param size the size of the element
101 | * @return the start point X and Y coordinate, relative to the angle center in cartesian
102 | */
103 | static private float[] getGradientStartPoint(float angle, int[] size) {
104 | // Bound angle to [0, 360)
105 | angle = angle % 360f;
106 | if (angle < 0f) {
107 | angle += 360f;
108 | }
109 |
110 | // Explicitly check for horizontal or vertical gradients, as slopes of
111 | // the gradient line or a line perpendicular will be undefined in that case
112 | if (angle % 90 == 0) {
113 | return getHorizontalOrVerticalStartPoint(angle, size);
114 | }
115 |
116 | // Get the equivalent slope of the gradient line as tan = opposite/adjacent = y/x
117 | float slope = (float) Math.tan(angle * Math.PI / 180.0f);
118 |
119 | // Find the start point by computing the intersection of the gradient line
120 | // and a line perpendicular to it that intersects the nearest corner
121 | float perpendicularScope = -1 / slope;
122 |
123 | // Get the start corner to intersect relative to center, in cartesian space (+y = up)
124 | float [] startCorner = getStartCornerToIntersect(angle, size);
125 |
126 | // Compute b (of y = mx + b) to get the equation for the perpendicular line
127 | float b = startCorner[1] - perpendicularScope * startCorner[0];
128 |
129 | // Solve the intersection of the gradient line and the perpendicular line:
130 | float startX = b / (slope - perpendicularScope);
131 | float startY = slope * startX;
132 |
133 | return new float[]{startX, startY};
134 | }
135 |
136 | public void setColors(ReadableArray colors) {
137 | int[] _colors = new int[colors.size()];
138 | for (int i = 0; i < _colors.length; i++) {
139 | _colors[i] = colors.getInt(i);
140 | }
141 | mColors = _colors;
142 | drawGradient();
143 | }
144 |
145 | public void setLocations(ReadableArray locations) {
146 | float[] _locations = new float[locations.size()];
147 | for(int i = 0; i < _locations.length; i++) {
148 | _locations[i] = (float) locations.getDouble(i);
149 | }
150 | mLocations = _locations;
151 | drawGradient();
152 | }
153 |
154 | public void setStartPosition(ReadableMap startPos) {
155 | mStartPos = new float[] {(float) startPos.getDouble("x"), (float) startPos.getDouble("y")};
156 | drawGradient();
157 | }
158 |
159 | public void setEndPosition(ReadableMap endPos) {
160 | mEndPos = new float[] {(float) endPos.getDouble("x"), (float) endPos.getDouble("y")};
161 | drawGradient();
162 | }
163 |
164 | public void setUseAngle(boolean useAngle) {
165 | mUseAngle = useAngle;
166 | drawGradient();
167 | }
168 |
169 | public void setAngleCenter(ReadableMap angleCenter) {
170 | mAngleCenter = new float[] {(float) angleCenter.getDouble("x"), (float) angleCenter.getDouble("y")};
171 | }
172 |
173 | public void setAngle(float angle) {
174 | mAngle = angle;
175 | drawGradient();
176 | }
177 |
178 | public void setBorderRadii(ReadableArray borderRadii) {
179 | float[] _borderRadii = new float[borderRadii.size()];
180 | for(int i = 0; i < _borderRadii.length; i++) {
181 | _borderRadii[i] = PixelUtil.toPixelFromDIP((float) borderRadii.getDouble(i));
182 | }
183 | mBorderRadii = _borderRadii;
184 | updatePath();
185 | drawGradient();
186 | }
187 |
188 | @Override
189 | protected void onSizeChanged(int w, int h, int oldw, int oldh) {
190 | mSize = new int[] {w, h};
191 | updatePath();
192 | drawGradient();
193 | }
194 |
195 | private void drawGradient() {
196 | // guard against crashes happening while multiple properties are updated
197 | if(mColors == null || (mLocations != null && mColors.length != mLocations.length))
198 | return;
199 |
200 | float[] startPos;
201 | float[] endPos;
202 |
203 | if(mUseAngle && mAngleCenter != null) {
204 | // Angle is in bearing degrees (North = 0, East = 90)
205 | // convert it to cartesian (N = 90, E = 0)
206 | float angle = (90 - mAngle);
207 | float[] relativeStartPoint = getGradientStartPoint(angle, mSize);
208 |
209 | // Get true angleCenter
210 | float[] angleCenter = new float[] {
211 | mAngleCenter[0] + mSize[0],
212 | mAngleCenter[1] + mSize[1]
213 | };
214 |
215 | // Translate to center on angle center
216 | // Flip Y coordinate to convert from cartesian
217 | startPos = new float[]{
218 | angleCenter[0] + relativeStartPoint[0],
219 | angleCenter[1] - relativeStartPoint[1]
220 | };
221 | // Reflect across the center to get the end point
222 | endPos = new float[]{
223 | angleCenter[0] - relativeStartPoint[0],
224 | angleCenter[1] + relativeStartPoint[1]
225 | };
226 | } else {
227 | startPos = new float[] {mStartPos[0] * mSize[0], mStartPos[1] * mSize[1]};
228 | endPos = new float[] {mEndPos[0] * mSize[0], mEndPos[1] * mSize[1]};
229 | }
230 |
231 | mShader = new LinearGradient(startPos[0], startPos[1], endPos[0], endPos[1], mColors, mLocations, LinearGradient.TileMode.CLAMP);
232 | mPaint.setShader(mShader);
233 | invalidate();
234 | }
235 |
236 | private void updatePath() {
237 | if (mPathForBorderRadius == null) {
238 | mPathForBorderRadius = new Path();
239 | mTempRectForBorderRadius = new RectF();
240 | }
241 | mPathForBorderRadius.reset();
242 | mTempRectForBorderRadius.set(0f, 0f, (float) mSize[0], (float) mSize[1]);
243 | mPathForBorderRadius.addRoundRect(mTempRectForBorderRadius, mBorderRadii, Path.Direction.CW);
244 | }
245 |
246 | @Override
247 | protected void onDraw(Canvas canvas) {
248 | super.onDraw(canvas);
249 | if(mPathForBorderRadius == null) {
250 | canvas.drawPaint(mPaint);
251 | } else {
252 | canvas.drawPath(mPathForBorderRadius, mPaint);
253 | }
254 | }
255 | }
--------------------------------------------------------------------------------
/gradient-component/ios/RNLinearGradientView/RNLinearGradientView.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 55;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 376121F1284B253000C3400F /* RNLinearGradientViewManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 376121F0284B253000C3400F /* RNLinearGradientViewManager.mm */; };
11 | 376121FA284B355A00C3400F /* RNLinearGradientView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 376121F9284B355A00C3400F /* RNLinearGradientView.mm */; };
12 | 378C76EC284B888600ED7209 /* LinearGradientLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 378C76EB284B888600ED7209 /* LinearGradientLayer.mm */; };
13 | /* End PBXBuildFile section */
14 |
15 | /* Begin PBXCopyFilesBuildPhase section */
16 | 376121EA284B253000C3400F /* CopyFiles */ = {
17 | isa = PBXCopyFilesBuildPhase;
18 | buildActionMask = 2147483647;
19 | dstPath = "include/$(PRODUCT_NAME)";
20 | dstSubfolderSpec = 16;
21 | files = (
22 | );
23 | runOnlyForDeploymentPostprocessing = 0;
24 | };
25 | /* End PBXCopyFilesBuildPhase section */
26 |
27 | /* Begin PBXFileReference section */
28 | 376121EC284B253000C3400F /* libRNLinearGradientView.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNLinearGradientView.a; sourceTree = BUILT_PRODUCTS_DIR; };
29 | 376121F0284B253000C3400F /* RNLinearGradientViewManager.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RNLinearGradientViewManager.mm; sourceTree = ""; };
30 | 376121F8284B33D500C3400F /* RNLinearGradientView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNLinearGradientView.h; sourceTree = ""; };
31 | 376121F9284B355A00C3400F /* RNLinearGradientView.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RNLinearGradientView.mm; sourceTree = ""; };
32 | 378C76EA284B885C00ED7209 /* LinearGradientLayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LinearGradientLayer.h; sourceTree = ""; };
33 | 378C76EB284B888600ED7209 /* LinearGradientLayer.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = LinearGradientLayer.mm; sourceTree = ""; };
34 | /* End PBXFileReference section */
35 |
36 | /* Begin PBXFrameworksBuildPhase section */
37 | 376121E9284B253000C3400F /* Frameworks */ = {
38 | isa = PBXFrameworksBuildPhase;
39 | buildActionMask = 2147483647;
40 | files = (
41 | );
42 | runOnlyForDeploymentPostprocessing = 0;
43 | };
44 | /* End PBXFrameworksBuildPhase section */
45 |
46 | /* Begin PBXGroup section */
47 | 376121E3284B253000C3400F = {
48 | isa = PBXGroup;
49 | children = (
50 | 376121EE284B253000C3400F /* RNLinearGradientView */,
51 | 376121ED284B253000C3400F /* Products */,
52 | );
53 | sourceTree = "";
54 | };
55 | 376121ED284B253000C3400F /* Products */ = {
56 | isa = PBXGroup;
57 | children = (
58 | 376121EC284B253000C3400F /* libRNLinearGradientView.a */,
59 | );
60 | name = Products;
61 | sourceTree = "";
62 | };
63 | 376121EE284B253000C3400F /* RNLinearGradientView */ = {
64 | isa = PBXGroup;
65 | children = (
66 | 376121F0284B253000C3400F /* RNLinearGradientViewManager.mm */,
67 | 376121F8284B33D500C3400F /* RNLinearGradientView.h */,
68 | 376121F9284B355A00C3400F /* RNLinearGradientView.mm */,
69 | 378C76EA284B885C00ED7209 /* LinearGradientLayer.h */,
70 | 378C76EB284B888600ED7209 /* LinearGradientLayer.mm */,
71 | );
72 | path = RNLinearGradientView;
73 | sourceTree = "";
74 | };
75 | /* End PBXGroup section */
76 |
77 | /* Begin PBXNativeTarget section */
78 | 376121EB284B253000C3400F /* RNLinearGradientView */ = {
79 | isa = PBXNativeTarget;
80 | buildConfigurationList = 376121F5284B253000C3400F /* Build configuration list for PBXNativeTarget "RNLinearGradientView" */;
81 | buildPhases = (
82 | 376121E8284B253000C3400F /* Sources */,
83 | 376121E9284B253000C3400F /* Frameworks */,
84 | 376121EA284B253000C3400F /* CopyFiles */,
85 | );
86 | buildRules = (
87 | );
88 | dependencies = (
89 | );
90 | name = RNLinearGradientView;
91 | productName = RNLinearGradientView;
92 | productReference = 376121EC284B253000C3400F /* libRNLinearGradientView.a */;
93 | productType = "com.apple.product-type.library.static";
94 | };
95 | /* End PBXNativeTarget section */
96 |
97 | /* Begin PBXProject section */
98 | 376121E4284B253000C3400F /* Project object */ = {
99 | isa = PBXProject;
100 | attributes = {
101 | BuildIndependentTargetsInParallel = 1;
102 | LastUpgradeCheck = 1340;
103 | TargetAttributes = {
104 | 376121EB284B253000C3400F = {
105 | CreatedOnToolsVersion = 13.4;
106 | };
107 | };
108 | };
109 | buildConfigurationList = 376121E7284B253000C3400F /* Build configuration list for PBXProject "RNLinearGradientView" */;
110 | compatibilityVersion = "Xcode 13.0";
111 | developmentRegion = en;
112 | hasScannedForEncodings = 0;
113 | knownRegions = (
114 | en,
115 | Base,
116 | );
117 | mainGroup = 376121E3284B253000C3400F;
118 | productRefGroup = 376121ED284B253000C3400F /* Products */;
119 | projectDirPath = "";
120 | projectRoot = "";
121 | targets = (
122 | 376121EB284B253000C3400F /* RNLinearGradientView */,
123 | );
124 | };
125 | /* End PBXProject section */
126 |
127 | /* Begin PBXSourcesBuildPhase section */
128 | 376121E8284B253000C3400F /* Sources */ = {
129 | isa = PBXSourcesBuildPhase;
130 | buildActionMask = 2147483647;
131 | files = (
132 | 376121F1284B253000C3400F /* RNLinearGradientViewManager.mm in Sources */,
133 | 378C76EC284B888600ED7209 /* LinearGradientLayer.mm in Sources */,
134 | 376121FA284B355A00C3400F /* RNLinearGradientView.mm in Sources */,
135 | );
136 | runOnlyForDeploymentPostprocessing = 0;
137 | };
138 | /* End PBXSourcesBuildPhase section */
139 |
140 | /* Begin XCBuildConfiguration section */
141 | 376121F3284B253000C3400F /* Debug */ = {
142 | isa = XCBuildConfiguration;
143 | buildSettings = {
144 | ALWAYS_SEARCH_USER_PATHS = NO;
145 | CLANG_ANALYZER_NONNULL = YES;
146 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
147 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
148 | CLANG_ENABLE_MODULES = YES;
149 | CLANG_ENABLE_OBJC_ARC = YES;
150 | CLANG_ENABLE_OBJC_WEAK = YES;
151 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
152 | CLANG_WARN_BOOL_CONVERSION = YES;
153 | CLANG_WARN_COMMA = YES;
154 | CLANG_WARN_CONSTANT_CONVERSION = YES;
155 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
156 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
157 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
158 | CLANG_WARN_EMPTY_BODY = YES;
159 | CLANG_WARN_ENUM_CONVERSION = YES;
160 | CLANG_WARN_INFINITE_RECURSION = YES;
161 | CLANG_WARN_INT_CONVERSION = YES;
162 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
163 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
164 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
165 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
166 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
167 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
168 | CLANG_WARN_STRICT_PROTOTYPES = YES;
169 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
170 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
171 | CLANG_WARN_UNREACHABLE_CODE = YES;
172 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
173 | COPY_PHASE_STRIP = NO;
174 | DEBUG_INFORMATION_FORMAT = dwarf;
175 | ENABLE_STRICT_OBJC_MSGSEND = YES;
176 | ENABLE_TESTABILITY = YES;
177 | GCC_C_LANGUAGE_STANDARD = gnu11;
178 | GCC_DYNAMIC_NO_PIC = NO;
179 | GCC_NO_COMMON_BLOCKS = YES;
180 | GCC_OPTIMIZATION_LEVEL = 0;
181 | GCC_PREPROCESSOR_DEFINITIONS = (
182 | "DEBUG=1",
183 | "$(inherited)",
184 | );
185 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
186 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
187 | GCC_WARN_UNDECLARED_SELECTOR = YES;
188 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
189 | GCC_WARN_UNUSED_FUNCTION = YES;
190 | GCC_WARN_UNUSED_VARIABLE = YES;
191 | IPHONEOS_DEPLOYMENT_TARGET = 15.5;
192 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
193 | MTL_FAST_MATH = YES;
194 | ONLY_ACTIVE_ARCH = YES;
195 | SDKROOT = iphoneos;
196 | };
197 | name = Debug;
198 | };
199 | 376121F4284B253000C3400F /* Release */ = {
200 | isa = XCBuildConfiguration;
201 | buildSettings = {
202 | ALWAYS_SEARCH_USER_PATHS = NO;
203 | CLANG_ANALYZER_NONNULL = YES;
204 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
205 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
206 | CLANG_ENABLE_MODULES = YES;
207 | CLANG_ENABLE_OBJC_ARC = YES;
208 | CLANG_ENABLE_OBJC_WEAK = YES;
209 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
210 | CLANG_WARN_BOOL_CONVERSION = YES;
211 | CLANG_WARN_COMMA = YES;
212 | CLANG_WARN_CONSTANT_CONVERSION = YES;
213 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
214 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
215 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
216 | CLANG_WARN_EMPTY_BODY = YES;
217 | CLANG_WARN_ENUM_CONVERSION = YES;
218 | CLANG_WARN_INFINITE_RECURSION = YES;
219 | CLANG_WARN_INT_CONVERSION = YES;
220 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
221 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
222 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
223 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
224 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
225 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
226 | CLANG_WARN_STRICT_PROTOTYPES = YES;
227 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
228 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
229 | CLANG_WARN_UNREACHABLE_CODE = YES;
230 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
231 | COPY_PHASE_STRIP = NO;
232 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
233 | ENABLE_NS_ASSERTIONS = NO;
234 | ENABLE_STRICT_OBJC_MSGSEND = YES;
235 | GCC_C_LANGUAGE_STANDARD = gnu11;
236 | GCC_NO_COMMON_BLOCKS = YES;
237 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
238 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
239 | GCC_WARN_UNDECLARED_SELECTOR = YES;
240 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
241 | GCC_WARN_UNUSED_FUNCTION = YES;
242 | GCC_WARN_UNUSED_VARIABLE = YES;
243 | IPHONEOS_DEPLOYMENT_TARGET = 15.5;
244 | MTL_ENABLE_DEBUG_INFO = NO;
245 | MTL_FAST_MATH = YES;
246 | SDKROOT = iphoneos;
247 | VALIDATE_PRODUCT = YES;
248 | };
249 | name = Release;
250 | };
251 | 376121F6284B253000C3400F /* Debug */ = {
252 | isa = XCBuildConfiguration;
253 | buildSettings = {
254 | CODE_SIGN_STYLE = Automatic;
255 | OTHER_LDFLAGS = "-ObjC";
256 | PRODUCT_NAME = "$(TARGET_NAME)";
257 | SKIP_INSTALL = YES;
258 | TARGETED_DEVICE_FAMILY = "1,2";
259 | };
260 | name = Debug;
261 | };
262 | 376121F7284B253000C3400F /* Release */ = {
263 | isa = XCBuildConfiguration;
264 | buildSettings = {
265 | CODE_SIGN_STYLE = Automatic;
266 | OTHER_LDFLAGS = "-ObjC";
267 | PRODUCT_NAME = "$(TARGET_NAME)";
268 | SKIP_INSTALL = YES;
269 | TARGETED_DEVICE_FAMILY = "1,2";
270 | };
271 | name = Release;
272 | };
273 | /* End XCBuildConfiguration section */
274 |
275 | /* Begin XCConfigurationList section */
276 | 376121E7284B253000C3400F /* Build configuration list for PBXProject "RNLinearGradientView" */ = {
277 | isa = XCConfigurationList;
278 | buildConfigurations = (
279 | 376121F3284B253000C3400F /* Debug */,
280 | 376121F4284B253000C3400F /* Release */,
281 | );
282 | defaultConfigurationIsVisible = 0;
283 | defaultConfigurationName = Release;
284 | };
285 | 376121F5284B253000C3400F /* Build configuration list for PBXNativeTarget "RNLinearGradientView" */ = {
286 | isa = XCConfigurationList;
287 | buildConfigurations = (
288 | 376121F6284B253000C3400F /* Debug */,
289 | 376121F7284B253000C3400F /* Release */,
290 | );
291 | defaultConfigurationIsVisible = 0;
292 | defaultConfigurationName = Release;
293 | };
294 | /* End XCConfigurationList section */
295 | };
296 | rootObject = 376121E4284B253000C3400F /* Project object */;
297 | }
298 |
--------------------------------------------------------------------------------
/Example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 |
3 | import com.android.build.OutputFile
4 |
5 | /**
6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7 | * and bundleReleaseJsAndAssets).
8 | * These basically call `react-native bundle` with the correct arguments during the Android build
9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10 | * bundle directly from the development server. Below you can see all the possible configurations
11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the
12 | * `apply from: "../../node_modules/react-native/react.gradle"` line.
13 | *
14 | * project.ext.react = [
15 | * // the name of the generated asset file containing your JS bundle
16 | * bundleAssetName: "index.android.bundle",
17 | *
18 | * // the entry file for bundle generation. If none specified and
19 | * // "index.android.js" exists, it will be used. Otherwise "index.js" is
20 | * // default. Can be overridden with ENTRY_FILE environment variable.
21 | * entryFile: "index.android.js",
22 | *
23 | * // https://reactnative.dev/docs/performance#enable-the-ram-format
24 | * bundleCommand: "ram-bundle",
25 | *
26 | * // whether to bundle JS and assets in debug mode
27 | * bundleInDebug: false,
28 | *
29 | * // whether to bundle JS and assets in release mode
30 | * bundleInRelease: true,
31 | *
32 | * // whether to bundle JS and assets in another build variant (if configured).
33 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
34 | * // The configuration property can be in the following formats
35 | * // 'bundleIn${productFlavor}${buildType}'
36 | * // 'bundleIn${buildType}'
37 | * // bundleInFreeDebug: true,
38 | * // bundleInPaidRelease: true,
39 | * // bundleInBeta: true,
40 | *
41 | * // whether to disable dev mode in custom build variants (by default only disabled in release)
42 | * // for example: to disable dev mode in the staging build type (if configured)
43 | * devDisabledInStaging: true,
44 | * // The configuration property can be in the following formats
45 | * // 'devDisabledIn${productFlavor}${buildType}'
46 | * // 'devDisabledIn${buildType}'
47 | *
48 | * // the root of your project, i.e. where "package.json" lives
49 | * root: "../../",
50 | *
51 | * // where to put the JS bundle asset in debug mode
52 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
53 | *
54 | * // where to put the JS bundle asset in release mode
55 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
56 | *
57 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
58 | * // require('./image.png')), in debug mode
59 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
60 | *
61 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
62 | * // require('./image.png')), in release mode
63 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
64 | *
65 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
66 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
67 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
68 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
69 | * // for example, you might want to remove it from here.
70 | * inputExcludes: ["android/**", "ios/**"],
71 | *
72 | * // override which node gets called and with what additional arguments
73 | * nodeExecutableAndArgs: ["node"],
74 | *
75 | * // supply additional arguments to the packager
76 | * extraPackagerArgs: []
77 | * ]
78 | */
79 |
80 | project.ext.react = [
81 | enableHermes: true, // clean and rebuild if changing
82 | ]
83 |
84 | apply from: "../../node_modules/react-native/react.gradle"
85 |
86 | /**
87 | * Set this to true to create two separate APKs instead of one:
88 | * - An APK that only works on ARM devices
89 | * - An APK that only works on x86 devices
90 | * The advantage is the size of the APK is reduced by about 4MB.
91 | * Upload all the APKs to the Play Store and people will download
92 | * the correct one based on the CPU architecture of their device.
93 | */
94 | def enableSeparateBuildPerCPUArchitecture = false
95 |
96 | /**
97 | * Run Proguard to shrink the Java bytecode in release builds.
98 | */
99 | def enableProguardInReleaseBuilds = false
100 |
101 | /**
102 | * The preferred build flavor of JavaScriptCore.
103 | *
104 | * For example, to use the international variant, you can use:
105 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
106 | *
107 | * The international variant includes ICU i18n library and necessary data
108 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
109 | * give correct results when using with locales other than en-US. Note that
110 | * this variant is about 6MiB larger per architecture than default.
111 | */
112 | def jscFlavor = 'org.webkit:android-jsc:+'
113 |
114 | /**
115 | * Whether to enable the Hermes VM.
116 | *
117 | * This should be set on project.ext.react and that value will be read here. If it is not set
118 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
119 | * and the benefits of using Hermes will therefore be sharply reduced.
120 | */
121 | def enableHermes = project.ext.react.get("enableHermes", false);
122 |
123 | /**
124 | * Architectures to build native code for.
125 | */
126 | def reactNativeArchitectures() {
127 | def value = project.getProperties().get("reactNativeArchitectures")
128 | return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
129 | }
130 |
131 | android {
132 | ndkVersion rootProject.ext.ndkVersion
133 |
134 | compileSdkVersion rootProject.ext.compileSdkVersion
135 |
136 | defaultConfig {
137 | applicationId "com.example"
138 | minSdkVersion rootProject.ext.minSdkVersion
139 | targetSdkVersion rootProject.ext.targetSdkVersion
140 | versionCode 1
141 | versionName "1.0"
142 | buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
143 |
144 | if (isNewArchitectureEnabled()) {
145 | // We configure the NDK build only if you decide to opt-in for the New Architecture.
146 | externalNativeBuild {
147 | ndkBuild {
148 | arguments "APP_PLATFORM=android-21",
149 | "APP_STL=c++_shared",
150 | "NDK_TOOLCHAIN_VERSION=clang",
151 | "GENERATED_SRC_DIR=$buildDir/generated/source",
152 | "PROJECT_BUILD_DIR=$buildDir",
153 | "REACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
154 | "REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
155 | "NODE_MODULES_DIR=$rootDir/../node_modules"
156 | cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
157 | cppFlags "-std=c++17"
158 | // Make sure this target name is the same you specify inside the
159 | // src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
160 | targets "example_appmodules"
161 | }
162 | }
163 | if (!enableSeparateBuildPerCPUArchitecture) {
164 | ndk {
165 | abiFilters (*reactNativeArchitectures())
166 | }
167 | }
168 | }
169 | }
170 |
171 | if (isNewArchitectureEnabled()) {
172 | // We configure the NDK build only if you decide to opt-in for the New Architecture.
173 | externalNativeBuild {
174 | ndkBuild {
175 | path "$projectDir/src/main/jni/Android.mk"
176 | }
177 | }
178 | def reactAndroidProjectDir = project(':ReactAndroid').projectDir
179 | def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
180 | dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
181 | from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
182 | into("$buildDir/react-ndk/exported")
183 | }
184 | def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
185 | dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
186 | from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
187 | into("$buildDir/react-ndk/exported")
188 | }
189 | afterEvaluate {
190 | // If you wish to add a custom TurboModule or component locally,
191 | // you should uncomment this line.
192 | // preBuild.dependsOn("generateCodegenArtifactsFromSchema")
193 | preDebugBuild.dependsOn(packageReactNdkDebugLibs)
194 | preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)
195 |
196 | // Due to a bug inside AGP, we have to explicitly set a dependency
197 | // between configureNdkBuild* tasks and the preBuild tasks.
198 | // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
199 | configureNdkBuildRelease.dependsOn(preReleaseBuild)
200 | configureNdkBuildDebug.dependsOn(preDebugBuild)
201 | reactNativeArchitectures().each { architecture ->
202 | tasks.findByName("configureNdkBuildDebug[${architecture}]")?.configure {
203 | dependsOn("preDebugBuild")
204 | }
205 | tasks.findByName("configureNdkBuildRelease[${architecture}]")?.configure {
206 | dependsOn("preReleaseBuild")
207 | }
208 | }
209 | }
210 | }
211 |
212 | splits {
213 | abi {
214 | reset()
215 | enable enableSeparateBuildPerCPUArchitecture
216 | universalApk false // If true, also generate a universal APK
217 | include (*reactNativeArchitectures())
218 | }
219 | }
220 | signingConfigs {
221 | debug {
222 | storeFile file('debug.keystore')
223 | storePassword 'android'
224 | keyAlias 'androiddebugkey'
225 | keyPassword 'android'
226 | }
227 | }
228 | buildTypes {
229 | debug {
230 | signingConfig signingConfigs.debug
231 | }
232 | release {
233 | // Caution! In production, you need to generate your own keystore file.
234 | // see https://reactnative.dev/docs/signed-apk-android.
235 | signingConfig signingConfigs.debug
236 | minifyEnabled enableProguardInReleaseBuilds
237 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
238 | }
239 | }
240 |
241 | // applicationVariants are e.g. debug, release
242 | applicationVariants.all { variant ->
243 | variant.outputs.each { output ->
244 | // For each separate APK per architecture, set a unique version code as described here:
245 | // https://developer.android.com/studio/build/configure-apk-splits.html
246 | // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
247 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
248 | def abi = output.getFilter(OutputFile.ABI)
249 | if (abi != null) { // null for the universal-debug, universal-release variants
250 | output.versionCodeOverride =
251 | defaultConfig.versionCode * 1000 + versionCodes.get(abi)
252 | }
253 |
254 | }
255 | }
256 | }
257 |
258 | dependencies {
259 | implementation fileTree(dir: "libs", include: ["*.jar"])
260 |
261 | //noinspection GradleDynamicVersion
262 | implementation "com.facebook.react:react-native:+" // From node_modules
263 |
264 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
265 |
266 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
267 | exclude group:'com.facebook.fbjni'
268 | }
269 |
270 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
271 | exclude group:'com.facebook.flipper'
272 | exclude group:'com.squareup.okhttp3', module:'okhttp'
273 | }
274 |
275 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
276 | exclude group:'com.facebook.flipper'
277 | }
278 |
279 | if (enableHermes) {
280 | //noinspection GradleDynamicVersion
281 | implementation("com.facebook.react:hermes-engine:+") { // From node_modules
282 | exclude group:'com.facebook.fbjni'
283 | }
284 | } else {
285 | implementation jscFlavor
286 | }
287 | }
288 |
289 | if (isNewArchitectureEnabled()) {
290 | // If new architecture is enabled, we let you build RN from source
291 | // Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
292 | // This will be applied to all the imported transtitive dependency.
293 | configurations.all {
294 | resolutionStrategy.dependencySubstitution {
295 | substitute(module("com.facebook.react:react-native"))
296 | .using(project(":ReactAndroid"))
297 | .because("On New Architecture we're building React Native from source")
298 | substitute(module("com.facebook.react:hermes-engine"))
299 | .using(project(":ReactAndroid:hermes-engine"))
300 | .because("On New Architecture we're building Hermes from source")
301 | }
302 | }
303 | }
304 |
305 | // Run this once to be able to run the application with BUCK
306 | // puts all compile dependencies into folder libs for BUCK to use
307 | task copyDownloadableDepsToLibs(type: Copy) {
308 | from configurations.implementation
309 | into 'libs'
310 | }
311 |
312 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
313 |
314 | def isNewArchitectureEnabled() {
315 | // To opt-in for the New Architecture, you can either:
316 | // - Set `newArchEnabled` to true inside the `gradle.properties` file
317 | // - Invoke gradle with `-newArchEnabled=true`
318 | // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
319 | return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
320 | }
321 |
--------------------------------------------------------------------------------
/gradient-component/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | "@ampproject/remapping@^2.1.0":
6 | version "2.2.0"
7 | resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d"
8 | integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==
9 | dependencies:
10 | "@jridgewell/gen-mapping" "^0.1.0"
11 | "@jridgewell/trace-mapping" "^0.3.9"
12 |
13 | "@babel/code-frame@^7.16.7":
14 | version "7.16.7"
15 | resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789"
16 | integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==
17 | dependencies:
18 | "@babel/highlight" "^7.16.7"
19 |
20 | "@babel/compat-data@^7.17.10":
21 | version "7.17.10"
22 | resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.10.tgz#711dc726a492dfc8be8220028b1b92482362baab"
23 | integrity sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw==
24 |
25 | "@babel/core@^7.18.2":
26 | version "7.18.2"
27 | resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.2.tgz#87b2fcd7cce9becaa7f5acebdc4f09f3dd19d876"
28 | integrity sha512-A8pri1YJiC5UnkdrWcmfZTJTV85b4UXTAfImGmCfYmax4TR9Cw8sDS0MOk++Gp2mE/BefVJ5nwy5yzqNJbP/DQ==
29 | dependencies:
30 | "@ampproject/remapping" "^2.1.0"
31 | "@babel/code-frame" "^7.16.7"
32 | "@babel/generator" "^7.18.2"
33 | "@babel/helper-compilation-targets" "^7.18.2"
34 | "@babel/helper-module-transforms" "^7.18.0"
35 | "@babel/helpers" "^7.18.2"
36 | "@babel/parser" "^7.18.0"
37 | "@babel/template" "^7.16.7"
38 | "@babel/traverse" "^7.18.2"
39 | "@babel/types" "^7.18.2"
40 | convert-source-map "^1.7.0"
41 | debug "^4.1.0"
42 | gensync "^1.0.0-beta.2"
43 | json5 "^2.2.1"
44 | semver "^6.3.0"
45 |
46 | "@babel/generator@^7.18.2":
47 | version "7.18.2"
48 | resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.2.tgz#33873d6f89b21efe2da63fe554460f3df1c5880d"
49 | integrity sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==
50 | dependencies:
51 | "@babel/types" "^7.18.2"
52 | "@jridgewell/gen-mapping" "^0.3.0"
53 | jsesc "^2.5.1"
54 |
55 | "@babel/helper-compilation-targets@^7.18.2":
56 | version "7.18.2"
57 | resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.2.tgz#67a85a10cbd5fc7f1457fec2e7f45441dc6c754b"
58 | integrity sha512-s1jnPotJS9uQnzFtiZVBUxe67CuBa679oWFHpxYYnTpRL/1ffhyX44R9uYiXoa/pLXcY9H2moJta0iaanlk/rQ==
59 | dependencies:
60 | "@babel/compat-data" "^7.17.10"
61 | "@babel/helper-validator-option" "^7.16.7"
62 | browserslist "^4.20.2"
63 | semver "^6.3.0"
64 |
65 | "@babel/helper-environment-visitor@^7.16.7", "@babel/helper-environment-visitor@^7.18.2":
66 | version "7.18.2"
67 | resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz#8a6d2dedb53f6bf248e31b4baf38739ee4a637bd"
68 | integrity sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ==
69 |
70 | "@babel/helper-function-name@^7.17.9":
71 | version "7.17.9"
72 | resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12"
73 | integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==
74 | dependencies:
75 | "@babel/template" "^7.16.7"
76 | "@babel/types" "^7.17.0"
77 |
78 | "@babel/helper-hoist-variables@^7.16.7":
79 | version "7.16.7"
80 | resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz#86bcb19a77a509c7b77d0e22323ef588fa58c246"
81 | integrity sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==
82 | dependencies:
83 | "@babel/types" "^7.16.7"
84 |
85 | "@babel/helper-module-imports@^7.16.7":
86 | version "7.16.7"
87 | resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz#25612a8091a999704461c8a222d0efec5d091437"
88 | integrity sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==
89 | dependencies:
90 | "@babel/types" "^7.16.7"
91 |
92 | "@babel/helper-module-transforms@^7.18.0":
93 | version "7.18.0"
94 | resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.0.tgz#baf05dec7a5875fb9235bd34ca18bad4e21221cd"
95 | integrity sha512-kclUYSUBIjlvnzN2++K9f2qzYKFgjmnmjwL4zlmU5f8ZtzgWe8s0rUPSTGy2HmK4P8T52MQsS+HTQAgZd3dMEA==
96 | dependencies:
97 | "@babel/helper-environment-visitor" "^7.16.7"
98 | "@babel/helper-module-imports" "^7.16.7"
99 | "@babel/helper-simple-access" "^7.17.7"
100 | "@babel/helper-split-export-declaration" "^7.16.7"
101 | "@babel/helper-validator-identifier" "^7.16.7"
102 | "@babel/template" "^7.16.7"
103 | "@babel/traverse" "^7.18.0"
104 | "@babel/types" "^7.18.0"
105 |
106 | "@babel/helper-simple-access@^7.17.7":
107 | version "7.18.2"
108 | resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.2.tgz#4dc473c2169ac3a1c9f4a51cfcd091d1c36fcff9"
109 | integrity sha512-7LIrjYzndorDY88MycupkpQLKS1AFfsVRm2k/9PtKScSy5tZq0McZTj+DiMRynboZfIqOKvo03pmhTaUgiD6fQ==
110 | dependencies:
111 | "@babel/types" "^7.18.2"
112 |
113 | "@babel/helper-split-export-declaration@^7.16.7":
114 | version "7.16.7"
115 | resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz#0b648c0c42da9d3920d85ad585f2778620b8726b"
116 | integrity sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==
117 | dependencies:
118 | "@babel/types" "^7.16.7"
119 |
120 | "@babel/helper-validator-identifier@^7.16.7":
121 | version "7.16.7"
122 | resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad"
123 | integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==
124 |
125 | "@babel/helper-validator-option@^7.16.7":
126 | version "7.16.7"
127 | resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23"
128 | integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==
129 |
130 | "@babel/helpers@^7.18.2":
131 | version "7.18.2"
132 | resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.2.tgz#970d74f0deadc3f5a938bfa250738eb4ac889384"
133 | integrity sha512-j+d+u5xT5utcQSzrh9p+PaJX94h++KN+ng9b9WEJq7pkUPAd61FGqhjuUEdfknb3E/uDBb7ruwEeKkIxNJPIrg==
134 | dependencies:
135 | "@babel/template" "^7.16.7"
136 | "@babel/traverse" "^7.18.2"
137 | "@babel/types" "^7.18.2"
138 |
139 | "@babel/highlight@^7.16.7":
140 | version "7.17.12"
141 | resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.17.12.tgz#257de56ee5afbd20451ac0a75686b6b404257351"
142 | integrity sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg==
143 | dependencies:
144 | "@babel/helper-validator-identifier" "^7.16.7"
145 | chalk "^2.0.0"
146 | js-tokens "^4.0.0"
147 |
148 | "@babel/parser@^7.16.7", "@babel/parser@^7.18.0":
149 | version "7.18.4"
150 | resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.4.tgz#6774231779dd700e0af29f6ad8d479582d7ce5ef"
151 | integrity sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==
152 |
153 | "@babel/runtime@^7.18.3":
154 | version "7.18.3"
155 | resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.3.tgz#c7b654b57f6f63cf7f8b418ac9ca04408c4579f4"
156 | integrity sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==
157 | dependencies:
158 | regenerator-runtime "^0.13.4"
159 |
160 | "@babel/template@^7.16.7":
161 | version "7.16.7"
162 | resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155"
163 | integrity sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==
164 | dependencies:
165 | "@babel/code-frame" "^7.16.7"
166 | "@babel/parser" "^7.16.7"
167 | "@babel/types" "^7.16.7"
168 |
169 | "@babel/traverse@^7.18.0", "@babel/traverse@^7.18.2":
170 | version "7.18.2"
171 | resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.2.tgz#b77a52604b5cc836a9e1e08dca01cba67a12d2e8"
172 | integrity sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==
173 | dependencies:
174 | "@babel/code-frame" "^7.16.7"
175 | "@babel/generator" "^7.18.2"
176 | "@babel/helper-environment-visitor" "^7.18.2"
177 | "@babel/helper-function-name" "^7.17.9"
178 | "@babel/helper-hoist-variables" "^7.16.7"
179 | "@babel/helper-split-export-declaration" "^7.16.7"
180 | "@babel/parser" "^7.18.0"
181 | "@babel/types" "^7.18.2"
182 | debug "^4.1.0"
183 | globals "^11.1.0"
184 |
185 | "@babel/types@^7.16.7", "@babel/types@^7.17.0", "@babel/types@^7.18.0", "@babel/types@^7.18.2":
186 | version "7.18.4"
187 | resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.4.tgz#27eae9b9fd18e9dccc3f9d6ad051336f307be354"
188 | integrity sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==
189 | dependencies:
190 | "@babel/helper-validator-identifier" "^7.16.7"
191 | to-fast-properties "^2.0.0"
192 |
193 | "@jridgewell/gen-mapping@^0.1.0":
194 | version "0.1.1"
195 | resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996"
196 | integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==
197 | dependencies:
198 | "@jridgewell/set-array" "^1.0.0"
199 | "@jridgewell/sourcemap-codec" "^1.4.10"
200 |
201 | "@jridgewell/gen-mapping@^0.3.0":
202 | version "0.3.1"
203 | resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz#cf92a983c83466b8c0ce9124fadeaf09f7c66ea9"
204 | integrity sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==
205 | dependencies:
206 | "@jridgewell/set-array" "^1.0.0"
207 | "@jridgewell/sourcemap-codec" "^1.4.10"
208 | "@jridgewell/trace-mapping" "^0.3.9"
209 |
210 | "@jridgewell/resolve-uri@^3.0.3":
211 | version "3.0.7"
212 | resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz#30cd49820a962aff48c8fffc5cd760151fca61fe"
213 | integrity sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==
214 |
215 | "@jridgewell/set-array@^1.0.0":
216 | version "1.1.1"
217 | resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.1.tgz#36a6acc93987adcf0ba50c66908bd0b70de8afea"
218 | integrity sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==
219 |
220 | "@jridgewell/sourcemap-codec@^1.4.10":
221 | version "1.4.13"
222 | resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz#b6461fb0c2964356c469e115f504c95ad97ab88c"
223 | integrity sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==
224 |
225 | "@jridgewell/trace-mapping@^0.3.9":
226 | version "0.3.13"
227 | resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz#dcfe3e95f224c8fe97a87a5235defec999aa92ea"
228 | integrity sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==
229 | dependencies:
230 | "@jridgewell/resolve-uri" "^3.0.3"
231 | "@jridgewell/sourcemap-codec" "^1.4.10"
232 |
233 | ansi-styles@^3.2.1:
234 | version "3.2.1"
235 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
236 | integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
237 | dependencies:
238 | color-convert "^1.9.0"
239 |
240 | browserslist@^4.20.2:
241 | version "4.20.3"
242 | resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.3.tgz#eb7572f49ec430e054f56d52ff0ebe9be915f8bf"
243 | integrity sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg==
244 | dependencies:
245 | caniuse-lite "^1.0.30001332"
246 | electron-to-chromium "^1.4.118"
247 | escalade "^3.1.1"
248 | node-releases "^2.0.3"
249 | picocolors "^1.0.0"
250 |
251 | caniuse-lite@^1.0.30001332:
252 | version "1.0.30001346"
253 | resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001346.tgz#e895551b46b9cc9cc9de852facd42f04839a8fbe"
254 | integrity sha512-q6ibZUO2t88QCIPayP/euuDREq+aMAxFE5S70PkrLh0iTDj/zEhgvJRKC2+CvXY6EWc6oQwUR48lL5vCW6jiXQ==
255 |
256 | chalk@^2.0.0:
257 | version "2.4.2"
258 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
259 | integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
260 | dependencies:
261 | ansi-styles "^3.2.1"
262 | escape-string-regexp "^1.0.5"
263 | supports-color "^5.3.0"
264 |
265 | color-convert@^1.9.0:
266 | version "1.9.3"
267 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
268 | integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
269 | dependencies:
270 | color-name "1.1.3"
271 |
272 | color-name@1.1.3:
273 | version "1.1.3"
274 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
275 | integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==
276 |
277 | convert-source-map@^1.7.0:
278 | version "1.8.0"
279 | resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369"
280 | integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==
281 | dependencies:
282 | safe-buffer "~5.1.1"
283 |
284 | debug@^4.1.0:
285 | version "4.3.4"
286 | resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
287 | integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
288 | dependencies:
289 | ms "2.1.2"
290 |
291 | electron-to-chromium@^1.4.118:
292 | version "1.4.146"
293 | resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.146.tgz#fd20970c3def2f9e6b32ac13a2e7a6b64e1b0c48"
294 | integrity sha512-4eWebzDLd+hYLm4csbyMU2EbBnqhwl8Oe9eF/7CBDPWcRxFmqzx4izxvHH+lofQxzieg8UbB8ZuzNTxeukzfTg==
295 |
296 | escalade@^3.1.1:
297 | version "3.1.1"
298 | resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
299 | integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
300 |
301 | escape-string-regexp@^1.0.5:
302 | version "1.0.5"
303 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
304 | integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==
305 |
306 | gensync@^1.0.0-beta.2:
307 | version "1.0.0-beta.2"
308 | resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
309 | integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
310 |
311 | globals@^11.1.0:
312 | version "11.12.0"
313 | resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
314 | integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
315 |
316 | has-flag@^3.0.0:
317 | version "3.0.0"
318 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
319 | integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==
320 |
321 | js-tokens@^4.0.0:
322 | version "4.0.0"
323 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
324 | integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
325 |
326 | jsesc@^2.5.1:
327 | version "2.5.2"
328 | resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
329 | integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
330 |
331 | json5@^2.2.1:
332 | version "2.2.1"
333 | resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
334 | integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
335 |
336 | ms@2.1.2:
337 | version "2.1.2"
338 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
339 | integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
340 |
341 | node-releases@^2.0.3:
342 | version "2.0.5"
343 | resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.5.tgz#280ed5bc3eba0d96ce44897d8aee478bfb3d9666"
344 | integrity sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q==
345 |
346 | picocolors@^1.0.0:
347 | version "1.0.0"
348 | resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
349 | integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
350 |
351 | regenerator-runtime@^0.13.4:
352 | version "0.13.9"
353 | resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52"
354 | integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==
355 |
356 | safe-buffer@~5.1.1:
357 | version "5.1.2"
358 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
359 | integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
360 |
361 | semver@^6.3.0:
362 | version "6.3.0"
363 | resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
364 | integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
365 |
366 | supports-color@^5.3.0:
367 | version "5.5.0"
368 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
369 | integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
370 | dependencies:
371 | has-flag "^3.0.0"
372 |
373 | to-fast-properties@^2.0.0:
374 | version "2.0.0"
375 | resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
376 | integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=
377 |
--------------------------------------------------------------------------------
/Example/ios/Example.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 00E356F31AD99517003FC87E /* ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExampleTests.m */; };
11 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
12 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
14 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
15 | C659AB83B21EFF9443F2727C /* libPods-Example-ExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 037F075B7FCB040DEFE4E2A2 /* libPods-Example-ExampleTests.a */; };
16 | DCE0B76C58C6022FBFAABEF9 /* libPods-Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C121D0DD4381C233EE364619 /* libPods-Example.a */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXContainerItemProxy section */
20 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
21 | isa = PBXContainerItemProxy;
22 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
23 | proxyType = 1;
24 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
25 | remoteInfo = Example;
26 | };
27 | /* End PBXContainerItemProxy section */
28 |
29 | /* Begin PBXFileReference section */
30 | 00E356EE1AD99517003FC87E /* ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
31 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
32 | 00E356F21AD99517003FC87E /* ExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleTests.m; sourceTree = ""; };
33 | 037F075B7FCB040DEFE4E2A2 /* libPods-Example-ExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example-ExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
34 | 03D9B622AB1A9594F4790070 /* 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 = ""; };
35 | 13B07F961A680F5B00A75B9A /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
36 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Example/AppDelegate.h; sourceTree = ""; };
37 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = Example/AppDelegate.mm; sourceTree = ""; };
38 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Example/Images.xcassets; sourceTree = ""; };
39 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Example/Info.plist; sourceTree = ""; };
40 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Example/main.m; sourceTree = ""; };
41 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = Example/LaunchScreen.storyboard; sourceTree = ""; };
42 | 982213EF92E37090CC113956 /* 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 = ""; };
43 | C121D0DD4381C233EE364619 /* libPods-Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
44 | E119BA841BC4FAE5DC14E459 /* 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 = ""; };
45 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
46 | EF047966B2D44BEDA4D0435D /* 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 = ""; };
47 | /* End PBXFileReference section */
48 |
49 | /* Begin PBXFrameworksBuildPhase section */
50 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
51 | isa = PBXFrameworksBuildPhase;
52 | buildActionMask = 2147483647;
53 | files = (
54 | C659AB83B21EFF9443F2727C /* libPods-Example-ExampleTests.a in Frameworks */,
55 | );
56 | runOnlyForDeploymentPostprocessing = 0;
57 | };
58 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
59 | isa = PBXFrameworksBuildPhase;
60 | buildActionMask = 2147483647;
61 | files = (
62 | DCE0B76C58C6022FBFAABEF9 /* libPods-Example.a in Frameworks */,
63 | );
64 | runOnlyForDeploymentPostprocessing = 0;
65 | };
66 | /* End PBXFrameworksBuildPhase section */
67 |
68 | /* Begin PBXGroup section */
69 | 00E356EF1AD99517003FC87E /* ExampleTests */ = {
70 | isa = PBXGroup;
71 | children = (
72 | 00E356F21AD99517003FC87E /* ExampleTests.m */,
73 | 00E356F01AD99517003FC87E /* Supporting Files */,
74 | );
75 | path = ExampleTests;
76 | sourceTree = "";
77 | };
78 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 00E356F11AD99517003FC87E /* Info.plist */,
82 | );
83 | name = "Supporting Files";
84 | sourceTree = "";
85 | };
86 | 13B07FAE1A68108700A75B9A /* Example */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
90 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */,
91 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
92 | 13B07FB61A68108700A75B9A /* Info.plist */,
93 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
94 | 13B07FB71A68108700A75B9A /* main.m */,
95 | );
96 | name = Example;
97 | sourceTree = "";
98 | };
99 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
100 | isa = PBXGroup;
101 | children = (
102 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
103 | C121D0DD4381C233EE364619 /* libPods-Example.a */,
104 | 037F075B7FCB040DEFE4E2A2 /* libPods-Example-ExampleTests.a */,
105 | );
106 | name = Frameworks;
107 | sourceTree = "";
108 | };
109 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
110 | isa = PBXGroup;
111 | children = (
112 | );
113 | name = Libraries;
114 | sourceTree = "";
115 | };
116 | 83CBB9F61A601CBA00E9B192 = {
117 | isa = PBXGroup;
118 | children = (
119 | 13B07FAE1A68108700A75B9A /* Example */,
120 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
121 | 00E356EF1AD99517003FC87E /* ExampleTests */,
122 | 83CBBA001A601CBA00E9B192 /* Products */,
123 | 2D16E6871FA4F8E400B85C8A /* Frameworks */,
124 | BBD78D7AC51CEA395F1C20DB /* Pods */,
125 | );
126 | indentWidth = 2;
127 | sourceTree = "";
128 | tabWidth = 2;
129 | usesTabs = 0;
130 | };
131 | 83CBBA001A601CBA00E9B192 /* Products */ = {
132 | isa = PBXGroup;
133 | children = (
134 | 13B07F961A680F5B00A75B9A /* Example.app */,
135 | 00E356EE1AD99517003FC87E /* ExampleTests.xctest */,
136 | );
137 | name = Products;
138 | sourceTree = "";
139 | };
140 | BBD78D7AC51CEA395F1C20DB /* Pods */ = {
141 | isa = PBXGroup;
142 | children = (
143 | EF047966B2D44BEDA4D0435D /* Pods-Example.debug.xcconfig */,
144 | E119BA841BC4FAE5DC14E459 /* Pods-Example.release.xcconfig */,
145 | 03D9B622AB1A9594F4790070 /* Pods-Example-ExampleTests.debug.xcconfig */,
146 | 982213EF92E37090CC113956 /* Pods-Example-ExampleTests.release.xcconfig */,
147 | );
148 | path = Pods;
149 | sourceTree = "";
150 | };
151 | /* End PBXGroup section */
152 |
153 | /* Begin PBXNativeTarget section */
154 | 00E356ED1AD99517003FC87E /* ExampleTests */ = {
155 | isa = PBXNativeTarget;
156 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ExampleTests" */;
157 | buildPhases = (
158 | F47DB65BCFAC7E6AC9C5EF6C /* [CP] Check Pods Manifest.lock */,
159 | 00E356EA1AD99517003FC87E /* Sources */,
160 | 00E356EB1AD99517003FC87E /* Frameworks */,
161 | 00E356EC1AD99517003FC87E /* Resources */,
162 | E4A60F8AAA9A31D4438C4F82 /* [CP] Embed Pods Frameworks */,
163 | A2BC41A2308B4EDF27B0FEF5 /* [CP] Copy Pods Resources */,
164 | );
165 | buildRules = (
166 | );
167 | dependencies = (
168 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
169 | );
170 | name = ExampleTests;
171 | productName = ExampleTests;
172 | productReference = 00E356EE1AD99517003FC87E /* ExampleTests.xctest */;
173 | productType = "com.apple.product-type.bundle.unit-test";
174 | };
175 | 13B07F861A680F5B00A75B9A /* Example */ = {
176 | isa = PBXNativeTarget;
177 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Example" */;
178 | buildPhases = (
179 | E7F8153E3845CB972F244AD1 /* [CP] Check Pods Manifest.lock */,
180 | FD10A7F022414F080027D42C /* Start Packager */,
181 | 13B07F871A680F5B00A75B9A /* Sources */,
182 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
183 | 13B07F8E1A680F5B00A75B9A /* Resources */,
184 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
185 | ECEAD9FD38C4B72BB94EC0E8 /* [CP] Embed Pods Frameworks */,
186 | 0970857EFEB1D8E5D49337B0 /* [CP] Copy Pods Resources */,
187 | );
188 | buildRules = (
189 | );
190 | dependencies = (
191 | );
192 | name = Example;
193 | productName = Example;
194 | productReference = 13B07F961A680F5B00A75B9A /* Example.app */;
195 | productType = "com.apple.product-type.application";
196 | };
197 | /* End PBXNativeTarget section */
198 |
199 | /* Begin PBXProject section */
200 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
201 | isa = PBXProject;
202 | attributes = {
203 | LastUpgradeCheck = 1210;
204 | TargetAttributes = {
205 | 00E356ED1AD99517003FC87E = {
206 | CreatedOnToolsVersion = 6.2;
207 | TestTargetID = 13B07F861A680F5B00A75B9A;
208 | };
209 | 13B07F861A680F5B00A75B9A = {
210 | LastSwiftMigration = 1120;
211 | };
212 | };
213 | };
214 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Example" */;
215 | compatibilityVersion = "Xcode 12.0";
216 | developmentRegion = en;
217 | hasScannedForEncodings = 0;
218 | knownRegions = (
219 | en,
220 | Base,
221 | );
222 | mainGroup = 83CBB9F61A601CBA00E9B192;
223 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
224 | projectDirPath = "";
225 | projectRoot = "";
226 | targets = (
227 | 13B07F861A680F5B00A75B9A /* Example */,
228 | 00E356ED1AD99517003FC87E /* ExampleTests */,
229 | );
230 | };
231 | /* End PBXProject section */
232 |
233 | /* Begin PBXResourcesBuildPhase section */
234 | 00E356EC1AD99517003FC87E /* Resources */ = {
235 | isa = PBXResourcesBuildPhase;
236 | buildActionMask = 2147483647;
237 | files = (
238 | );
239 | runOnlyForDeploymentPostprocessing = 0;
240 | };
241 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
242 | isa = PBXResourcesBuildPhase;
243 | buildActionMask = 2147483647;
244 | files = (
245 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
246 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
247 | );
248 | runOnlyForDeploymentPostprocessing = 0;
249 | };
250 | /* End PBXResourcesBuildPhase section */
251 |
252 | /* Begin PBXShellScriptBuildPhase section */
253 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
254 | isa = PBXShellScriptBuildPhase;
255 | buildActionMask = 2147483647;
256 | files = (
257 | );
258 | inputPaths = (
259 | "$(SRCROOT)/.xcode.env.local",
260 | "$(SRCROOT)/.xcode.env",
261 | );
262 | name = "Bundle React Native code and images";
263 | outputPaths = (
264 | );
265 | runOnlyForDeploymentPostprocessing = 0;
266 | shellPath = /bin/sh;
267 | 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";
268 | };
269 | 0970857EFEB1D8E5D49337B0 /* [CP] Copy Pods Resources */ = {
270 | isa = PBXShellScriptBuildPhase;
271 | buildActionMask = 2147483647;
272 | files = (
273 | );
274 | inputFileListPaths = (
275 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-resources-${CONFIGURATION}-input-files.xcfilelist",
276 | );
277 | name = "[CP] Copy Pods Resources";
278 | outputFileListPaths = (
279 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-resources-${CONFIGURATION}-output-files.xcfilelist",
280 | );
281 | runOnlyForDeploymentPostprocessing = 0;
282 | shellPath = /bin/sh;
283 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-resources.sh\"\n";
284 | showEnvVarsInLog = 0;
285 | };
286 | A2BC41A2308B4EDF27B0FEF5 /* [CP] Copy Pods Resources */ = {
287 | isa = PBXShellScriptBuildPhase;
288 | buildActionMask = 2147483647;
289 | files = (
290 | );
291 | inputFileListPaths = (
292 | "${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-resources-${CONFIGURATION}-input-files.xcfilelist",
293 | );
294 | name = "[CP] Copy Pods Resources";
295 | outputFileListPaths = (
296 | "${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-resources-${CONFIGURATION}-output-files.xcfilelist",
297 | );
298 | runOnlyForDeploymentPostprocessing = 0;
299 | shellPath = /bin/sh;
300 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-resources.sh\"\n";
301 | showEnvVarsInLog = 0;
302 | };
303 | E4A60F8AAA9A31D4438C4F82 /* [CP] Embed Pods Frameworks */ = {
304 | isa = PBXShellScriptBuildPhase;
305 | buildActionMask = 2147483647;
306 | files = (
307 | );
308 | inputFileListPaths = (
309 | "${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
310 | );
311 | name = "[CP] Embed Pods Frameworks";
312 | outputFileListPaths = (
313 | "${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
314 | );
315 | runOnlyForDeploymentPostprocessing = 0;
316 | shellPath = /bin/sh;
317 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-frameworks.sh\"\n";
318 | showEnvVarsInLog = 0;
319 | };
320 | E7F8153E3845CB972F244AD1 /* [CP] Check Pods Manifest.lock */ = {
321 | isa = PBXShellScriptBuildPhase;
322 | buildActionMask = 2147483647;
323 | files = (
324 | );
325 | inputFileListPaths = (
326 | );
327 | inputPaths = (
328 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
329 | "${PODS_ROOT}/Manifest.lock",
330 | );
331 | name = "[CP] Check Pods Manifest.lock";
332 | outputFileListPaths = (
333 | );
334 | outputPaths = (
335 | "$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt",
336 | );
337 | runOnlyForDeploymentPostprocessing = 0;
338 | shellPath = /bin/sh;
339 | 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";
340 | showEnvVarsInLog = 0;
341 | };
342 | ECEAD9FD38C4B72BB94EC0E8 /* [CP] Embed Pods Frameworks */ = {
343 | isa = PBXShellScriptBuildPhase;
344 | buildActionMask = 2147483647;
345 | files = (
346 | );
347 | inputFileListPaths = (
348 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks-${CONFIGURATION}-input-files.xcfilelist",
349 | );
350 | name = "[CP] Embed Pods Frameworks";
351 | outputFileListPaths = (
352 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks-${CONFIGURATION}-output-files.xcfilelist",
353 | );
354 | runOnlyForDeploymentPostprocessing = 0;
355 | shellPath = /bin/sh;
356 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n";
357 | showEnvVarsInLog = 0;
358 | };
359 | F47DB65BCFAC7E6AC9C5EF6C /* [CP] Check Pods Manifest.lock */ = {
360 | isa = PBXShellScriptBuildPhase;
361 | buildActionMask = 2147483647;
362 | files = (
363 | );
364 | inputFileListPaths = (
365 | );
366 | inputPaths = (
367 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
368 | "${PODS_ROOT}/Manifest.lock",
369 | );
370 | name = "[CP] Check Pods Manifest.lock";
371 | outputFileListPaths = (
372 | );
373 | outputPaths = (
374 | "$(DERIVED_FILE_DIR)/Pods-Example-ExampleTests-checkManifestLockResult.txt",
375 | );
376 | runOnlyForDeploymentPostprocessing = 0;
377 | shellPath = /bin/sh;
378 | 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";
379 | showEnvVarsInLog = 0;
380 | };
381 | FD10A7F022414F080027D42C /* Start Packager */ = {
382 | isa = PBXShellScriptBuildPhase;
383 | buildActionMask = 2147483647;
384 | files = (
385 | );
386 | inputFileListPaths = (
387 | );
388 | inputPaths = (
389 | );
390 | name = "Start Packager";
391 | outputFileListPaths = (
392 | );
393 | outputPaths = (
394 | );
395 | runOnlyForDeploymentPostprocessing = 0;
396 | shellPath = /bin/sh;
397 | 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";
398 | showEnvVarsInLog = 0;
399 | };
400 | /* End PBXShellScriptBuildPhase section */
401 |
402 | /* Begin PBXSourcesBuildPhase section */
403 | 00E356EA1AD99517003FC87E /* Sources */ = {
404 | isa = PBXSourcesBuildPhase;
405 | buildActionMask = 2147483647;
406 | files = (
407 | 00E356F31AD99517003FC87E /* ExampleTests.m in Sources */,
408 | );
409 | runOnlyForDeploymentPostprocessing = 0;
410 | };
411 | 13B07F871A680F5B00A75B9A /* Sources */ = {
412 | isa = PBXSourcesBuildPhase;
413 | buildActionMask = 2147483647;
414 | files = (
415 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
416 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
417 | );
418 | runOnlyForDeploymentPostprocessing = 0;
419 | };
420 | /* End PBXSourcesBuildPhase section */
421 |
422 | /* Begin PBXTargetDependency section */
423 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
424 | isa = PBXTargetDependency;
425 | target = 13B07F861A680F5B00A75B9A /* Example */;
426 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
427 | };
428 | /* End PBXTargetDependency section */
429 |
430 | /* Begin XCBuildConfiguration section */
431 | 00E356F61AD99517003FC87E /* Debug */ = {
432 | isa = XCBuildConfiguration;
433 | baseConfigurationReference = 03D9B622AB1A9594F4790070 /* Pods-Example-ExampleTests.debug.xcconfig */;
434 | buildSettings = {
435 | BUNDLE_LOADER = "$(TEST_HOST)";
436 | GCC_PREPROCESSOR_DEFINITIONS = (
437 | "DEBUG=1",
438 | "$(inherited)",
439 | );
440 | INFOPLIST_FILE = ExampleTests/Info.plist;
441 | IPHONEOS_DEPLOYMENT_TARGET = 12.4;
442 | LD_RUNPATH_SEARCH_PATHS = (
443 | "$(inherited)",
444 | "@executable_path/Frameworks",
445 | "@loader_path/Frameworks",
446 | );
447 | OTHER_LDFLAGS = (
448 | "-ObjC",
449 | "-lc++",
450 | "$(inherited)",
451 | );
452 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
453 | PRODUCT_NAME = "$(TARGET_NAME)";
454 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
455 | };
456 | name = Debug;
457 | };
458 | 00E356F71AD99517003FC87E /* Release */ = {
459 | isa = XCBuildConfiguration;
460 | baseConfigurationReference = 982213EF92E37090CC113956 /* Pods-Example-ExampleTests.release.xcconfig */;
461 | buildSettings = {
462 | BUNDLE_LOADER = "$(TEST_HOST)";
463 | COPY_PHASE_STRIP = NO;
464 | INFOPLIST_FILE = ExampleTests/Info.plist;
465 | IPHONEOS_DEPLOYMENT_TARGET = 12.4;
466 | LD_RUNPATH_SEARCH_PATHS = (
467 | "$(inherited)",
468 | "@executable_path/Frameworks",
469 | "@loader_path/Frameworks",
470 | );
471 | OTHER_LDFLAGS = (
472 | "-ObjC",
473 | "-lc++",
474 | "$(inherited)",
475 | );
476 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
477 | PRODUCT_NAME = "$(TARGET_NAME)";
478 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
479 | };
480 | name = Release;
481 | };
482 | 13B07F941A680F5B00A75B9A /* Debug */ = {
483 | isa = XCBuildConfiguration;
484 | baseConfigurationReference = EF047966B2D44BEDA4D0435D /* Pods-Example.debug.xcconfig */;
485 | buildSettings = {
486 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
487 | CLANG_ENABLE_MODULES = YES;
488 | CURRENT_PROJECT_VERSION = 1;
489 | DEVELOPMENT_TEAM = 8DNFB8467F;
490 | ENABLE_BITCODE = NO;
491 | INFOPLIST_FILE = Example/Info.plist;
492 | LD_RUNPATH_SEARCH_PATHS = (
493 | "$(inherited)",
494 | "@executable_path/Frameworks",
495 | );
496 | OTHER_LDFLAGS = (
497 | "$(inherited)",
498 | "-ObjC",
499 | "-lc++",
500 | );
501 | PRODUCT_BUNDLE_IDENTIFIER = com.fyndx.rnfabriclgexample;
502 | PRODUCT_NAME = Example;
503 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
504 | SWIFT_VERSION = 5.0;
505 | VERSIONING_SYSTEM = "apple-generic";
506 | };
507 | name = Debug;
508 | };
509 | 13B07F951A680F5B00A75B9A /* Release */ = {
510 | isa = XCBuildConfiguration;
511 | baseConfigurationReference = E119BA841BC4FAE5DC14E459 /* Pods-Example.release.xcconfig */;
512 | buildSettings = {
513 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
514 | CLANG_ENABLE_MODULES = YES;
515 | CURRENT_PROJECT_VERSION = 1;
516 | DEVELOPMENT_TEAM = 8DNFB8467F;
517 | INFOPLIST_FILE = Example/Info.plist;
518 | LD_RUNPATH_SEARCH_PATHS = (
519 | "$(inherited)",
520 | "@executable_path/Frameworks",
521 | );
522 | OTHER_LDFLAGS = (
523 | "$(inherited)",
524 | "-ObjC",
525 | "-lc++",
526 | );
527 | PRODUCT_BUNDLE_IDENTIFIER = com.fyndx.rnfabriclgexample;
528 | PRODUCT_NAME = Example;
529 | SWIFT_VERSION = 5.0;
530 | VERSIONING_SYSTEM = "apple-generic";
531 | };
532 | name = Release;
533 | };
534 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
535 | isa = XCBuildConfiguration;
536 | buildSettings = {
537 | ALWAYS_SEARCH_USER_PATHS = NO;
538 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
539 | CLANG_CXX_LANGUAGE_STANDARD = "c++17";
540 | CLANG_CXX_LIBRARY = "libc++";
541 | CLANG_ENABLE_MODULES = YES;
542 | CLANG_ENABLE_OBJC_ARC = YES;
543 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
544 | CLANG_WARN_BOOL_CONVERSION = YES;
545 | CLANG_WARN_COMMA = YES;
546 | CLANG_WARN_CONSTANT_CONVERSION = YES;
547 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
548 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
549 | CLANG_WARN_EMPTY_BODY = YES;
550 | CLANG_WARN_ENUM_CONVERSION = YES;
551 | CLANG_WARN_INFINITE_RECURSION = YES;
552 | CLANG_WARN_INT_CONVERSION = YES;
553 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
554 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
555 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
556 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
557 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
558 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
559 | CLANG_WARN_STRICT_PROTOTYPES = YES;
560 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
561 | CLANG_WARN_UNREACHABLE_CODE = YES;
562 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
563 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
564 | COPY_PHASE_STRIP = NO;
565 | ENABLE_STRICT_OBJC_MSGSEND = YES;
566 | ENABLE_TESTABILITY = YES;
567 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
568 | GCC_C_LANGUAGE_STANDARD = gnu99;
569 | GCC_DYNAMIC_NO_PIC = NO;
570 | GCC_NO_COMMON_BLOCKS = YES;
571 | GCC_OPTIMIZATION_LEVEL = 0;
572 | GCC_PREPROCESSOR_DEFINITIONS = (
573 | "DEBUG=1",
574 | "$(inherited)",
575 | );
576 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
577 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
578 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
579 | GCC_WARN_UNDECLARED_SELECTOR = YES;
580 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
581 | GCC_WARN_UNUSED_FUNCTION = YES;
582 | GCC_WARN_UNUSED_VARIABLE = YES;
583 | IPHONEOS_DEPLOYMENT_TARGET = 12.4;
584 | LD_RUNPATH_SEARCH_PATHS = (
585 | /usr/lib/swift,
586 | "$(inherited)",
587 | );
588 | LIBRARY_SEARCH_PATHS = (
589 | "\"$(SDKROOT)/usr/lib/swift\"",
590 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
591 | "\"$(inherited)\"",
592 | );
593 | MTL_ENABLE_DEBUG_INFO = YES;
594 | ONLY_ACTIVE_ARCH = YES;
595 | OTHER_CPLUSPLUSFLAGS = (
596 | "$(OTHER_CFLAGS)",
597 | "-DFOLLY_NO_CONFIG",
598 | "-DFOLLY_MOBILE=1",
599 | "-DFOLLY_USE_LIBCPP=1",
600 | );
601 | REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
602 | SDKROOT = iphoneos;
603 | };
604 | name = Debug;
605 | };
606 | 83CBBA211A601CBA00E9B192 /* Release */ = {
607 | isa = XCBuildConfiguration;
608 | buildSettings = {
609 | ALWAYS_SEARCH_USER_PATHS = NO;
610 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
611 | CLANG_CXX_LANGUAGE_STANDARD = "c++17";
612 | CLANG_CXX_LIBRARY = "libc++";
613 | CLANG_ENABLE_MODULES = YES;
614 | CLANG_ENABLE_OBJC_ARC = YES;
615 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
616 | CLANG_WARN_BOOL_CONVERSION = YES;
617 | CLANG_WARN_COMMA = YES;
618 | CLANG_WARN_CONSTANT_CONVERSION = YES;
619 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
620 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
621 | CLANG_WARN_EMPTY_BODY = YES;
622 | CLANG_WARN_ENUM_CONVERSION = YES;
623 | CLANG_WARN_INFINITE_RECURSION = YES;
624 | CLANG_WARN_INT_CONVERSION = YES;
625 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
626 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
627 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
628 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
629 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
630 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
631 | CLANG_WARN_STRICT_PROTOTYPES = YES;
632 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
633 | CLANG_WARN_UNREACHABLE_CODE = YES;
634 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
635 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
636 | COPY_PHASE_STRIP = YES;
637 | ENABLE_NS_ASSERTIONS = NO;
638 | ENABLE_STRICT_OBJC_MSGSEND = YES;
639 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
640 | GCC_C_LANGUAGE_STANDARD = gnu99;
641 | GCC_NO_COMMON_BLOCKS = YES;
642 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
643 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
644 | GCC_WARN_UNDECLARED_SELECTOR = YES;
645 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
646 | GCC_WARN_UNUSED_FUNCTION = YES;
647 | GCC_WARN_UNUSED_VARIABLE = YES;
648 | IPHONEOS_DEPLOYMENT_TARGET = 12.4;
649 | LD_RUNPATH_SEARCH_PATHS = (
650 | /usr/lib/swift,
651 | "$(inherited)",
652 | );
653 | LIBRARY_SEARCH_PATHS = (
654 | "\"$(SDKROOT)/usr/lib/swift\"",
655 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
656 | "\"$(inherited)\"",
657 | );
658 | MTL_ENABLE_DEBUG_INFO = NO;
659 | OTHER_CPLUSPLUSFLAGS = (
660 | "$(OTHER_CFLAGS)",
661 | "-DFOLLY_NO_CONFIG",
662 | "-DFOLLY_MOBILE=1",
663 | "-DFOLLY_USE_LIBCPP=1",
664 | );
665 | REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
666 | SDKROOT = iphoneos;
667 | VALIDATE_PRODUCT = YES;
668 | };
669 | name = Release;
670 | };
671 | /* End XCBuildConfiguration section */
672 |
673 | /* Begin XCConfigurationList section */
674 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ExampleTests" */ = {
675 | isa = XCConfigurationList;
676 | buildConfigurations = (
677 | 00E356F61AD99517003FC87E /* Debug */,
678 | 00E356F71AD99517003FC87E /* Release */,
679 | );
680 | defaultConfigurationIsVisible = 0;
681 | defaultConfigurationName = Release;
682 | };
683 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Example" */ = {
684 | isa = XCConfigurationList;
685 | buildConfigurations = (
686 | 13B07F941A680F5B00A75B9A /* Debug */,
687 | 13B07F951A680F5B00A75B9A /* Release */,
688 | );
689 | defaultConfigurationIsVisible = 0;
690 | defaultConfigurationName = Release;
691 | };
692 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Example" */ = {
693 | isa = XCConfigurationList;
694 | buildConfigurations = (
695 | 83CBBA201A601CBA00E9B192 /* Debug */,
696 | 83CBBA211A601CBA00E9B192 /* Release */,
697 | );
698 | defaultConfigurationIsVisible = 0;
699 | defaultConfigurationName = Release;
700 | };
701 | /* End XCConfigurationList section */
702 | };
703 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
704 | }
705 |
--------------------------------------------------------------------------------