├── .npmignore
├── ExampleApp
├── .watchmanconfig
├── .gitattributes
├── app.json
├── image.jpg
├── babel.config.js
├── balloons.png
├── android
│ ├── app
│ │ ├── src
│ │ │ ├── main
│ │ │ │ ├── res
│ │ │ │ │ ├── values
│ │ │ │ │ │ ├── strings.xml
│ │ │ │ │ │ └── styles.xml
│ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ │ └── mipmap-xxxhdpi
│ │ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ │ └── ic_launcher_round.png
│ │ │ │ ├── java
│ │ │ │ │ └── com
│ │ │ │ │ │ └── exampleapp
│ │ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ │ └── MainApplication.java
│ │ │ │ └── AndroidManifest.xml
│ │ │ └── debug
│ │ │ │ └── AndroidManifest.xml
│ │ ├── build_defs.bzl
│ │ ├── proguard-rules.pro
│ │ ├── BUCK
│ │ └── build.gradle
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── keystores
│ │ ├── debug.keystore.properties
│ │ └── BUCK
│ ├── settings.gradle
│ ├── gradle.properties
│ ├── build.gradle
│ ├── gradlew.bat
│ └── gradlew
├── ios
│ ├── ExampleApp
│ │ ├── Images.xcassets
│ │ │ ├── Contents.json
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── AppDelegate.h
│ │ ├── main.m
│ │ ├── AppDelegate.m
│ │ ├── Info.plist
│ │ └── Base.lproj
│ │ │ └── LaunchScreen.xib
│ ├── Podfile
│ ├── ExampleAppTests
│ │ ├── Info.plist
│ │ └── ExampleAppTests.m
│ ├── ExampleApp-tvOSTests
│ │ └── Info.plist
│ ├── Podfile.lock
│ ├── ExampleApp-tvOS
│ │ └── Info.plist
│ └── ExampleApp.xcodeproj
│ │ ├── xcshareddata
│ │ └── xcschemes
│ │ │ ├── ExampleApp.xcscheme
│ │ │ └── ExampleApp-tvOS.xcscheme
│ │ └── project.pbxproj
├── .buckconfig
├── index.js
├── __tests__
│ └── App-test.js
├── package.json
├── metro.config.js
├── .gitignore
├── .flowconfig
└── App.js
├── .gitattributes
├── index.js
├── android
├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ └── net
│ │ └── wowmaking
│ │ ├── RNImageToolsPackage.java
│ │ ├── RNImageToolsModule.java
│ │ └── Utility.java
└── build.gradle
├── ios
├── RNImageTools.h
├── RNImageTools.xcworkspace
│ └── contents.xcworkspacedata
├── RNImageTools.xcodeproj
│ └── project.pbxproj
└── RNImageTools.m
├── .gitignore
├── package.json
├── RNImageTools.podspec
├── LICENSE.md
└── README.md
/.npmignore:
--------------------------------------------------------------------------------
1 | ExampleApp
--------------------------------------------------------------------------------
/ExampleApp/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
--------------------------------------------------------------------------------
/ExampleApp/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/ExampleApp/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ExampleApp",
3 | "displayName": "ExampleApp"
4 | }
--------------------------------------------------------------------------------
/ExampleApp/image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wowmaking/react-native-image-tools/HEAD/ExampleApp/image.jpg
--------------------------------------------------------------------------------
/ExampleApp/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/ExampleApp/balloons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wowmaking/react-native-image-tools/HEAD/ExampleApp/balloons.png
--------------------------------------------------------------------------------
/ExampleApp/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | ExampleApp
3 |
4 |
--------------------------------------------------------------------------------
/ExampleApp/ios/ExampleApp/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | import { NativeModules } from 'react-native';
2 |
3 | const { RNImageTools } = NativeModules;
4 |
5 | export default RNImageTools;
6 |
--------------------------------------------------------------------------------
/ExampleApp/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/ExampleApp/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wowmaking/react-native-image-tools/HEAD/ExampleApp/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/ExampleApp/android/keystores/debug.keystore.properties:
--------------------------------------------------------------------------------
1 | key.store=debug.keystore
2 | key.alias=androiddebugkey
3 | key.store.password=android
4 | key.alias.password=android
5 |
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ExampleApp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wowmaking/react-native-image-tools/HEAD/ExampleApp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ExampleApp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wowmaking/react-native-image-tools/HEAD/ExampleApp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ExampleApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wowmaking/react-native-image-tools/HEAD/ExampleApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ExampleApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wowmaking/react-native-image-tools/HEAD/ExampleApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ExampleApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wowmaking/react-native-image-tools/HEAD/ExampleApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ExampleApp/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wowmaking/react-native-image-tools/HEAD/ExampleApp/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/ExampleApp/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wowmaking/react-native-image-tools/HEAD/ExampleApp/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/ExampleApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wowmaking/react-native-image-tools/HEAD/ExampleApp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/ExampleApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wowmaking/react-native-image-tools/HEAD/ExampleApp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/ExampleApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wowmaking/react-native-image-tools/HEAD/ExampleApp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/ExampleApp/android/keystores/BUCK:
--------------------------------------------------------------------------------
1 | keystore(
2 | name = "debug",
3 | properties = "debug.keystore.properties",
4 | store = "debug.keystore",
5 | visibility = [
6 | "PUBLIC",
7 | ],
8 | )
9 |
--------------------------------------------------------------------------------
/ExampleApp/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import {AppRegistry} from 'react-native';
6 | import App from './App';
7 | import {name as appName} from './app.json';
8 |
9 | AppRegistry.registerComponent(appName, () => App);
10 |
--------------------------------------------------------------------------------
/ios/RNImageTools.h:
--------------------------------------------------------------------------------
1 |
2 | #if __has_include("RCTBridgeModule.h")
3 | #import "RCTBridgeModule.h"
4 | #else
5 | #import
6 | #endif
7 |
8 | @interface RNImageTools : NSObject
9 |
10 | @end
11 |
--------------------------------------------------------------------------------
/ExampleApp/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'ExampleApp'
2 |
3 | include ':react-native-image-tools-wm'
4 | project(':react-native-image-tools-wm').projectDir = new File(rootProject.projectDir, '../../android')
5 |
6 | include ':app'
7 |
--------------------------------------------------------------------------------
/ios/RNImageTools.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 |
3 |
5 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ExampleApp/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ExampleApp/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/ExampleApp/__tests__/App-test.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import 'react-native';
6 | import React from 'react';
7 | import App from '../App';
8 |
9 | // Note: test renderer must be required after react-native.
10 | import renderer from 'react-test-renderer';
11 |
12 | it('renders correctly', () => {
13 | renderer.create();
14 | });
15 |
--------------------------------------------------------------------------------
/ExampleApp/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ExampleApp/ios/ExampleApp/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (nonatomic, strong) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ExampleApp/ios/ExampleApp/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 |
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ExampleApp/android/app/src/main/java/com/exampleapp/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.exampleapp;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript.
9 | * This is used to schedule rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "ExampleApp";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/ExampleApp/ios/Podfile:
--------------------------------------------------------------------------------
1 | target 'ExampleApp' do
2 |
3 | platform :ios, '9.0'
4 |
5 | pod "yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
6 | pod 'React', :path => '../node_modules/react-native'
7 |
8 | # Pods for node_modules
9 | pod 'RNImageTools', :path => '../../RNImageTools.podspec'
10 | end
11 |
12 |
13 | post_install do |installer|
14 | installer.pods_project.targets.each do |target|
15 | if target.name == "React"
16 | target.remove_from_project
17 | end
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # OSX
3 | #
4 | .DS_Store
5 |
6 | # node.js
7 | #
8 | node_modules/
9 | npm-debug.log
10 | yarn-error.log
11 |
12 |
13 | # Xcode
14 | #
15 | build/
16 | *.pbxuser
17 | !default.pbxuser
18 | *.mode1v3
19 | !default.mode1v3
20 | *.mode2v3
21 | !default.mode2v3
22 | *.perspectivev3
23 | !default.perspectivev3
24 | xcuserdata
25 | *.xccheckout
26 | *.moved-aside
27 | DerivedData
28 | *.hmap
29 | *.ipa
30 | *.xcuserstate
31 | project.xcworkspace
32 |
33 |
34 | # Android/IntelliJ
35 | #
36 | build/
37 | .idea
38 | .gradle
39 | local.properties
40 | *.iml
41 |
42 | # BUCK
43 | buck-out/
44 | \.buckd/
45 | *.keystore
46 |
--------------------------------------------------------------------------------
/ExampleApp/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ExampleApp",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node node_modules/react-native/local-cli/cli.js start",
7 | "test": "jest"
8 | },
9 | "dependencies": {
10 | "react": "16.8.3",
11 | "react-native": "0.59.10"
12 | },
13 | "devDependencies": {
14 | "@babel/core": "7.6.2",
15 | "@babel/runtime": "7.6.2",
16 | "babel-jest": "24.9.0",
17 | "jest": "24.9.0",
18 | "metro-react-native-babel-preset": "0.56.0",
19 | "react-test-renderer": "16.8.3"
20 | },
21 | "jest": {
22 | "preset": "react-native"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-image-tools-wm",
3 | "version": "1.5.7",
4 | "description": "A collection of image processing tools for React Native",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "keywords": [
10 | "react-native",
11 | "image",
12 | "edit",
13 | "processing",
14 | "mask"
15 | ],
16 | "author": "Dmitry Kazlouski",
17 | "license": "MIT",
18 | "peerDependencies": {
19 | "react-native": ">=0.41.2"
20 | },
21 | "repository": {
22 | "type": "git",
23 | "url": "https://github.com/wowmaking/react-native-image-tools"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/ExampleApp/android/app/build_defs.bzl:
--------------------------------------------------------------------------------
1 | """Helper definitions to glob .aar and .jar targets"""
2 |
3 | def create_aar_targets(aarfiles):
4 | for aarfile in aarfiles:
5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6 | lib_deps.append(":" + name)
7 | android_prebuilt_aar(
8 | name = name,
9 | aar = aarfile,
10 | )
11 |
12 | def create_jar_targets(jarfiles):
13 | for jarfile in jarfiles:
14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15 | lib_deps.append(":" + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
--------------------------------------------------------------------------------
/ExampleApp/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/ExampleApp/ios/ExampleApp/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/ExampleApp/metro.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Metro configuration for React Native
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | */
7 |
8 | const path = require('path');
9 |
10 | module.exports = {
11 | transformer: {
12 | getTransformOptions: async () => ({
13 | transform: {
14 | experimentalImportSupport: false,
15 | inlineRequires: false,
16 | },
17 | }),
18 | },
19 | resolver: {
20 | extraNodeModules: { // peer dependencies
21 | '@babel/runtime': path.resolve(__dirname, 'node_modules/@babel/runtime'),
22 | 'react': path.resolve(__dirname, 'node_modules/react'),
23 | 'react-native': path.resolve(__dirname, 'node_modules/react-native'),
24 | },
25 | },
26 | watchFolders: [path.resolve(__dirname, '..')], // lib source
27 | };
28 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | def safeExtGet(prop, fallback) {
2 | rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
3 | }
4 |
5 | apply plugin: 'com.android.library'
6 |
7 | android {
8 | compileSdkVersion safeExtGet('compileSdkVersion', 26)
9 | buildToolsVersion safeExtGet('buildToolsVersion', "26.0.3")
10 |
11 | defaultConfig {
12 | minSdkVersion safeExtGet('minSdkVersion', 16)
13 | targetSdkVersion safeExtGet('targetSdkVersion', 26)
14 | versionCode 1
15 | versionName "1.0"
16 | }
17 | lintOptions {
18 | abortOnError false
19 | }
20 | }
21 |
22 | repositories {
23 | mavenCentral()
24 | }
25 |
26 | dependencies {
27 | implementation 'com.facebook.react:react-native:+'
28 | implementation "com.android.support:exifinterface:${safeExtGet('supportLibVersion', '27.1.0')}"
29 | }
30 |
--------------------------------------------------------------------------------
/ExampleApp/ios/ExampleAppTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ExampleApp/ios/ExampleApp-tvOSTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/RNImageTools.podspec:
--------------------------------------------------------------------------------
1 | require "json"
2 | version = JSON.parse(File.read("package.json"))["version"]
3 |
4 | Pod::Spec.new do |s|
5 | s.name = "RNImageTools"
6 | s.version = version
7 | s.summary = "RNImageTools"
8 | s.description = <<-DESC
9 | A collection of image processing tools for React Native
10 | DESC
11 | s.homepage = "https://github.com/wowmaking/react-native-image-tools"
12 | s.license = "MIT"
13 | # s.license = { :type => "MIT", :file => "FILE_LICENSE" }
14 | s.author = { "Dmitry Kazlouski" => "dkazlouski@wowmaking.net" }
15 | s.platform = :ios, "7.0"
16 | s.source = { :git => "https://github.com/wowmaking/react-native-image-tools", tag: "v" + s.version.to_s }
17 | s.source_files = "ios/**/*.{h,m}"
18 | s.requires_arc = true
19 |
20 |
21 | s.dependency "React"
22 | #s.dependency "others"
23 |
24 | end
25 |
26 |
--------------------------------------------------------------------------------
/ExampleApp/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - React (0.59.10):
3 | - React/Core (= 0.59.10)
4 | - React/Core (0.59.10):
5 | - yoga (= 0.59.10.React)
6 | - RNImageTools (1.5.6):
7 | - React
8 | - yoga (0.59.10.React)
9 |
10 | DEPENDENCIES:
11 | - React (from `../node_modules/react-native`)
12 | - RNImageTools (from `../../RNImageTools.podspec`)
13 | - yoga (from `../node_modules/react-native/ReactCommon/yoga`)
14 |
15 | EXTERNAL SOURCES:
16 | React:
17 | :path: "../node_modules/react-native"
18 | RNImageTools:
19 | :path: "../../RNImageTools.podspec"
20 | yoga:
21 | :path: "../node_modules/react-native/ReactCommon/yoga"
22 |
23 | SPEC CHECKSUMS:
24 | React: 36d0768f9e93be2473b37e7fa64f92c1d5341eef
25 | RNImageTools: cdf1c3d8ec14146a68629c208cec1a99d50ac37e
26 | yoga: 684513b14b03201579ba3cee20218c9d1298b0cc
27 |
28 | PODFILE CHECKSUM: 61fedfff81b829088bc81c766b2aafa4a68aef94
29 |
30 | COCOAPODS: 1.7.5
31 |
--------------------------------------------------------------------------------
/ExampleApp/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: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
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 |
--------------------------------------------------------------------------------
/ExampleApp/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "28.0.3"
6 | minSdkVersion = 16
7 | compileSdkVersion = 28
8 | targetSdkVersion = 28
9 | supportLibVersion = "28.0.0"
10 | }
11 | repositories {
12 | google()
13 | jcenter()
14 | }
15 | dependencies {
16 | classpath("com.android.tools.build:gradle:3.4.0")
17 |
18 | // NOTE: Do not place your application dependencies here; they belong
19 | // in the individual module build.gradle files
20 | }
21 | }
22 |
23 | allprojects {
24 | repositories {
25 | mavenLocal()
26 | google()
27 | jcenter()
28 | maven {
29 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
30 | url "$rootDir/../node_modules/react-native/android"
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/android/src/main/java/net/wowmaking/RNImageToolsPackage.java:
--------------------------------------------------------------------------------
1 |
2 | package net.wowmaking;
3 |
4 | import java.util.Arrays;
5 | import java.util.Collections;
6 | import java.util.List;
7 |
8 | import com.facebook.react.ReactPackage;
9 | import com.facebook.react.bridge.NativeModule;
10 | import com.facebook.react.bridge.ReactApplicationContext;
11 | import com.facebook.react.uimanager.ViewManager;
12 | import com.facebook.react.bridge.JavaScriptModule;
13 | public class RNImageToolsPackage implements ReactPackage {
14 | @Override
15 | public List createNativeModules(ReactApplicationContext reactContext) {
16 | return Arrays.asList(new RNImageToolsModule(reactContext));
17 | }
18 |
19 | // Deprecated from RN 0.47
20 | public List> createJSModules() {
21 | return Collections.emptyList();
22 | }
23 |
24 | @Override
25 | public List createViewManagers(ReactApplicationContext reactContext) {
26 | return Collections.emptyList();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/ExampleApp/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 |
33 | # node.js
34 | #
35 | node_modules/
36 | npm-debug.log
37 | yarn-error.log
38 |
39 | # BUCK
40 | buck-out/
41 | \.buckd/
42 | *.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | */fastlane/report.xml
52 | */fastlane/Preview.html
53 | */fastlane/screenshots
54 |
55 | # Bundle artifact
56 | *.jsbundle
57 |
58 | ios/Pods
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | # The MIT License (MIT)
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the “Software”), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7 | the Software, and to permit persons to whom the Software is furnished to do so,
8 | subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/ExampleApp/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ExampleApp/android/app/src/main/java/com/exampleapp/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.exampleapp;
2 |
3 | import android.app.Application;
4 |
5 | import net.wowmaking.RNImageToolsPackage;
6 |
7 | import com.facebook.react.ReactApplication;
8 | import com.facebook.react.ReactNativeHost;
9 | import com.facebook.react.ReactPackage;
10 | import com.facebook.react.shell.MainReactPackage;
11 | import com.facebook.soloader.SoLoader;
12 |
13 | import java.util.Arrays;
14 | import java.util.List;
15 |
16 | public class MainApplication extends Application implements ReactApplication {
17 |
18 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
19 | @Override
20 | public boolean getUseDeveloperSupport() {
21 | return BuildConfig.DEBUG;
22 | }
23 |
24 | @Override
25 | protected List getPackages() {
26 | return Arrays.asList(
27 | new MainReactPackage(),
28 | new RNImageToolsPackage()
29 | );
30 | }
31 |
32 | @Override
33 | protected String getJSMainModuleName() {
34 | return "index";
35 | }
36 | };
37 |
38 | @Override
39 | public ReactNativeHost getReactNativeHost() {
40 | return mReactNativeHost;
41 | }
42 |
43 | @Override
44 | public void onCreate() {
45 | super.onCreate();
46 | SoLoader.init(this, /* native exopackage */ false);
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/ExampleApp/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.exampleapp",
39 | )
40 |
41 | android_resource(
42 | name = "res",
43 | package = "com.exampleapp",
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 |
--------------------------------------------------------------------------------
/ExampleApp/ios/ExampleApp/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import "AppDelegate.h"
9 |
10 | #import
11 | #import
12 | #import
13 |
14 | @implementation AppDelegate
15 |
16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
17 | {
18 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
19 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
20 | moduleName:@"ExampleApp"
21 | initialProperties:nil];
22 |
23 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
24 |
25 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
26 | UIViewController *rootViewController = [UIViewController new];
27 | rootViewController.view = rootView;
28 | self.window.rootViewController = rootViewController;
29 | [self.window makeKeyAndVisible];
30 | return YES;
31 | }
32 |
33 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
34 | {
35 | #if DEBUG
36 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
37 | #else
38 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
39 | #endif
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/ExampleApp/ios/ExampleApp-tvOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UIViewControllerBasedStatusBarAppearance
38 |
39 | NSLocationWhenInUseUsageDescription
40 |
41 | NSAppTransportSecurity
42 |
43 |
44 | NSExceptionDomains
45 |
46 | localhost
47 |
48 | NSExceptionAllowsInsecureHTTPLoads
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/ExampleApp/ios/ExampleApp/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ExampleApp
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 | NSLocationWhenInUseUsageDescription
28 |
29 | UILaunchStoryboardName
30 | LaunchScreen
31 | UIRequiredDeviceCapabilities
32 |
33 | armv7
34 |
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 |
41 | UIViewControllerBasedStatusBarAppearance
42 |
43 | NSLocationWhenInUseUsageDescription
44 |
45 | NSAppTransportSecurity
46 |
47 |
48 | NSAllowsArbitraryLoads
49 |
50 | NSExceptionDomains
51 |
52 | localhost
53 |
54 | NSExceptionAllowsInsecureHTTPLoads
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/ExampleApp/ios/ExampleAppTests/ExampleAppTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 | #import
10 |
11 | #import
12 | #import
13 |
14 | #define TIMEOUT_SECONDS 600
15 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
16 |
17 | @interface ExampleAppTests : XCTestCase
18 |
19 | @end
20 |
21 | @implementation ExampleAppTests
22 |
23 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
24 | {
25 | if (test(view)) {
26 | return YES;
27 | }
28 | for (UIView *subview in [view subviews]) {
29 | if ([self findSubviewInView:subview matching:test]) {
30 | return YES;
31 | }
32 | }
33 | return NO;
34 | }
35 |
36 | - (void)testRendersWelcomeScreen
37 | {
38 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
39 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
40 | BOOL foundElement = NO;
41 |
42 | __block NSString *redboxError = nil;
43 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
44 | if (level >= RCTLogLevelError) {
45 | redboxError = message;
46 | }
47 | });
48 |
49 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
50 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
51 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
52 |
53 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
54 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
55 | return YES;
56 | }
57 | return NO;
58 | }];
59 | }
60 |
61 | RCTSetLogFunction(RCTDefaultLogFunction);
62 |
63 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
64 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
65 | }
66 |
67 |
68 | @end
69 |
--------------------------------------------------------------------------------
/ExampleApp/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore unexpected extra "@providesModule"
9 | .*/node_modules/.*/node_modules/fbjs/.*
10 |
11 | ; Ignore duplicate module providers
12 | ; For RN Apps installed via npm, "Libraries" folder is inside
13 | ; "node_modules/react-native" but in the source repo it is in the root
14 | .*/Libraries/react-native/React.js
15 |
16 | ; Ignore polyfills
17 | .*/Libraries/polyfills/.*
18 |
19 | ; Ignore metro
20 | .*/node_modules/metro/.*
21 |
22 | [include]
23 |
24 | [libs]
25 | node_modules/react-native/Libraries/react-native/react-native-interface.js
26 | node_modules/react-native/flow/
27 |
28 | [options]
29 | emoji=true
30 |
31 | esproposal.optional_chaining=enable
32 | esproposal.nullish_coalescing=enable
33 |
34 | module.system=haste
35 | module.system.haste.use_name_reducers=true
36 | # get basename
37 | module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
38 | # strip .js or .js.flow suffix
39 | module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
40 | # strip .ios suffix
41 | module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
42 | module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
43 | module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
44 | module.system.haste.paths.blacklist=.*/__tests__/.*
45 | module.system.haste.paths.blacklist=.*/__mocks__/.*
46 | module.system.haste.paths.blacklist=/node_modules/react-native/Libraries/Animated/src/polyfills/.*
47 | module.system.haste.paths.whitelist=/node_modules/react-native/Libraries/.*
48 |
49 | munge_underscores=true
50 |
51 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
52 |
53 | module.file_ext=.js
54 | module.file_ext=.jsx
55 | module.file_ext=.json
56 | module.file_ext=.native.js
57 |
58 | suppress_type=$FlowIssue
59 | suppress_type=$FlowFixMe
60 | suppress_type=$FlowFixMeProps
61 | suppress_type=$FlowFixMeState
62 |
63 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
64 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
65 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
66 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
67 |
68 | [version]
69 | ^0.92.0
70 |
--------------------------------------------------------------------------------
/ExampleApp/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 http://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 Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
34 |
35 | @rem Find java.exe
36 | if defined JAVA_HOME goto findJavaFromJavaHome
37 |
38 | set JAVA_EXE=java.exe
39 | %JAVA_EXE% -version >NUL 2>&1
40 | if "%ERRORLEVEL%" == "0" goto init
41 |
42 | echo.
43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
44 | echo.
45 | echo Please set the JAVA_HOME variable in your environment to match the
46 | echo location of your Java installation.
47 |
48 | goto fail
49 |
50 | :findJavaFromJavaHome
51 | set JAVA_HOME=%JAVA_HOME:"=%
52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
53 |
54 | if exist "%JAVA_EXE%" goto init
55 |
56 | echo.
57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
58 | echo.
59 | echo Please set the JAVA_HOME variable in your environment to match the
60 | echo location of your Java installation.
61 |
62 | goto fail
63 |
64 | :init
65 | @rem Get command-line arguments, handling Windows variants
66 |
67 | if not "%OS%" == "Windows_NT" goto win9xME_args
68 |
69 | :win9xME_args
70 | @rem Slurp the command line arguments.
71 | set CMD_LINE_ARGS=
72 | set _SKIP=2
73 |
74 | :win9xME_args_slurp
75 | if "x%~1" == "x" goto execute
76 |
77 | set CMD_LINE_ARGS=%*
78 |
79 | :execute
80 | @rem Setup the command line
81 |
82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
83 |
84 | @rem Execute Gradle
85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
86 |
87 | :end
88 | @rem End local scope for the variables with windows NT shell
89 | if "%ERRORLEVEL%"=="0" goto mainEnd
90 |
91 | :fail
92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
93 | rem the _cmd.exe /c_ return code!
94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
95 | exit /b 1
96 |
97 | :mainEnd
98 | if "%OS%"=="Windows_NT" endlocal
99 |
100 | :omega
101 |
--------------------------------------------------------------------------------
/ExampleApp/ios/ExampleApp/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/ExampleApp/ios/ExampleApp.xcodeproj/xcshareddata/xcschemes/ExampleApp.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
43 |
49 |
50 |
51 |
52 |
53 |
58 |
59 |
61 |
67 |
68 |
69 |
70 |
71 |
77 |
78 |
79 |
80 |
81 |
82 |
92 |
94 |
100 |
101 |
102 |
103 |
104 |
105 |
111 |
113 |
119 |
120 |
121 |
122 |
124 |
125 |
128 |
129 |
130 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # react-native-image-tools-wm
2 | A collection of image processing tools for React Native
3 |
4 | ## Getting started
5 |
6 | `$ npm install react-native-image-tools-wm --save`
7 |
8 | ### Automatic installation
9 |
10 | `$ react-native link react-native-image-tools-wm`
11 |
12 | ### Manual installation
13 |
14 | #### iOS
15 |
16 | 1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
17 | 2. Go to `node_modules` ➜ `react-native-image-tools-wm` and add `RNImageTools.xcodeproj`
18 | 3. In XCode, in the project navigator, select your project. Add `libRNImageTools.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
19 | 4. Run your project (`Cmd+R`)
20 |
21 | #### iOS CocoaPods
22 | 1. Add `pod 'RNImageTools', :path => '../node_modules/react-native-image-tools-wm'` to your `ios/Podfile`
23 | 2. Run `pod install` while in `ios` directory
24 |
25 | #### Android
26 |
27 | 1. Open up `android/app/src/main/java/[...]/MainApplication.java`
28 |
29 | - Add `import net.wowmaking.RNImageToolsPackage;` to the imports at the top of the file
30 | - Add `new RNImageToolsPackage()` to the list returned by the `getPackages()` method
31 |
32 | 2. Append the following lines to `android/settings.gradle`:
33 | ```
34 | include ':react-native-image-tools-wm'
35 | project(':react-native-image-tools-wm').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-tools-wm/android')
36 | ```
37 | 3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
38 | ```
39 | implementation project(':react-native-image-tools-wm')
40 | ```
41 | ## Usage
42 |
43 | ```javascript
44 | import RNImageTools from 'react-native-image-tools-wm';
45 | ```
46 | See examples in the API section.
47 |
48 | ## API
49 | ### mask(image, maskImage)
50 | #### Parameter(s)
51 | * **image:** String - path to image
52 | * **maskImage:** String - path to mask image
53 | * **options:** Object
54 | * **trimTransparency:** Boolean
55 | #### Returns Promise of
56 | * **maskedImage:** Object
57 | * **uri:** String
58 | * **width:** Number
59 | * **height:** Number
60 | ```javascript
61 | RNImageTools.mask(image, maskImage, {
62 | trimTransparency: true
63 | }).then(({ uri, width, height }) => {
64 | // Sync with your app state
65 | }).catch(console.error);
66 | ```
67 |
68 |
69 | ### transform(image, translateX, translateY, scale, rotate)
70 | #### Parameter(s)
71 | * **image:** String - path to image
72 | * **translateX:** Number
73 | * **translateY:** Number
74 | * **scale:** Number
75 | * **rotate:** Number - in degrees
76 | #### Returns Promise of
77 | * **transformedImage:** Object
78 | * **uri:** String
79 | * **width:** Number
80 | * **height:** Number
81 | ```javascript
82 | RNImageTools.transform(image, 10, -10, 1.25, 45)
83 | .then(({ uri, width, height }) => {
84 | // Sync with your app state
85 | })
86 | .catch(console.error);
87 | ```
88 |
89 |
90 | ### resize(image, width, height)
91 | #### Parameter(s)
92 | * **image:** String - path to image
93 | * **width:** Number
94 | * **height:** Number - in degrees
95 | #### Returns Promise of
96 | * **resizedImage:** Object
97 | * **uri:** String
98 | * **width:** Number
99 | * **height:** Number
100 | ```javascript
101 | RNImageTools.resize(image, 500, 500)
102 | .then(({ uri, width, height }) => {
103 | // Sync with your app state
104 | })
105 | .catch(console.error);
106 | ```
107 |
108 |
109 | ### crop(image, x, y, width, height)
110 | #### Parameter(s)
111 | * **image:** String - path to image
112 | * **x:** Number - top offset
113 | * **y:** Number - left offset
114 | * **width:** Number
115 | * **height:** Number
116 | #### Returns Promise of
117 | * **croppedImage:** Object
118 | * **uri:** String
119 | * **width:** Number
120 | * **height:** Number
121 | ```javascript
122 | RNImageTools.crop(image, 100, 100, 500, 500)
123 | .then(({ uri, width, height }) => {
124 | // Sync with your app state
125 | })
126 | .catch(console.error);
127 | ```
128 |
129 |
130 | ### createMaskFromShape(options)
131 | Creates a bitmap with white background and draws a black shape from provided points. It's intended usage is to generate mask images on the fly.
132 | #### Parameter(s)
133 | * **options:** Object
134 | * **points:** Array of points
135 | * **point:** Object
136 | * **x:** Number
137 | * **y:** Number
138 | * **width:** Number
139 | * **height:** Number
140 | * **inverted:** Boolean
141 | #### Returns Promise of
142 | * **maskImage:** Object
143 | * **uri:** String
144 | * **width:** Number
145 | * **height:** Number
146 | ```javascript
147 | RNImageTools.createMaskFromShape({
148 | points: [
149 | { x: 20, y: 20 },
150 | { x: 200, y: 200 },
151 | { x: 200, y: 20 },
152 | { x: 20, y: 20 },
153 | ],
154 | width: 500,
155 | height: 500,
156 | inverted: false,
157 | }).then(({ uri, width, height }) => {
158 | // Sync with your app state
159 | }).catch(console.error);
160 | ```
161 |
162 | ### merge(images)
163 | #### Parameter(s)
164 | * **images:** Array
165 | * **uri:** String - path to image
166 | #### Returns Promise of
167 | * **mergedImage:** Object
168 | * **uri:** String
169 | * **width:** Number
170 | * **height:** Number
171 | ```javascript
172 | RNImageTools.merge(
173 | [
174 | image1,
175 | image2,
176 | image3,
177 | ]
178 | ).then(({ uri, width, height }) => {
179 | // Sync with your app state
180 | }).catch(console.error);
181 | ```
--------------------------------------------------------------------------------
/ExampleApp/ios/ExampleApp.xcodeproj/xcshareddata/xcschemes/ExampleApp-tvOS.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
43 |
49 |
50 |
51 |
52 |
53 |
58 |
59 |
61 |
67 |
68 |
69 |
70 |
71 |
77 |
78 |
79 |
80 |
81 |
82 |
92 |
94 |
100 |
101 |
102 |
103 |
104 |
105 |
111 |
113 |
119 |
120 |
121 |
122 |
124 |
125 |
128 |
129 |
130 |
--------------------------------------------------------------------------------
/ExampleApp/App.js:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | import {
3 | StyleSheet,
4 | Text,
5 | View,
6 | ScrollView,
7 | TouchableOpacity,
8 | SafeAreaView,
9 | Image,
10 | } from 'react-native';
11 | import RNImageTools from 'react-native-image-tools-wm';
12 |
13 | const assetSource = Image.resolveAssetSource(require('./image.jpg'));
14 | const balloonsAssetSource = Image.resolveAssetSource(require('./balloons.png'));
15 |
16 | const TARGET_IMAGE_WIDTH = 200;
17 | const TARGET_IMAGE_HEIGHT = 200;
18 |
19 | const Button = ({ text, onPress }) => (
20 |
21 | {text}
22 |
23 | );
24 |
25 | export default class App extends Component {
26 |
27 | state = {
28 | previewImageSource: null,
29 | };
30 |
31 | handleResizeImage = () => {
32 | RNImageTools.resize(assetSource.uri, TARGET_IMAGE_WIDTH, TARGET_IMAGE_HEIGHT).then(result => {
33 | this.setState({
34 | previewImageSource: result
35 | });
36 | }).catch(console.error);
37 | };
38 |
39 | handleCropImage = () => {
40 | RNImageTools.crop(assetSource.uri, 50, 50, TARGET_IMAGE_WIDTH, TARGET_IMAGE_HEIGHT).then(result => {
41 | this.setState({
42 | previewImageSource: result
43 | });
44 | }).catch(console.error);
45 | };
46 |
47 | handleCreateMask = () => {
48 | RNImageTools.createMaskFromShape({
49 | points: [
50 | { x: 10, y: 10 },
51 | { x: 80, y: 80 },
52 | { x: 80, y: 10 },
53 | { x: 10, y: 10 },
54 | ],
55 | width: TARGET_IMAGE_WIDTH,
56 | height: TARGET_IMAGE_HEIGHT,
57 | inverted: true,
58 | }).then(result => {
59 | this.setState({
60 | previewImageSource: result
61 | });
62 | }).catch(console.error);
63 | };
64 |
65 | handleMaskImage = () => {
66 | RNImageTools.createMaskFromShape({
67 | points: [
68 | { x: 10, y: 10 },
69 | { x: 80, y: 80 },
70 | { x: 80, y: 10 },
71 | { x: 10, y: 10 },
72 | ],
73 | width: TARGET_IMAGE_WIDTH,
74 | height: TARGET_IMAGE_HEIGHT,
75 | inverted: true,
76 | }).then(maskImage => {
77 | return RNImageTools.mask(assetSource.uri, maskImage.uri, {
78 | trimTransparency: true
79 | }).then(maskedImage => {
80 | this.setState({
81 | previewImageSource: maskedImage
82 | });
83 | }).catch(console.error);
84 | }).catch(console.error);
85 | };
86 |
87 | handleMergeImages = () => {
88 | RNImageTools.merge([
89 | assetSource.uri,
90 | balloonsAssetSource.uri,
91 | ]).then(mergedImage => {
92 | this.setState({
93 | previewImageSource: mergedImage
94 | });
95 | }).catch(console.error);
96 | };
97 |
98 | handleTransformImage = () => {
99 | RNImageTools.transform(balloonsAssetSource.uri, 10, -10, 0.9, 45).then(result => {
100 | this.setState({
101 | previewImageSource: result
102 | });
103 | }).catch(console.error);
104 | };
105 |
106 |
107 | render() {
108 | return (
109 |
110 |
111 |
112 | Preview
113 |
114 | {this.state.previewImageSource ? (
115 |
116 | ) : (
117 | No image
118 | )}
119 |
120 |
121 |
122 | Methods
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 | );
135 | }
136 | }
137 |
138 | const styles = StyleSheet.create({
139 | container: {
140 | flex: 1,
141 | justifyContent: "center",
142 | alignItems: "center",
143 | backgroundColor: "#f4f4fb",
144 | },
145 | btn: {
146 | backgroundColor: "#1c76ee",
147 | margin: 5,
148 | paddingVertical: 5,
149 | paddingHorizontal: 10,
150 | borderRadius: 100
151 | },
152 | btnText: {
153 | color: "#fff",
154 | fontSize: 14,
155 | fontWeight: "bold"
156 | },
157 | row: {
158 | flexDirection: "row",
159 | flexWrap: "wrap",
160 | alignItems: "center",
161 | justifyContent: "center",
162 | padding: 3
163 | },
164 | col: {
165 | alignItems: "center",
166 | justifyContent: "center",
167 | padding: 3
168 | },
169 | textContent: {
170 | padding: 3,
171 | alignItems: "center"
172 | },
173 | group: {
174 | marginVertical: 5,
175 | minWidth: "100%",
176 | },
177 | title: {
178 | fontWeight: "bold",
179 | width: "100%",
180 | backgroundColor: "#e6e1e4",
181 | textAlign: "center",
182 | padding: 3
183 | },
184 | preview: {
185 | backgroundColor: '#343434',
186 | minHeight: TARGET_IMAGE_HEIGHT,
187 | alignItems: 'center',
188 | justifyContent: 'center',
189 | },
190 | previewText: {
191 | color: "#fff",
192 | },
193 | previewImage: {
194 | maxWidth: '100%'
195 | },
196 | });
--------------------------------------------------------------------------------
/ExampleApp/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or 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 | # http://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 UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 | # Determine the Java command to use to start the JVM.
86 | if [ -n "$JAVA_HOME" ] ; then
87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88 | # IBM's JDK on AIX uses strange locations for the executables
89 | JAVACMD="$JAVA_HOME/jre/sh/java"
90 | else
91 | JAVACMD="$JAVA_HOME/bin/java"
92 | fi
93 | if [ ! -x "$JAVACMD" ] ; then
94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95 |
96 | Please set the JAVA_HOME variable in your environment to match the
97 | location of your Java installation."
98 | fi
99 | else
100 | JAVACMD="java"
101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102 |
103 | Please set the JAVA_HOME variable in your environment to match the
104 | location of your Java installation."
105 | fi
106 |
107 | # Increase the maximum file descriptors if we can.
108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109 | MAX_FD_LIMIT=`ulimit -H -n`
110 | if [ $? -eq 0 ] ; then
111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112 | MAX_FD="$MAX_FD_LIMIT"
113 | fi
114 | ulimit -n $MAX_FD
115 | if [ $? -ne 0 ] ; then
116 | warn "Could not set maximum file descriptor limit: $MAX_FD"
117 | fi
118 | else
119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120 | fi
121 | fi
122 |
123 | # For Darwin, add options to specify how the application appears in the dock
124 | if $darwin; then
125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126 | fi
127 |
128 | # For Cygwin, switch paths to Windows format before running java
129 | if $cygwin ; then
130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132 | JAVACMD=`cygpath --unix "$JAVACMD"`
133 |
134 | # We build the pattern for arguments to be converted via cygpath
135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136 | SEP=""
137 | for dir in $ROOTDIRSRAW ; do
138 | ROOTDIRS="$ROOTDIRS$SEP$dir"
139 | SEP="|"
140 | done
141 | OURCYGPATTERN="(^($ROOTDIRS))"
142 | # Add a user-defined pattern to the cygpath arguments
143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145 | fi
146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
147 | i=0
148 | for arg in "$@" ; do
149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151 |
152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154 | else
155 | eval `echo args$i`="\"$arg\""
156 | fi
157 | i=$((i+1))
158 | done
159 | case $i in
160 | (0) set -- ;;
161 | (1) set -- "$args0" ;;
162 | (2) set -- "$args0" "$args1" ;;
163 | (3) set -- "$args0" "$args1" "$args2" ;;
164 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170 | esac
171 | fi
172 |
173 | # Escape application args
174 | save () {
175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176 | echo " "
177 | }
178 | APP_ARGS=$(save "$@")
179 |
180 | # Collect all arguments for the java command, following the shell quoting and substitution rules
181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182 |
183 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185 | cd "$(dirname "$0")"
186 | fi
187 |
188 | exec "$JAVACMD" "$@"
189 |
--------------------------------------------------------------------------------
/ExampleApp/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
19 | * entryFile: "index.android.js",
20 | *
21 | * // whether to bundle JS and assets in debug mode
22 | * bundleInDebug: false,
23 | *
24 | * // whether to bundle JS and assets in release mode
25 | * bundleInRelease: true,
26 | *
27 | * // whether to bundle JS and assets in another build variant (if configured).
28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
29 | * // The configuration property can be in the following formats
30 | * // 'bundleIn${productFlavor}${buildType}'
31 | * // 'bundleIn${buildType}'
32 | * // bundleInFreeDebug: true,
33 | * // bundleInPaidRelease: true,
34 | * // bundleInBeta: true,
35 | *
36 | * // whether to disable dev mode in custom build variants (by default only disabled in release)
37 | * // for example: to disable dev mode in the staging build type (if configured)
38 | * devDisabledInStaging: true,
39 | * // The configuration property can be in the following formats
40 | * // 'devDisabledIn${productFlavor}${buildType}'
41 | * // 'devDisabledIn${buildType}'
42 | *
43 | * // the root of your project, i.e. where "package.json" lives
44 | * root: "../../",
45 | *
46 | * // where to put the JS bundle asset in debug mode
47 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
48 | *
49 | * // where to put the JS bundle asset in release mode
50 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
51 | *
52 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
53 | * // require('./image.png')), in debug mode
54 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
55 | *
56 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
57 | * // require('./image.png')), in release mode
58 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
59 | *
60 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
61 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
62 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
63 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
64 | * // for example, you might want to remove it from here.
65 | * inputExcludes: ["android/**", "ios/**"],
66 | *
67 | * // override which node gets called and with what additional arguments
68 | * nodeExecutableAndArgs: ["node"],
69 | *
70 | * // supply additional arguments to the packager
71 | * extraPackagerArgs: []
72 | * ]
73 | */
74 |
75 | project.ext.react = [
76 | entryFile: "index.js"
77 | ]
78 |
79 | apply from: "../../node_modules/react-native/react.gradle"
80 |
81 | /**
82 | * Set this to true to create two separate APKs instead of one:
83 | * - An APK that only works on ARM devices
84 | * - An APK that only works on x86 devices
85 | * The advantage is the size of the APK is reduced by about 4MB.
86 | * Upload all the APKs to the Play Store and people will download
87 | * the correct one based on the CPU architecture of their device.
88 | */
89 | def enableSeparateBuildPerCPUArchitecture = false
90 |
91 | /**
92 | * Run Proguard to shrink the Java bytecode in release builds.
93 | */
94 | def enableProguardInReleaseBuilds = false
95 |
96 | android {
97 | compileSdkVersion rootProject.ext.compileSdkVersion
98 |
99 | compileOptions {
100 | sourceCompatibility JavaVersion.VERSION_1_8
101 | targetCompatibility JavaVersion.VERSION_1_8
102 | }
103 |
104 | defaultConfig {
105 | applicationId "com.exampleapp"
106 | minSdkVersion rootProject.ext.minSdkVersion
107 | targetSdkVersion rootProject.ext.targetSdkVersion
108 | versionCode 1
109 | versionName "1.0"
110 | }
111 | splits {
112 | abi {
113 | reset()
114 | enable enableSeparateBuildPerCPUArchitecture
115 | universalApk false // If true, also generate a universal APK
116 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
117 | }
118 | }
119 | buildTypes {
120 | release {
121 | minifyEnabled enableProguardInReleaseBuilds
122 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
123 | }
124 | }
125 | // applicationVariants are e.g. debug, release
126 | applicationVariants.all { variant ->
127 | variant.outputs.each { output ->
128 | // For each separate APK per architecture, set a unique version code as described here:
129 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
130 | def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
131 | def abi = output.getFilter(OutputFile.ABI)
132 | if (abi != null) { // null for the universal-debug, universal-release variants
133 | output.versionCodeOverride =
134 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
135 | }
136 | }
137 | }
138 | }
139 |
140 | dependencies {
141 | implementation fileTree(dir: "libs", include: ["*.jar"])
142 | implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
143 | implementation "com.facebook.react:react-native:+" // From node_modules
144 |
145 | implementation project(':react-native-image-tools-wm')
146 | }
147 |
148 | // Run this once to be able to run the application with BUCK
149 | // puts all compile dependencies into folder libs for BUCK to use
150 | task copyDownloadableDepsToLibs(type: Copy) {
151 | from configurations.compile
152 | into 'libs'
153 | }
154 |
--------------------------------------------------------------------------------
/ios/RNImageTools.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | B3E7B58A1CC2AC0600A0062D /* RNImageTools.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNImageTools.m */; };
11 | /* End PBXBuildFile section */
12 |
13 | /* Begin PBXCopyFilesBuildPhase section */
14 | 58B511D91A9E6C8500147676 /* CopyFiles */ = {
15 | isa = PBXCopyFilesBuildPhase;
16 | buildActionMask = 2147483647;
17 | dstPath = "include/$(PRODUCT_NAME)";
18 | dstSubfolderSpec = 16;
19 | files = (
20 | );
21 | runOnlyForDeploymentPostprocessing = 0;
22 | };
23 | /* End PBXCopyFilesBuildPhase section */
24 |
25 | /* Begin PBXFileReference section */
26 | 134814201AA4EA6300B7C361 /* libRNImageTools.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNImageTools.a; sourceTree = BUILT_PRODUCTS_DIR; };
27 | B3E7B5881CC2AC0600A0062D /* RNImageTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNImageTools.h; sourceTree = ""; };
28 | B3E7B5891CC2AC0600A0062D /* RNImageTools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNImageTools.m; sourceTree = ""; };
29 | /* End PBXFileReference section */
30 |
31 | /* Begin PBXFrameworksBuildPhase section */
32 | 58B511D81A9E6C8500147676 /* Frameworks */ = {
33 | isa = PBXFrameworksBuildPhase;
34 | buildActionMask = 2147483647;
35 | files = (
36 | );
37 | runOnlyForDeploymentPostprocessing = 0;
38 | };
39 | /* End PBXFrameworksBuildPhase section */
40 |
41 | /* Begin PBXGroup section */
42 | 134814211AA4EA7D00B7C361 /* Products */ = {
43 | isa = PBXGroup;
44 | children = (
45 | 134814201AA4EA6300B7C361 /* libRNImageTools.a */,
46 | );
47 | name = Products;
48 | sourceTree = "";
49 | };
50 | 58B511D21A9E6C8500147676 = {
51 | isa = PBXGroup;
52 | children = (
53 | B3E7B5881CC2AC0600A0062D /* RNImageTools.h */,
54 | B3E7B5891CC2AC0600A0062D /* RNImageTools.m */,
55 | 134814211AA4EA7D00B7C361 /* Products */,
56 | );
57 | sourceTree = "";
58 | };
59 | /* End PBXGroup section */
60 |
61 | /* Begin PBXNativeTarget section */
62 | 58B511DA1A9E6C8500147676 /* RNImageTools */ = {
63 | isa = PBXNativeTarget;
64 | buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNImageTools" */;
65 | buildPhases = (
66 | 58B511D71A9E6C8500147676 /* Sources */,
67 | 58B511D81A9E6C8500147676 /* Frameworks */,
68 | 58B511D91A9E6C8500147676 /* CopyFiles */,
69 | );
70 | buildRules = (
71 | );
72 | dependencies = (
73 | );
74 | name = RNImageTools;
75 | productName = RCTDataManager;
76 | productReference = 134814201AA4EA6300B7C361 /* libRNImageTools.a */;
77 | productType = "com.apple.product-type.library.static";
78 | };
79 | /* End PBXNativeTarget section */
80 |
81 | /* Begin PBXProject section */
82 | 58B511D31A9E6C8500147676 /* Project object */ = {
83 | isa = PBXProject;
84 | attributes = {
85 | LastUpgradeCheck = 0830;
86 | ORGANIZATIONNAME = Facebook;
87 | TargetAttributes = {
88 | 58B511DA1A9E6C8500147676 = {
89 | CreatedOnToolsVersion = 6.1.1;
90 | };
91 | };
92 | };
93 | buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNImageTools" */;
94 | compatibilityVersion = "Xcode 3.2";
95 | developmentRegion = English;
96 | hasScannedForEncodings = 0;
97 | knownRegions = (
98 | en,
99 | );
100 | mainGroup = 58B511D21A9E6C8500147676;
101 | productRefGroup = 58B511D21A9E6C8500147676;
102 | projectDirPath = "";
103 | projectRoot = "";
104 | targets = (
105 | 58B511DA1A9E6C8500147676 /* RNImageTools */,
106 | );
107 | };
108 | /* End PBXProject section */
109 |
110 | /* Begin PBXSourcesBuildPhase section */
111 | 58B511D71A9E6C8500147676 /* Sources */ = {
112 | isa = PBXSourcesBuildPhase;
113 | buildActionMask = 2147483647;
114 | files = (
115 | B3E7B58A1CC2AC0600A0062D /* RNImageTools.m in Sources */,
116 | );
117 | runOnlyForDeploymentPostprocessing = 0;
118 | };
119 | /* End PBXSourcesBuildPhase section */
120 |
121 | /* Begin XCBuildConfiguration section */
122 | 58B511ED1A9E6C8500147676 /* Debug */ = {
123 | isa = XCBuildConfiguration;
124 | buildSettings = {
125 | ALWAYS_SEARCH_USER_PATHS = NO;
126 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
127 | CLANG_CXX_LIBRARY = "libc++";
128 | CLANG_ENABLE_MODULES = YES;
129 | CLANG_ENABLE_OBJC_ARC = YES;
130 | CLANG_WARN_BOOL_CONVERSION = YES;
131 | CLANG_WARN_CONSTANT_CONVERSION = YES;
132 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
133 | CLANG_WARN_EMPTY_BODY = YES;
134 | CLANG_WARN_ENUM_CONVERSION = YES;
135 | CLANG_WARN_INFINITE_RECURSION = YES;
136 | CLANG_WARN_INT_CONVERSION = YES;
137 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
138 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
139 | CLANG_WARN_UNREACHABLE_CODE = YES;
140 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
141 | COPY_PHASE_STRIP = NO;
142 | ENABLE_STRICT_OBJC_MSGSEND = YES;
143 | ENABLE_TESTABILITY = YES;
144 | GCC_C_LANGUAGE_STANDARD = gnu99;
145 | GCC_DYNAMIC_NO_PIC = NO;
146 | GCC_NO_COMMON_BLOCKS = YES;
147 | GCC_OPTIMIZATION_LEVEL = 0;
148 | GCC_PREPROCESSOR_DEFINITIONS = (
149 | "DEBUG=1",
150 | "$(inherited)",
151 | );
152 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
153 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
154 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
155 | GCC_WARN_UNDECLARED_SELECTOR = YES;
156 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
157 | GCC_WARN_UNUSED_FUNCTION = YES;
158 | GCC_WARN_UNUSED_VARIABLE = YES;
159 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
160 | MTL_ENABLE_DEBUG_INFO = YES;
161 | ONLY_ACTIVE_ARCH = YES;
162 | SDKROOT = iphoneos;
163 | };
164 | name = Debug;
165 | };
166 | 58B511EE1A9E6C8500147676 /* Release */ = {
167 | isa = XCBuildConfiguration;
168 | buildSettings = {
169 | ALWAYS_SEARCH_USER_PATHS = NO;
170 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
171 | CLANG_CXX_LIBRARY = "libc++";
172 | CLANG_ENABLE_MODULES = YES;
173 | CLANG_ENABLE_OBJC_ARC = YES;
174 | CLANG_WARN_BOOL_CONVERSION = YES;
175 | CLANG_WARN_CONSTANT_CONVERSION = YES;
176 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
177 | CLANG_WARN_EMPTY_BODY = YES;
178 | CLANG_WARN_ENUM_CONVERSION = YES;
179 | CLANG_WARN_INFINITE_RECURSION = YES;
180 | CLANG_WARN_INT_CONVERSION = YES;
181 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
182 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
183 | CLANG_WARN_UNREACHABLE_CODE = YES;
184 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
185 | COPY_PHASE_STRIP = YES;
186 | ENABLE_NS_ASSERTIONS = NO;
187 | ENABLE_STRICT_OBJC_MSGSEND = YES;
188 | GCC_C_LANGUAGE_STANDARD = gnu99;
189 | GCC_NO_COMMON_BLOCKS = YES;
190 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
191 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
192 | GCC_WARN_UNDECLARED_SELECTOR = YES;
193 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
194 | GCC_WARN_UNUSED_FUNCTION = YES;
195 | GCC_WARN_UNUSED_VARIABLE = YES;
196 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
197 | MTL_ENABLE_DEBUG_INFO = NO;
198 | SDKROOT = iphoneos;
199 | VALIDATE_PRODUCT = YES;
200 | };
201 | name = Release;
202 | };
203 | 58B511F01A9E6C8500147676 /* Debug */ = {
204 | isa = XCBuildConfiguration;
205 | buildSettings = {
206 | HEADER_SEARCH_PATHS = (
207 | "$(inherited)",
208 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
209 | "$(SRCROOT)/../../../React/**",
210 | "$(SRCROOT)/../../react-native/React/**",
211 | );
212 | LIBRARY_SEARCH_PATHS = "$(inherited)";
213 | OTHER_LDFLAGS = "-ObjC";
214 | PRODUCT_NAME = RNImageTools;
215 | SKIP_INSTALL = YES;
216 | };
217 | name = Debug;
218 | };
219 | 58B511F11A9E6C8500147676 /* Release */ = {
220 | isa = XCBuildConfiguration;
221 | buildSettings = {
222 | HEADER_SEARCH_PATHS = (
223 | "$(inherited)",
224 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
225 | "$(SRCROOT)/../../../React/**",
226 | "$(SRCROOT)/../../react-native/React/**",
227 | );
228 | LIBRARY_SEARCH_PATHS = "$(inherited)";
229 | OTHER_LDFLAGS = "-ObjC";
230 | PRODUCT_NAME = RNImageTools;
231 | SKIP_INSTALL = YES;
232 | };
233 | name = Release;
234 | };
235 | /* End XCBuildConfiguration section */
236 |
237 | /* Begin XCConfigurationList section */
238 | 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNImageTools" */ = {
239 | isa = XCConfigurationList;
240 | buildConfigurations = (
241 | 58B511ED1A9E6C8500147676 /* Debug */,
242 | 58B511EE1A9E6C8500147676 /* Release */,
243 | );
244 | defaultConfigurationIsVisible = 0;
245 | defaultConfigurationName = Release;
246 | };
247 | 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNImageTools" */ = {
248 | isa = XCConfigurationList;
249 | buildConfigurations = (
250 | 58B511F01A9E6C8500147676 /* Debug */,
251 | 58B511F11A9E6C8500147676 /* Release */,
252 | );
253 | defaultConfigurationIsVisible = 0;
254 | defaultConfigurationName = Release;
255 | };
256 | /* End XCConfigurationList section */
257 | };
258 | rootObject = 58B511D31A9E6C8500147676 /* Project object */;
259 | }
260 |
--------------------------------------------------------------------------------
/android/src/main/java/net/wowmaking/RNImageToolsModule.java:
--------------------------------------------------------------------------------
1 |
2 | package net.wowmaking;
3 |
4 | import android.graphics.Bitmap;
5 | import android.graphics.Canvas;
6 | import android.graphics.Color;
7 | import android.graphics.Matrix;
8 | import android.graphics.Paint;
9 | import android.graphics.Path;
10 | import android.graphics.PorterDuff;
11 | import android.graphics.PorterDuffXfermode;
12 | import android.graphics.Rect;
13 |
14 | import com.facebook.react.bridge.Promise;
15 | import com.facebook.react.bridge.ReactApplicationContext;
16 | import com.facebook.react.bridge.ReactContextBaseJavaModule;
17 | import com.facebook.react.bridge.ReactMethod;
18 | import com.facebook.react.bridge.ReadableArray;
19 | import com.facebook.react.bridge.ReadableMap;
20 | import com.facebook.react.bridge.WritableMap;
21 |
22 | import java.io.File;
23 | import java.util.HashMap;
24 |
25 | public class RNImageToolsModule extends ReactContextBaseJavaModule {
26 |
27 | private final ReactApplicationContext reactContext;
28 |
29 | public RNImageToolsModule(ReactApplicationContext reactContext) {
30 | super(reactContext);
31 | this.reactContext = reactContext;
32 | }
33 |
34 | @ReactMethod
35 | public void resize(String uriString, int width, int height, final Promise promise) {
36 | Bitmap bmp = Utility.bitmapFromUriString(uriString, promise, reactContext);
37 | if (bmp == null) {
38 | return;
39 | }
40 |
41 | final HashMap containedRectMap = Utility.calcRectForContainedRect(
42 | bmp.getWidth(), bmp.getHeight(),
43 | width, height
44 | );
45 | int rectWidth = (int) containedRectMap.get("width");
46 | int rectHeight = (int) containedRectMap.get("height");
47 | int rectX = (int) containedRectMap.get("x");
48 | int rectY = (int) containedRectMap.get("y");
49 |
50 | Bitmap editBmp = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
51 | Canvas canvas = new Canvas(editBmp);
52 |
53 | Rect srcRect = new Rect(0, 0, bmp.getWidth(), bmp.getHeight());
54 | Rect dstRect = new Rect(rectX, rectY, rectWidth + rectX, rectHeight + rectY);
55 |
56 | canvas.drawBitmap(bmp, srcRect, dstRect, null);
57 |
58 | File file = Utility.createRandomPNGFile(reactContext);
59 | Utility.writeBMPToPNGFile(editBmp, file, promise);
60 |
61 | final WritableMap map = Utility.buildImageReactMap(file, editBmp);
62 | promise.resolve(map);
63 | }
64 |
65 | @ReactMethod
66 | public void crop(String uriString, int x, int y, int width, int height, final Promise promise) {
67 | Bitmap bmp = Utility.bitmapFromUriString(uriString, promise, reactContext);
68 | if (bmp == null) {
69 | return;
70 | }
71 | Bitmap croppedBmp = Bitmap.createBitmap(bmp, x, y, width, height);
72 |
73 | File file = Utility.createRandomPNGFile(reactContext);
74 | Utility.writeBMPToPNGFile(croppedBmp, file, promise);
75 |
76 | final WritableMap map = Utility.buildImageReactMap(file, croppedBmp);
77 | promise.resolve(map);
78 | }
79 |
80 | @ReactMethod
81 | public void transform(String uriString, float translateX, float translateY, float rotate, float scale, final Promise promise) {
82 | Bitmap bmp = Utility.bitmapFromUriString(uriString, promise, reactContext);
83 | if (bmp == null) {
84 | return;
85 | }
86 | Matrix mtrx = new Matrix();
87 | mtrx.preTranslate(translateX, translateY);
88 | mtrx.preTranslate(bmp.getWidth() / 2 * (1 - scale), bmp.getHeight() / 2 * (1 - scale));
89 | mtrx.preScale(scale, scale);
90 | mtrx.preRotate(rotate, bmp.getWidth() / 2, bmp.getHeight() / 2);
91 |
92 | Bitmap editBmp = Bitmap.createBitmap(bmp.getWidth(), bmp.getHeight(), Bitmap.Config.ARGB_8888);
93 |
94 | Canvas canvas = new Canvas(editBmp);
95 | Paint rectPaint = new Paint();
96 | rectPaint.setColor(Color.WHITE);
97 | canvas.drawRect(0, 0, bmp.getWidth(), bmp.getHeight(), rectPaint);
98 | canvas.drawBitmap(bmp, mtrx, null);
99 |
100 | File file = Utility.createRandomPNGFile(reactContext);
101 | Utility.writeBMPToPNGFile(editBmp, file, promise);
102 |
103 | final WritableMap map = Utility.buildImageReactMap(file, editBmp);
104 | promise.resolve(map);
105 | }
106 |
107 | @ReactMethod
108 | public void merge(ReadableArray uriStrings, Promise promise) {
109 | Bitmap firstBmp = Utility.bitmapFromUriString(uriStrings.getString(0), promise, reactContext);
110 | if (firstBmp == null) {
111 | return;
112 | }
113 | Bitmap editBmp = Bitmap.createBitmap(firstBmp.getWidth(), firstBmp.getHeight(), Bitmap.Config.ARGB_8888);
114 | Canvas canvas = new Canvas(editBmp);
115 | canvas.drawBitmap(firstBmp, new Matrix(), null);
116 |
117 | for (int i = 1; i < uriStrings.size(); i++) {
118 | Bitmap bmp = Utility.bitmapFromUriString(uriStrings.getString(i), promise, reactContext);
119 | if (bmp == null) {
120 | return;
121 | }
122 | Rect srcRect = new Rect(0, 0, bmp.getWidth(), bmp.getHeight());
123 | Rect dstRect = new Rect(0, 0, canvas.getWidth(), canvas.getHeight());
124 | canvas.drawBitmap(bmp, srcRect, dstRect, null);
125 | }
126 |
127 | File file = Utility.createRandomPNGFile(reactContext);
128 | Utility.writeBMPToPNGFile(editBmp, file, promise);
129 |
130 | final WritableMap map = Utility.buildImageReactMap(file, editBmp);
131 | promise.resolve(map);
132 | }
133 |
134 | @ReactMethod
135 | public void createMaskFromShape(ReadableMap options, Promise promise) {
136 | final ReadableArray points = options.getArray("points");
137 | final int width = options.getInt("width");
138 | final int height = options.getInt("height");
139 | final boolean inverted = options.getBoolean("inverted");
140 |
141 | final Paint bgPaint = new Paint();
142 | final Paint shapePaint = new Paint();
143 |
144 | if (inverted) {
145 | bgPaint.setColor(Color.BLACK);
146 | bgPaint.setAlpha(0);
147 | shapePaint.setColor(Color.WHITE);
148 | } else {
149 | bgPaint.setColor(Color.WHITE);
150 | shapePaint.setColor(Color.BLACK);
151 | shapePaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));
152 | }
153 |
154 | Bitmap bmp = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
155 | Canvas canvas = new Canvas(bmp);
156 |
157 | final Rect bgRect = new Rect(0, 0, width, height);
158 |
159 | canvas.drawRect(bgRect, bgPaint);
160 |
161 | final Path shapePath = new Path();
162 |
163 | for (int i = 0; i < points.size(); i++) {
164 | final ReadableMap pointsItem = points.getMap(i);
165 | final int x = pointsItem.getInt("x");
166 | final int y = pointsItem.getInt("y");
167 | if (i == 0) {
168 | shapePath.moveTo(x, y);
169 | } else {
170 | shapePath.lineTo(x, y);
171 | }
172 | if (i == points.size() - 1) {
173 | shapePath.close();
174 | }
175 | }
176 |
177 | canvas.drawPath(shapePath, shapePaint);
178 |
179 | File file = Utility.createRandomPNGFile(reactContext);
180 | Utility.writeBMPToPNGFile(bmp, file, promise);
181 |
182 | final WritableMap map = Utility.buildImageReactMap(file, bmp);
183 | promise.resolve(map);
184 | }
185 |
186 | @ReactMethod
187 | public void mask(String uriString, String maskUriString, ReadableMap options, Promise promise) {
188 |
189 | final boolean trimTransparency = options.getBoolean("trimTransparency");
190 |
191 | Bitmap bmp = Utility.bitmapFromUriString(uriString, promise, reactContext);
192 | if (bmp == null) {
193 | return;
194 | }
195 |
196 | Bitmap maskBmp = Utility.bitmapFromUriString(maskUriString, promise, reactContext);
197 | if (maskBmp == null) {
198 | return;
199 | }
200 |
201 | final HashMap containedRectMap = Utility.calcRectForContainedRect(
202 | maskBmp.getWidth(), maskBmp.getHeight(),
203 | bmp.getWidth(), bmp.getHeight()
204 | );
205 | int editWidth = (int) containedRectMap.get("width");
206 | int editHeight = (int) containedRectMap.get("height");
207 | int editX = (int) containedRectMap.get("x");
208 | int editY = (int) containedRectMap.get("y");
209 |
210 | Bitmap editBmp = Bitmap.createBitmap(editWidth, editHeight, Bitmap.Config.ARGB_8888);
211 | Canvas canvas = new Canvas(editBmp);
212 |
213 | Paint maskPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
214 | maskPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN));
215 |
216 | canvas.drawBitmap(bmp, -editX, editY, null);
217 |
218 | Rect maskSrcRect = new Rect(0, 0, maskBmp.getWidth(), maskBmp.getHeight());
219 | Rect maskDstRect = new Rect(0, 0, canvas.getWidth(), canvas.getHeight());
220 |
221 | canvas.drawBitmap(maskBmp, maskSrcRect, maskDstRect, maskPaint);
222 |
223 | maskPaint.setXfermode(null);
224 |
225 | canvas.drawBitmap(editBmp, 0, 0, new Paint());
226 |
227 | if (trimTransparency) {
228 | editBmp = Utility.trimTransparency(editBmp);
229 | }
230 |
231 | File file = Utility.createRandomPNGFile(reactContext);
232 | Utility.writeBMPToPNGFile(editBmp, file, promise);
233 |
234 | final WritableMap map = Utility.buildImageReactMap(file, editBmp);
235 | promise.resolve(map);
236 | }
237 |
238 |
239 | @Override
240 | public String getName() {
241 | return "RNImageTools";
242 | }
243 | }
244 |
--------------------------------------------------------------------------------
/android/src/main/java/net/wowmaking/Utility.java:
--------------------------------------------------------------------------------
1 | package net.wowmaking;
2 |
3 | import android.content.ContentResolver;
4 | import android.content.Context;
5 | import android.graphics.Bitmap;
6 | import android.graphics.BitmapFactory;
7 | import android.graphics.Color;
8 | import android.graphics.Matrix;
9 | import android.support.media.ExifInterface;
10 | import android.net.Uri;
11 | import android.os.Build;
12 |
13 | import com.facebook.react.bridge.Arguments;
14 | import com.facebook.react.bridge.Promise;
15 | import com.facebook.react.bridge.ReactContext;
16 | import com.facebook.react.bridge.WritableMap;
17 | import com.facebook.react.views.imagehelper.ResourceDrawableIdHelper;
18 |
19 | import java.io.File;
20 | import java.io.FileNotFoundException;
21 | import java.io.FileOutputStream;
22 | import java.io.IOException;
23 | import java.io.InputStream;
24 | import java.net.MalformedURLException;
25 | import java.net.URL;
26 | import java.net.URLConnection;
27 | import java.util.HashMap;
28 | import java.util.UUID;
29 | import java.io.OutputStream;
30 | import java.io.InputStream;
31 |
32 | final class Utility {
33 |
34 | private static final String SCHEME_FILE = "file";
35 | private static final String SCHEME_CONTENT = "content";
36 | public static final int EOF = -1;
37 | private static final int DEFAULT_BUFFER_SIZE = 1024 * 4;
38 |
39 | static WritableMap buildImageReactMap(File file, Bitmap bmp) {
40 | WritableMap map = Arguments.createMap();
41 | map.putString("uri", "file://" + file.toString());
42 | map.putDouble("width", bmp.getWidth());
43 | map.putDouble("height", bmp.getHeight());
44 | return map;
45 | }
46 |
47 | public static long copyLarge(final InputStream input, final OutputStream output, final byte[] buffer)
48 | throws IOException {
49 | long count = 0;
50 | int n;
51 | while (EOF != (n = input.read(buffer))) {
52 | output.write(buffer, 0, n);
53 | count += n;
54 | }
55 | return count;
56 | }
57 |
58 |
59 | public static int copy(final InputStream input, final OutputStream output) throws IOException {
60 | final long count = copyLarge(input, output, new byte[DEFAULT_BUFFER_SIZE]);
61 | if (count > Integer.MAX_VALUE) {
62 | return -1;
63 | }
64 | return (int) count;
65 | }
66 |
67 | static Bitmap bitmapFromUriString(String uriString, final Promise promise, Context context) {
68 | try {
69 | Uri uri = Uri.parse(uriString);
70 | String scheme = Uri.parse(uriString).getScheme();
71 | if (scheme != null && (scheme.equals(SCHEME_CONTENT) || scheme.equals(SCHEME_FILE))) {
72 | ContentResolver resolver = context.getContentResolver();
73 | try {
74 | InputStream streamOrient = resolver.openInputStream(uri);
75 | final int orientation = Utility.getOrientation(streamOrient);
76 |
77 | InputStream streamBmp = resolver.openInputStream(uri);
78 | Bitmap bmp = BitmapFactory.decodeStream(streamBmp);
79 |
80 | return Utility.fixOrientation(bmp, orientation);
81 |
82 | } catch (FileNotFoundException e) {
83 | handleError(e, promise);
84 | }
85 | } else {
86 | int id = ResourceDrawableIdHelper.getInstance().getResourceDrawableId(context, uriString);
87 | if (id > 0) {
88 | return BitmapFactory.decodeResource(context.getResources(), id);
89 | }
90 | }
91 |
92 | URL url = new URL(uriString);
93 | try {
94 | URLConnection connection = url.openConnection();
95 | InputStream inputStream = connection.getInputStream();
96 |
97 | File tempFile = new File(context.getFilesDir(), UUID.randomUUID().toString() + ".tmp");
98 |
99 | final FileOutputStream outputStream = new FileOutputStream(tempFile);
100 |
101 | Utility.copy(inputStream, outputStream);
102 |
103 | final int orientation = Utility.getOrientation(tempFile.getAbsolutePath());
104 |
105 | Bitmap bmp = BitmapFactory.decodeFile(tempFile.getAbsolutePath());
106 |
107 | tempFile.delete();
108 |
109 | return Utility.fixOrientation(bmp, orientation);
110 | } catch (IOException e) {
111 | handleError(e, promise);
112 | }
113 | } catch (MalformedURLException e) {
114 | handleError(e, promise);
115 | }
116 | return null;
117 | }
118 |
119 | static void handleError(Exception e, Promise promise) {
120 | e.printStackTrace(System.err);
121 | promise.reject(e);
122 | }
123 |
124 | static File createRandomPNGFile(ReactContext context) {
125 | String filename = UUID.randomUUID().toString() + ".png";
126 | return new File(context.getFilesDir(), filename);
127 | }
128 |
129 |
130 | static void writeBMPToPNGFile(Bitmap bmp, File file, Promise promise) {
131 | try {
132 | FileOutputStream out = new FileOutputStream(file);
133 | bmp.compress(Bitmap.CompressFormat.PNG, 100, out);
134 | out.close();
135 | } catch (IOException e) {
136 | handleError(e, promise);
137 | }
138 | }
139 |
140 | static Bitmap trimTransparency(Bitmap source) {
141 | int firstX = 0, firstY = 0;
142 | int lastX = source.getWidth();
143 | int lastY = source.getHeight();
144 | int[] pixels = new int[source.getWidth() * source.getHeight()];
145 | source.getPixels(pixels, 0, source.getWidth(), 0, 0, source.getWidth(), source.getHeight());
146 | loop:
147 | for (int x = 0; x < source.getWidth(); x++) {
148 | for (int y = 0; y < source.getHeight(); y++) {
149 | if (pixels[x + (y * source.getWidth())] != Color.TRANSPARENT) {
150 | firstX = x;
151 | break loop;
152 | }
153 | }
154 | }
155 | loop:
156 | for (int y = 0; y < source.getHeight(); y++) {
157 | for (int x = firstX; x < source.getWidth(); x++) {
158 | if (pixels[x + (y * source.getWidth())] != Color.TRANSPARENT) {
159 | firstY = y;
160 | break loop;
161 | }
162 | }
163 | }
164 | loop:
165 | for (int x = source.getWidth() - 1; x >= firstX; x--) {
166 | for (int y = source.getHeight() - 1; y >= firstY; y--) {
167 | if (pixels[x + (y * source.getWidth())] != Color.TRANSPARENT) {
168 | lastX = x;
169 | break loop;
170 | }
171 | }
172 | }
173 | loop:
174 | for (int y = source.getHeight() - 1; y >= firstY; y--) {
175 | for (int x = source.getWidth() - 1; x >= firstX; x--) {
176 | if (pixels[x + (y * source.getWidth())] != Color.TRANSPARENT) {
177 | lastY = y;
178 | break loop;
179 | }
180 | }
181 | }
182 | return Bitmap.createBitmap(source, firstX, firstY, lastX - firstX, lastY - firstY);
183 | }
184 |
185 | static HashMap calcRectForContainedRect(int srcWidth, int srcHeight, int dstWidth, int dstHeight) {
186 | int width;
187 | int height;
188 | int x;
189 | int y;
190 |
191 | if (srcWidth > srcHeight) {
192 | width = dstWidth;
193 | height = srcHeight * dstWidth / srcWidth;
194 | x = 0;
195 | y = dstHeight / 2 - height / 2;
196 | } else {
197 | width = srcWidth * dstHeight / srcHeight;
198 | height = dstHeight;
199 | x = dstWidth / 2 - width / 2;
200 | y = 0;
201 | }
202 |
203 |
204 | HashMap map = new HashMap();
205 | map.put("width", width);
206 | map.put("height", height);
207 | map.put("x", x);
208 | map.put("y", y);
209 |
210 | return map;
211 | }
212 |
213 | static int getOrientation(String filename) {
214 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
215 | try {
216 | return new ExifInterface(filename).getAttributeInt(
217 | ExifInterface.TAG_ORIENTATION,
218 | ExifInterface.ORIENTATION_UNDEFINED
219 | );
220 | } catch (IOException e) {
221 | e.printStackTrace(System.err);
222 | return -1;
223 | }
224 | } else {
225 | return -1;
226 | }
227 | }
228 |
229 |
230 |
231 | static int getOrientation(InputStream stream) {
232 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
233 | try {
234 | return new ExifInterface(stream).getAttributeInt(
235 | ExifInterface.TAG_ORIENTATION,
236 | ExifInterface.ORIENTATION_UNDEFINED
237 | );
238 | } catch (IOException e) {
239 | e.printStackTrace(System.err);
240 | return -1;
241 | }
242 | } else {
243 | return -1;
244 | }
245 | }
246 |
247 | static Bitmap fixOrientation(Bitmap bitmap, int orientation) {
248 | Matrix matrix = new Matrix();
249 | switch (orientation) {
250 | case ExifInterface.ORIENTATION_NORMAL:
251 | return bitmap;
252 | case ExifInterface.ORIENTATION_FLIP_HORIZONTAL:
253 | matrix.setScale(-1, 1);
254 | break;
255 | case ExifInterface.ORIENTATION_ROTATE_180:
256 | matrix.setRotate(180);
257 | break;
258 | case ExifInterface.ORIENTATION_FLIP_VERTICAL:
259 | matrix.setRotate(180);
260 | matrix.postScale(-1, 1);
261 | break;
262 | case ExifInterface.ORIENTATION_TRANSPOSE:
263 | matrix.setRotate(90);
264 | matrix.postScale(-1, 1);
265 | break;
266 | case ExifInterface.ORIENTATION_ROTATE_90:
267 | matrix.setRotate(90);
268 | break;
269 | case ExifInterface.ORIENTATION_TRANSVERSE:
270 | matrix.setRotate(-90);
271 | matrix.postScale(-1, 1);
272 | break;
273 | case ExifInterface.ORIENTATION_ROTATE_270:
274 | matrix.setRotate(-90);
275 | break;
276 | default:
277 | return bitmap;
278 | }
279 | try {
280 | Bitmap bmRotated = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
281 | bitmap.recycle();
282 | return bmRotated;
283 | }
284 | catch (OutOfMemoryError e) {
285 | e.printStackTrace();
286 | return null;
287 | }
288 | }
289 | }
290 |
--------------------------------------------------------------------------------
/ios/RNImageTools.m:
--------------------------------------------------------------------------------
1 |
2 | #import "RNImageTools.h"
3 | #import "React/RCTLog.h"
4 | #import "React/RCTConvert.h"
5 |
6 | CGFloat layerImageScaleFactor = 1;
7 |
8 | @implementation RNImageTools
9 |
10 | - (dispatch_queue_t)methodQueue
11 | {
12 | return dispatch_get_main_queue();
13 | }
14 | RCT_EXPORT_MODULE()
15 |
16 | RCT_EXPORT_METHOD(transform:(NSString *)imageURLString
17 | translateX:(CGFloat)translateX
18 | translateY:(CGFloat)translateY
19 | rotate:(CGFloat)rotate
20 | scale:(CGFloat)scale
21 | resolver:(RCTPromiseResolveBlock)resolve
22 | rejector:(RCTPromiseRejectBlock)reject)
23 | {
24 | UIImage *image = [self getUIImageFromURLString:imageURLString];
25 | UIImage *resultImage = [self transformImage:image translateX:translateX translateY:translateY rotate:rotate scaleX:scale scaleY:scale];
26 |
27 | NSString *imagePath = [self saveImage:resultImage withPostfix:@"transformed"];
28 |
29 | resolve(@{
30 | @"uri": imagePath,
31 | @"width": [NSNumber numberWithFloat:resultImage.size.width],
32 | @"height": [NSNumber numberWithFloat:resultImage.size.height]
33 | });
34 | }
35 |
36 | RCT_EXPORT_METHOD(crop:(NSString *)imageURLString
37 | x:(CGFloat)x
38 | y:(CGFloat)y
39 | width:(CGFloat)width
40 | height:(CGFloat)height
41 | resolver:(RCTPromiseResolveBlock)resolve
42 | rejector:(RCTPromiseRejectBlock)reject)
43 | {
44 | NSURL *imageURL = [RCTConvert NSURL:imageURLString];
45 | NSData *imageData = [[NSData alloc] initWithContentsOfURL:imageURL];
46 | UIImage *image = [self fixImageOrientation:[[UIImage alloc] initWithData:imageData]];
47 | UIImage *croppedImage = [self cropImage:image toRect:CGRectMake(x, y, width, height)];
48 |
49 | NSString *imagePath = [self saveImage:croppedImage withPostfix:@"cropped"];
50 |
51 | resolve(@{
52 | @"uri": imagePath,
53 | @"width": [NSNumber numberWithFloat:croppedImage.size.width],
54 | @"height": [NSNumber numberWithFloat:croppedImage.size.height]
55 | });
56 | }
57 |
58 | RCT_EXPORT_METHOD(mask:(NSString *)imageURLString
59 | maskImageURLString:(NSString *)maskImageURLString
60 | options:(NSDictionary *)options
61 | resolver:(RCTPromiseResolveBlock)resolve
62 | rejector:(RCTPromiseRejectBlock)reject)
63 | {
64 | UIImage *image = [self getUIImageFromURLString:imageURLString];
65 | UIImage *maskImage = [self getUIImageFromURLString:maskImageURLString];
66 | BOOL trimTransparency = [RCTConvert BOOL:options[@"trimTransparency"]];
67 |
68 | CGRect cropRect = [self calcRect:maskImage.size forContainedSize:image.size];
69 | UIImage *croppedImage = [self cropImage:image toRect:cropRect];
70 |
71 | UIImage *maskedImage = [self maskImage:croppedImage withMask:maskImage];
72 | UIImageView *maskedImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, maskedImage.size.width, maskedImage.size.height)];
73 | maskedImageView.image = maskedImage;
74 | UIImage *maskedImageFromLayer = [self imageFromLayer:maskedImageView.layer];
75 |
76 | UIImage *resultImage = trimTransparency ? [self trimTransparentPixels:maskedImageFromLayer requiringFullOpacity:NO] : maskedImageFromLayer;
77 | NSString *imagePath = [self saveImage:resultImage withPostfix:@"masked"];
78 |
79 | resolve(@{
80 | @"uri": imagePath,
81 | @"width": [NSNumber numberWithFloat:resultImage.size.width],
82 | @"height": [NSNumber numberWithFloat:resultImage.size.height]
83 | });
84 | }
85 |
86 | RCT_EXPORT_METHOD(resize:(NSString *)imageURLString
87 | toWidth:(CGFloat)width
88 | toHeight:(CGFloat)height
89 | resolver:(RCTPromiseResolveBlock)resolve
90 | rejector:(RCTPromiseRejectBlock)reject)
91 | {
92 | UIImage *image = [self getUIImageFromURLString:imageURLString];
93 |
94 | image = [self resizeImage:image toWidth:width toHeight:height];
95 |
96 | NSString *imagePath = [self saveImage:image withPostfix:@"resized"];
97 |
98 | resolve(@{
99 | @"uri": imagePath,
100 | @"width": [NSNumber numberWithFloat:image.size.width],
101 | @"height": [NSNumber numberWithFloat:image.size.height]
102 | });
103 | }
104 |
105 | RCT_EXPORT_METHOD(merge:(NSArray *)imageURLStrings
106 | resolver:(RCTPromiseResolveBlock)resolve
107 | rejector:(RCTPromiseRejectBlock)reject)
108 | {
109 | NSInteger count = [imageURLStrings count];
110 | NSMutableArray *images = [[NSMutableArray alloc] initWithCapacity:count];
111 | for (NSInteger i = 0; i < count; i++) {
112 | UIImage *image = [self getUIImageFromURLString:imageURLStrings[i]];
113 | [images addObject:image];
114 | }
115 |
116 | NSArray *imagesImmutable = [[NSArray alloc] initWithArray:images];
117 |
118 | UIImage *mergedImage = [self mergeImages:imagesImmutable];
119 |
120 | NSString *imagePath = [self saveImage:mergedImage withPostfix:@"merged"];
121 |
122 | resolve(@{
123 | @"uri": imagePath,
124 | @"width": [NSNumber numberWithFloat:mergedImage.size.width],
125 | @"height": [NSNumber numberWithFloat:mergedImage.size.height]
126 | });
127 | }
128 |
129 | RCT_EXPORT_METHOD(delete:(NSString *)imageURLString
130 | resolver:(RCTPromiseResolveBlock)resolve
131 | rejector:(RCTPromiseRejectBlock)reject)
132 | {
133 | [self deleteImageAtPath:imageURLString];
134 | resolve(nil);
135 | }
136 |
137 | RCT_EXPORT_METHOD(createMaskFromShape:(NSDictionary*)options
138 | resolver:(RCTPromiseResolveBlock)resolve
139 | rejector:(RCTPromiseRejectBlock)reject)
140 | {
141 | CGFloat width = [RCTConvert CGFloat:options[@"width"]];
142 | CGFloat height = [RCTConvert CGFloat:options[@"height"]];
143 | NSArray *points = [RCTConvert NSArray:options[@"points"]];
144 | BOOL inverted = [RCTConvert BOOL:options[@"inverted"]];
145 |
146 | NSMutableArray *pointsWithCGPoints = [[NSMutableArray alloc] init];
147 | for (NSInteger i = 0; i < [points count]; i++) {
148 | CGPoint convertedCGPoint = [RCTConvert CGPoint:[points objectAtIndex:i]];
149 | [pointsWithCGPoints addObject:[NSValue valueWithCGPoint:convertedCGPoint]];
150 | }
151 |
152 | UIImage *image = [self createMaskImageFromShape:pointsWithCGPoints withWidth:width height:height invert:inverted];
153 |
154 | NSString *imagePath = [self saveImage:image withPostfix:@"shape"];
155 |
156 | resolve(@{
157 | @"uri": imagePath,
158 | @"width": [NSNumber numberWithFloat:image.size.width],
159 | @"height": [NSNumber numberWithFloat:image.size.height]
160 | });
161 | }
162 |
163 | - (UIImage*) getUIImageFromURLString:(NSString *)imageURLString {
164 | NSURL *imageURL = [RCTConvert NSURL:imageURLString];
165 | NSData *imageData = [[NSData alloc] initWithContentsOfURL:imageURL];
166 | UIImage *image = [self fixImageOrientation:[[UIImage alloc] initWithData:imageData]];
167 | return image;
168 | }
169 |
170 | - (UIImage*) maskImage:(UIImage *) image withMask:(UIImage *) mask
171 | {
172 | CGImageRef imageReference = image.CGImage;
173 | CGImageRef maskReference = mask.CGImage;
174 |
175 | CGImageRef imageMask = CGImageMaskCreate(CGImageGetWidth(maskReference),
176 | CGImageGetHeight(maskReference),
177 | CGImageGetBitsPerComponent(maskReference),
178 | CGImageGetBitsPerPixel(maskReference),
179 | CGImageGetBytesPerRow(maskReference),
180 | CGImageGetDataProvider(maskReference),
181 | NULL, // Decode is null
182 | YES // Should interpolate
183 | );
184 |
185 | CGImageRef maskedReference = CGImageCreateWithMask(imageReference, imageMask);
186 | CGImageRelease(imageMask);
187 |
188 | UIImage *maskedImage = [UIImage imageWithCGImage:maskedReference];
189 | CGImageRelease(maskedReference);
190 |
191 | return maskedImage;
192 | }
193 |
194 | - (NSString *)saveImage:(UIImage *)image withPostfix:(NSString *)postfix {
195 | NSString *fileName = [[NSProcessInfo processInfo] globallyUniqueString];
196 | NSString *fullPath = [NSString stringWithFormat:@"%@/%@_%@.png", [self getPathForDirectory:NSDocumentDirectory], fileName, postfix];
197 | NSData *imageData = UIImagePNGRepresentation(image);
198 | [imageData writeToFile:fullPath atomically:YES];
199 | return fullPath;
200 | }
201 |
202 | - (void)deleteImageAtPath:(NSString *)path {
203 | NSError *error;
204 | if ([[NSFileManager defaultManager] isDeletableFileAtPath:path]) {
205 | BOOL success = [[NSFileManager defaultManager] removeItemAtPath:path error:&error];
206 | if (!success) {
207 | NSLog(@"Error removing file at path: %@", error.localizedDescription);
208 | }
209 | }
210 | }
211 |
212 |
213 | - (NSString *)getPathForDirectory:(int)directory
214 | {
215 | NSArray *paths = NSSearchPathForDirectoriesInDomains(directory, NSUserDomainMask, YES);
216 | return [paths firstObject];
217 | }
218 |
219 | - (UIImage *)imageFromLayer:(CALayer *)layer
220 | {
221 | UIGraphicsBeginImageContextWithOptions(layer.frame.size, NO, layerImageScaleFactor);
222 |
223 | [layer renderInContext:UIGraphicsGetCurrentContext()];
224 | UIImage *outputImage = UIGraphicsGetImageFromCurrentImageContext();
225 |
226 | UIGraphicsEndImageContext();
227 |
228 | return outputImage;
229 | }
230 |
231 | -(UIImage *) fixImageOrientation:(UIImage *) image {
232 |
233 | if (image.imageOrientation == UIImageOrientationUp) {
234 | return image;
235 | }
236 |
237 | CGAffineTransform transform = CGAffineTransformIdentity;
238 |
239 | switch (image.imageOrientation) {
240 | case UIImageOrientationDown:
241 | case UIImageOrientationDownMirrored:
242 | transform = CGAffineTransformTranslate(transform, image.size.width, image.size.height);
243 | transform = CGAffineTransformRotate(transform, M_PI);
244 | break;
245 |
246 | case UIImageOrientationLeft:
247 | case UIImageOrientationLeftMirrored:
248 | transform = CGAffineTransformTranslate(transform, image.size.width, 0);
249 | transform = CGAffineTransformRotate(transform, M_PI_2);
250 | break;
251 |
252 | case UIImageOrientationRight:
253 | case UIImageOrientationRightMirrored:
254 | transform = CGAffineTransformTranslate(transform, 0, image.size.height);
255 | transform = CGAffineTransformRotate(transform, -M_PI_2);
256 | break;
257 |
258 | default: break;
259 | }
260 |
261 | switch (image.imageOrientation) {
262 | case UIImageOrientationUpMirrored:
263 | case UIImageOrientationDownMirrored:
264 | // CORRECTION: Need to assign to transform here
265 | transform = CGAffineTransformTranslate(transform, image.size.width, 0);
266 | transform = CGAffineTransformScale(transform, -1, 1);
267 | break;
268 |
269 | case UIImageOrientationLeftMirrored:
270 | case UIImageOrientationRightMirrored:
271 | // CORRECTION: Need to assign to transform here
272 | transform = CGAffineTransformTranslate(transform, image.size.height, 0);
273 | transform = CGAffineTransformScale(transform, -1, 1);
274 | break;
275 |
276 | default: break;
277 | }
278 |
279 | CGContextRef ctx = CGBitmapContextCreate(nil, image.size.width, image.size.height, CGImageGetBitsPerComponent(image.CGImage), 0, CGImageGetColorSpace(image.CGImage), kCGImageAlphaPremultipliedLast);
280 |
281 | CGContextConcatCTM(ctx, transform);
282 |
283 | switch (image.imageOrientation) {
284 | case UIImageOrientationLeft:
285 | case UIImageOrientationLeftMirrored:
286 | case UIImageOrientationRight:
287 | case UIImageOrientationRightMirrored:
288 | CGContextDrawImage(ctx, CGRectMake(0, 0, image.size.height, image.size.width), image.CGImage);
289 | break;
290 |
291 | default:
292 | CGContextDrawImage(ctx, CGRectMake(0, 0, image.size.width, image.size.height), image.CGImage);
293 | break;
294 | }
295 |
296 | CGImageRef cgImage = CGBitmapContextCreateImage(ctx);
297 |
298 | return [UIImage imageWithCGImage:cgImage];
299 | }
300 |
301 | - (UIImage*) transformImage:(UIImage *) image
302 | translateX:(CGFloat)x
303 | translateY:(CGFloat)y
304 | rotate:(CGFloat)degree
305 | scaleX:(CGFloat)sx
306 | scaleY:(CGFloat)sy
307 | {
308 | CGContextRef ctx = CGBitmapContextCreate(nil, image.size.width, image.size.height, CGImageGetBitsPerComponent(image.CGImage), 0, CGImageGetColorSpace(image.CGImage), kCGImageAlphaPremultipliedLast);
309 |
310 | CGContextSetFillColorWithColor(ctx, [UIColor whiteColor].CGColor);
311 | CGContextFillRect(ctx, CGRectMake(0, 0, image.size.width, image.size.height));
312 |
313 | CGAffineTransform transform = CGAffineTransformIdentity;
314 |
315 | // Translate
316 | transform = CGAffineTransformTranslate(transform, x, -y);
317 |
318 | // Rotate
319 | transform = CGAffineTransformTranslate(transform, image.size.width / 2, image.size.height / 2);
320 | transform = CGAffineTransformRotate(transform, -M_PI / 180 * degree);
321 | transform = CGAffineTransformTranslate(transform, -image.size.width / 2, -image.size.height / 2);
322 |
323 | // Scale
324 | transform = CGAffineTransformTranslate(transform, -image.size.width * (sx - 1) / 2, -image.size.height * (sy - 1) / 2);
325 | transform = CGAffineTransformScale(transform, sx, sy);
326 |
327 | CGContextConcatCTM(ctx, transform);
328 | CGContextDrawImage(ctx, CGRectMake(0, 0, image.size.width, image.size.height), image.CGImage);
329 |
330 | CGImageRef cgImage = CGBitmapContextCreateImage(ctx);
331 | CGContextRelease(ctx);
332 |
333 | return [UIImage imageWithCGImage:cgImage];
334 | }
335 |
336 | - (UIImage*) cropImage:(UIImage *) image toRect:(CGRect) rect
337 | {
338 | CGImageRef imageRef = CGImageCreateWithImageInRect([image CGImage], rect);
339 | UIImage *cropped = [UIImage imageWithCGImage:imageRef];
340 | CGImageRelease(imageRef);
341 |
342 | return cropped;
343 | }
344 |
345 | - (UIImage*) resizeImage:(UIImage *)image toWidth:(CGFloat)width toHeight:(CGFloat)height
346 | {
347 | CGContextRef ctx = CGBitmapContextCreate(nil, width, height, CGImageGetBitsPerComponent(image.CGImage), 0, CGImageGetColorSpace(image.CGImage), kCGImageAlphaPremultipliedLast);
348 |
349 | CGRect cropRect = [self calcRect:image.size forContainedSize:CGSizeMake(width, height)];;
350 | CGContextDrawImage(ctx, cropRect, image.CGImage);
351 |
352 | CGImageRef cgImage = CGBitmapContextCreateImage(ctx);
353 | CGContextRelease(ctx);
354 |
355 | return [UIImage imageWithCGImage:cgImage];
356 | }
357 |
358 | - (UIImage*) mergeImages:(NSArray *)images
359 | {
360 | UIImage *firstImage = [images objectAtIndex:0];
361 | CGFloat width = firstImage.size.width;
362 | CGFloat height = firstImage.size.height;
363 |
364 | CGContextRef ctx = CGBitmapContextCreate(nil, width, height, CGImageGetBitsPerComponent(firstImage.CGImage), 0, CGImageGetColorSpace(firstImage.CGImage), kCGImageAlphaPremultipliedLast);
365 |
366 | for (UIImage *image in images) {
367 | CGContextDrawImage(ctx, CGRectMake(0, 0, width, height), image.CGImage);
368 | }
369 |
370 | CGImageRef cgImage = CGBitmapContextCreateImage(ctx);
371 | CGContextRelease(ctx);
372 |
373 | return [UIImage imageWithCGImage:cgImage];
374 | }
375 |
376 | - (UIImage*) createMaskImageFromShape:(NSArray*)points withWidth:(CGFloat)width height:(CGFloat)height invert:(BOOL)inverted
377 | {
378 | CGContextRef ctx = CGBitmapContextCreate(nil, width, height, 8, 0, CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB), kCGImageAlphaPremultipliedLast);
379 |
380 | NSInteger count = [points count];
381 | CGPoint cPoints[count];
382 |
383 | for (int i = 0; i < count; i++) {
384 | cPoints[i] = [[points objectAtIndex:i] CGPointValue];
385 | }
386 |
387 | CGAffineTransform transform = CGAffineTransformIdentity;
388 | // Flip top to right
389 | transform = CGAffineTransformTranslate(transform, 0, height);
390 | transform = CGAffineTransformScale(transform, 1, -1);
391 |
392 | CGContextConcatCTM(ctx, transform);
393 |
394 | CGColorRef rectCGColor = inverted ? [UIColor whiteColor].CGColor : [UIColor blackColor].CGColor;
395 | CGColorRef shapeCGColor = inverted ? [UIColor blackColor].CGColor : [UIColor whiteColor].CGColor;
396 |
397 | CGContextSetFillColorWithColor(ctx, rectCGColor);
398 | CGContextFillRect(ctx, CGRectMake(0, 0, width, height));
399 |
400 | CGContextSetFillColorWithColor(ctx, shapeCGColor);
401 | CGContextAddLines(ctx, cPoints, count);
402 | CGContextFillPath(ctx);
403 |
404 | CGImageRef cgImage = CGBitmapContextCreateImage(ctx);
405 | CGContextRelease(ctx);
406 |
407 | return [UIImage imageWithCGImage:cgImage];
408 | }
409 |
410 | - (UIImage *) trimTransparentPixels:(UIImage *)image requiringFullOpacity:(BOOL)fullyOpaque
411 | {
412 | if (image.size.height < 2 || image.size.width < 2) {
413 |
414 | return image;
415 |
416 | }
417 |
418 | CGRect rect = CGRectMake(0, 0, image.size.width * image.scale, image.size.height * image.scale);
419 | UIEdgeInsets crop = [self transparencyInsets:image requiringFullOpacity:fullyOpaque];
420 |
421 | UIImage *img = image;
422 |
423 | if (crop.top == 0 && crop.bottom == 0 && crop.left == 0 && crop.right == 0) {
424 |
425 | // No cropping needed
426 |
427 | } else {
428 |
429 | // Calculate new crop bounds
430 | rect.origin.x += crop.left;
431 | rect.origin.y += crop.top;
432 | rect.size.width -= crop.left + crop.right;
433 | rect.size.height -= crop.top + crop.bottom;
434 |
435 | // Crop it
436 | CGImageRef newImage = CGImageCreateWithImageInRect([image CGImage], rect);
437 |
438 | // Convert back to UIImage
439 | img = [UIImage imageWithCGImage:newImage scale:image.scale orientation:image.imageOrientation];
440 |
441 | CGImageRelease(newImage);
442 | }
443 |
444 | return img;
445 | }
446 |
447 | - (UIEdgeInsets)transparencyInsets:(UIImage*)image requiringFullOpacity:(BOOL)fullyOpaque
448 | {
449 | // Draw our image on that context
450 | NSInteger width = (NSInteger)CGImageGetWidth([image CGImage]);
451 | NSInteger height = (NSInteger)CGImageGetHeight([image CGImage]);
452 | NSInteger bytesPerRow = width * (NSInteger)sizeof(uint8_t);
453 |
454 | // Allocate array to hold alpha channel
455 | uint8_t * bitmapData = calloc((size_t)(width * height), sizeof(uint8_t));
456 |
457 | // Create alpha-only bitmap context
458 | CGContextRef contextRef = CGBitmapContextCreate(bitmapData, (NSUInteger)width, (NSUInteger)height, 8, (NSUInteger)bytesPerRow, NULL, kCGImageAlphaOnly);
459 |
460 | CGImageRef cgImage = image.CGImage;
461 | CGRect rect = CGRectMake(0, 0, width, height);
462 | CGContextDrawImage(contextRef, rect, cgImage);
463 |
464 | // Sum all non-transparent pixels in every row and every column
465 | uint16_t * rowSum = calloc((size_t)height, sizeof(uint16_t));
466 | uint16_t * colSum = calloc((size_t)width, sizeof(uint16_t));
467 |
468 | // Enumerate through all pixels
469 | for (NSInteger row = 0; row < height; row++) {
470 |
471 | for (NSInteger col = 0; col < width; col++) {
472 |
473 | if (fullyOpaque) {
474 |
475 | // Found non-transparent pixel
476 | if (bitmapData[row*bytesPerRow + col] == UINT8_MAX) {
477 |
478 | rowSum[row]++;
479 | colSum[col]++;
480 |
481 | }
482 |
483 | } else {
484 |
485 | // Found non-transparent pixel
486 | if (bitmapData[row*bytesPerRow + col]) {
487 |
488 | rowSum[row]++;
489 | colSum[col]++;
490 |
491 | }
492 |
493 | }
494 |
495 | }
496 |
497 | }
498 |
499 | // Initialize crop insets and enumerate cols/rows arrays until we find non-empty columns or row
500 | UIEdgeInsets crop = UIEdgeInsetsZero;
501 |
502 | // Top
503 | for (NSInteger i = 0; i < height; i++) {
504 |
505 | if (rowSum[i] > 0) {
506 |
507 | crop.top = i;
508 | break;
509 |
510 | }
511 |
512 | }
513 |
514 | // Bottom
515 | for (NSInteger i = height - 1; i >= 0; i--) {
516 |
517 | if (rowSum[i] > 0) {
518 | crop.bottom = MAX(0, height - i - 1);
519 | break;
520 | }
521 |
522 | }
523 |
524 | // Left
525 | for (NSInteger i = 0; i < width; i++) {
526 |
527 | if (colSum[i] > 0) {
528 | crop.left = i;
529 | break;
530 | }
531 |
532 | }
533 |
534 | // Right
535 | for (NSInteger i = width - 1; i >= 0; i--) {
536 |
537 | if (colSum[i] > 0) {
538 |
539 | crop.right = MAX(0, width - i - 1);
540 | break;
541 |
542 | }
543 | }
544 |
545 | free(bitmapData);
546 | free(colSum);
547 | free(rowSum);
548 |
549 | CGContextRelease(contextRef);
550 |
551 | return crop;
552 | }
553 |
554 | - (UIImage *) removeTransparencyFromImage:(UIImage *)image {
555 | CGImageAlphaInfo alpha = CGImageGetAlphaInfo(image.CGImage);
556 | if (alpha == kCGImageAlphaPremultipliedLast || alpha == kCGImageAlphaPremultipliedFirst ||
557 | alpha == kCGImageAlphaLast || alpha == kCGImageAlphaFirst || alpha == kCGImageAlphaOnly)
558 | {
559 | // create the context with information from the original image
560 | CGContextRef bitmapContext = CGBitmapContextCreate(NULL,
561 | image.size.width,
562 | image.size.height,
563 | CGImageGetBitsPerComponent(image.CGImage),
564 | CGImageGetBytesPerRow(image.CGImage),
565 | CGImageGetColorSpace(image.CGImage),
566 | CGImageGetBitmapInfo(image.CGImage)
567 | );
568 |
569 | // draw white rect as background
570 | CGContextSetFillColorWithColor(bitmapContext, [UIColor whiteColor].CGColor);
571 | CGContextFillRect(bitmapContext, CGRectMake(0, 0, image.size.width, image.size.height));
572 |
573 | // draw the image
574 | CGContextDrawImage(bitmapContext, CGRectMake(0, 0, image.size.width, image.size.height), image.CGImage);
575 | CGImageRef resultNoTransparency = CGBitmapContextCreateImage(bitmapContext);
576 |
577 | // get the image back
578 | image = [UIImage imageWithCGImage:resultNoTransparency];
579 |
580 | // do not forget to release..
581 | CGImageRelease(resultNoTransparency);
582 | CGContextRelease(bitmapContext);
583 |
584 | }
585 | return image;
586 | }
587 |
588 | - (CGRect) calcRect:(CGSize)srcSize forContainedSize:(CGSize)dstSize {
589 |
590 | CGFloat width = 0.0;
591 | CGFloat height = 0.0;
592 | CGFloat x = 0.0;
593 | CGFloat y = 0.0;
594 |
595 | if (dstSize.width > dstSize.height) {
596 | width = srcSize.width * dstSize.height / srcSize.height;
597 | height = dstSize.height;
598 | x = (dstSize.width - width) / 2;
599 | y = 0;
600 | } else {
601 | width = dstSize.width;
602 | height = srcSize.height * dstSize.width / srcSize.width;
603 | x = 0;
604 | y = (dstSize.height - height) / 2;
605 | }
606 |
607 | return CGRectMake(x, y, width, height);
608 | }
609 |
610 | @end
611 |
--------------------------------------------------------------------------------
/ExampleApp/ios/ExampleApp.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
12 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; };
13 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
14 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; };
15 | 00E356F31AD99517003FC87E /* ExampleAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExampleAppTests.m */; };
16 | 11D1A2F320CAFA9E000508D9 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
17 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
18 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; };
19 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; };
20 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
21 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
22 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
23 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
24 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
25 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
26 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
27 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
28 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
29 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
30 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; };
31 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; };
32 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; };
33 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; };
34 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; };
35 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; };
36 | 2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
37 | 2DCD954D1E0B4F2C00145EB5 /* ExampleAppTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExampleAppTests.m */; };
38 | 2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
39 | 58D4EE2D7810C120DD2DCE14 /* libPods-ExampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4692F777E2909EE86C020683 /* libPods-ExampleApp.a */; };
40 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
41 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
42 | ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED297162215061F000B7C4FE /* JavaScriptCore.framework */; };
43 | ED2971652150620600B7C4FE /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED2971642150620600B7C4FE /* JavaScriptCore.framework */; };
44 | /* End PBXBuildFile section */
45 |
46 | /* Begin PBXContainerItemProxy section */
47 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = {
48 | isa = PBXContainerItemProxy;
49 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
50 | proxyType = 2;
51 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
52 | remoteInfo = RCTActionSheet;
53 | };
54 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = {
55 | isa = PBXContainerItemProxy;
56 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
57 | proxyType = 2;
58 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
59 | remoteInfo = RCTGeolocation;
60 | };
61 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = {
62 | isa = PBXContainerItemProxy;
63 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
64 | proxyType = 2;
65 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676;
66 | remoteInfo = RCTImage;
67 | };
68 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = {
69 | isa = PBXContainerItemProxy;
70 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
71 | proxyType = 2;
72 | remoteGlobalIDString = 58B511DB1A9E6C8500147676;
73 | remoteInfo = RCTNetwork;
74 | };
75 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = {
76 | isa = PBXContainerItemProxy;
77 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
78 | proxyType = 2;
79 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
80 | remoteInfo = RCTVibration;
81 | };
82 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
83 | isa = PBXContainerItemProxy;
84 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
85 | proxyType = 1;
86 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
87 | remoteInfo = ExampleApp;
88 | };
89 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
90 | isa = PBXContainerItemProxy;
91 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
92 | proxyType = 2;
93 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
94 | remoteInfo = RCTSettings;
95 | };
96 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = {
97 | isa = PBXContainerItemProxy;
98 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
99 | proxyType = 2;
100 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
101 | remoteInfo = RCTWebSocket;
102 | };
103 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = {
104 | isa = PBXContainerItemProxy;
105 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
106 | proxyType = 2;
107 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
108 | remoteInfo = React;
109 | };
110 | 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = {
111 | isa = PBXContainerItemProxy;
112 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
113 | proxyType = 1;
114 | remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7;
115 | remoteInfo = "ExampleApp-tvOS";
116 | };
117 | 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
118 | isa = PBXContainerItemProxy;
119 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
120 | proxyType = 2;
121 | remoteGlobalIDString = ADD01A681E09402E00F6D226;
122 | remoteInfo = "RCTBlob-tvOS";
123 | };
124 | 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
125 | isa = PBXContainerItemProxy;
126 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
127 | proxyType = 2;
128 | remoteGlobalIDString = 3DBE0D001F3B181A0099AA32;
129 | remoteInfo = fishhook;
130 | };
131 | 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
132 | isa = PBXContainerItemProxy;
133 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
134 | proxyType = 2;
135 | remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32;
136 | remoteInfo = "fishhook-tvOS";
137 | };
138 | 2DF0FFDE2056DD460020B375 /* PBXContainerItemProxy */ = {
139 | isa = PBXContainerItemProxy;
140 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
141 | proxyType = 2;
142 | remoteGlobalIDString = EBF21BDC1FC498900052F4D5;
143 | remoteInfo = jsinspector;
144 | };
145 | 2DF0FFE02056DD460020B375 /* PBXContainerItemProxy */ = {
146 | isa = PBXContainerItemProxy;
147 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
148 | proxyType = 2;
149 | remoteGlobalIDString = EBF21BFA1FC4989A0052F4D5;
150 | remoteInfo = "jsinspector-tvOS";
151 | };
152 | 2DF0FFE22056DD460020B375 /* PBXContainerItemProxy */ = {
153 | isa = PBXContainerItemProxy;
154 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
155 | proxyType = 2;
156 | remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7;
157 | remoteInfo = "third-party";
158 | };
159 | 2DF0FFE42056DD460020B375 /* PBXContainerItemProxy */ = {
160 | isa = PBXContainerItemProxy;
161 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
162 | proxyType = 2;
163 | remoteGlobalIDString = 3D383D3C1EBD27B6005632C8;
164 | remoteInfo = "third-party-tvOS";
165 | };
166 | 2DF0FFE62056DD460020B375 /* PBXContainerItemProxy */ = {
167 | isa = PBXContainerItemProxy;
168 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
169 | proxyType = 2;
170 | remoteGlobalIDString = 139D7E881E25C6D100323FB7;
171 | remoteInfo = "double-conversion";
172 | };
173 | 2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */ = {
174 | isa = PBXContainerItemProxy;
175 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
176 | proxyType = 2;
177 | remoteGlobalIDString = 3D383D621EBD27B9005632C8;
178 | remoteInfo = "double-conversion-tvOS";
179 | };
180 | 2DF0FFEA2056DD460020B375 /* PBXContainerItemProxy */ = {
181 | isa = PBXContainerItemProxy;
182 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
183 | proxyType = 2;
184 | remoteGlobalIDString = 9936F3131F5F2E4B0010BF04;
185 | remoteInfo = privatedata;
186 | };
187 | 2DF0FFEC2056DD460020B375 /* PBXContainerItemProxy */ = {
188 | isa = PBXContainerItemProxy;
189 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
190 | proxyType = 2;
191 | remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04;
192 | remoteInfo = "privatedata-tvOS";
193 | };
194 | 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = {
195 | isa = PBXContainerItemProxy;
196 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
197 | proxyType = 2;
198 | remoteGlobalIDString = 2D2A283A1D9B042B00D4039D;
199 | remoteInfo = "RCTImage-tvOS";
200 | };
201 | 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = {
202 | isa = PBXContainerItemProxy;
203 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
204 | proxyType = 2;
205 | remoteGlobalIDString = 2D2A28471D9B043800D4039D;
206 | remoteInfo = "RCTLinking-tvOS";
207 | };
208 | 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
209 | isa = PBXContainerItemProxy;
210 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
211 | proxyType = 2;
212 | remoteGlobalIDString = 2D2A28541D9B044C00D4039D;
213 | remoteInfo = "RCTNetwork-tvOS";
214 | };
215 | 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
216 | isa = PBXContainerItemProxy;
217 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
218 | proxyType = 2;
219 | remoteGlobalIDString = 2D2A28611D9B046600D4039D;
220 | remoteInfo = "RCTSettings-tvOS";
221 | };
222 | 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = {
223 | isa = PBXContainerItemProxy;
224 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
225 | proxyType = 2;
226 | remoteGlobalIDString = 2D2A287B1D9B048500D4039D;
227 | remoteInfo = "RCTText-tvOS";
228 | };
229 | 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = {
230 | isa = PBXContainerItemProxy;
231 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
232 | proxyType = 2;
233 | remoteGlobalIDString = 2D2A28881D9B049200D4039D;
234 | remoteInfo = "RCTWebSocket-tvOS";
235 | };
236 | 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = {
237 | isa = PBXContainerItemProxy;
238 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
239 | proxyType = 2;
240 | remoteGlobalIDString = 2D2A28131D9B038B00D4039D;
241 | remoteInfo = "React-tvOS";
242 | };
243 | 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = {
244 | isa = PBXContainerItemProxy;
245 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
246 | proxyType = 2;
247 | remoteGlobalIDString = 3D3C059A1DE3340900C268FA;
248 | remoteInfo = yoga;
249 | };
250 | 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = {
251 | isa = PBXContainerItemProxy;
252 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
253 | proxyType = 2;
254 | remoteGlobalIDString = 3D3C06751DE3340C00C268FA;
255 | remoteInfo = "yoga-tvOS";
256 | };
257 | 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = {
258 | isa = PBXContainerItemProxy;
259 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
260 | proxyType = 2;
261 | remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4;
262 | remoteInfo = cxxreact;
263 | };
264 | 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
265 | isa = PBXContainerItemProxy;
266 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
267 | proxyType = 2;
268 | remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4;
269 | remoteInfo = "cxxreact-tvOS";
270 | };
271 | 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
272 | isa = PBXContainerItemProxy;
273 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
274 | proxyType = 2;
275 | remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4;
276 | remoteInfo = jschelpers;
277 | };
278 | 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
279 | isa = PBXContainerItemProxy;
280 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
281 | proxyType = 2;
282 | remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
283 | remoteInfo = "jschelpers-tvOS";
284 | };
285 | 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
286 | isa = PBXContainerItemProxy;
287 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
288 | proxyType = 2;
289 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
290 | remoteInfo = RCTAnimation;
291 | };
292 | 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
293 | isa = PBXContainerItemProxy;
294 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
295 | proxyType = 2;
296 | remoteGlobalIDString = 2D2A28201D9B03D100D4039D;
297 | remoteInfo = "RCTAnimation-tvOS";
298 | };
299 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
300 | isa = PBXContainerItemProxy;
301 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
302 | proxyType = 2;
303 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
304 | remoteInfo = RCTLinking;
305 | };
306 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = {
307 | isa = PBXContainerItemProxy;
308 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
309 | proxyType = 2;
310 | remoteGlobalIDString = 58B5119B1A9E6C1200147676;
311 | remoteInfo = RCTText;
312 | };
313 | ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = {
314 | isa = PBXContainerItemProxy;
315 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
316 | proxyType = 2;
317 | remoteGlobalIDString = 358F4ED71D1E81A9004DF814;
318 | remoteInfo = RCTBlob;
319 | };
320 | /* End PBXContainerItemProxy section */
321 |
322 | /* Begin PBXFileReference section */
323 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; };
324 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; };
325 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; };
326 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; };
327 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; };
328 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; };
329 | 00E356EE1AD99517003FC87E /* ExampleAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
330 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
331 | 00E356F21AD99517003FC87E /* ExampleAppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleAppTests.m; sourceTree = ""; };
332 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; };
333 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; };
334 | 13B07F961A680F5B00A75B9A /* ExampleApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ExampleApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
335 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ExampleApp/AppDelegate.h; sourceTree = ""; };
336 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = ExampleApp/AppDelegate.m; sourceTree = ""; };
337 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
338 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ExampleApp/Images.xcassets; sourceTree = ""; };
339 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ExampleApp/Info.plist; sourceTree = ""; };
340 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ExampleApp/main.m; sourceTree = ""; };
341 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; };
342 | 1D19FCD5A7FA6923D2EBCAF4 /* Pods-ExampleApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleApp.release.xcconfig"; path = "Target Support Files/Pods-ExampleApp/Pods-ExampleApp.release.xcconfig"; sourceTree = ""; };
343 | 2D02E47B1E0B4A5D006451C7 /* ExampleApp-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ExampleApp-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
344 | 2D02E4901E0B4A5D006451C7 /* ExampleApp-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ExampleApp-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
345 | 2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
346 | 4692F777E2909EE86C020683 /* libPods-ExampleApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ExampleApp.a"; sourceTree = BUILT_PRODUCTS_DIR; };
347 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; };
348 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; };
349 | 7E418A97065030AE682D160C /* Pods-ExampleApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleApp.debug.xcconfig"; path = "Target Support Files/Pods-ExampleApp/Pods-ExampleApp.debug.xcconfig"; sourceTree = ""; };
350 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; };
351 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = ""; };
352 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
353 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
354 | /* End PBXFileReference section */
355 |
356 | /* Begin PBXFrameworksBuildPhase section */
357 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
358 | isa = PBXFrameworksBuildPhase;
359 | buildActionMask = 2147483647;
360 | files = (
361 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */,
362 | );
363 | runOnlyForDeploymentPostprocessing = 0;
364 | };
365 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
366 | isa = PBXFrameworksBuildPhase;
367 | buildActionMask = 2147483647;
368 | files = (
369 | ED297163215061F000B7C4FE /* JavaScriptCore.framework in Frameworks */,
370 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */,
371 | 11D1A2F320CAFA9E000508D9 /* libRCTAnimation.a in Frameworks */,
372 | 146834051AC3E58100842450 /* libReact.a in Frameworks */,
373 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
374 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
375 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
376 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */,
377 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */,
378 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */,
379 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
380 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
381 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
382 | 58D4EE2D7810C120DD2DCE14 /* libPods-ExampleApp.a in Frameworks */,
383 | );
384 | runOnlyForDeploymentPostprocessing = 0;
385 | };
386 | 2D02E4781E0B4A5D006451C7 /* Frameworks */ = {
387 | isa = PBXFrameworksBuildPhase;
388 | buildActionMask = 2147483647;
389 | files = (
390 | ED2971652150620600B7C4FE /* JavaScriptCore.framework in Frameworks */,
391 | 2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */,
392 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */,
393 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */,
394 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */,
395 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */,
396 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */,
397 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */,
398 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */,
399 | );
400 | runOnlyForDeploymentPostprocessing = 0;
401 | };
402 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = {
403 | isa = PBXFrameworksBuildPhase;
404 | buildActionMask = 2147483647;
405 | files = (
406 | 2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */,
407 | );
408 | runOnlyForDeploymentPostprocessing = 0;
409 | };
410 | /* End PBXFrameworksBuildPhase section */
411 |
412 | /* Begin PBXGroup section */
413 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = {
414 | isa = PBXGroup;
415 | children = (
416 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */,
417 | );
418 | name = Products;
419 | sourceTree = "";
420 | };
421 | 00C302B61ABCB90400DB3ED1 /* Products */ = {
422 | isa = PBXGroup;
423 | children = (
424 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */,
425 | );
426 | name = Products;
427 | sourceTree = "";
428 | };
429 | 00C302BC1ABCB91800DB3ED1 /* Products */ = {
430 | isa = PBXGroup;
431 | children = (
432 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */,
433 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */,
434 | );
435 | name = Products;
436 | sourceTree = "";
437 | };
438 | 00C302D41ABCB9D200DB3ED1 /* Products */ = {
439 | isa = PBXGroup;
440 | children = (
441 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */,
442 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */,
443 | );
444 | name = Products;
445 | sourceTree = "";
446 | };
447 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = {
448 | isa = PBXGroup;
449 | children = (
450 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */,
451 | );
452 | name = Products;
453 | sourceTree = "";
454 | };
455 | 00E356EF1AD99517003FC87E /* ExampleAppTests */ = {
456 | isa = PBXGroup;
457 | children = (
458 | 00E356F21AD99517003FC87E /* ExampleAppTests.m */,
459 | 00E356F01AD99517003FC87E /* Supporting Files */,
460 | );
461 | path = ExampleAppTests;
462 | sourceTree = "";
463 | };
464 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
465 | isa = PBXGroup;
466 | children = (
467 | 00E356F11AD99517003FC87E /* Info.plist */,
468 | );
469 | name = "Supporting Files";
470 | sourceTree = "";
471 | };
472 | 139105B71AF99BAD00B5F7CC /* Products */ = {
473 | isa = PBXGroup;
474 | children = (
475 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */,
476 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */,
477 | );
478 | name = Products;
479 | sourceTree = "";
480 | };
481 | 139FDEE71B06529A00C62182 /* Products */ = {
482 | isa = PBXGroup;
483 | children = (
484 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
485 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */,
486 | 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */,
487 | 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */,
488 | );
489 | name = Products;
490 | sourceTree = "";
491 | };
492 | 13B07FAE1A68108700A75B9A /* ExampleApp */ = {
493 | isa = PBXGroup;
494 | children = (
495 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
496 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
497 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
498 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
499 | 13B07FB61A68108700A75B9A /* Info.plist */,
500 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
501 | 13B07FB71A68108700A75B9A /* main.m */,
502 | );
503 | name = ExampleApp;
504 | sourceTree = "";
505 | };
506 | 146834001AC3E56700842450 /* Products */ = {
507 | isa = PBXGroup;
508 | children = (
509 | 146834041AC3E56700842450 /* libReact.a */,
510 | 3DAD3EA31DF850E9000B6D8A /* libReact.a */,
511 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */,
512 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */,
513 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */,
514 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
515 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */,
516 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */,
517 | 2DF0FFDF2056DD460020B375 /* libjsinspector.a */,
518 | 2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */,
519 | 2DF0FFE32056DD460020B375 /* libthird-party.a */,
520 | 2DF0FFE52056DD460020B375 /* libthird-party.a */,
521 | 2DF0FFE72056DD460020B375 /* libdouble-conversion.a */,
522 | 2DF0FFE92056DD460020B375 /* libdouble-conversion.a */,
523 | 2DF0FFEB2056DD460020B375 /* libprivatedata.a */,
524 | 2DF0FFED2056DD460020B375 /* libprivatedata-tvOS.a */,
525 | );
526 | name = Products;
527 | sourceTree = "";
528 | };
529 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
530 | isa = PBXGroup;
531 | children = (
532 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
533 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
534 | 2D16E6891FA4F8E400B85C8A /* libReact.a */,
535 | 4692F777E2909EE86C020683 /* libPods-ExampleApp.a */,
536 | );
537 | name = Frameworks;
538 | sourceTree = "";
539 | };
540 | 5E91572E1DD0AC6500FF2AA8 /* Products */ = {
541 | isa = PBXGroup;
542 | children = (
543 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */,
544 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */,
545 | );
546 | name = Products;
547 | sourceTree = "";
548 | };
549 | 654DB56716EEB752B8EF52B9 /* Pods */ = {
550 | isa = PBXGroup;
551 | children = (
552 | 7E418A97065030AE682D160C /* Pods-ExampleApp.debug.xcconfig */,
553 | 1D19FCD5A7FA6923D2EBCAF4 /* Pods-ExampleApp.release.xcconfig */,
554 | );
555 | name = Pods;
556 | path = Pods;
557 | sourceTree = "";
558 | };
559 | 78C398B11ACF4ADC00677621 /* Products */ = {
560 | isa = PBXGroup;
561 | children = (
562 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */,
563 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */,
564 | );
565 | name = Products;
566 | sourceTree = "";
567 | };
568 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
569 | isa = PBXGroup;
570 | children = (
571 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */,
572 | 146833FF1AC3E56700842450 /* React.xcodeproj */,
573 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
574 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */,
575 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
576 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
577 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
578 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */,
579 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */,
580 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
581 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
582 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
583 | );
584 | name = Libraries;
585 | sourceTree = "";
586 | };
587 | 832341B11AAA6A8300B99B32 /* Products */ = {
588 | isa = PBXGroup;
589 | children = (
590 | 832341B51AAA6A8300B99B32 /* libRCTText.a */,
591 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */,
592 | );
593 | name = Products;
594 | sourceTree = "";
595 | };
596 | 83CBB9F61A601CBA00E9B192 = {
597 | isa = PBXGroup;
598 | children = (
599 | 13B07FAE1A68108700A75B9A /* ExampleApp */,
600 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
601 | 00E356EF1AD99517003FC87E /* ExampleAppTests */,
602 | 83CBBA001A601CBA00E9B192 /* Products */,
603 | 2D16E6871FA4F8E400B85C8A /* Frameworks */,
604 | 654DB56716EEB752B8EF52B9 /* Pods */,
605 | );
606 | indentWidth = 2;
607 | sourceTree = "";
608 | tabWidth = 2;
609 | usesTabs = 0;
610 | };
611 | 83CBBA001A601CBA00E9B192 /* Products */ = {
612 | isa = PBXGroup;
613 | children = (
614 | 13B07F961A680F5B00A75B9A /* ExampleApp.app */,
615 | 00E356EE1AD99517003FC87E /* ExampleAppTests.xctest */,
616 | 2D02E47B1E0B4A5D006451C7 /* ExampleApp-tvOS.app */,
617 | 2D02E4901E0B4A5D006451C7 /* ExampleApp-tvOSTests.xctest */,
618 | );
619 | name = Products;
620 | sourceTree = "";
621 | };
622 | ADBDB9201DFEBF0600ED6528 /* Products */ = {
623 | isa = PBXGroup;
624 | children = (
625 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */,
626 | 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */,
627 | );
628 | name = Products;
629 | sourceTree = "";
630 | };
631 | /* End PBXGroup section */
632 |
633 | /* Begin PBXNativeTarget section */
634 | 00E356ED1AD99517003FC87E /* ExampleAppTests */ = {
635 | isa = PBXNativeTarget;
636 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ExampleAppTests" */;
637 | buildPhases = (
638 | 00E356EA1AD99517003FC87E /* Sources */,
639 | 00E356EB1AD99517003FC87E /* Frameworks */,
640 | 00E356EC1AD99517003FC87E /* Resources */,
641 | );
642 | buildRules = (
643 | );
644 | dependencies = (
645 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
646 | );
647 | name = ExampleAppTests;
648 | productName = ExampleAppTests;
649 | productReference = 00E356EE1AD99517003FC87E /* ExampleAppTests.xctest */;
650 | productType = "com.apple.product-type.bundle.unit-test";
651 | };
652 | 13B07F861A680F5B00A75B9A /* ExampleApp */ = {
653 | isa = PBXNativeTarget;
654 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ExampleApp" */;
655 | buildPhases = (
656 | FB1983E5E0C0C40D5E79294F /* [CP] Check Pods Manifest.lock */,
657 | 13B07F871A680F5B00A75B9A /* Sources */,
658 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
659 | 13B07F8E1A680F5B00A75B9A /* Resources */,
660 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
661 | );
662 | buildRules = (
663 | );
664 | dependencies = (
665 | );
666 | name = ExampleApp;
667 | productName = "Hello World";
668 | productReference = 13B07F961A680F5B00A75B9A /* ExampleApp.app */;
669 | productType = "com.apple.product-type.application";
670 | };
671 | 2D02E47A1E0B4A5D006451C7 /* ExampleApp-tvOS */ = {
672 | isa = PBXNativeTarget;
673 | buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "ExampleApp-tvOS" */;
674 | buildPhases = (
675 | 2D02E4771E0B4A5D006451C7 /* Sources */,
676 | 2D02E4781E0B4A5D006451C7 /* Frameworks */,
677 | 2D02E4791E0B4A5D006451C7 /* Resources */,
678 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */,
679 | );
680 | buildRules = (
681 | );
682 | dependencies = (
683 | );
684 | name = "ExampleApp-tvOS";
685 | productName = "ExampleApp-tvOS";
686 | productReference = 2D02E47B1E0B4A5D006451C7 /* ExampleApp-tvOS.app */;
687 | productType = "com.apple.product-type.application";
688 | };
689 | 2D02E48F1E0B4A5D006451C7 /* ExampleApp-tvOSTests */ = {
690 | isa = PBXNativeTarget;
691 | buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "ExampleApp-tvOSTests" */;
692 | buildPhases = (
693 | 2D02E48C1E0B4A5D006451C7 /* Sources */,
694 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */,
695 | 2D02E48E1E0B4A5D006451C7 /* Resources */,
696 | );
697 | buildRules = (
698 | );
699 | dependencies = (
700 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */,
701 | );
702 | name = "ExampleApp-tvOSTests";
703 | productName = "ExampleApp-tvOSTests";
704 | productReference = 2D02E4901E0B4A5D006451C7 /* ExampleApp-tvOSTests.xctest */;
705 | productType = "com.apple.product-type.bundle.unit-test";
706 | };
707 | /* End PBXNativeTarget section */
708 |
709 | /* Begin PBXProject section */
710 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
711 | isa = PBXProject;
712 | attributes = {
713 | LastUpgradeCheck = 0940;
714 | ORGANIZATIONNAME = Facebook;
715 | TargetAttributes = {
716 | 00E356ED1AD99517003FC87E = {
717 | CreatedOnToolsVersion = 6.2;
718 | TestTargetID = 13B07F861A680F5B00A75B9A;
719 | };
720 | 2D02E47A1E0B4A5D006451C7 = {
721 | CreatedOnToolsVersion = 8.2.1;
722 | ProvisioningStyle = Automatic;
723 | };
724 | 2D02E48F1E0B4A5D006451C7 = {
725 | CreatedOnToolsVersion = 8.2.1;
726 | ProvisioningStyle = Automatic;
727 | TestTargetID = 2D02E47A1E0B4A5D006451C7;
728 | };
729 | };
730 | };
731 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ExampleApp" */;
732 | compatibilityVersion = "Xcode 3.2";
733 | developmentRegion = English;
734 | hasScannedForEncodings = 0;
735 | knownRegions = (
736 | en,
737 | Base,
738 | );
739 | mainGroup = 83CBB9F61A601CBA00E9B192;
740 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
741 | projectDirPath = "";
742 | projectReferences = (
743 | {
744 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
745 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
746 | },
747 | {
748 | ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */;
749 | ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
750 | },
751 | {
752 | ProductGroup = ADBDB9201DFEBF0600ED6528 /* Products */;
753 | ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
754 | },
755 | {
756 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
757 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
758 | },
759 | {
760 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */;
761 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
762 | },
763 | {
764 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */;
765 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
766 | },
767 | {
768 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */;
769 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
770 | },
771 | {
772 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */;
773 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
774 | },
775 | {
776 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */;
777 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
778 | },
779 | {
780 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */;
781 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
782 | },
783 | {
784 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */;
785 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
786 | },
787 | {
788 | ProductGroup = 146834001AC3E56700842450 /* Products */;
789 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
790 | },
791 | );
792 | projectRoot = "";
793 | targets = (
794 | 13B07F861A680F5B00A75B9A /* ExampleApp */,
795 | 00E356ED1AD99517003FC87E /* ExampleAppTests */,
796 | 2D02E47A1E0B4A5D006451C7 /* ExampleApp-tvOS */,
797 | 2D02E48F1E0B4A5D006451C7 /* ExampleApp-tvOSTests */,
798 | );
799 | };
800 | /* End PBXProject section */
801 |
802 | /* Begin PBXReferenceProxy section */
803 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = {
804 | isa = PBXReferenceProxy;
805 | fileType = archive.ar;
806 | path = libRCTActionSheet.a;
807 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */;
808 | sourceTree = BUILT_PRODUCTS_DIR;
809 | };
810 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = {
811 | isa = PBXReferenceProxy;
812 | fileType = archive.ar;
813 | path = libRCTGeolocation.a;
814 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */;
815 | sourceTree = BUILT_PRODUCTS_DIR;
816 | };
817 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = {
818 | isa = PBXReferenceProxy;
819 | fileType = archive.ar;
820 | path = libRCTImage.a;
821 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */;
822 | sourceTree = BUILT_PRODUCTS_DIR;
823 | };
824 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = {
825 | isa = PBXReferenceProxy;
826 | fileType = archive.ar;
827 | path = libRCTNetwork.a;
828 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */;
829 | sourceTree = BUILT_PRODUCTS_DIR;
830 | };
831 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = {
832 | isa = PBXReferenceProxy;
833 | fileType = archive.ar;
834 | path = libRCTVibration.a;
835 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */;
836 | sourceTree = BUILT_PRODUCTS_DIR;
837 | };
838 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = {
839 | isa = PBXReferenceProxy;
840 | fileType = archive.ar;
841 | path = libRCTSettings.a;
842 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */;
843 | sourceTree = BUILT_PRODUCTS_DIR;
844 | };
845 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = {
846 | isa = PBXReferenceProxy;
847 | fileType = archive.ar;
848 | path = libRCTWebSocket.a;
849 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */;
850 | sourceTree = BUILT_PRODUCTS_DIR;
851 | };
852 | 146834041AC3E56700842450 /* libReact.a */ = {
853 | isa = PBXReferenceProxy;
854 | fileType = archive.ar;
855 | path = libReact.a;
856 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
857 | sourceTree = BUILT_PRODUCTS_DIR;
858 | };
859 | 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */ = {
860 | isa = PBXReferenceProxy;
861 | fileType = archive.ar;
862 | path = "libRCTBlob-tvOS.a";
863 | remoteRef = 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */;
864 | sourceTree = BUILT_PRODUCTS_DIR;
865 | };
866 | 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */ = {
867 | isa = PBXReferenceProxy;
868 | fileType = archive.ar;
869 | path = libfishhook.a;
870 | remoteRef = 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */;
871 | sourceTree = BUILT_PRODUCTS_DIR;
872 | };
873 | 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */ = {
874 | isa = PBXReferenceProxy;
875 | fileType = archive.ar;
876 | path = "libfishhook-tvOS.a";
877 | remoteRef = 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */;
878 | sourceTree = BUILT_PRODUCTS_DIR;
879 | };
880 | 2DF0FFDF2056DD460020B375 /* libjsinspector.a */ = {
881 | isa = PBXReferenceProxy;
882 | fileType = archive.ar;
883 | path = libjsinspector.a;
884 | remoteRef = 2DF0FFDE2056DD460020B375 /* PBXContainerItemProxy */;
885 | sourceTree = BUILT_PRODUCTS_DIR;
886 | };
887 | 2DF0FFE12056DD460020B375 /* libjsinspector-tvOS.a */ = {
888 | isa = PBXReferenceProxy;
889 | fileType = archive.ar;
890 | path = "libjsinspector-tvOS.a";
891 | remoteRef = 2DF0FFE02056DD460020B375 /* PBXContainerItemProxy */;
892 | sourceTree = BUILT_PRODUCTS_DIR;
893 | };
894 | 2DF0FFE32056DD460020B375 /* libthird-party.a */ = {
895 | isa = PBXReferenceProxy;
896 | fileType = archive.ar;
897 | path = "libthird-party.a";
898 | remoteRef = 2DF0FFE22056DD460020B375 /* PBXContainerItemProxy */;
899 | sourceTree = BUILT_PRODUCTS_DIR;
900 | };
901 | 2DF0FFE52056DD460020B375 /* libthird-party.a */ = {
902 | isa = PBXReferenceProxy;
903 | fileType = archive.ar;
904 | path = "libthird-party.a";
905 | remoteRef = 2DF0FFE42056DD460020B375 /* PBXContainerItemProxy */;
906 | sourceTree = BUILT_PRODUCTS_DIR;
907 | };
908 | 2DF0FFE72056DD460020B375 /* libdouble-conversion.a */ = {
909 | isa = PBXReferenceProxy;
910 | fileType = archive.ar;
911 | path = "libdouble-conversion.a";
912 | remoteRef = 2DF0FFE62056DD460020B375 /* PBXContainerItemProxy */;
913 | sourceTree = BUILT_PRODUCTS_DIR;
914 | };
915 | 2DF0FFE92056DD460020B375 /* libdouble-conversion.a */ = {
916 | isa = PBXReferenceProxy;
917 | fileType = archive.ar;
918 | path = "libdouble-conversion.a";
919 | remoteRef = 2DF0FFE82056DD460020B375 /* PBXContainerItemProxy */;
920 | sourceTree = BUILT_PRODUCTS_DIR;
921 | };
922 | 2DF0FFEB2056DD460020B375 /* libprivatedata.a */ = {
923 | isa = PBXReferenceProxy;
924 | fileType = archive.ar;
925 | path = libprivatedata.a;
926 | remoteRef = 2DF0FFEA2056DD460020B375 /* PBXContainerItemProxy */;
927 | sourceTree = BUILT_PRODUCTS_DIR;
928 | };
929 | 2DF0FFED2056DD460020B375 /* libprivatedata-tvOS.a */ = {
930 | isa = PBXReferenceProxy;
931 | fileType = archive.ar;
932 | path = "libprivatedata-tvOS.a";
933 | remoteRef = 2DF0FFEC2056DD460020B375 /* PBXContainerItemProxy */;
934 | sourceTree = BUILT_PRODUCTS_DIR;
935 | };
936 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = {
937 | isa = PBXReferenceProxy;
938 | fileType = archive.ar;
939 | path = "libRCTImage-tvOS.a";
940 | remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */;
941 | sourceTree = BUILT_PRODUCTS_DIR;
942 | };
943 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = {
944 | isa = PBXReferenceProxy;
945 | fileType = archive.ar;
946 | path = "libRCTLinking-tvOS.a";
947 | remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */;
948 | sourceTree = BUILT_PRODUCTS_DIR;
949 | };
950 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = {
951 | isa = PBXReferenceProxy;
952 | fileType = archive.ar;
953 | path = "libRCTNetwork-tvOS.a";
954 | remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */;
955 | sourceTree = BUILT_PRODUCTS_DIR;
956 | };
957 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = {
958 | isa = PBXReferenceProxy;
959 | fileType = archive.ar;
960 | path = "libRCTSettings-tvOS.a";
961 | remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */;
962 | sourceTree = BUILT_PRODUCTS_DIR;
963 | };
964 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = {
965 | isa = PBXReferenceProxy;
966 | fileType = archive.ar;
967 | path = "libRCTText-tvOS.a";
968 | remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */;
969 | sourceTree = BUILT_PRODUCTS_DIR;
970 | };
971 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = {
972 | isa = PBXReferenceProxy;
973 | fileType = archive.ar;
974 | path = "libRCTWebSocket-tvOS.a";
975 | remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */;
976 | sourceTree = BUILT_PRODUCTS_DIR;
977 | };
978 | 3DAD3EA31DF850E9000B6D8A /* libReact.a */ = {
979 | isa = PBXReferenceProxy;
980 | fileType = archive.ar;
981 | path = libReact.a;
982 | remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */;
983 | sourceTree = BUILT_PRODUCTS_DIR;
984 | };
985 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = {
986 | isa = PBXReferenceProxy;
987 | fileType = archive.ar;
988 | path = libyoga.a;
989 | remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */;
990 | sourceTree = BUILT_PRODUCTS_DIR;
991 | };
992 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = {
993 | isa = PBXReferenceProxy;
994 | fileType = archive.ar;
995 | path = libyoga.a;
996 | remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */;
997 | sourceTree = BUILT_PRODUCTS_DIR;
998 | };
999 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = {
1000 | isa = PBXReferenceProxy;
1001 | fileType = archive.ar;
1002 | path = libcxxreact.a;
1003 | remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */;
1004 | sourceTree = BUILT_PRODUCTS_DIR;
1005 | };
1006 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = {
1007 | isa = PBXReferenceProxy;
1008 | fileType = archive.ar;
1009 | path = libcxxreact.a;
1010 | remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */;
1011 | sourceTree = BUILT_PRODUCTS_DIR;
1012 | };
1013 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = {
1014 | isa = PBXReferenceProxy;
1015 | fileType = archive.ar;
1016 | path = libjschelpers.a;
1017 | remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */;
1018 | sourceTree = BUILT_PRODUCTS_DIR;
1019 | };
1020 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = {
1021 | isa = PBXReferenceProxy;
1022 | fileType = archive.ar;
1023 | path = libjschelpers.a;
1024 | remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */;
1025 | sourceTree = BUILT_PRODUCTS_DIR;
1026 | };
1027 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
1028 | isa = PBXReferenceProxy;
1029 | fileType = archive.ar;
1030 | path = libRCTAnimation.a;
1031 | remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
1032 | sourceTree = BUILT_PRODUCTS_DIR;
1033 | };
1034 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
1035 | isa = PBXReferenceProxy;
1036 | fileType = archive.ar;
1037 | path = libRCTAnimation.a;
1038 | remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
1039 | sourceTree = BUILT_PRODUCTS_DIR;
1040 | };
1041 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
1042 | isa = PBXReferenceProxy;
1043 | fileType = archive.ar;
1044 | path = libRCTLinking.a;
1045 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */;
1046 | sourceTree = BUILT_PRODUCTS_DIR;
1047 | };
1048 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = {
1049 | isa = PBXReferenceProxy;
1050 | fileType = archive.ar;
1051 | path = libRCTText.a;
1052 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
1053 | sourceTree = BUILT_PRODUCTS_DIR;
1054 | };
1055 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = {
1056 | isa = PBXReferenceProxy;
1057 | fileType = archive.ar;
1058 | path = libRCTBlob.a;
1059 | remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */;
1060 | sourceTree = BUILT_PRODUCTS_DIR;
1061 | };
1062 | /* End PBXReferenceProxy section */
1063 |
1064 | /* Begin PBXResourcesBuildPhase section */
1065 | 00E356EC1AD99517003FC87E /* Resources */ = {
1066 | isa = PBXResourcesBuildPhase;
1067 | buildActionMask = 2147483647;
1068 | files = (
1069 | );
1070 | runOnlyForDeploymentPostprocessing = 0;
1071 | };
1072 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
1073 | isa = PBXResourcesBuildPhase;
1074 | buildActionMask = 2147483647;
1075 | files = (
1076 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
1077 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
1078 | );
1079 | runOnlyForDeploymentPostprocessing = 0;
1080 | };
1081 | 2D02E4791E0B4A5D006451C7 /* Resources */ = {
1082 | isa = PBXResourcesBuildPhase;
1083 | buildActionMask = 2147483647;
1084 | files = (
1085 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
1086 | );
1087 | runOnlyForDeploymentPostprocessing = 0;
1088 | };
1089 | 2D02E48E1E0B4A5D006451C7 /* Resources */ = {
1090 | isa = PBXResourcesBuildPhase;
1091 | buildActionMask = 2147483647;
1092 | files = (
1093 | );
1094 | runOnlyForDeploymentPostprocessing = 0;
1095 | };
1096 | /* End PBXResourcesBuildPhase section */
1097 |
1098 | /* Begin PBXShellScriptBuildPhase section */
1099 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
1100 | isa = PBXShellScriptBuildPhase;
1101 | buildActionMask = 2147483647;
1102 | files = (
1103 | );
1104 | inputPaths = (
1105 | );
1106 | name = "Bundle React Native code and images";
1107 | outputPaths = (
1108 | );
1109 | runOnlyForDeploymentPostprocessing = 0;
1110 | shellPath = /bin/sh;
1111 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
1112 | };
1113 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
1114 | isa = PBXShellScriptBuildPhase;
1115 | buildActionMask = 2147483647;
1116 | files = (
1117 | );
1118 | inputPaths = (
1119 | );
1120 | name = "Bundle React Native Code And Images";
1121 | outputPaths = (
1122 | );
1123 | runOnlyForDeploymentPostprocessing = 0;
1124 | shellPath = /bin/sh;
1125 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
1126 | };
1127 | FB1983E5E0C0C40D5E79294F /* [CP] Check Pods Manifest.lock */ = {
1128 | isa = PBXShellScriptBuildPhase;
1129 | buildActionMask = 2147483647;
1130 | files = (
1131 | );
1132 | inputFileListPaths = (
1133 | );
1134 | inputPaths = (
1135 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
1136 | "${PODS_ROOT}/Manifest.lock",
1137 | );
1138 | name = "[CP] Check Pods Manifest.lock";
1139 | outputFileListPaths = (
1140 | );
1141 | outputPaths = (
1142 | "$(DERIVED_FILE_DIR)/Pods-ExampleApp-checkManifestLockResult.txt",
1143 | );
1144 | runOnlyForDeploymentPostprocessing = 0;
1145 | shellPath = /bin/sh;
1146 | 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";
1147 | showEnvVarsInLog = 0;
1148 | };
1149 | /* End PBXShellScriptBuildPhase section */
1150 |
1151 | /* Begin PBXSourcesBuildPhase section */
1152 | 00E356EA1AD99517003FC87E /* Sources */ = {
1153 | isa = PBXSourcesBuildPhase;
1154 | buildActionMask = 2147483647;
1155 | files = (
1156 | 00E356F31AD99517003FC87E /* ExampleAppTests.m in Sources */,
1157 | );
1158 | runOnlyForDeploymentPostprocessing = 0;
1159 | };
1160 | 13B07F871A680F5B00A75B9A /* Sources */ = {
1161 | isa = PBXSourcesBuildPhase;
1162 | buildActionMask = 2147483647;
1163 | files = (
1164 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
1165 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
1166 | );
1167 | runOnlyForDeploymentPostprocessing = 0;
1168 | };
1169 | 2D02E4771E0B4A5D006451C7 /* Sources */ = {
1170 | isa = PBXSourcesBuildPhase;
1171 | buildActionMask = 2147483647;
1172 | files = (
1173 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */,
1174 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */,
1175 | );
1176 | runOnlyForDeploymentPostprocessing = 0;
1177 | };
1178 | 2D02E48C1E0B4A5D006451C7 /* Sources */ = {
1179 | isa = PBXSourcesBuildPhase;
1180 | buildActionMask = 2147483647;
1181 | files = (
1182 | 2DCD954D1E0B4F2C00145EB5 /* ExampleAppTests.m in Sources */,
1183 | );
1184 | runOnlyForDeploymentPostprocessing = 0;
1185 | };
1186 | /* End PBXSourcesBuildPhase section */
1187 |
1188 | /* Begin PBXTargetDependency section */
1189 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
1190 | isa = PBXTargetDependency;
1191 | target = 13B07F861A680F5B00A75B9A /* ExampleApp */;
1192 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
1193 | };
1194 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = {
1195 | isa = PBXTargetDependency;
1196 | target = 2D02E47A1E0B4A5D006451C7 /* ExampleApp-tvOS */;
1197 | targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */;
1198 | };
1199 | /* End PBXTargetDependency section */
1200 |
1201 | /* Begin PBXVariantGroup section */
1202 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
1203 | isa = PBXVariantGroup;
1204 | children = (
1205 | 13B07FB21A68108700A75B9A /* Base */,
1206 | );
1207 | name = LaunchScreen.xib;
1208 | path = ExampleApp;
1209 | sourceTree = "";
1210 | };
1211 | /* End PBXVariantGroup section */
1212 |
1213 | /* Begin XCBuildConfiguration section */
1214 | 00E356F61AD99517003FC87E /* Debug */ = {
1215 | isa = XCBuildConfiguration;
1216 | buildSettings = {
1217 | BUNDLE_LOADER = "$(TEST_HOST)";
1218 | GCC_PREPROCESSOR_DEFINITIONS = (
1219 | "DEBUG=1",
1220 | "$(inherited)",
1221 | );
1222 | INFOPLIST_FILE = ExampleAppTests/Info.plist;
1223 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1224 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1225 | OTHER_LDFLAGS = (
1226 | "-ObjC",
1227 | "-lc++",
1228 | );
1229 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
1230 | PRODUCT_NAME = "$(TARGET_NAME)";
1231 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ExampleApp.app/ExampleApp";
1232 | };
1233 | name = Debug;
1234 | };
1235 | 00E356F71AD99517003FC87E /* Release */ = {
1236 | isa = XCBuildConfiguration;
1237 | buildSettings = {
1238 | BUNDLE_LOADER = "$(TEST_HOST)";
1239 | COPY_PHASE_STRIP = NO;
1240 | INFOPLIST_FILE = ExampleAppTests/Info.plist;
1241 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1242 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1243 | OTHER_LDFLAGS = (
1244 | "-ObjC",
1245 | "-lc++",
1246 | );
1247 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
1248 | PRODUCT_NAME = "$(TARGET_NAME)";
1249 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ExampleApp.app/ExampleApp";
1250 | };
1251 | name = Release;
1252 | };
1253 | 13B07F941A680F5B00A75B9A /* Debug */ = {
1254 | isa = XCBuildConfiguration;
1255 | baseConfigurationReference = 7E418A97065030AE682D160C /* Pods-ExampleApp.debug.xcconfig */;
1256 | buildSettings = {
1257 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1258 | CURRENT_PROJECT_VERSION = 1;
1259 | DEAD_CODE_STRIPPING = NO;
1260 | INFOPLIST_FILE = ExampleApp/Info.plist;
1261 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1262 | OTHER_LDFLAGS = (
1263 | "$(inherited)",
1264 | "-ObjC",
1265 | "-lc++",
1266 | );
1267 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
1268 | PRODUCT_NAME = ExampleApp;
1269 | VERSIONING_SYSTEM = "apple-generic";
1270 | };
1271 | name = Debug;
1272 | };
1273 | 13B07F951A680F5B00A75B9A /* Release */ = {
1274 | isa = XCBuildConfiguration;
1275 | baseConfigurationReference = 1D19FCD5A7FA6923D2EBCAF4 /* Pods-ExampleApp.release.xcconfig */;
1276 | buildSettings = {
1277 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1278 | CURRENT_PROJECT_VERSION = 1;
1279 | INFOPLIST_FILE = ExampleApp/Info.plist;
1280 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1281 | OTHER_LDFLAGS = (
1282 | "$(inherited)",
1283 | "-ObjC",
1284 | "-lc++",
1285 | );
1286 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
1287 | PRODUCT_NAME = ExampleApp;
1288 | VERSIONING_SYSTEM = "apple-generic";
1289 | };
1290 | name = Release;
1291 | };
1292 | 2D02E4971E0B4A5E006451C7 /* Debug */ = {
1293 | isa = XCBuildConfiguration;
1294 | buildSettings = {
1295 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
1296 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
1297 | CLANG_ANALYZER_NONNULL = YES;
1298 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1299 | CLANG_WARN_INFINITE_RECURSION = YES;
1300 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1301 | DEBUG_INFORMATION_FORMAT = dwarf;
1302 | ENABLE_TESTABILITY = YES;
1303 | GCC_NO_COMMON_BLOCKS = YES;
1304 | INFOPLIST_FILE = "ExampleApp-tvOS/Info.plist";
1305 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1306 | OTHER_LDFLAGS = (
1307 | "-ObjC",
1308 | "-lc++",
1309 | );
1310 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.ExampleApp-tvOS";
1311 | PRODUCT_NAME = "$(TARGET_NAME)";
1312 | SDKROOT = appletvos;
1313 | TARGETED_DEVICE_FAMILY = 3;
1314 | TVOS_DEPLOYMENT_TARGET = 9.2;
1315 | };
1316 | name = Debug;
1317 | };
1318 | 2D02E4981E0B4A5E006451C7 /* Release */ = {
1319 | isa = XCBuildConfiguration;
1320 | buildSettings = {
1321 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
1322 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
1323 | CLANG_ANALYZER_NONNULL = YES;
1324 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1325 | CLANG_WARN_INFINITE_RECURSION = YES;
1326 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1327 | COPY_PHASE_STRIP = NO;
1328 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1329 | GCC_NO_COMMON_BLOCKS = YES;
1330 | INFOPLIST_FILE = "ExampleApp-tvOS/Info.plist";
1331 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1332 | OTHER_LDFLAGS = (
1333 | "-ObjC",
1334 | "-lc++",
1335 | );
1336 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.ExampleApp-tvOS";
1337 | PRODUCT_NAME = "$(TARGET_NAME)";
1338 | SDKROOT = appletvos;
1339 | TARGETED_DEVICE_FAMILY = 3;
1340 | TVOS_DEPLOYMENT_TARGET = 9.2;
1341 | };
1342 | name = Release;
1343 | };
1344 | 2D02E4991E0B4A5E006451C7 /* Debug */ = {
1345 | isa = XCBuildConfiguration;
1346 | buildSettings = {
1347 | BUNDLE_LOADER = "$(TEST_HOST)";
1348 | CLANG_ANALYZER_NONNULL = YES;
1349 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1350 | CLANG_WARN_INFINITE_RECURSION = YES;
1351 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1352 | DEBUG_INFORMATION_FORMAT = dwarf;
1353 | ENABLE_TESTABILITY = YES;
1354 | GCC_NO_COMMON_BLOCKS = YES;
1355 | INFOPLIST_FILE = "ExampleApp-tvOSTests/Info.plist";
1356 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1357 | OTHER_LDFLAGS = (
1358 | "-ObjC",
1359 | "-lc++",
1360 | );
1361 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.ExampleApp-tvOSTests";
1362 | PRODUCT_NAME = "$(TARGET_NAME)";
1363 | SDKROOT = appletvos;
1364 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ExampleApp-tvOS.app/ExampleApp-tvOS";
1365 | TVOS_DEPLOYMENT_TARGET = 10.1;
1366 | };
1367 | name = Debug;
1368 | };
1369 | 2D02E49A1E0B4A5E006451C7 /* Release */ = {
1370 | isa = XCBuildConfiguration;
1371 | buildSettings = {
1372 | BUNDLE_LOADER = "$(TEST_HOST)";
1373 | CLANG_ANALYZER_NONNULL = YES;
1374 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1375 | CLANG_WARN_INFINITE_RECURSION = YES;
1376 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1377 | COPY_PHASE_STRIP = NO;
1378 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1379 | GCC_NO_COMMON_BLOCKS = YES;
1380 | INFOPLIST_FILE = "ExampleApp-tvOSTests/Info.plist";
1381 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1382 | OTHER_LDFLAGS = (
1383 | "-ObjC",
1384 | "-lc++",
1385 | );
1386 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.ExampleApp-tvOSTests";
1387 | PRODUCT_NAME = "$(TARGET_NAME)";
1388 | SDKROOT = appletvos;
1389 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ExampleApp-tvOS.app/ExampleApp-tvOS";
1390 | TVOS_DEPLOYMENT_TARGET = 10.1;
1391 | };
1392 | name = Release;
1393 | };
1394 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
1395 | isa = XCBuildConfiguration;
1396 | buildSettings = {
1397 | ALWAYS_SEARCH_USER_PATHS = NO;
1398 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
1399 | CLANG_CXX_LIBRARY = "libc++";
1400 | CLANG_ENABLE_MODULES = YES;
1401 | CLANG_ENABLE_OBJC_ARC = YES;
1402 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
1403 | CLANG_WARN_BOOL_CONVERSION = YES;
1404 | CLANG_WARN_COMMA = YES;
1405 | CLANG_WARN_CONSTANT_CONVERSION = YES;
1406 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
1407 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
1408 | CLANG_WARN_EMPTY_BODY = YES;
1409 | CLANG_WARN_ENUM_CONVERSION = YES;
1410 | CLANG_WARN_INFINITE_RECURSION = YES;
1411 | CLANG_WARN_INT_CONVERSION = YES;
1412 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1413 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
1414 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
1415 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1416 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
1417 | CLANG_WARN_STRICT_PROTOTYPES = YES;
1418 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1419 | CLANG_WARN_UNREACHABLE_CODE = YES;
1420 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1421 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1422 | COPY_PHASE_STRIP = NO;
1423 | ENABLE_STRICT_OBJC_MSGSEND = YES;
1424 | ENABLE_TESTABILITY = YES;
1425 | GCC_C_LANGUAGE_STANDARD = gnu99;
1426 | GCC_DYNAMIC_NO_PIC = NO;
1427 | GCC_NO_COMMON_BLOCKS = YES;
1428 | GCC_OPTIMIZATION_LEVEL = 0;
1429 | GCC_PREPROCESSOR_DEFINITIONS = (
1430 | "DEBUG=1",
1431 | "$(inherited)",
1432 | );
1433 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
1434 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
1435 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
1436 | GCC_WARN_UNDECLARED_SELECTOR = YES;
1437 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
1438 | GCC_WARN_UNUSED_FUNCTION = YES;
1439 | GCC_WARN_UNUSED_VARIABLE = YES;
1440 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1441 | MTL_ENABLE_DEBUG_INFO = YES;
1442 | ONLY_ACTIVE_ARCH = YES;
1443 | SDKROOT = iphoneos;
1444 | };
1445 | name = Debug;
1446 | };
1447 | 83CBBA211A601CBA00E9B192 /* Release */ = {
1448 | isa = XCBuildConfiguration;
1449 | buildSettings = {
1450 | ALWAYS_SEARCH_USER_PATHS = NO;
1451 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
1452 | CLANG_CXX_LIBRARY = "libc++";
1453 | CLANG_ENABLE_MODULES = YES;
1454 | CLANG_ENABLE_OBJC_ARC = YES;
1455 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
1456 | CLANG_WARN_BOOL_CONVERSION = YES;
1457 | CLANG_WARN_COMMA = YES;
1458 | CLANG_WARN_CONSTANT_CONVERSION = YES;
1459 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
1460 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
1461 | CLANG_WARN_EMPTY_BODY = YES;
1462 | CLANG_WARN_ENUM_CONVERSION = YES;
1463 | CLANG_WARN_INFINITE_RECURSION = YES;
1464 | CLANG_WARN_INT_CONVERSION = YES;
1465 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1466 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
1467 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
1468 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1469 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
1470 | CLANG_WARN_STRICT_PROTOTYPES = YES;
1471 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1472 | CLANG_WARN_UNREACHABLE_CODE = YES;
1473 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1474 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1475 | COPY_PHASE_STRIP = YES;
1476 | ENABLE_NS_ASSERTIONS = NO;
1477 | ENABLE_STRICT_OBJC_MSGSEND = YES;
1478 | GCC_C_LANGUAGE_STANDARD = gnu99;
1479 | GCC_NO_COMMON_BLOCKS = YES;
1480 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
1481 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
1482 | GCC_WARN_UNDECLARED_SELECTOR = YES;
1483 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
1484 | GCC_WARN_UNUSED_FUNCTION = YES;
1485 | GCC_WARN_UNUSED_VARIABLE = YES;
1486 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
1487 | MTL_ENABLE_DEBUG_INFO = NO;
1488 | SDKROOT = iphoneos;
1489 | VALIDATE_PRODUCT = YES;
1490 | };
1491 | name = Release;
1492 | };
1493 | /* End XCBuildConfiguration section */
1494 |
1495 | /* Begin XCConfigurationList section */
1496 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ExampleAppTests" */ = {
1497 | isa = XCConfigurationList;
1498 | buildConfigurations = (
1499 | 00E356F61AD99517003FC87E /* Debug */,
1500 | 00E356F71AD99517003FC87E /* Release */,
1501 | );
1502 | defaultConfigurationIsVisible = 0;
1503 | defaultConfigurationName = Release;
1504 | };
1505 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ExampleApp" */ = {
1506 | isa = XCConfigurationList;
1507 | buildConfigurations = (
1508 | 13B07F941A680F5B00A75B9A /* Debug */,
1509 | 13B07F951A680F5B00A75B9A /* Release */,
1510 | );
1511 | defaultConfigurationIsVisible = 0;
1512 | defaultConfigurationName = Release;
1513 | };
1514 | 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "ExampleApp-tvOS" */ = {
1515 | isa = XCConfigurationList;
1516 | buildConfigurations = (
1517 | 2D02E4971E0B4A5E006451C7 /* Debug */,
1518 | 2D02E4981E0B4A5E006451C7 /* Release */,
1519 | );
1520 | defaultConfigurationIsVisible = 0;
1521 | defaultConfigurationName = Release;
1522 | };
1523 | 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "ExampleApp-tvOSTests" */ = {
1524 | isa = XCConfigurationList;
1525 | buildConfigurations = (
1526 | 2D02E4991E0B4A5E006451C7 /* Debug */,
1527 | 2D02E49A1E0B4A5E006451C7 /* Release */,
1528 | );
1529 | defaultConfigurationIsVisible = 0;
1530 | defaultConfigurationName = Release;
1531 | };
1532 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ExampleApp" */ = {
1533 | isa = XCConfigurationList;
1534 | buildConfigurations = (
1535 | 83CBBA201A601CBA00E9B192 /* Debug */,
1536 | 83CBBA211A601CBA00E9B192 /* Release */,
1537 | );
1538 | defaultConfigurationIsVisible = 0;
1539 | defaultConfigurationName = Release;
1540 | };
1541 | /* End XCConfigurationList section */
1542 | };
1543 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
1544 | }
1545 |
--------------------------------------------------------------------------------