├── .flowconfig
├── .gitignore
├── .npmignore
├── .travis.yml
├── .watchmanconfig
├── Makefile
├── README.md
├── android
├── app
│ ├── build.gradle
│ ├── proguard-rules.pro
│ ├── react.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── autoresponsive_react_native_sample
│ │ │ └── MainActivity.java
│ │ └── res
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── autoresponsive_react_native_sample.xcodeproj
├── project.pbxproj
└── xcshareddata
│ └── xcschemes
│ └── autoresponsive_react_native_sample.xcscheme
├── iOS
├── AppDelegate.h
├── AppDelegate.m
├── Base.lproj
│ └── LaunchScreen.xib
├── Images.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
├── main.jsbundle
└── main.m
├── index.android.js
├── index.ios.js
├── package.json
├── sample.js
├── screenshot
├── android.png
└── ios.png
└── test
├── base.test.js
├── mocha.opt
└── utils.js
/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 |
3 | # We fork some components by platform.
4 | .*/*.web.js
5 | .*/*.android.js
6 |
7 | # Some modules have their own node_modules with overlap
8 | .*/node_modules/node-haste/.*
9 |
10 | # Ugh
11 | .*/node_modules/babel.*
12 | .*/node_modules/babylon.*
13 | .*/node_modules/invariant.*
14 |
15 | # Ignore react and fbjs where there are overlaps, but don't ignore
16 | # anything that react-native relies on
17 | .*/node_modules/fbjs/lib/Map.js
18 | .*/node_modules/fbjs/lib/Promise.js
19 | .*/node_modules/fbjs/lib/fetch.js
20 | .*/node_modules/fbjs/lib/ExecutionEnvironment.js
21 | .*/node_modules/fbjs/lib/isEmpty.js
22 | .*/node_modules/fbjs/lib/crc32.js
23 | .*/node_modules/fbjs/lib/ErrorUtils.js
24 |
25 | # Flow has a built-in definition for the 'react' module which we prefer to use
26 | # over the currently-untyped source
27 | .*/node_modules/react/react.js
28 | .*/node_modules/react/lib/React.js
29 | .*/node_modules/react/lib/ReactDOM.js
30 |
31 | # Ignore commoner tests
32 | .*/node_modules/commoner/test/.*
33 |
34 | # See https://github.com/facebook/flow/issues/442
35 | .*/react-tools/node_modules/commoner/lib/reader.js
36 |
37 | # Ignore jest
38 | .*/node_modules/jest-cli/.*
39 |
40 | # Ignore Website
41 | .*/website/.*
42 |
43 | [include]
44 |
45 | [libs]
46 | node_modules/react-native/Libraries/react-native/react-native-interface.js
47 |
48 | [options]
49 | module.system=haste
50 |
51 | munge_underscores=true
52 |
53 | module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
54 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.png$' -> 'RelativeImageStub'
55 |
56 | suppress_type=$FlowIssue
57 | suppress_type=$FlowFixMe
58 | suppress_type=$FixMe
59 |
60 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-0]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
61 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-0]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
62 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
63 |
64 | [version]
65 | 0.20.1
66 |
--------------------------------------------------------------------------------
/.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/IJ
26 | #
27 | .idea
28 | .gradle
29 | local.properties
30 |
31 | # node.js
32 | #
33 | node_modules/
34 | npm-debug.log
35 |
36 | # screenshot
37 | screenshot/*-diff.png
38 |
39 | *.sw*
40 | *.un~
41 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
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 |
24 | # screenshot
25 | screenshot/*-diff.png
26 |
27 | # node.js
28 | #
29 | node_modules/
30 | npm-debug.log
31 |
32 | *.sw*
33 | *.un~
34 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | os: osx
2 | osx_image: xcode7.3
3 | sudo: required
4 | before_install:
5 | - sed 's/localhost.localdomain localhost/localhost localhost.localdomain/' /etc/hosts > /tmp/etchoststmp && cat /tmp/etchoststmp | sudo tee /etc/hosts
6 | install:
7 | - brew reinstall node flow watchman xctool
8 | script:
9 | - make test
10 |
--------------------------------------------------------------------------------
/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | npm_bin= $$(npm bin)
2 |
3 | all: test
4 | install:
5 | @npm install
6 | start:
7 | @npm run start
8 | clean:
9 | find ~/Library/Developer/Xcode -name autoresponsive_react_native_sample.app | xargs rm -rf
10 | test: install build
11 | npm i macaca-ios --save-dev
12 | APP_PATH=${shell find ~/Library/Developer/Xcode -name autoresponsive_react_native_sample.app} ${npm_bin}/macaca run --verbose -d ./test
13 | build:
14 | xcodebuild clean build -scheme autoresponsive_react_native_sample -configuration Debug -sdk iphonesimulator9.3 CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""
15 | test-android: install build-android
16 | npm i macaca-android --save-dev
17 | platform=android APP_PATH=./android/app/build/outputs/apk/app-debug.apk ${npm_bin}/macaca run --verbose -d ./test
18 | build-android:
19 | cd android && chmod +x ./gradlew; ls -l gradlew; ./gradlew wrapper -v && ./gradlew clean assembleDebug --stacktrace
20 | lint:
21 | @${npm_bin}/eslint
22 | .PHONY: all test build
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # autoresponsive_react_native_sample
2 |
3 | Auto responsive grid layout library for [ReactNative](https://facebook.github.io/react-native/).
4 |
5 | ## CI
6 |
7 | | Platform | Status | Repo |
8 | | ---------- | ----------------------------------------------- | ------------------ |
9 | | iOS | [![build status][travis-image-0]][travis-url-0] | [autoresponsive_react_native_sample](https://github.com/xudafeng/autoresponsive_react_native_sample) |
10 | | Android | [![build status][travis-image-1]][travis-url-1] | [autoresponsive_react_native_sample_android_ci](https://github.com/xudafeng/autoresponsive_react_native_sample_android_ci) |
11 |
12 | [travis-image-0]: https://img.shields.io/travis/xudafeng/autoresponsive_react_native_sample.svg?style=flat-square
13 | [travis-url-0]: https://travis-ci.org/xudafeng/autoresponsive_react_native_sample
14 | [travis-image-1]: https://img.shields.io/travis/xudafeng/autoresponsive_react_native_sample_android_ci.svg?style=flat-square
15 | [travis-url-1]: https://travis-ci.org/xudafeng/autoresponsive_react_native_sample_android_ci
16 |
17 | ## Run
18 |
19 | ```bash
20 | $ react-native run-android
21 | ```
22 |
23 | ## ScreenShot
24 |
25 | Screenshots of iOS & Android which generated from automation test.
26 |
27 |
28 |
29 |
30 |
31 | ## Contributors
32 |
33 | |[
xudafeng](https://github.com/xudafeng)
|[
ziczhu](https://github.com/ziczhu)
34 | | :---: | :---: |
35 |
36 |
37 | This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto upated at `Sat Apr 21 2018 17:31:36 GMT+0800`.
38 |
39 |
40 |
41 | ## License
42 |
43 | MIT Licensed. Copyright (c) xdf 2015.
44 |
--------------------------------------------------------------------------------
/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: "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 is in the format 'bundleIn${productFlavor}${buildType}'
30 | * // bundleInFreeDebug: true,
31 | * // bundleInPaidRelease: true,
32 | * // bundleInBeta: true,
33 | *
34 | * // the root of your project, i.e. where "package.json" lives
35 | * root: "../../",
36 | *
37 | * // where to put the JS bundle asset in debug mode
38 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
39 | *
40 | * // where to put the JS bundle asset in release mode
41 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
42 | *
43 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
44 | * // require('./image.png')), in debug mode
45 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
46 | *
47 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
48 | * // require('./image.png')), in release mode
49 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
50 | *
51 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
52 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
53 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
54 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
55 | * // for example, you might want to remove it from here.
56 | * inputExcludes: ["android/**", "ios/**"]
57 | * ]
58 | */
59 |
60 | apply from: "react.gradle"
61 |
62 | /**
63 | * Set this to true to create two separate APKs instead of one:
64 | * - An APK that only works on ARM devices
65 | * - An APK that only works on x86 devices
66 | * The advantage is the size of the APK is reduced by about 4MB.
67 | * Upload all the APKs to the Play Store and people will download
68 | * the correct one based on the CPU architecture of their device.
69 | */
70 | def enableSeparateBuildPerCPUArchitecture = false
71 |
72 | /**
73 | * Run Proguard to shrink the Java bytecode in release builds.
74 | */
75 | def enableProguardInReleaseBuilds = true
76 |
77 | android {
78 | compileSdkVersion 23
79 | buildToolsVersion "22.0.1"
80 |
81 | defaultConfig {
82 | applicationId "com.autoresponsive_react_native_sample"
83 | minSdkVersion 16
84 | targetSdkVersion 22
85 | versionCode 1
86 | versionName "1.0"
87 | ndk {
88 | abiFilters "armeabi-v7a", "x86"
89 | }
90 | }
91 | splits {
92 | abi {
93 | enable enableSeparateBuildPerCPUArchitecture
94 | universalApk false // Also generate an universal APK
95 | reset()
96 | include "armeabi-v7a", "x86"
97 | }
98 | }
99 | buildTypes {
100 | release {
101 | minifyEnabled enableProguardInReleaseBuilds
102 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
103 | }
104 | }
105 | // applicationVariants are e.g. debug, release
106 | applicationVariants.all { variant ->
107 | variant.outputs.each { output ->
108 | // For each separate APK per architecture, set a unique version code as described here:
109 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
110 | def versionCodes = ["armeabi-v7a":1, "x86":2]
111 | def abi = output.getFilter(OutputFile.ABI)
112 | if (abi != null) { // null for the universal-debug, universal-release variants
113 | output.versionCodeOverride =
114 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
115 | }
116 | }
117 | }
118 | }
119 |
120 | dependencies {
121 | compile fileTree(dir: "libs", include: ["*.jar"])
122 | compile "com.android.support:appcompat-v7:23.0.+"
123 | compile "com.facebook.react:react-native:0.19.+"
124 | }
125 |
--------------------------------------------------------------------------------
/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 |
19 | # Disabling obfuscation is useful if you collect stack traces from production crashes
20 | # (unless you are using a system that supports de-obfuscate the stack traces).
21 | -dontobfuscate
22 |
23 | # React Native
24 |
25 | # Keep our interfaces so they can be used by other ProGuard rules.
26 | # See http://sourceforge.net/p/proguard/bugs/466/
27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
29 |
30 | # Do not strip any method/class that is annotated with @DoNotStrip
31 | -keep @com.facebook.proguard.annotations.DoNotStrip class *
32 | -keepclassmembers class * {
33 | @com.facebook.proguard.annotations.DoNotStrip *;
34 | }
35 |
36 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
37 | void set*(***);
38 | *** get*();
39 | }
40 |
41 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
42 | -keep class * extends com.facebook.react.bridge.NativeModule { *; }
43 | -keepclassmembers,includedescriptorclasses class * { native ; }
44 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; }
45 | -keepclassmembers class * { @com.facebook.react.uimanager.ReactProp ; }
46 | -keepclassmembers class * { @com.facebook.react.uimanager.ReactPropGroup ; }
47 |
48 | -dontwarn com.facebook.react.**
49 |
50 | # okhttp
51 |
52 | -keepattributes Signature
53 | -keepattributes *Annotation*
54 | -keep class com.squareup.okhttp.** { *; }
55 | -keep interface com.squareup.okhttp.** { *; }
56 | -dontwarn com.squareup.okhttp.**
57 |
58 | # okio
59 |
60 | -keep class sun.misc.Unsafe { *; }
61 | -dontwarn java.nio.file.*
62 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
63 | -dontwarn okio.**
64 |
65 | # stetho
66 |
67 | -dontwarn com.facebook.stetho.**
68 |
--------------------------------------------------------------------------------
/android/app/react.gradle:
--------------------------------------------------------------------------------
1 | import org.apache.tools.ant.taskdefs.condition.Os
2 |
3 | def config = project.hasProperty("react") ? project.react : [];
4 |
5 | def bundleAssetName = config.bundleAssetName ?: "index.android.bundle"
6 | def entryFile = config.entryFile ?: "index.android.js"
7 |
8 | // because elvis operator
9 | def elvisFile(thing) {
10 | return thing ? file(thing) : null;
11 | }
12 |
13 | def reactRoot = elvisFile(config.root) ?: file("../../")
14 | def inputExcludes = config.inputExcludes ?: ["android/**", "ios/**"]
15 |
16 | void runBefore(String dependentTaskName, Task task) {
17 | Task dependentTask = tasks.findByPath(dependentTaskName);
18 | if (dependentTask != null) {
19 | dependentTask.dependsOn task
20 | }
21 | }
22 |
23 | gradle.projectsEvaluated {
24 | // Grab all build types and product flavors
25 | def buildTypes = android.buildTypes.collect { type -> type.name }
26 | def productFlavors = android.productFlavors.collect { flavor -> flavor.name }
27 |
28 | // When no product flavors defined, use empty
29 | if (!productFlavors) productFlavors.add('')
30 |
31 | productFlavors.each { productFlavorName ->
32 | buildTypes.each { buildTypeName ->
33 | // Create variant and source names
34 | def sourceName = "${buildTypeName}"
35 | def targetName = "${sourceName.capitalize()}"
36 | if (productFlavorName) {
37 | sourceName = "${productFlavorName}${targetName}"
38 | }
39 |
40 | // React js bundle directories
41 | def jsBundleDirConfigName = "jsBundleDir${targetName}"
42 | def jsBundleDir = elvisFile(config."$jsBundleDirConfigName") ?:
43 | file("$buildDir/intermediates/assets/${sourceName}")
44 |
45 | def resourcesDirConfigName = "jsBundleDir${targetName}"
46 | def resourcesDir = elvisFile(config."${resourcesDirConfigName}") ?:
47 | file("$buildDir/intermediates/res/merged/${sourceName}")
48 | def jsBundleFile = file("$jsBundleDir/$bundleAssetName")
49 |
50 | // Bundle task name for variant
51 | def bundleJsAndAssetsTaskName = "bundle${targetName}JsAndAssets"
52 |
53 | def currentBundleTask = tasks.create(
54 | name: bundleJsAndAssetsTaskName,
55 | type: Exec) {
56 | group = "react"
57 | description = "bundle JS and assets for ${targetName}."
58 |
59 | // Create dirs if they are not there (e.g. the "clean" task just ran)
60 | doFirst {
61 | jsBundleDir.mkdirs()
62 | resourcesDir.mkdirs()
63 | }
64 |
65 | // Set up inputs and outputs so gradle can cache the result
66 | inputs.files fileTree(dir: reactRoot, excludes: inputExcludes)
67 | outputs.dir jsBundleDir
68 | outputs.dir resourcesDir
69 |
70 | // Set up the call to the react-native cli
71 | workingDir reactRoot
72 |
73 | // Set up dev mode
74 | def devEnabled = !targetName.toLowerCase().contains("release")
75 | if (Os.isFamily(Os.FAMILY_WINDOWS)) {
76 | commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "${devEnabled}",
77 | "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir
78 | } else {
79 | commandLine "react-native", "bundle", "--platform", "android", "--dev", "${devEnabled}",
80 | "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir
81 | }
82 |
83 | enabled config."bundleIn${targetName}" ?: targetName.toLowerCase().contains("release")
84 | }
85 |
86 | // Hook bundle${productFlavor}${buildType}JsAndAssets into the android build process
87 | currentBundleTask.dependsOn("merge${targetName}Resources")
88 | currentBundleTask.dependsOn("merge${targetName}Assets")
89 |
90 | runBefore("processArmeabi-v7a${targetName}Resources", currentBundleTask)
91 | runBefore("processX86${targetName}Resources", currentBundleTask)
92 | runBefore("processUniversal${targetName}Resources", currentBundleTask)
93 | runBefore("process${targetName}Resources", currentBundleTask)
94 | }
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/autoresponsive_react_native_sample/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.autoresponsive_react_native_sample;
2 |
3 | import com.facebook.react.ReactActivity;
4 | import com.facebook.react.ReactPackage;
5 | import com.facebook.react.shell.MainReactPackage;
6 |
7 | import java.util.Arrays;
8 | import java.util.List;
9 |
10 | public class MainActivity extends ReactActivity {
11 |
12 | /**
13 | * Returns the name of the main component registered from JavaScript.
14 | * This is used to schedule rendering of the component.
15 | */
16 | @Override
17 | protected String getMainComponentName() {
18 | return "autoresponsive_react_native_sample";
19 | }
20 |
21 | /**
22 | * Returns whether dev mode should be enabled.
23 | * This enables e.g. the dev menu.
24 | */
25 | @Override
26 | protected boolean getUseDeveloperSupport() {
27 | return BuildConfig.DEBUG;
28 | }
29 |
30 | /**
31 | * A list of packages used by the app. If the app uses additional views
32 | * or modules besides the default ones, add more packages here.
33 | */
34 | @Override
35 | protected List getPackages() {
36 | return Arrays.asList(
37 | new MainReactPackage()
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/app-bootstrap/autoresponsive_react_native_sample/1a55ea4629fe9bcbda2448371d9cd53b7be24bd4/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/app-bootstrap/autoresponsive_react_native_sample/1a55ea4629fe9bcbda2448371d9cd53b7be24bd4/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/app-bootstrap/autoresponsive_react_native_sample/1a55ea4629fe9bcbda2448371d9cd53b7be24bd4/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/app-bootstrap/autoresponsive_react_native_sample/1a55ea4629fe9bcbda2448371d9cd53b7be24bd4/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | autoresponsive_react_native_sample
3 |
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.3.1'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | mavenLocal()
18 | jcenter()
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/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 |
20 | android.useDeprecatedNdk=true
21 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/app-bootstrap/autoresponsive_react_native_sample/1a55ea4629fe9bcbda2448371d9cd53b7be24bd4/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
6 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'autoresponsive_react_native_sample'
2 |
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/autoresponsive_react_native_sample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 008F07F21AC5B25A0029DE68 /* main.jsbundle */; };
11 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
12 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
13 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; };
14 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
15 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; };
16 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
17 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; };
18 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; };
19 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
20 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
21 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
22 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
23 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
24 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
25 | /* End PBXBuildFile section */
26 |
27 | /* Begin PBXContainerItemProxy section */
28 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = {
29 | isa = PBXContainerItemProxy;
30 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
31 | proxyType = 2;
32 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
33 | remoteInfo = RCTActionSheet;
34 | };
35 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = {
36 | isa = PBXContainerItemProxy;
37 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
38 | proxyType = 2;
39 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
40 | remoteInfo = RCTGeolocation;
41 | };
42 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = {
43 | isa = PBXContainerItemProxy;
44 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
45 | proxyType = 2;
46 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676;
47 | remoteInfo = RCTImage;
48 | };
49 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = {
50 | isa = PBXContainerItemProxy;
51 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
52 | proxyType = 2;
53 | remoteGlobalIDString = 58B511DB1A9E6C8500147676;
54 | remoteInfo = RCTNetwork;
55 | };
56 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = {
57 | isa = PBXContainerItemProxy;
58 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
59 | proxyType = 2;
60 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
61 | remoteInfo = RCTVibration;
62 | };
63 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
64 | isa = PBXContainerItemProxy;
65 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
66 | proxyType = 2;
67 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
68 | remoteInfo = RCTSettings;
69 | };
70 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = {
71 | isa = PBXContainerItemProxy;
72 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
73 | proxyType = 2;
74 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
75 | remoteInfo = RCTWebSocket;
76 | };
77 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = {
78 | isa = PBXContainerItemProxy;
79 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
80 | proxyType = 2;
81 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
82 | remoteInfo = React;
83 | };
84 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
85 | isa = PBXContainerItemProxy;
86 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
87 | proxyType = 2;
88 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
89 | remoteInfo = RCTLinking;
90 | };
91 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = {
92 | isa = PBXContainerItemProxy;
93 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
94 | proxyType = 2;
95 | remoteGlobalIDString = 58B5119B1A9E6C1200147676;
96 | remoteInfo = RCTText;
97 | };
98 | /* End PBXContainerItemProxy section */
99 |
100 | /* Begin PBXFileReference section */
101 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = iOS/main.jsbundle; sourceTree = ""; };
102 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; };
103 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; };
104 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; };
105 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; };
106 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; };
107 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
108 | 00E356F21AD99517003FC87E /* autoresponsive_react_native_sampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = autoresponsive_react_native_sampleTests.m; sourceTree = ""; };
109 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; };
110 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; };
111 | 13B07F961A680F5B00A75B9A /* autoresponsive_react_native_sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = autoresponsive_react_native_sample.app; sourceTree = BUILT_PRODUCTS_DIR; };
112 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = iOS/AppDelegate.h; sourceTree = ""; };
113 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = iOS/AppDelegate.m; sourceTree = ""; };
114 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
115 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = iOS/Images.xcassets; sourceTree = ""; };
116 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = iOS/Info.plist; sourceTree = ""; };
117 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = iOS/main.m; sourceTree = ""; };
118 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; };
119 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; };
120 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; };
121 | /* End PBXFileReference section */
122 |
123 | /* Begin PBXFrameworksBuildPhase section */
124 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
125 | isa = PBXFrameworksBuildPhase;
126 | buildActionMask = 2147483647;
127 | files = (
128 | 146834051AC3E58100842450 /* libReact.a in Frameworks */,
129 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
130 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
131 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
132 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */,
133 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */,
134 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */,
135 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
136 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
137 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
138 | );
139 | runOnlyForDeploymentPostprocessing = 0;
140 | };
141 | /* End PBXFrameworksBuildPhase section */
142 |
143 | /* Begin PBXGroup section */
144 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = {
145 | isa = PBXGroup;
146 | children = (
147 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */,
148 | );
149 | name = Products;
150 | sourceTree = "";
151 | };
152 | 00C302B61ABCB90400DB3ED1 /* Products */ = {
153 | isa = PBXGroup;
154 | children = (
155 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */,
156 | );
157 | name = Products;
158 | sourceTree = "";
159 | };
160 | 00C302BC1ABCB91800DB3ED1 /* Products */ = {
161 | isa = PBXGroup;
162 | children = (
163 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */,
164 | );
165 | name = Products;
166 | sourceTree = "";
167 | };
168 | 00C302D41ABCB9D200DB3ED1 /* Products */ = {
169 | isa = PBXGroup;
170 | children = (
171 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */,
172 | );
173 | name = Products;
174 | sourceTree = "";
175 | };
176 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = {
177 | isa = PBXGroup;
178 | children = (
179 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */,
180 | );
181 | name = Products;
182 | sourceTree = "";
183 | };
184 | 00E356EF1AD99517003FC87E /* autoresponsive_react_native_sampleTests */ = {
185 | isa = PBXGroup;
186 | children = (
187 | 00E356F21AD99517003FC87E /* autoresponsive_react_native_sampleTests.m */,
188 | 00E356F01AD99517003FC87E /* Supporting Files */,
189 | );
190 | path = autoresponsive_react_native_sampleTests;
191 | sourceTree = "";
192 | };
193 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
194 | isa = PBXGroup;
195 | children = (
196 | 00E356F11AD99517003FC87E /* Info.plist */,
197 | );
198 | name = "Supporting Files";
199 | sourceTree = "";
200 | };
201 | 139105B71AF99BAD00B5F7CC /* Products */ = {
202 | isa = PBXGroup;
203 | children = (
204 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */,
205 | );
206 | name = Products;
207 | sourceTree = "";
208 | };
209 | 139FDEE71B06529A00C62182 /* Products */ = {
210 | isa = PBXGroup;
211 | children = (
212 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
213 | );
214 | name = Products;
215 | sourceTree = "";
216 | };
217 | 13B07FAE1A68108700A75B9A /* autoresponsive_react_native_sample */ = {
218 | isa = PBXGroup;
219 | children = (
220 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
221 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
222 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
223 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
224 | 13B07FB61A68108700A75B9A /* Info.plist */,
225 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
226 | 13B07FB71A68108700A75B9A /* main.m */,
227 | );
228 | name = autoresponsive_react_native_sample;
229 | sourceTree = "";
230 | };
231 | 146834001AC3E56700842450 /* Products */ = {
232 | isa = PBXGroup;
233 | children = (
234 | 146834041AC3E56700842450 /* libReact.a */,
235 | );
236 | name = Products;
237 | sourceTree = "";
238 | };
239 | 78C398B11ACF4ADC00677621 /* Products */ = {
240 | isa = PBXGroup;
241 | children = (
242 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */,
243 | );
244 | name = Products;
245 | sourceTree = "";
246 | };
247 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
248 | isa = PBXGroup;
249 | children = (
250 | 146833FF1AC3E56700842450 /* React.xcodeproj */,
251 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
252 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
253 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
254 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
255 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */,
256 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */,
257 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
258 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
259 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
260 | );
261 | name = Libraries;
262 | sourceTree = "";
263 | };
264 | 832341B11AAA6A8300B99B32 /* Products */ = {
265 | isa = PBXGroup;
266 | children = (
267 | 832341B51AAA6A8300B99B32 /* libRCTText.a */,
268 | );
269 | name = Products;
270 | sourceTree = "";
271 | };
272 | 83CBB9F61A601CBA00E9B192 = {
273 | isa = PBXGroup;
274 | children = (
275 | 13B07FAE1A68108700A75B9A /* autoresponsive_react_native_sample */,
276 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
277 | 00E356EF1AD99517003FC87E /* autoresponsive_react_native_sampleTests */,
278 | 83CBBA001A601CBA00E9B192 /* Products */,
279 | );
280 | indentWidth = 2;
281 | sourceTree = "";
282 | tabWidth = 2;
283 | };
284 | 83CBBA001A601CBA00E9B192 /* Products */ = {
285 | isa = PBXGroup;
286 | children = (
287 | 13B07F961A680F5B00A75B9A /* autoresponsive_react_native_sample.app */,
288 | );
289 | name = Products;
290 | sourceTree = "";
291 | };
292 | /* End PBXGroup section */
293 |
294 | /* Begin PBXNativeTarget section */
295 | 13B07F861A680F5B00A75B9A /* autoresponsive_react_native_sample */ = {
296 | isa = PBXNativeTarget;
297 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "autoresponsive_react_native_sample" */;
298 | buildPhases = (
299 | 13B07F871A680F5B00A75B9A /* Sources */,
300 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
301 | 13B07F8E1A680F5B00A75B9A /* Resources */,
302 | );
303 | buildRules = (
304 | );
305 | dependencies = (
306 | );
307 | name = autoresponsive_react_native_sample;
308 | productName = "Hello World";
309 | productReference = 13B07F961A680F5B00A75B9A /* autoresponsive_react_native_sample.app */;
310 | productType = "com.apple.product-type.application";
311 | };
312 | /* End PBXNativeTarget section */
313 |
314 | /* Begin PBXProject section */
315 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
316 | isa = PBXProject;
317 | attributes = {
318 | LastUpgradeCheck = 0610;
319 | ORGANIZATIONNAME = Facebook;
320 | };
321 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "autoresponsive_react_native_sample" */;
322 | compatibilityVersion = "Xcode 3.2";
323 | developmentRegion = English;
324 | hasScannedForEncodings = 0;
325 | knownRegions = (
326 | en,
327 | Base,
328 | );
329 | mainGroup = 83CBB9F61A601CBA00E9B192;
330 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
331 | projectDirPath = "";
332 | projectReferences = (
333 | {
334 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
335 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
336 | },
337 | {
338 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
339 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
340 | },
341 | {
342 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */;
343 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
344 | },
345 | {
346 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */;
347 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
348 | },
349 | {
350 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */;
351 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
352 | },
353 | {
354 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */;
355 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
356 | },
357 | {
358 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */;
359 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
360 | },
361 | {
362 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */;
363 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
364 | },
365 | {
366 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */;
367 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
368 | },
369 | {
370 | ProductGroup = 146834001AC3E56700842450 /* Products */;
371 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
372 | },
373 | );
374 | projectRoot = "";
375 | targets = (
376 | 13B07F861A680F5B00A75B9A /* autoresponsive_react_native_sample */,
377 | );
378 | };
379 | /* End PBXProject section */
380 |
381 | /* Begin PBXReferenceProxy section */
382 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = {
383 | isa = PBXReferenceProxy;
384 | fileType = archive.ar;
385 | path = libRCTActionSheet.a;
386 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */;
387 | sourceTree = BUILT_PRODUCTS_DIR;
388 | };
389 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = {
390 | isa = PBXReferenceProxy;
391 | fileType = archive.ar;
392 | path = libRCTGeolocation.a;
393 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */;
394 | sourceTree = BUILT_PRODUCTS_DIR;
395 | };
396 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = {
397 | isa = PBXReferenceProxy;
398 | fileType = archive.ar;
399 | path = libRCTImage.a;
400 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */;
401 | sourceTree = BUILT_PRODUCTS_DIR;
402 | };
403 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = {
404 | isa = PBXReferenceProxy;
405 | fileType = archive.ar;
406 | path = libRCTNetwork.a;
407 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */;
408 | sourceTree = BUILT_PRODUCTS_DIR;
409 | };
410 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = {
411 | isa = PBXReferenceProxy;
412 | fileType = archive.ar;
413 | path = libRCTVibration.a;
414 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */;
415 | sourceTree = BUILT_PRODUCTS_DIR;
416 | };
417 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = {
418 | isa = PBXReferenceProxy;
419 | fileType = archive.ar;
420 | path = libRCTSettings.a;
421 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */;
422 | sourceTree = BUILT_PRODUCTS_DIR;
423 | };
424 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = {
425 | isa = PBXReferenceProxy;
426 | fileType = archive.ar;
427 | path = libRCTWebSocket.a;
428 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */;
429 | sourceTree = BUILT_PRODUCTS_DIR;
430 | };
431 | 146834041AC3E56700842450 /* libReact.a */ = {
432 | isa = PBXReferenceProxy;
433 | fileType = archive.ar;
434 | path = libReact.a;
435 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
436 | sourceTree = BUILT_PRODUCTS_DIR;
437 | };
438 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
439 | isa = PBXReferenceProxy;
440 | fileType = archive.ar;
441 | path = libRCTLinking.a;
442 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */;
443 | sourceTree = BUILT_PRODUCTS_DIR;
444 | };
445 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = {
446 | isa = PBXReferenceProxy;
447 | fileType = archive.ar;
448 | path = libRCTText.a;
449 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
450 | sourceTree = BUILT_PRODUCTS_DIR;
451 | };
452 | /* End PBXReferenceProxy section */
453 |
454 | /* Begin PBXResourcesBuildPhase section */
455 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
456 | isa = PBXResourcesBuildPhase;
457 | buildActionMask = 2147483647;
458 | files = (
459 | 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */,
460 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
461 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
462 | );
463 | runOnlyForDeploymentPostprocessing = 0;
464 | };
465 | /* End PBXResourcesBuildPhase section */
466 |
467 | /* Begin PBXSourcesBuildPhase section */
468 | 13B07F871A680F5B00A75B9A /* Sources */ = {
469 | isa = PBXSourcesBuildPhase;
470 | buildActionMask = 2147483647;
471 | files = (
472 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
473 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
474 | );
475 | runOnlyForDeploymentPostprocessing = 0;
476 | };
477 | /* End PBXSourcesBuildPhase section */
478 |
479 | /* Begin PBXVariantGroup section */
480 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
481 | isa = PBXVariantGroup;
482 | children = (
483 | 13B07FB21A68108700A75B9A /* Base */,
484 | );
485 | name = LaunchScreen.xib;
486 | path = iOS;
487 | sourceTree = "";
488 | };
489 | /* End PBXVariantGroup section */
490 |
491 | /* Begin XCBuildConfiguration section */
492 | 13B07F941A680F5B00A75B9A /* Debug */ = {
493 | isa = XCBuildConfiguration;
494 | buildSettings = {
495 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
496 | CODE_SIGN_IDENTITY = "iPhone Developer";
497 | HEADER_SEARCH_PATHS = (
498 | "$(inherited)",
499 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
500 | "$(SRCROOT)/node_modules/react-native/React/**",
501 | );
502 | INFOPLIST_FILE = "$(SRCROOT)/iOS/Info.plist";
503 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
504 | OTHER_LDFLAGS = "-ObjC";
505 | PRODUCT_NAME = autoresponsive_react_native_sample;
506 | };
507 | name = Debug;
508 | };
509 | 13B07F951A680F5B00A75B9A /* Release */ = {
510 | isa = XCBuildConfiguration;
511 | buildSettings = {
512 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
513 | CODE_SIGN_IDENTITY = "iPhone Developer";
514 | HEADER_SEARCH_PATHS = (
515 | "$(inherited)",
516 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
517 | "$(SRCROOT)/node_modules/react-native/React/**",
518 | );
519 | INFOPLIST_FILE = "$(SRCROOT)/iOS/Info.plist";
520 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
521 | OTHER_LDFLAGS = "-ObjC";
522 | PRODUCT_NAME = autoresponsive_react_native_sample;
523 | };
524 | name = Release;
525 | };
526 | 63385E861CE6FC2500FDB876 /* Macaca */ = {
527 | isa = XCBuildConfiguration;
528 | buildSettings = {
529 | ALWAYS_SEARCH_USER_PATHS = NO;
530 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
531 | CLANG_CXX_LIBRARY = "libc++";
532 | CLANG_ENABLE_MODULES = YES;
533 | CLANG_ENABLE_OBJC_ARC = YES;
534 | CLANG_WARN_BOOL_CONVERSION = YES;
535 | CLANG_WARN_CONSTANT_CONVERSION = YES;
536 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
537 | CLANG_WARN_EMPTY_BODY = YES;
538 | CLANG_WARN_ENUM_CONVERSION = YES;
539 | CLANG_WARN_INT_CONVERSION = YES;
540 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
541 | CLANG_WARN_UNREACHABLE_CODE = YES;
542 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
543 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
544 | COPY_PHASE_STRIP = NO;
545 | ENABLE_STRICT_OBJC_MSGSEND = YES;
546 | GCC_C_LANGUAGE_STANDARD = gnu99;
547 | GCC_DYNAMIC_NO_PIC = NO;
548 | GCC_OPTIMIZATION_LEVEL = 0;
549 | GCC_PREPROCESSOR_DEFINITIONS = (
550 | "DEBUG=1",
551 | "$(inherited)",
552 | );
553 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
554 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
555 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
556 | GCC_WARN_UNDECLARED_SELECTOR = YES;
557 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
558 | GCC_WARN_UNUSED_FUNCTION = YES;
559 | GCC_WARN_UNUSED_VARIABLE = YES;
560 | HEADER_SEARCH_PATHS = (
561 | "$(inherited)",
562 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
563 | "$(SRCROOT)/node_modules/react-native/React/**",
564 | );
565 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
566 | MTL_ENABLE_DEBUG_INFO = YES;
567 | ONLY_ACTIVE_ARCH = YES;
568 | SDKROOT = iphoneos;
569 | };
570 | name = Macaca;
571 | };
572 | 63385E871CE6FC2500FDB876 /* Macaca */ = {
573 | isa = XCBuildConfiguration;
574 | buildSettings = {
575 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
576 | CODE_SIGN_IDENTITY = "iPhone Developer";
577 | HEADER_SEARCH_PATHS = (
578 | "$(inherited)",
579 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
580 | "$(SRCROOT)/node_modules/react-native/React/**",
581 | );
582 | INFOPLIST_FILE = "$(SRCROOT)/iOS/Info.plist";
583 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
584 | OTHER_LDFLAGS = "-ObjC";
585 | PRODUCT_NAME = autoresponsive_react_native_sample;
586 | };
587 | name = Macaca;
588 | };
589 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
590 | isa = XCBuildConfiguration;
591 | buildSettings = {
592 | ALWAYS_SEARCH_USER_PATHS = NO;
593 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
594 | CLANG_CXX_LIBRARY = "libc++";
595 | CLANG_ENABLE_MODULES = YES;
596 | CLANG_ENABLE_OBJC_ARC = YES;
597 | CLANG_WARN_BOOL_CONVERSION = YES;
598 | CLANG_WARN_CONSTANT_CONVERSION = YES;
599 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
600 | CLANG_WARN_EMPTY_BODY = YES;
601 | CLANG_WARN_ENUM_CONVERSION = YES;
602 | CLANG_WARN_INT_CONVERSION = YES;
603 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
604 | CLANG_WARN_UNREACHABLE_CODE = YES;
605 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
606 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
607 | COPY_PHASE_STRIP = NO;
608 | ENABLE_STRICT_OBJC_MSGSEND = YES;
609 | GCC_C_LANGUAGE_STANDARD = gnu99;
610 | GCC_DYNAMIC_NO_PIC = NO;
611 | GCC_OPTIMIZATION_LEVEL = 0;
612 | GCC_PREPROCESSOR_DEFINITIONS = (
613 | "DEBUG=1",
614 | "$(inherited)",
615 | );
616 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
617 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
618 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
619 | GCC_WARN_UNDECLARED_SELECTOR = YES;
620 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
621 | GCC_WARN_UNUSED_FUNCTION = YES;
622 | GCC_WARN_UNUSED_VARIABLE = YES;
623 | HEADER_SEARCH_PATHS = (
624 | "$(inherited)",
625 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
626 | "$(SRCROOT)/node_modules/react-native/React/**",
627 | );
628 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
629 | MTL_ENABLE_DEBUG_INFO = YES;
630 | ONLY_ACTIVE_ARCH = YES;
631 | SDKROOT = iphoneos;
632 | };
633 | name = Debug;
634 | };
635 | 83CBBA211A601CBA00E9B192 /* Release */ = {
636 | isa = XCBuildConfiguration;
637 | buildSettings = {
638 | ALWAYS_SEARCH_USER_PATHS = NO;
639 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
640 | CLANG_CXX_LIBRARY = "libc++";
641 | CLANG_ENABLE_MODULES = YES;
642 | CLANG_ENABLE_OBJC_ARC = YES;
643 | CLANG_WARN_BOOL_CONVERSION = YES;
644 | CLANG_WARN_CONSTANT_CONVERSION = YES;
645 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
646 | CLANG_WARN_EMPTY_BODY = YES;
647 | CLANG_WARN_ENUM_CONVERSION = YES;
648 | CLANG_WARN_INT_CONVERSION = YES;
649 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
650 | CLANG_WARN_UNREACHABLE_CODE = YES;
651 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
652 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
653 | COPY_PHASE_STRIP = YES;
654 | ENABLE_NS_ASSERTIONS = NO;
655 | ENABLE_STRICT_OBJC_MSGSEND = YES;
656 | GCC_C_LANGUAGE_STANDARD = gnu99;
657 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
658 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
659 | GCC_WARN_UNDECLARED_SELECTOR = YES;
660 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
661 | GCC_WARN_UNUSED_FUNCTION = YES;
662 | GCC_WARN_UNUSED_VARIABLE = YES;
663 | HEADER_SEARCH_PATHS = (
664 | "$(inherited)",
665 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
666 | "$(SRCROOT)/node_modules/react-native/React/**",
667 | );
668 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
669 | MTL_ENABLE_DEBUG_INFO = NO;
670 | SDKROOT = iphoneos;
671 | VALIDATE_PRODUCT = YES;
672 | };
673 | name = Release;
674 | };
675 | /* End XCBuildConfiguration section */
676 |
677 | /* Begin XCConfigurationList section */
678 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "autoresponsive_react_native_sample" */ = {
679 | isa = XCConfigurationList;
680 | buildConfigurations = (
681 | 13B07F941A680F5B00A75B9A /* Debug */,
682 | 63385E871CE6FC2500FDB876 /* Macaca */,
683 | 13B07F951A680F5B00A75B9A /* Release */,
684 | );
685 | defaultConfigurationIsVisible = 0;
686 | defaultConfigurationName = Release;
687 | };
688 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "autoresponsive_react_native_sample" */ = {
689 | isa = XCConfigurationList;
690 | buildConfigurations = (
691 | 83CBBA201A601CBA00E9B192 /* Debug */,
692 | 63385E861CE6FC2500FDB876 /* Macaca */,
693 | 83CBBA211A601CBA00E9B192 /* Release */,
694 | );
695 | defaultConfigurationIsVisible = 0;
696 | defaultConfigurationName = Release;
697 | };
698 | /* End XCConfigurationList section */
699 | };
700 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
701 | }
702 |
--------------------------------------------------------------------------------
/autoresponsive_react_native_sample.xcodeproj/xcshareddata/xcschemes/autoresponsive_react_native_sample.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
67 |
68 |
78 |
80 |
86 |
87 |
88 |
89 |
90 |
91 |
97 |
99 |
105 |
106 |
107 |
108 |
110 |
111 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/iOS/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 |
14 | @property (nonatomic, strong) UIWindow *window;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/iOS/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "AppDelegate.h"
11 | #import "RCTRootView.h"
12 |
13 | @implementation AppDelegate
14 |
15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
16 | {
17 | NSURL *jsCodeLocation;
18 |
19 | /**
20 | * Loading JavaScript code - uncomment the one you want.
21 | *
22 | * OPTION 1
23 | * Load from development server. Start the server from the repository root:
24 | *
25 | * $ npm start
26 | *
27 | * To run on device, change `localhost` to the IP address of your computer
28 | * (you can get this by typing `ifconfig` into the terminal and selecting the
29 | * `inet` value under `en0:`) and make sure your computer and iOS device are
30 | * on the same Wi-Fi network.
31 | */
32 |
33 | jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
34 |
35 | /**
36 | * OPTION 2
37 | * Load from pre-bundled file on disk. To re-generate the static bundle
38 | * from the root of your project directory, run
39 | *
40 | * $ react-native bundle --minify
41 | *
42 | * see http://facebook.github.io/react-native/docs/runningondevice.html
43 | */
44 |
45 | //jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
46 |
47 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@"autoresponsive_react_native_sample" initialProperties:nil launchOptions:launchOptions];
48 |
49 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
50 | UIViewController *rootViewController = [[UIViewController alloc] init];
51 | rootViewController.view = rootView;
52 | self.window.rootViewController = rootViewController;
53 | [self.window makeKeyAndVisible];
54 | return YES;
55 | }
56 |
57 | @end
58 |
--------------------------------------------------------------------------------
/iOS/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 |
--------------------------------------------------------------------------------
/iOS/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 | }
--------------------------------------------------------------------------------
/iOS/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 | NSExceptionDomains
44 |
45 | localhost
46 |
47 | NSTemporaryExceptionAllowsInsecureHTTPLoads
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/iOS/main.jsbundle:
--------------------------------------------------------------------------------
1 | // Offline JS
2 | // To re-generate the offline bundle, run this from the root of your project:
3 | //
4 | // $ react-native bundle --minify
5 | //
6 | // See http://facebook.github.io/react-native/docs/runningondevice.html for more details.
7 |
8 | throw new Error('Offline JS file is empty. See iOS/main.jsbundle for instructions');
9 |
--------------------------------------------------------------------------------
/iOS/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char * argv[]) {
14 | @autoreleasepool {
15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/index.android.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | let Sample = require('./sample');
4 | let React = require('react-native');
5 |
6 | let {
7 | AppRegistry
8 | } = React;
9 |
10 | AppRegistry.registerComponent('autoresponsive_react_native_sample', () => Sample);
11 |
--------------------------------------------------------------------------------
/index.ios.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | let Sample = require('./sample');
4 | let React = require('react-native');
5 |
6 | let {
7 | AppRegistry
8 | } = React;
9 |
10 | AppRegistry.registerComponent('autoresponsive_react_native_sample', () => Sample);
11 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "autoresponsive_react_native_sample",
3 | "version": "1.0.28",
4 | "scripts": {
5 | "dev:ios": "react-native run-ios",
6 | "dev:android": "react-native run-android",
7 | "clean:babelrc": "find ./node_modules -name react-packager -prune -o -name '.babelrc' -print | xargs rm -f",
8 | "postinstall": "npm run clean:babelrc",
9 | "contributor": "git-contributor"
10 | },
11 | "dependencies": {
12 | "autoresponsive-react-native": "~1.0.6",
13 | "blink-diff": "~1.0.12"
14 | },
15 | "devDependencies": {
16 | "eslint-plugin-react": "^5.0.1",
17 | "git-contributor": "^1.0.8",
18 | "macaca-cli": "^2.0.4",
19 | "react-native": "^0.52.0",
20 | "react-native-cli": "^2.0.1",
21 | "webdriver-client": "^1.0.9"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/sample.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | let React = require('react-native');
4 | let AutoResponsive = require('autoresponsive-react-native');
5 |
6 | let {
7 | StyleSheet,
8 | Text,
9 | View,
10 | ScrollView,
11 | Dimensions
12 | } = React;
13 |
14 | let styles = StyleSheet.create({
15 | container: {
16 | backgroundColor: '#301711',
17 | },
18 | title: {
19 | paddingTop: 20,
20 | paddingBottom: 20,
21 | },
22 | titleText: {
23 | color: '#d0bbab',
24 | textAlign: 'center',
25 | fontSize: 36,
26 | fontWeight: 'bold',
27 | },
28 | text: {
29 | textAlign: 'center',
30 | fontSize: 60,
31 | fontWeight: 'bold',
32 | color: 'rgb(58, 45, 91)',
33 | }
34 | });
35 |
36 | const SCREEN_WIDTH = Dimensions.get('window').width;
37 |
38 | class Sample extends React.Component {
39 | state = {
40 | array: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
41 | }
42 |
43 | getChildrenStyle() {
44 | return {
45 | width: (screenWidth - 18) / 2,
46 | height: parseInt(Math.random() * 20 + 12) * 10,
47 | backgroundColor: 'rgb(92, 67, 155)',
48 | paddingTop: 20,
49 | borderRadius: 8,
50 | };
51 | }
52 |
53 | getAutoResponsiveProps() {
54 | return {
55 | itemMargin: 8,
56 | };
57 | }
58 |
59 | renderChildren() {
60 | return this.state.array.map((i, key) => {
61 | return (
62 |
63 | {i}
64 |
65 | );
66 | }, this);
67 | }
68 |
69 | onPressTitle = () => {
70 | this.setState({
71 | array: [...this.state.array, parseInt(Math.random() * 30)],
72 | });
73 | }
74 |
75 | render() {
76 | return (
77 |
78 |
79 | autoresponsive
80 |
81 |
82 | {this.renderChildren()}
83 |
84 |
85 | );
86 | }
87 | }
88 |
89 | module.exports = Sample;
90 |
--------------------------------------------------------------------------------
/screenshot/android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/app-bootstrap/autoresponsive_react_native_sample/1a55ea4629fe9bcbda2448371d9cd53b7be24bd4/screenshot/android.png
--------------------------------------------------------------------------------
/screenshot/ios.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/app-bootstrap/autoresponsive_react_native_sample/1a55ea4629fe9bcbda2448371d9cd53b7be24bd4/screenshot/ios.png
--------------------------------------------------------------------------------
/test/base.test.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var fs = require('fs');
4 | var path = require('path');
5 |
6 | var diffImage = require('./utils.js').diffImage;
7 |
8 | var appPath = path.resolve(process.env.APP_PATH);
9 |
10 | var iOSOpts = {
11 | deviceName: 'iPhone 5s',
12 | platformName: 'iOS',
13 | app: appPath
14 | };
15 |
16 | var androidOpts = {
17 | platformName: 'android',
18 | app: appPath
19 | };
20 |
21 | var wd = require('webdriver-client')(process.env.platform === 'android' ? androidOpts : iOSOpts);
22 |
23 | describe('base', function() {
24 | this.timeout(5 * 60 * 1000);
25 |
26 | var driver = wd.initPromiseChain();
27 |
28 | driver.configureHttp({
29 | timeout: 300 * 60 * 1000
30 | });
31 |
32 | before(function() {
33 | return driver
34 | .initDriver()
35 | .sleep(20 * 1000);
36 | });
37 |
38 | after(function() {
39 | return driver
40 | .sleep(1000)
41 | .quit();
42 | });
43 |
44 | it('#1 login picture should be the same.', function() {
45 | return driver
46 | .sleep(40 * 1000)
47 | .waitForElementByName('autoresponsive')
48 | .takeScreenshot()
49 | .then(imgData => {
50 | var newImg = new Buffer(imgData, 'base64');
51 | var screenshotFolder = path.resolve(__dirname, '../screenshot');
52 | var oldImgPath = path.join(screenshotFolder, process.env.platform === 'android' ? 'android.png' : 'ios.png');
53 | var diffImgPath = path.join(screenshotFolder, process.env.platform === 'android' ? 'android-diff.png' : 'ios-diff.png');
54 | return diffImage(oldImgPath, newImg, 0.3, diffImgPath);
55 | })
56 | .then(result => {
57 | result.should.be.true();
58 | })
59 | .catch(e => {
60 | console.log(e);
61 | });
62 | });
63 | });
64 |
--------------------------------------------------------------------------------
/test/mocha.opt:
--------------------------------------------------------------------------------
1 | --require should
2 | --reporter spec
3 |
--------------------------------------------------------------------------------
/test/utils.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | const BlinkDiff = require('blink-diff');
4 |
5 | function diffImage(imageAPath, imageB, threshold, outputPath) {
6 | return new Promise((resolve, reject) => {
7 | var diff = new BlinkDiff({
8 | imageAPath: imageAPath, // Path
9 | imageB: imageB, // Buffer
10 | thresholdType: BlinkDiff.THRESHOLD_PERCENT,
11 | threshold: threshold,
12 | imageOutputPath: outputPath
13 | });
14 |
15 | diff.run((err, result) => {
16 | if (err) {
17 | return reject(err);
18 | }
19 | var ifPassed = diff.hasPassed(result.code);
20 | console.log(ifPassed ? 'Image Comparison Passed' : 'Image Comparison Failed');
21 | console.log(`Found ${result.differences} pixel differences between two images.`);
22 | resolve(ifPassed);
23 | });
24 | });
25 | }
26 |
27 | module.exports = {
28 | diffImage
29 | };
30 |
--------------------------------------------------------------------------------