├── .babelrc ├── .eslintrc ├── .flowconfig ├── .gitignore ├── .npmignore ├── .watchmanconfig ├── README.markdown ├── android ├── app │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── app │ │ │ └── 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 ├── index.android.js ├── index.ios.js ├── ios ├── App.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── App.xcscheme ├── App │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── main.m ├── AppTests │ ├── AppTests.m │ └── Info.plist └── main.jsbundle ├── package.json └── src ├── actions └── index.js ├── components ├── navigation-bar.js └── scene.js ├── containers ├── app.js └── root.js ├── reducers └── index.js └── store └── configure-store.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "retainLines": true, 3 | "compact": true, 4 | "comments": false, 5 | "whitelist": [ 6 | "es6.arrowFunctions", 7 | "es6.blockScoping", 8 | "es6.classes", 9 | "es6.destructuring", 10 | "es6.parameters", 11 | "es6.properties.computed", 12 | "es6.properties.shorthand", 13 | "es6.spread", 14 | "es6.modules", 15 | "es6.templateLiterals", 16 | "es7.trailingFunctionCommas", 17 | "es7.objectRestSpread", 18 | "es7.asyncFunctions", 19 | "es7.classProperties", 20 | "regenerator", 21 | "flow", 22 | "react", 23 | "react.displayName" 24 | ], 25 | "sourceMaps": false 26 | } -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | --- 2 | extends: 3 | - "defaults/configurations/walmart/es6-react" 4 | -------------------------------------------------------------------------------- /.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 | # Ignore react-tools where there are overlaps, but don't ignore anything that 11 | # react-native relies on 12 | .*/node_modules/react-tools/src/React.js 13 | .*/node_modules/react-tools/src/renderers/shared/event/EventPropagators.js 14 | .*/node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js 15 | .*/node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js 16 | .*/node_modules/react-redux/node_modules/invariant/ 17 | 18 | # Ignore commoner tests 19 | .*/node_modules/commoner/test/.* 20 | 21 | # See https://github.com/facebook/flow/issues/442 22 | .*/react-tools/node_modules/commoner/lib/reader.js 23 | 24 | # Ignore jest 25 | .*/react-native/node_modules/jest-cli/.* 26 | 27 | [include] 28 | ./src 29 | [libs] 30 | node_modules/react-native/Libraries/react-native/react-native-interface.js 31 | 32 | [options] 33 | module.system=haste 34 | 35 | munge_underscores=true 36 | 37 | suppress_type=$FlowIssue 38 | suppress_type=$FlowFixMe 39 | suppress_type=$FixMe 40 | 41 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-4]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 42 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-4]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+ 43 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 44 | 45 | [version] 46 | 0.16.0 47 | -------------------------------------------------------------------------------- /.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 | # node.js 26 | # 27 | node_modules/ 28 | npm-debug.log 29 | -------------------------------------------------------------------------------- /.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 | # node.js 25 | # 26 | node_modules/ 27 | npm-debug.log 28 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | ##formidable-react-native-app-boilerplate 2 | > React Native / Redux / Babel boilerplate. 3 | 4 | #### Features 5 | 6 | - Babel/ES2015 support 7 | - ES6 Class support 8 | - Redux with Async actions via `redux-thunk` and console logging via `redux-logger` 9 | - Navigator & NavigationBar 10 | - Android support 11 | - ESLint preconfigured with settings from [eslint-config-defaults](https://github.com/walmartlabs/eslint-config-defaults) 12 | - Flowtype annotations preconfigured 13 | 14 | #### Getting Started 15 | 16 | - Make sure XCode is installed. 17 | 18 | - Install React Native following the instructions detailed here [https://facebook.github.io/react-native/docs/getting-started.html#content](https://facebook.github.io/react-native/docs/getting-started.html#content) 19 | 20 | - Clone this repo and then run `npm install` 21 | 22 | - Open XCode and open `/ios/App.xcodeproj` 23 | 24 | #### Running IOS 25 | 26 | Simply run the project in XCode 27 | 28 | #### Running Android 29 | 30 | From your command line run `react-native run-android` 31 | 32 | #### Linting 33 | 34 | To lint your code using [ESLint](http://eslint.org/) run `npm run lint` 35 | 36 | #### Type Checking 37 | 38 | To type check your code using [Flow](flowtype.org), first [install Flow](http://flowtype.org/docs/getting-started.html#_) and then run `npm run flow` 39 | 40 | #### Troubleshooting 41 | 42 | If you have any trouble with package caching due to `.babelrc`, run `rm -fr $TMPDIR/react-*` 43 | 44 | #### Maintenance Status 45 | 46 | **Archived:** This project is no longer maintained by Formidable. We are no longer responding to issues or pull requests unless they relate to security concerns. We encourage interested developers to fork this project and make it their own! 47 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.1" 6 | 7 | defaultConfig { 8 | applicationId "com.app" 9 | minSdkVersion 16 10 | targetSdkVersion 22 11 | versionCode 1 12 | versionName "1.0" 13 | ndk { 14 | abiFilters "armeabi-v7a", "x86" 15 | } 16 | } 17 | buildTypes { 18 | release { 19 | minifyEnabled false 20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 21 | } 22 | } 23 | } 24 | 25 | dependencies { 26 | compile fileTree(dir: 'libs', include: ['*.jar']) 27 | compile 'com.android.support:appcompat-v7:23.0.0' 28 | compile 'com.facebook.react:react-native:0.11.+' 29 | } 30 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/app/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.app; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.view.KeyEvent; 6 | 7 | import com.facebook.react.LifecycleState; 8 | import com.facebook.react.ReactInstanceManager; 9 | import com.facebook.react.ReactRootView; 10 | import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; 11 | import com.facebook.react.shell.MainReactPackage; 12 | import com.facebook.soloader.SoLoader; 13 | 14 | public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler { 15 | 16 | private ReactInstanceManager mReactInstanceManager; 17 | private ReactRootView mReactRootView; 18 | 19 | @Override 20 | protected void onCreate(Bundle savedInstanceState) { 21 | super.onCreate(savedInstanceState); 22 | mReactRootView = new ReactRootView(this); 23 | 24 | mReactInstanceManager = ReactInstanceManager.builder() 25 | .setApplication(getApplication()) 26 | .setBundleAssetName("index.android.bundle") 27 | .setJSMainModuleName("index.android") 28 | .addPackage(new MainReactPackage()) 29 | .setUseDeveloperSupport(BuildConfig.DEBUG) 30 | .setInitialLifecycleState(LifecycleState.RESUMED) 31 | .build(); 32 | 33 | mReactRootView.startReactApplication(mReactInstanceManager, "App", null); 34 | 35 | setContentView(mReactRootView); 36 | } 37 | 38 | @Override 39 | public boolean onKeyUp(int keyCode, KeyEvent event) { 40 | if (keyCode == KeyEvent.KEYCODE_MENU && mReactInstanceManager != null) { 41 | mReactInstanceManager.showDevOptionsDialog(); 42 | return true; 43 | } 44 | return super.onKeyUp(keyCode, event); 45 | } 46 | 47 | @Override 48 | public void invokeDefaultOnBackPressed() { 49 | super.onBackPressed(); 50 | } 51 | 52 | @Override 53 | protected void onPause() { 54 | super.onPause(); 55 | 56 | if (mReactInstanceManager != null) { 57 | mReactInstanceManager.onPause(); 58 | } 59 | } 60 | 61 | @Override 62 | protected void onResume() { 63 | super.onResume(); 64 | 65 | if (mReactInstanceManager != null) { 66 | mReactInstanceManager.onResume(this); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FormidableLabs/formidable-react-native-app-boilerplate/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FormidableLabs/formidable-react-native-app-boilerplate/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FormidableLabs/formidable-react-native-app-boilerplate/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FormidableLabs/formidable-react-native-app-boilerplate/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | App 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.0' 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/FormidableLabs/formidable-react-native-app-boilerplate/HEAD/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 = 'App' 2 | 3 | include ':app' 4 | -------------------------------------------------------------------------------- /index.android.js: -------------------------------------------------------------------------------- 1 | import React from "react-native"; 2 | import Root from "./src/containers/root"; 3 | 4 | const { 5 | AppRegistry 6 | } = React; 7 | 8 | AppRegistry.registerComponent("App", () => Root); 9 | -------------------------------------------------------------------------------- /index.ios.js: -------------------------------------------------------------------------------- 1 | import React from "react-native"; 2 | import Root from "./src/containers/root"; 3 | 4 | const { 5 | AppRegistry 6 | } = React; 7 | 8 | AppRegistry.registerComponent("App", () => Root); 9 | -------------------------------------------------------------------------------- /ios/App.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; path = 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 /* AppTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppTests.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 /* App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; }; 112 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = App/AppDelegate.h; sourceTree = ""; }; 113 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = App/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 = App/Images.xcassets; sourceTree = ""; }; 116 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = App/Info.plist; sourceTree = ""; }; 117 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = App/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 /* AppTests */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | 00E356F21AD99517003FC87E /* AppTests.m */, 188 | 00E356F01AD99517003FC87E /* Supporting Files */, 189 | ); 190 | path = AppTests; 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 /* App */ = { 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 = App; 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 /* App */, 276 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 277 | 00E356EF1AD99517003FC87E /* AppTests */, 278 | 83CBBA001A601CBA00E9B192 /* Products */, 279 | ); 280 | indentWidth = 2; 281 | sourceTree = ""; 282 | tabWidth = 2; 283 | }; 284 | 83CBBA001A601CBA00E9B192 /* Products */ = { 285 | isa = PBXGroup; 286 | children = ( 287 | 13B07F961A680F5B00A75B9A /* App.app */, 288 | ); 289 | name = Products; 290 | sourceTree = ""; 291 | }; 292 | /* End PBXGroup section */ 293 | 294 | /* Begin PBXNativeTarget section */ 295 | 13B07F861A680F5B00A75B9A /* App */ = { 296 | isa = PBXNativeTarget; 297 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "App" */; 298 | buildPhases = ( 299 | 13B07F871A680F5B00A75B9A /* Sources */, 300 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 301 | 13B07F8E1A680F5B00A75B9A /* Resources */, 302 | ); 303 | buildRules = ( 304 | ); 305 | dependencies = ( 306 | ); 307 | name = App; 308 | productName = "Hello World"; 309 | productReference = 13B07F961A680F5B00A75B9A /* App.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 = 0700; 319 | ORGANIZATIONNAME = Facebook; 320 | }; 321 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "App" */; 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 /* App */, 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 = App; 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 | HEADER_SEARCH_PATHS = ( 497 | "$(inherited)", 498 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 499 | "$(SRCROOT)/../node_modules/react-native/React/**", 500 | ); 501 | INFOPLIST_FILE = App/Info.plist; 502 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 503 | OTHER_LDFLAGS = "-ObjC"; 504 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 505 | PRODUCT_NAME = App; 506 | }; 507 | name = Debug; 508 | }; 509 | 13B07F951A680F5B00A75B9A /* Release */ = { 510 | isa = XCBuildConfiguration; 511 | buildSettings = { 512 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 513 | HEADER_SEARCH_PATHS = ( 514 | "$(inherited)", 515 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 516 | "$(SRCROOT)/../node_modules/react-native/React/**", 517 | ); 518 | INFOPLIST_FILE = App/Info.plist; 519 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 520 | OTHER_LDFLAGS = "-ObjC"; 521 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 522 | PRODUCT_NAME = App; 523 | }; 524 | name = Release; 525 | }; 526 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 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 | ENABLE_TESTABILITY = YES; 547 | GCC_C_LANGUAGE_STANDARD = gnu99; 548 | GCC_DYNAMIC_NO_PIC = NO; 549 | GCC_OPTIMIZATION_LEVEL = 0; 550 | GCC_PREPROCESSOR_DEFINITIONS = ( 551 | "DEBUG=1", 552 | "$(inherited)", 553 | ); 554 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 555 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 556 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 557 | GCC_WARN_UNDECLARED_SELECTOR = YES; 558 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 559 | GCC_WARN_UNUSED_FUNCTION = YES; 560 | GCC_WARN_UNUSED_VARIABLE = YES; 561 | HEADER_SEARCH_PATHS = ( 562 | "$(inherited)", 563 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 564 | "$(SRCROOT)/../node_modules/react-native/React/**", 565 | ); 566 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 567 | MTL_ENABLE_DEBUG_INFO = YES; 568 | ONLY_ACTIVE_ARCH = YES; 569 | SDKROOT = iphoneos; 570 | }; 571 | name = Debug; 572 | }; 573 | 83CBBA211A601CBA00E9B192 /* Release */ = { 574 | isa = XCBuildConfiguration; 575 | buildSettings = { 576 | ALWAYS_SEARCH_USER_PATHS = NO; 577 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 578 | CLANG_CXX_LIBRARY = "libc++"; 579 | CLANG_ENABLE_MODULES = YES; 580 | CLANG_ENABLE_OBJC_ARC = YES; 581 | CLANG_WARN_BOOL_CONVERSION = YES; 582 | CLANG_WARN_CONSTANT_CONVERSION = YES; 583 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 584 | CLANG_WARN_EMPTY_BODY = YES; 585 | CLANG_WARN_ENUM_CONVERSION = YES; 586 | CLANG_WARN_INT_CONVERSION = YES; 587 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 588 | CLANG_WARN_UNREACHABLE_CODE = YES; 589 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 590 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 591 | COPY_PHASE_STRIP = YES; 592 | ENABLE_NS_ASSERTIONS = NO; 593 | ENABLE_STRICT_OBJC_MSGSEND = YES; 594 | GCC_C_LANGUAGE_STANDARD = gnu99; 595 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 596 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 597 | GCC_WARN_UNDECLARED_SELECTOR = YES; 598 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 599 | GCC_WARN_UNUSED_FUNCTION = YES; 600 | GCC_WARN_UNUSED_VARIABLE = YES; 601 | HEADER_SEARCH_PATHS = ( 602 | "$(inherited)", 603 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 604 | "$(SRCROOT)/../node_modules/react-native/React/**", 605 | ); 606 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 607 | MTL_ENABLE_DEBUG_INFO = NO; 608 | SDKROOT = iphoneos; 609 | VALIDATE_PRODUCT = YES; 610 | }; 611 | name = Release; 612 | }; 613 | /* End XCBuildConfiguration section */ 614 | 615 | /* Begin XCConfigurationList section */ 616 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "App" */ = { 617 | isa = XCConfigurationList; 618 | buildConfigurations = ( 619 | 13B07F941A680F5B00A75B9A /* Debug */, 620 | 13B07F951A680F5B00A75B9A /* Release */, 621 | ); 622 | defaultConfigurationIsVisible = 0; 623 | defaultConfigurationName = Release; 624 | }; 625 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "App" */ = { 626 | isa = XCConfigurationList; 627 | buildConfigurations = ( 628 | 83CBBA201A601CBA00E9B192 /* Debug */, 629 | 83CBBA211A601CBA00E9B192 /* Release */, 630 | ); 631 | defaultConfigurationIsVisible = 0; 632 | defaultConfigurationName = Release; 633 | }; 634 | /* End XCConfigurationList section */ 635 | }; 636 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 637 | } 638 | -------------------------------------------------------------------------------- /ios/App.xcodeproj/xcshareddata/xcschemes/App.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/App/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/App/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 | 12 | #import "RCTRootView.h" 13 | 14 | @implementation AppDelegate 15 | 16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 17 | { 18 | NSURL *jsCodeLocation; 19 | 20 | /** 21 | * Loading JavaScript code - uncomment the one you want. 22 | * 23 | * OPTION 1 24 | * Load from development server. Start the server from the repository root: 25 | * 26 | * $ npm start 27 | * 28 | * To run on device, change `localhost` to the IP address of your computer 29 | * (you can get this by typing `ifconfig` into the terminal and selecting the 30 | * `inet` value under `en0:`) and make sure your computer and iOS device are 31 | * on the same Wi-Fi network. 32 | */ 33 | 34 | jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"]; 35 | 36 | /** 37 | * OPTION 2 38 | * Load from pre-bundled file on disk. To re-generate the static bundle 39 | * from the root of your project directory, run 40 | * 41 | * $ react-native bundle --minify 42 | * 43 | * see http://facebook.github.io/react-native/docs/runningondevice.html 44 | */ 45 | 46 | // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 47 | 48 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 49 | moduleName:@"App" 50 | initialProperties:nil 51 | launchOptions:launchOptions]; 52 | 53 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 54 | UIViewController *rootViewController = [[UIViewController alloc] init]; 55 | rootViewController.view = rootView; 56 | self.window.rootViewController = rootViewController; 57 | [self.window makeKeyAndVisible]; 58 | return YES; 59 | } 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /ios/App/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/App/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/App/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 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | 30 | NSLocationWhenInUseUsageDescription 31 | 32 | UILaunchStoryboardName 33 | LaunchScreen 34 | UIRequiredDeviceCapabilities 35 | 36 | armv7 37 | 38 | UISupportedInterfaceOrientations 39 | 40 | UIInterfaceOrientationPortrait 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ios/App/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 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ios/AppTests/AppTests.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 12 | 13 | #import "RCTLog.h" 14 | #import "RCTRootView.h" 15 | 16 | #define TIMEOUT_SECONDS 240 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface AppTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation AppTests 24 | 25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 26 | { 27 | if (test(view)) { 28 | return YES; 29 | } 30 | for (UIView *subview in [view subviews]) { 31 | if ([self findSubviewInView:subview matching:test]) { 32 | return YES; 33 | } 34 | } 35 | return NO; 36 | } 37 | 38 | - (void)testRendersWelcomeScreen 39 | { 40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 42 | BOOL foundElement = NO; 43 | 44 | __block NSString *redboxError = nil; 45 | RCTSetLogFunction(^(RCTLogLevel level, NSString *fileName, NSNumber *lineNumber, NSString *message) { 46 | if (level >= RCTLogLevelError) { 47 | redboxError = message; 48 | } 49 | }); 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | RCTSetLogFunction(RCTDefaultLogFunction); 64 | 65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 67 | } 68 | 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /ios/AppTests/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "App", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "flow": "flow check", 7 | "lint": "eslint --ext .js,.jsx src", 8 | "start": "node_modules/react-native/packager/packager.sh" 9 | }, 10 | "dependencies": { 11 | "lodash": "^3.10.1", 12 | "react-native": "^0.11.4", 13 | "react-redux": "^3.1.0", 14 | "redux": "^3.0.2", 15 | "redux-logger": "^2.0.1", 16 | "redux-thunk": "^1.0.0" 17 | }, 18 | "devDependencies": { 19 | "eslint": "^1.6.0", 20 | "eslint-config-defaults": "^7.0.1", 21 | "eslint-plugin-filenames": "^0.1.2", 22 | "eslint-plugin-react": "^3.5.1" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/actions/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | /*global setTimeout*/ 3 | 4 | export const REQUEST_DATA = "REQUEST_DATA"; 5 | export const RECEIVE_DATA = "RECEIVE_DATA"; 6 | 7 | export const requestData = (): Object => { 8 | return { 9 | type: REQUEST_DATA 10 | }; 11 | }; 12 | 13 | export const receiveData = (data: Object): Object => { 14 | return { 15 | type: RECEIVE_DATA, 16 | data 17 | }; 18 | }; 19 | 20 | export const fetchData = (): Function => { 21 | return (dispatch) => { 22 | dispatch(requestData()); 23 | return setTimeout(() => { 24 | const data = {message: "Hello"}; 25 | dispatch(receiveData(data)); 26 | }, 300); 27 | }; 28 | }; 29 | -------------------------------------------------------------------------------- /src/components/navigation-bar.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | /*eslint-disable prefer-const */ 3 | 4 | import React from "react-native"; 5 | 6 | let { 7 | StatusBarIOS, 8 | StyleSheet, 9 | Text, 10 | TouchableOpacity, 11 | View 12 | } = React; 13 | 14 | const NAV_BAR_HEIGHT = 44; 15 | const STATUS_BAR_HEIGHT = 20; 16 | const NAV_HEIGHT = NAV_BAR_HEIGHT + STATUS_BAR_HEIGHT; 17 | 18 | const styles = StyleSheet.create({ 19 | navBarContainer: { 20 | height: NAV_HEIGHT, 21 | backgroundColor: "white", 22 | paddingBottom: 5, 23 | borderBottomColor: "rgba(0, 0, 0, 0.5)", 24 | borderBottomWidth: 1 / React.PixelRatio.get() 25 | }, 26 | navBar: { 27 | height: NAV_HEIGHT, 28 | flexDirection: "row", 29 | justifyContent: "space-between" 30 | }, 31 | customTitle: { 32 | position: "absolute", 33 | alignItems: "center", 34 | bottom: 5, 35 | left: 0, 36 | right: 0 37 | }, 38 | navBarText: { 39 | fontSize: 16, 40 | marginVertical: 10, 41 | flex: 2, 42 | textAlign: "center" 43 | }, 44 | navBarTitleText: { 45 | color: "#373e4d", 46 | fontWeight: "500", 47 | position: "absolute", 48 | left: 0, 49 | right: 0, 50 | bottom: 15 51 | }, 52 | navBarLeftButton: { 53 | paddingLeft: 10, 54 | marginVertical: 20 55 | }, 56 | navBarRightButton: { 57 | marginVertical: 20, 58 | paddingRight: 10 59 | }, 60 | navBarButtonText: { 61 | color: "#5890ff" 62 | } 63 | }); 64 | 65 | class NavigationBar extends React.Component { 66 | prevButtonShouldBeHidden(): Boolean { 67 | let { 68 | onPrev, 69 | hidePrev, 70 | navigator 71 | } = this.props; 72 | 73 | const getCurrentRoutes = navigator.getCurrentRoutes; 74 | 75 | return ( 76 | hidePrev || 77 | (getCurrentRoutes && getCurrentRoutes().length <= 1 && !onPrev) 78 | ); 79 | } 80 | getLeftButtonElement() { 81 | let { 82 | onPrev, 83 | prevTitle, 84 | navigator, 85 | route, 86 | buttonsColor, 87 | customPrev 88 | } = this.props; 89 | 90 | if (customPrev) { 91 | return React.cloneElement(customPrev, { navigator, route }); 92 | } 93 | 94 | if (this.prevButtonShouldBeHidden()) { 95 | return ; 96 | } 97 | 98 | const customStyle = buttonsColor ? { color: buttonsColor } : {}; 99 | 100 | let onPress = navigator.pop; 101 | 102 | if (onPrev) { 103 | onPress = () => onPrev(navigator, route); 104 | } 105 | 106 | return ( 107 | 108 | 109 | 110 | {prevTitle || "Back"} 111 | 112 | 113 | 114 | ); 115 | } 116 | getTitleElement() { 117 | let { 118 | title, 119 | titleColor, 120 | customTitle, 121 | navigator, 122 | route 123 | } = this.props; 124 | 125 | if (customTitle) { 126 | return ( 127 | 128 | {React.cloneElement(customTitle, { navigator, route })} 129 | 130 | ); 131 | } 132 | 133 | if (title && !title.length) { 134 | return true; 135 | } 136 | 137 | const titleStyle = [ 138 | styles.navBarText, 139 | styles.navBarTitleText, 140 | { color: titleColor } 141 | ]; 142 | 143 | return ( 144 | 145 | {title} 146 | 147 | ); 148 | } 149 | getRightButtonElement() { 150 | let { 151 | onNext, 152 | nextTitle, 153 | navigator, 154 | route, 155 | buttonsColor, 156 | customNext 157 | } = this.props; 158 | 159 | if (customNext) { 160 | return React.cloneElement(customNext, { navigator, route }); 161 | } 162 | 163 | if (!onNext) { 164 | return ; 165 | } 166 | 167 | const customStyle = buttonsColor ? { color: buttonsColor } : {}; 168 | 169 | return ( 170 | onNext(navigator, route)}> 171 | 172 | 173 | {nextTitle || "Next"} 174 | 175 | 176 | 177 | ); 178 | } 179 | render() { 180 | if (this.props.statusBar === "lightContent") { 181 | StatusBarIOS.setStyle("light-content", false); 182 | } else if (this.props.statusBar === "default") { 183 | StatusBarIOS.setStyle("default", false); 184 | } 185 | 186 | let { style, backgroundStyle } = this.props; 187 | 188 | return ( 189 | 190 | 191 | {this.getTitleElement()} 192 | {this.getLeftButtonElement()} 193 | {this.getRightButtonElement()} 194 | 195 | 196 | ); 197 | } 198 | } 199 | 200 | NavigationBar.propTypes = { 201 | backgroundStyle: React.PropTypes.object, 202 | buttonsColor: React.PropTypes.string, 203 | customNext: React.PropTypes.node, 204 | customPrev: React.PropTypes.node, 205 | customTitle: React.PropTypes.node, 206 | hidePrev: React.PropTypes.bool, 207 | navigator: React.PropTypes.object, 208 | nextTitle: React.PropTypes.string, 209 | onNext: React.PropTypes.func, 210 | onPrev: React.PropTypes.func, 211 | prevTitle: React.PropTypes.string, 212 | route: React.PropTypes.object, 213 | statusBar: React.PropTypes.string, 214 | style: React.PropTypes.object, 215 | title: React.PropTypes.string, 216 | titleColor: React.PropTypes.string 217 | }; 218 | 219 | export default NavigationBar; 220 | -------------------------------------------------------------------------------- /src/components/scene.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | /*eslint-disable prefer-const */ 3 | 4 | import React from "react-native"; 5 | import App from "../containers/app"; 6 | import NavigationBar from "./navigation-bar"; 7 | 8 | let { 9 | Navigator, 10 | View 11 | } = React; 12 | 13 | class Scene extends React.Component { 14 | renderScene(route: Object, navigator: Object) { 15 | const Component = route.component; 16 | return ( 17 | 18 | 25 | 30 | 31 | ); 32 | } 33 | render() { 34 | return ( 35 | 43 | ); 44 | } 45 | } 46 | 47 | export default Scene; 48 | -------------------------------------------------------------------------------- /src/containers/app.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | /*eslint-disable prefer-const */ 3 | 4 | import React from "react-native"; 5 | import { connect } from "react-redux/native"; 6 | import { fetchData } from "../actions"; 7 | 8 | let { 9 | Text, 10 | ScrollView 11 | } = React; 12 | 13 | class App extends React.Component { 14 | componentDidMount() { 15 | this.props.dispatch(fetchData()); 16 | } 17 | render() { 18 | return ( 19 | 26 | {this.props.isFetching ? "Loading" : this.props.message} 27 | 28 | ); 29 | } 30 | } 31 | 32 | App.propTypes = { 33 | dispatch: React.PropTypes.func, 34 | message: React.PropTypes.string, 35 | isFetching: React.PropTypes.bool 36 | }; 37 | 38 | App.defaultProps = { 39 | dispatch: () => {}, 40 | isFetching: false, 41 | message: "" 42 | }; 43 | 44 | export default connect((state) => ({ 45 | isFetching: state.data.isFetching, 46 | message: state.data.message 47 | }))(App); 48 | -------------------------------------------------------------------------------- /src/containers/root.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import React from "react-native"; 4 | import { Provider } from "react-redux/native"; 5 | import configureStore from "../store/configure-store"; 6 | import Scene from "../components/scene"; 7 | 8 | const store = configureStore(); 9 | 10 | class Root extends React.Component { 11 | render() { 12 | return ( 13 | 14 | {() => } 15 | 16 | ); 17 | } 18 | } 19 | 20 | export default Root; 21 | -------------------------------------------------------------------------------- /src/reducers/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { combineReducers } from "redux"; 4 | import * as types from "../actions"; 5 | 6 | const data = (state = { 7 | isFetching: false, 8 | message: "" 9 | }, action) => { 10 | switch (action.type) { 11 | case types.REQUEST_DATA: 12 | return Object.assign({}, state, { 13 | isFetching: true 14 | }); 15 | case types.RECEIVE_DATA: 16 | return Object.assign({}, state, { 17 | isFetching: false, 18 | message: action.data.message 19 | }); 20 | default: 21 | return state; 22 | } 23 | }; 24 | 25 | const rootReducer = combineReducers({ 26 | data 27 | }); 28 | 29 | export default rootReducer; 30 | -------------------------------------------------------------------------------- /src/store/configure-store.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { createStore, applyMiddleware } from "redux"; 4 | import thunkMiddleware from "redux-thunk"; 5 | import createLogger from "redux-logger"; 6 | import rootReducer from "../reducers"; 7 | 8 | const loggerMiddleware = createLogger(); 9 | 10 | const createStoreWithMiddleware = applyMiddleware( 11 | thunkMiddleware, 12 | loggerMiddleware 13 | )(createStore); 14 | 15 | const configureStore = function (initialState: Object = {}): Function { 16 | return createStoreWithMiddleware(rootReducer, initialState); 17 | }; 18 | 19 | export default configureStore; 20 | --------------------------------------------------------------------------------