├── .babelrc ├── .buckconfig ├── .flowconfig ├── .gitignore ├── .watchmanconfig ├── LICENSE ├── README.md ├── android ├── app │ ├── BUCK │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── navigationmobxexample │ │ │ ├── MainActivity.java │ │ │ └── MainApplication.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 ├── keystores │ ├── BUCK │ └── debug.keystore.properties └── settings.gradle ├── img ├── one@2x.png ├── one_selected@2x.png ├── two@2x.png └── two_selected@2x.png ├── index.android.js ├── index.ios.js ├── ios ├── NavigationMobxExample.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── NavigationMobxExample.xcscheme ├── NavigationMobxExample │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── main.m └── NavigationMobxExampleTests │ ├── Info.plist │ └── NavigationMobxExampleTests.m ├── package.json └── src ├── app.js ├── screens ├── FirstTabScreen.js ├── LoginScreen.js ├── PushedScreen.js ├── SecondTabScreen.js └── index.js └── stores ├── app.js ├── counter.js └── index.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native-stage-0/decorator-support"] 3 | } -------------------------------------------------------------------------------- /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | 3 | # We fork some components by platform. 4 | .*/*.android.js 5 | 6 | # Ignore templates with `@flow` in header 7 | .*/local-cli/generator.* 8 | 9 | # Ignore malformed json 10 | .*/node_modules/y18n/test/.*\.json 11 | 12 | # Ignore the website subdir 13 | /website/.* 14 | 15 | # Ignore BUCK generated dirs 16 | /\.buckd/ 17 | 18 | # Ignore unexpected extra @providesModule 19 | .*/node_modules/commoner/test/source/widget/share.js 20 | 21 | # Ignore duplicate module providers 22 | # For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root 23 | .*/Libraries/react-native/React.js 24 | .*/Libraries/react-native/ReactNative.js 25 | .*/node_modules/jest-runtime/build/__tests__/.* 26 | 27 | [include] 28 | 29 | [libs] 30 | node_modules/react-native/Libraries/react-native/react-native-interface.js 31 | node_modules/react-native/flow 32 | flow/ 33 | 34 | [options] 35 | module.system=haste 36 | 37 | esproposal.class_static_fields=enable 38 | esproposal.class_instance_fields=enable 39 | 40 | experimental.strict_type_args=true 41 | 42 | munge_underscores=true 43 | 44 | module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' 45 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 46 | 47 | suppress_type=$FlowIssue 48 | suppress_type=$FlowFixMe 49 | suppress_type=$FixMe 50 | 51 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-9]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 52 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-9]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 53 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 54 | 55 | unsafe.enable_getters_and_setters=true 56 | 57 | [version] 58 | ^0.29.0 59 | -------------------------------------------------------------------------------- /.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 | *.iml 28 | .idea 29 | .gradle 30 | local.properties 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | 37 | # BUCK 38 | buck-out/ 39 | \.buckd/ 40 | android/app/libs 41 | android/keystores/debug.keystore 42 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Yousef Kamawall 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # example-mobX 2 | 3 | A simple usage example for an app based on mobX instead of redux in your [react-native-navigation](https://github.com/wix/react-native-navigation) project. 4 | See this [issue](https://github.com/wix/react-native-navigation/issues/187). 5 | 6 | ## Installation - iOS 7 | 8 | * Run `npm install` 9 | 10 | * Open `ios/NavigationMobxExample.xcodeproj` in Xcode and press the play button 11 | 12 | ## Folder Structure 13 | 14 | * `src/screens/` - all your app screens, every screen component is wrapped in an mobX observer 15 | * `src/stores/` - all of your mobX goodness goes here, all business logic should be here -------------------------------------------------------------------------------- /android/app/BUCK: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # To learn about Buck see [Docs](https://buckbuild.com/). 4 | # To run your application with Buck: 5 | # - install Buck 6 | # - `npm start` - to start the packager 7 | # - `cd android` 8 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 9 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 10 | # - `buck install -r android/app` - compile, install and run application 11 | # 12 | 13 | lib_deps = [] 14 | for jarfile in glob(['libs/*.jar']): 15 | name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile) 16 | lib_deps.append(':' + name) 17 | prebuilt_jar( 18 | name = name, 19 | binary_jar = jarfile, 20 | ) 21 | 22 | for aarfile in glob(['libs/*.aar']): 23 | name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile) 24 | lib_deps.append(':' + name) 25 | android_prebuilt_aar( 26 | name = name, 27 | aar = aarfile, 28 | ) 29 | 30 | android_library( 31 | name = 'all-libs', 32 | exported_deps = lib_deps 33 | ) 34 | 35 | android_library( 36 | name = 'app-code', 37 | srcs = glob([ 38 | 'src/main/java/**/*.java', 39 | ]), 40 | deps = [ 41 | ':all-libs', 42 | ':build_config', 43 | ':res', 44 | ], 45 | ) 46 | 47 | android_build_config( 48 | name = 'build_config', 49 | package = 'com.navigationmobxexample', 50 | ) 51 | 52 | android_resource( 53 | name = 'res', 54 | res = 'src/main/res', 55 | package = 'com.navigationmobxexample', 56 | ) 57 | 58 | android_binary( 59 | name = 'app', 60 | package_type = 'debug', 61 | manifest = 'src/main/AndroidManifest.xml', 62 | keystore = '//android/keystores:debug', 63 | deps = [ 64 | ':app-code', 65 | ], 66 | ) 67 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation 19 | * entryFile: "index.android.js", 20 | * 21 | * // whether to bundle JS and assets in debug mode 22 | * bundleInDebug: false, 23 | * 24 | * // whether to bundle JS and assets in release mode 25 | * bundleInRelease: true, 26 | * 27 | * // whether to bundle JS and assets in another build variant (if configured). 28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 29 | * // The configuration property can be in the following formats 30 | * // 'bundleIn${productFlavor}${buildType}' 31 | * // 'bundleIn${buildType}' 32 | * // bundleInFreeDebug: true, 33 | * // bundleInPaidRelease: true, 34 | * // bundleInBeta: true, 35 | * 36 | * // the root of your project, i.e. where "package.json" lives 37 | * root: "../../", 38 | * 39 | * // where to put the JS bundle asset in debug mode 40 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 41 | * 42 | * // where to put the JS bundle asset in release mode 43 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 44 | * 45 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 46 | * // require('./image.png')), in debug mode 47 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 48 | * 49 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 50 | * // require('./image.png')), in release mode 51 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 52 | * 53 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 54 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 55 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 56 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 57 | * // for example, you might want to remove it from here. 58 | * inputExcludes: ["android/**", "ios/**"], 59 | * 60 | * // override which node gets called and with what additional arguments 61 | * nodeExecutableAndArgs: ["node"] 62 | * 63 | * // supply additional arguments to the packager 64 | * extraPackagerArgs: [] 65 | * ] 66 | */ 67 | 68 | apply from: "../../node_modules/react-native/react.gradle" 69 | 70 | /** 71 | * Set this to true to create two separate APKs instead of one: 72 | * - An APK that only works on ARM devices 73 | * - An APK that only works on x86 devices 74 | * The advantage is the size of the APK is reduced by about 4MB. 75 | * Upload all the APKs to the Play Store and people will download 76 | * the correct one based on the CPU architecture of their device. 77 | */ 78 | def enableSeparateBuildPerCPUArchitecture = false 79 | 80 | /** 81 | * Run Proguard to shrink the Java bytecode in release builds. 82 | */ 83 | def enableProguardInReleaseBuilds = false 84 | 85 | android { 86 | compileSdkVersion 23 87 | buildToolsVersion "23.0.1" 88 | 89 | defaultConfig { 90 | applicationId "com.navigationmobxexample" 91 | minSdkVersion 16 92 | targetSdkVersion 22 93 | versionCode 1 94 | versionName "1.0" 95 | ndk { 96 | abiFilters "armeabi-v7a", "x86" 97 | } 98 | } 99 | splits { 100 | abi { 101 | reset() 102 | enable enableSeparateBuildPerCPUArchitecture 103 | universalApk false // If true, also generate a universal APK 104 | include "armeabi-v7a", "x86" 105 | } 106 | } 107 | buildTypes { 108 | release { 109 | minifyEnabled enableProguardInReleaseBuilds 110 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 111 | } 112 | } 113 | // applicationVariants are e.g. debug, release 114 | applicationVariants.all { variant -> 115 | variant.outputs.each { output -> 116 | // For each separate APK per architecture, set a unique version code as described here: 117 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 118 | def versionCodes = ["armeabi-v7a":1, "x86":2] 119 | def abi = output.getFilter(OutputFile.ABI) 120 | if (abi != null) { // null for the universal-debug, universal-release variants 121 | output.versionCodeOverride = 122 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 123 | } 124 | } 125 | } 126 | } 127 | 128 | dependencies { 129 | compile fileTree(dir: "libs", include: ["*.jar"]) 130 | compile "com.android.support:appcompat-v7:23.0.1" 131 | compile "com.facebook.react:react-native:+" // From node_modules 132 | } 133 | 134 | // Run this once to be able to run the application with BUCK 135 | // puts all compile dependencies into folder libs for BUCK to use 136 | task copyDownloadableDepsToLibs(type: Copy) { 137 | from configurations.compile 138 | into 'libs' 139 | } 140 | -------------------------------------------------------------------------------- /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 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip 30 | 31 | # Do not strip any method/class that is annotated with @DoNotStrip 32 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 33 | -keep @com.facebook.common.internal.DoNotStrip class * 34 | -keepclassmembers class * { 35 | @com.facebook.proguard.annotations.DoNotStrip *; 36 | @com.facebook.common.internal.DoNotStrip *; 37 | } 38 | 39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 40 | void set*(***); 41 | *** get*(); 42 | } 43 | 44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 46 | -keepclassmembers,includedescriptorclasses class * { native ; } 47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } 49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } 50 | 51 | -dontwarn com.facebook.react.** 52 | 53 | # okhttp 54 | 55 | -keepattributes Signature 56 | -keepattributes *Annotation* 57 | -keep class okhttp3.** { *; } 58 | -keep interface okhttp3.** { *; } 59 | -dontwarn okhttp3.** 60 | 61 | # okio 62 | 63 | -keep class sun.misc.Unsafe { *; } 64 | -dontwarn java.nio.file.* 65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 66 | -dontwarn okio.** 67 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/navigationmobxexample/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.navigationmobxexample; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. 9 | * This is used to schedule rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "NavigationMobxExample"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/navigationmobxexample/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.navigationmobxexample; 2 | 3 | import android.app.Application; 4 | import android.util.Log; 5 | 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactInstanceManager; 8 | import com.facebook.react.ReactNativeHost; 9 | import com.facebook.react.ReactPackage; 10 | import com.facebook.react.shell.MainReactPackage; 11 | 12 | import java.util.Arrays; 13 | import java.util.List; 14 | 15 | public class MainApplication extends Application implements ReactApplication { 16 | 17 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 18 | @Override 19 | protected boolean getUseDeveloperSupport() { 20 | return BuildConfig.DEBUG; 21 | } 22 | 23 | @Override 24 | protected List getPackages() { 25 | return Arrays.asList( 26 | new MainReactPackage() 27 | ); 28 | } 29 | }; 30 | 31 | @Override 32 | public ReactNativeHost getReactNativeHost() { 33 | return mReactNativeHost; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastermoo/navigation-mobx-example/c73a054b81105b30e56d4e2eae705f0e7709fe6a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastermoo/navigation-mobx-example/c73a054b81105b30e56d4e2eae705f0e7709fe6a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastermoo/navigation-mobx-example/c73a054b81105b30e56d4e2eae705f0e7709fe6a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastermoo/navigation-mobx-example/c73a054b81105b30e56d4e2eae705f0e7709fe6a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | NavigationMobxExample 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 | maven { 20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 21 | url "$rootDir/../node_modules/react-native/android" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /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/mastermoo/navigation-mobx-example/c73a054b81105b30e56d4e2eae705f0e7709fe6a/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/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = 'debug', 3 | store = 'debug.keystore', 4 | properties = 'debug.keystore.properties', 5 | visibility = [ 6 | 'PUBLIC', 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'NavigationMobxExample' 2 | 3 | include ':app' 4 | -------------------------------------------------------------------------------- /img/one@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastermoo/navigation-mobx-example/c73a054b81105b30e56d4e2eae705f0e7709fe6a/img/one@2x.png -------------------------------------------------------------------------------- /img/one_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastermoo/navigation-mobx-example/c73a054b81105b30e56d4e2eae705f0e7709fe6a/img/one_selected@2x.png -------------------------------------------------------------------------------- /img/two@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastermoo/navigation-mobx-example/c73a054b81105b30e56d4e2eae705f0e7709fe6a/img/two@2x.png -------------------------------------------------------------------------------- /img/two_selected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mastermoo/navigation-mobx-example/c73a054b81105b30e56d4e2eae705f0e7709fe6a/img/two_selected@2x.png -------------------------------------------------------------------------------- /index.android.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from 'react'; 8 | import { 9 | AppRegistry, 10 | StyleSheet, 11 | Text, 12 | View 13 | } from 'react-native'; 14 | 15 | class NavigationMobxExample extends Component { 16 | render() { 17 | return ( 18 | 19 | 20 | Welcome to React Native! 21 | 22 | 23 | To get started, edit index.android.js 24 | 25 | 26 | Double tap R on your keyboard to reload,{'\n'} 27 | Shake or press menu button for dev menu 28 | 29 | 30 | ); 31 | } 32 | } 33 | 34 | const styles = StyleSheet.create({ 35 | container: { 36 | flex: 1, 37 | justifyContent: 'center', 38 | alignItems: 'center', 39 | backgroundColor: '#F5FCFF', 40 | }, 41 | welcome: { 42 | fontSize: 20, 43 | textAlign: 'center', 44 | margin: 10, 45 | }, 46 | instructions: { 47 | textAlign: 'center', 48 | color: '#333333', 49 | marginBottom: 5, 50 | }, 51 | }); 52 | 53 | AppRegistry.registerComponent('NavigationMobxExample', () => NavigationMobxExample); 54 | -------------------------------------------------------------------------------- /index.ios.js: -------------------------------------------------------------------------------- 1 | import App from './src/app'; 2 | 3 | const app = new App(); 4 | -------------------------------------------------------------------------------- /ios/NavigationMobxExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 12 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 13 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 14 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 15 | 00E356F31AD99517003FC87E /* NavigationMobxExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* NavigationMobxExampleTests.m */; }; 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 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 24 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 25 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 26 | CACB9B831D5F2E8300061AC8 /* libReactNativeControllers.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CACB9B821D5F2E7400061AC8 /* libReactNativeControllers.a */; }; 27 | /* End PBXBuildFile section */ 28 | 29 | /* Begin PBXContainerItemProxy section */ 30 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 33 | proxyType = 2; 34 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 35 | remoteInfo = RCTActionSheet; 36 | }; 37 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 40 | proxyType = 2; 41 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 42 | remoteInfo = RCTGeolocation; 43 | }; 44 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { 45 | isa = PBXContainerItemProxy; 46 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 47 | proxyType = 2; 48 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 49 | remoteInfo = RCTImage; 50 | }; 51 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { 52 | isa = PBXContainerItemProxy; 53 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 54 | proxyType = 2; 55 | remoteGlobalIDString = 58B511DB1A9E6C8500147676; 56 | remoteInfo = RCTNetwork; 57 | }; 58 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { 59 | isa = PBXContainerItemProxy; 60 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 61 | proxyType = 2; 62 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 63 | remoteInfo = RCTVibration; 64 | }; 65 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 66 | isa = PBXContainerItemProxy; 67 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 68 | proxyType = 1; 69 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 70 | remoteInfo = NavigationMobxExample; 71 | }; 72 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { 73 | isa = PBXContainerItemProxy; 74 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 75 | proxyType = 2; 76 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 77 | remoteInfo = RCTSettings; 78 | }; 79 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { 80 | isa = PBXContainerItemProxy; 81 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 82 | proxyType = 2; 83 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A; 84 | remoteInfo = RCTWebSocket; 85 | }; 86 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { 87 | isa = PBXContainerItemProxy; 88 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 89 | proxyType = 2; 90 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; 91 | remoteInfo = React; 92 | }; 93 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 94 | isa = PBXContainerItemProxy; 95 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 96 | proxyType = 2; 97 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 98 | remoteInfo = RCTLinking; 99 | }; 100 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 101 | isa = PBXContainerItemProxy; 102 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 103 | proxyType = 2; 104 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 105 | remoteInfo = RCTText; 106 | }; 107 | CACB9B811D5F2E7400061AC8 /* PBXContainerItemProxy */ = { 108 | isa = PBXContainerItemProxy; 109 | containerPortal = CACB9B731D5F2E7400061AC8 /* ReactNativeControllers.xcodeproj */; 110 | proxyType = 2; 111 | remoteGlobalIDString = D8AFADBD1BEE6F3F00A4592D; 112 | remoteInfo = ReactNativeControllers; 113 | }; 114 | /* End PBXContainerItemProxy section */ 115 | 116 | /* Begin PBXFileReference section */ 117 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 118 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 119 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; 120 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; 121 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; 122 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 123 | 00E356EE1AD99517003FC87E /* NavigationMobxExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NavigationMobxExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 124 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 125 | 00E356F21AD99517003FC87E /* NavigationMobxExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NavigationMobxExampleTests.m; sourceTree = ""; }; 126 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; 127 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 128 | 13B07F961A680F5B00A75B9A /* NavigationMobxExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NavigationMobxExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 129 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = NavigationMobxExample/AppDelegate.h; sourceTree = ""; }; 130 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = NavigationMobxExample/AppDelegate.m; sourceTree = ""; }; 131 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 132 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = NavigationMobxExample/Images.xcassets; sourceTree = ""; }; 133 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = NavigationMobxExample/Info.plist; sourceTree = ""; }; 134 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = NavigationMobxExample/main.m; sourceTree = ""; }; 135 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 136 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 137 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 138 | CACB9B731D5F2E7400061AC8 /* ReactNativeControllers.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ReactNativeControllers.xcodeproj; path = "../node_modules/react-native-controllers/ios/ReactNativeControllers.xcodeproj"; sourceTree = ""; }; 139 | /* End PBXFileReference section */ 140 | 141 | /* Begin PBXFrameworksBuildPhase section */ 142 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 143 | isa = PBXFrameworksBuildPhase; 144 | buildActionMask = 2147483647; 145 | files = ( 146 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */, 147 | ); 148 | runOnlyForDeploymentPostprocessing = 0; 149 | }; 150 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 151 | isa = PBXFrameworksBuildPhase; 152 | buildActionMask = 2147483647; 153 | files = ( 154 | CACB9B831D5F2E8300061AC8 /* libReactNativeControllers.a in Frameworks */, 155 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 156 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 157 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 158 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 159 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 160 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 161 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 162 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 163 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 164 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 165 | ); 166 | runOnlyForDeploymentPostprocessing = 0; 167 | }; 168 | /* End PBXFrameworksBuildPhase section */ 169 | 170 | /* Begin PBXGroup section */ 171 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 175 | ); 176 | name = Products; 177 | sourceTree = ""; 178 | }; 179 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 183 | ); 184 | name = Products; 185 | sourceTree = ""; 186 | }; 187 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 188 | isa = PBXGroup; 189 | children = ( 190 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 191 | ); 192 | name = Products; 193 | sourceTree = ""; 194 | }; 195 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 196 | isa = PBXGroup; 197 | children = ( 198 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 199 | ); 200 | name = Products; 201 | sourceTree = ""; 202 | }; 203 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 204 | isa = PBXGroup; 205 | children = ( 206 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 207 | ); 208 | name = Products; 209 | sourceTree = ""; 210 | }; 211 | 00E356EF1AD99517003FC87E /* NavigationMobxExampleTests */ = { 212 | isa = PBXGroup; 213 | children = ( 214 | 00E356F21AD99517003FC87E /* NavigationMobxExampleTests.m */, 215 | 00E356F01AD99517003FC87E /* Supporting Files */, 216 | ); 217 | path = NavigationMobxExampleTests; 218 | sourceTree = ""; 219 | }; 220 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 221 | isa = PBXGroup; 222 | children = ( 223 | 00E356F11AD99517003FC87E /* Info.plist */, 224 | ); 225 | name = "Supporting Files"; 226 | sourceTree = ""; 227 | }; 228 | 139105B71AF99BAD00B5F7CC /* Products */ = { 229 | isa = PBXGroup; 230 | children = ( 231 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 232 | ); 233 | name = Products; 234 | sourceTree = ""; 235 | }; 236 | 139FDEE71B06529A00C62182 /* Products */ = { 237 | isa = PBXGroup; 238 | children = ( 239 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 240 | ); 241 | name = Products; 242 | sourceTree = ""; 243 | }; 244 | 13B07FAE1A68108700A75B9A /* NavigationMobxExample */ = { 245 | isa = PBXGroup; 246 | children = ( 247 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 248 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 249 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 250 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 251 | 13B07FB61A68108700A75B9A /* Info.plist */, 252 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 253 | 13B07FB71A68108700A75B9A /* main.m */, 254 | ); 255 | name = NavigationMobxExample; 256 | sourceTree = ""; 257 | }; 258 | 146834001AC3E56700842450 /* Products */ = { 259 | isa = PBXGroup; 260 | children = ( 261 | 146834041AC3E56700842450 /* libReact.a */, 262 | ); 263 | name = Products; 264 | sourceTree = ""; 265 | }; 266 | 78C398B11ACF4ADC00677621 /* Products */ = { 267 | isa = PBXGroup; 268 | children = ( 269 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 270 | ); 271 | name = Products; 272 | sourceTree = ""; 273 | }; 274 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 275 | isa = PBXGroup; 276 | children = ( 277 | CACB9B731D5F2E7400061AC8 /* ReactNativeControllers.xcodeproj */, 278 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 279 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 280 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 281 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 282 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 283 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 284 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 285 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 286 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 287 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 288 | ); 289 | name = Libraries; 290 | sourceTree = ""; 291 | }; 292 | 832341B11AAA6A8300B99B32 /* Products */ = { 293 | isa = PBXGroup; 294 | children = ( 295 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 296 | ); 297 | name = Products; 298 | sourceTree = ""; 299 | }; 300 | 83CBB9F61A601CBA00E9B192 = { 301 | isa = PBXGroup; 302 | children = ( 303 | 13B07FAE1A68108700A75B9A /* NavigationMobxExample */, 304 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 305 | 00E356EF1AD99517003FC87E /* NavigationMobxExampleTests */, 306 | 83CBBA001A601CBA00E9B192 /* Products */, 307 | ); 308 | indentWidth = 2; 309 | sourceTree = ""; 310 | tabWidth = 2; 311 | }; 312 | 83CBBA001A601CBA00E9B192 /* Products */ = { 313 | isa = PBXGroup; 314 | children = ( 315 | 13B07F961A680F5B00A75B9A /* NavigationMobxExample.app */, 316 | 00E356EE1AD99517003FC87E /* NavigationMobxExampleTests.xctest */, 317 | ); 318 | name = Products; 319 | sourceTree = ""; 320 | }; 321 | CACB9B741D5F2E7400061AC8 /* Products */ = { 322 | isa = PBXGroup; 323 | children = ( 324 | CACB9B821D5F2E7400061AC8 /* libReactNativeControllers.a */, 325 | ); 326 | name = Products; 327 | sourceTree = ""; 328 | }; 329 | /* End PBXGroup section */ 330 | 331 | /* Begin PBXNativeTarget section */ 332 | 00E356ED1AD99517003FC87E /* NavigationMobxExampleTests */ = { 333 | isa = PBXNativeTarget; 334 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "NavigationMobxExampleTests" */; 335 | buildPhases = ( 336 | 00E356EA1AD99517003FC87E /* Sources */, 337 | 00E356EB1AD99517003FC87E /* Frameworks */, 338 | 00E356EC1AD99517003FC87E /* Resources */, 339 | ); 340 | buildRules = ( 341 | ); 342 | dependencies = ( 343 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 344 | ); 345 | name = NavigationMobxExampleTests; 346 | productName = NavigationMobxExampleTests; 347 | productReference = 00E356EE1AD99517003FC87E /* NavigationMobxExampleTests.xctest */; 348 | productType = "com.apple.product-type.bundle.unit-test"; 349 | }; 350 | 13B07F861A680F5B00A75B9A /* NavigationMobxExample */ = { 351 | isa = PBXNativeTarget; 352 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "NavigationMobxExample" */; 353 | buildPhases = ( 354 | 13B07F871A680F5B00A75B9A /* Sources */, 355 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 356 | 13B07F8E1A680F5B00A75B9A /* Resources */, 357 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 358 | ); 359 | buildRules = ( 360 | ); 361 | dependencies = ( 362 | ); 363 | name = NavigationMobxExample; 364 | productName = "Hello World"; 365 | productReference = 13B07F961A680F5B00A75B9A /* NavigationMobxExample.app */; 366 | productType = "com.apple.product-type.application"; 367 | }; 368 | /* End PBXNativeTarget section */ 369 | 370 | /* Begin PBXProject section */ 371 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 372 | isa = PBXProject; 373 | attributes = { 374 | LastUpgradeCheck = 0730; 375 | ORGANIZATIONNAME = Facebook; 376 | TargetAttributes = { 377 | 00E356ED1AD99517003FC87E = { 378 | CreatedOnToolsVersion = 6.2; 379 | TestTargetID = 13B07F861A680F5B00A75B9A; 380 | }; 381 | }; 382 | }; 383 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "NavigationMobxExample" */; 384 | compatibilityVersion = "Xcode 3.2"; 385 | developmentRegion = English; 386 | hasScannedForEncodings = 0; 387 | knownRegions = ( 388 | en, 389 | Base, 390 | ); 391 | mainGroup = 83CBB9F61A601CBA00E9B192; 392 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 393 | projectDirPath = ""; 394 | projectReferences = ( 395 | { 396 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 397 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 398 | }, 399 | { 400 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 401 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 402 | }, 403 | { 404 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 405 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 406 | }, 407 | { 408 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 409 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 410 | }, 411 | { 412 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 413 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 414 | }, 415 | { 416 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 417 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 418 | }, 419 | { 420 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 421 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 422 | }, 423 | { 424 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 425 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 426 | }, 427 | { 428 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 429 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 430 | }, 431 | { 432 | ProductGroup = 146834001AC3E56700842450 /* Products */; 433 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 434 | }, 435 | { 436 | ProductGroup = CACB9B741D5F2E7400061AC8 /* Products */; 437 | ProjectRef = CACB9B731D5F2E7400061AC8 /* ReactNativeControllers.xcodeproj */; 438 | }, 439 | ); 440 | projectRoot = ""; 441 | targets = ( 442 | 13B07F861A680F5B00A75B9A /* NavigationMobxExample */, 443 | 00E356ED1AD99517003FC87E /* NavigationMobxExampleTests */, 444 | ); 445 | }; 446 | /* End PBXProject section */ 447 | 448 | /* Begin PBXReferenceProxy section */ 449 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 450 | isa = PBXReferenceProxy; 451 | fileType = archive.ar; 452 | path = libRCTActionSheet.a; 453 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 454 | sourceTree = BUILT_PRODUCTS_DIR; 455 | }; 456 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 457 | isa = PBXReferenceProxy; 458 | fileType = archive.ar; 459 | path = libRCTGeolocation.a; 460 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 461 | sourceTree = BUILT_PRODUCTS_DIR; 462 | }; 463 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 464 | isa = PBXReferenceProxy; 465 | fileType = archive.ar; 466 | path = libRCTImage.a; 467 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 468 | sourceTree = BUILT_PRODUCTS_DIR; 469 | }; 470 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 471 | isa = PBXReferenceProxy; 472 | fileType = archive.ar; 473 | path = libRCTNetwork.a; 474 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 475 | sourceTree = BUILT_PRODUCTS_DIR; 476 | }; 477 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 478 | isa = PBXReferenceProxy; 479 | fileType = archive.ar; 480 | path = libRCTVibration.a; 481 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 482 | sourceTree = BUILT_PRODUCTS_DIR; 483 | }; 484 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 485 | isa = PBXReferenceProxy; 486 | fileType = archive.ar; 487 | path = libRCTSettings.a; 488 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 489 | sourceTree = BUILT_PRODUCTS_DIR; 490 | }; 491 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 492 | isa = PBXReferenceProxy; 493 | fileType = archive.ar; 494 | path = libRCTWebSocket.a; 495 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 496 | sourceTree = BUILT_PRODUCTS_DIR; 497 | }; 498 | 146834041AC3E56700842450 /* libReact.a */ = { 499 | isa = PBXReferenceProxy; 500 | fileType = archive.ar; 501 | path = libReact.a; 502 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 503 | sourceTree = BUILT_PRODUCTS_DIR; 504 | }; 505 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 506 | isa = PBXReferenceProxy; 507 | fileType = archive.ar; 508 | path = libRCTLinking.a; 509 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 510 | sourceTree = BUILT_PRODUCTS_DIR; 511 | }; 512 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 513 | isa = PBXReferenceProxy; 514 | fileType = archive.ar; 515 | path = libRCTText.a; 516 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 517 | sourceTree = BUILT_PRODUCTS_DIR; 518 | }; 519 | CACB9B821D5F2E7400061AC8 /* libReactNativeControllers.a */ = { 520 | isa = PBXReferenceProxy; 521 | fileType = archive.ar; 522 | path = libReactNativeControllers.a; 523 | remoteRef = CACB9B811D5F2E7400061AC8 /* PBXContainerItemProxy */; 524 | sourceTree = BUILT_PRODUCTS_DIR; 525 | }; 526 | /* End PBXReferenceProxy section */ 527 | 528 | /* Begin PBXResourcesBuildPhase section */ 529 | 00E356EC1AD99517003FC87E /* Resources */ = { 530 | isa = PBXResourcesBuildPhase; 531 | buildActionMask = 2147483647; 532 | files = ( 533 | ); 534 | runOnlyForDeploymentPostprocessing = 0; 535 | }; 536 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 537 | isa = PBXResourcesBuildPhase; 538 | buildActionMask = 2147483647; 539 | files = ( 540 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 541 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 542 | ); 543 | runOnlyForDeploymentPostprocessing = 0; 544 | }; 545 | /* End PBXResourcesBuildPhase section */ 546 | 547 | /* Begin PBXShellScriptBuildPhase section */ 548 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 549 | isa = PBXShellScriptBuildPhase; 550 | buildActionMask = 2147483647; 551 | files = ( 552 | ); 553 | inputPaths = ( 554 | ); 555 | name = "Bundle React Native code and images"; 556 | outputPaths = ( 557 | ); 558 | runOnlyForDeploymentPostprocessing = 0; 559 | shellPath = /bin/sh; 560 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh"; 561 | }; 562 | /* End PBXShellScriptBuildPhase section */ 563 | 564 | /* Begin PBXSourcesBuildPhase section */ 565 | 00E356EA1AD99517003FC87E /* Sources */ = { 566 | isa = PBXSourcesBuildPhase; 567 | buildActionMask = 2147483647; 568 | files = ( 569 | 00E356F31AD99517003FC87E /* NavigationMobxExampleTests.m in Sources */, 570 | ); 571 | runOnlyForDeploymentPostprocessing = 0; 572 | }; 573 | 13B07F871A680F5B00A75B9A /* Sources */ = { 574 | isa = PBXSourcesBuildPhase; 575 | buildActionMask = 2147483647; 576 | files = ( 577 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 578 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 579 | ); 580 | runOnlyForDeploymentPostprocessing = 0; 581 | }; 582 | /* End PBXSourcesBuildPhase section */ 583 | 584 | /* Begin PBXTargetDependency section */ 585 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 586 | isa = PBXTargetDependency; 587 | target = 13B07F861A680F5B00A75B9A /* NavigationMobxExample */; 588 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 589 | }; 590 | /* End PBXTargetDependency section */ 591 | 592 | /* Begin PBXVariantGroup section */ 593 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 594 | isa = PBXVariantGroup; 595 | children = ( 596 | 13B07FB21A68108700A75B9A /* Base */, 597 | ); 598 | name = LaunchScreen.xib; 599 | path = NavigationMobxExample; 600 | sourceTree = ""; 601 | }; 602 | /* End PBXVariantGroup section */ 603 | 604 | /* Begin XCBuildConfiguration section */ 605 | 00E356F61AD99517003FC87E /* Debug */ = { 606 | isa = XCBuildConfiguration; 607 | buildSettings = { 608 | BUNDLE_LOADER = "$(TEST_HOST)"; 609 | GCC_PREPROCESSOR_DEFINITIONS = ( 610 | "DEBUG=1", 611 | "$(inherited)", 612 | ); 613 | INFOPLIST_FILE = NavigationMobxExampleTests/Info.plist; 614 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 615 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 616 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 617 | PRODUCT_NAME = "$(TARGET_NAME)"; 618 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NavigationMobxExample.app/NavigationMobxExample"; 619 | }; 620 | name = Debug; 621 | }; 622 | 00E356F71AD99517003FC87E /* Release */ = { 623 | isa = XCBuildConfiguration; 624 | buildSettings = { 625 | BUNDLE_LOADER = "$(TEST_HOST)"; 626 | COPY_PHASE_STRIP = NO; 627 | INFOPLIST_FILE = NavigationMobxExampleTests/Info.plist; 628 | IPHONEOS_DEPLOYMENT_TARGET = 8.2; 629 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 630 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 631 | PRODUCT_NAME = "$(TARGET_NAME)"; 632 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NavigationMobxExample.app/NavigationMobxExample"; 633 | }; 634 | name = Release; 635 | }; 636 | 13B07F941A680F5B00A75B9A /* Debug */ = { 637 | isa = XCBuildConfiguration; 638 | buildSettings = { 639 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 640 | DEAD_CODE_STRIPPING = NO; 641 | HEADER_SEARCH_PATHS = ( 642 | "$(inherited)", 643 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 644 | "$(SRCROOT)/../node_modules/react-native/React/**", 645 | "$(SRCROOT)/../node_modules/react-native-controllers/ios/**", 646 | ); 647 | INFOPLIST_FILE = NavigationMobxExample/Info.plist; 648 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 649 | OTHER_LDFLAGS = ( 650 | "$(inherited)", 651 | "-ObjC", 652 | "-lc++", 653 | ); 654 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 655 | PRODUCT_NAME = NavigationMobxExample; 656 | }; 657 | name = Debug; 658 | }; 659 | 13B07F951A680F5B00A75B9A /* Release */ = { 660 | isa = XCBuildConfiguration; 661 | buildSettings = { 662 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 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 | "$(SRCROOT)/../node_modules/react-native-controllers/ios/**", 668 | ); 669 | INFOPLIST_FILE = NavigationMobxExample/Info.plist; 670 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 671 | OTHER_LDFLAGS = ( 672 | "$(inherited)", 673 | "-ObjC", 674 | "-lc++", 675 | ); 676 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 677 | PRODUCT_NAME = NavigationMobxExample; 678 | }; 679 | name = Release; 680 | }; 681 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 682 | isa = XCBuildConfiguration; 683 | buildSettings = { 684 | ALWAYS_SEARCH_USER_PATHS = NO; 685 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 686 | CLANG_CXX_LIBRARY = "libc++"; 687 | CLANG_ENABLE_MODULES = YES; 688 | CLANG_ENABLE_OBJC_ARC = YES; 689 | CLANG_WARN_BOOL_CONVERSION = YES; 690 | CLANG_WARN_CONSTANT_CONVERSION = YES; 691 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 692 | CLANG_WARN_EMPTY_BODY = YES; 693 | CLANG_WARN_ENUM_CONVERSION = YES; 694 | CLANG_WARN_INT_CONVERSION = YES; 695 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 696 | CLANG_WARN_UNREACHABLE_CODE = YES; 697 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 698 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 699 | COPY_PHASE_STRIP = NO; 700 | ENABLE_STRICT_OBJC_MSGSEND = YES; 701 | ENABLE_TESTABILITY = YES; 702 | GCC_C_LANGUAGE_STANDARD = gnu99; 703 | GCC_DYNAMIC_NO_PIC = NO; 704 | GCC_OPTIMIZATION_LEVEL = 0; 705 | GCC_PREPROCESSOR_DEFINITIONS = ( 706 | "DEBUG=1", 707 | "$(inherited)", 708 | ); 709 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 710 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 711 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 712 | GCC_WARN_UNDECLARED_SELECTOR = YES; 713 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 714 | GCC_WARN_UNUSED_FUNCTION = YES; 715 | GCC_WARN_UNUSED_VARIABLE = YES; 716 | HEADER_SEARCH_PATHS = ( 717 | "$(inherited)", 718 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 719 | "$(SRCROOT)/../node_modules/react-native/React/**", 720 | ); 721 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 722 | MTL_ENABLE_DEBUG_INFO = YES; 723 | ONLY_ACTIVE_ARCH = YES; 724 | SDKROOT = iphoneos; 725 | }; 726 | name = Debug; 727 | }; 728 | 83CBBA211A601CBA00E9B192 /* Release */ = { 729 | isa = XCBuildConfiguration; 730 | buildSettings = { 731 | ALWAYS_SEARCH_USER_PATHS = NO; 732 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 733 | CLANG_CXX_LIBRARY = "libc++"; 734 | CLANG_ENABLE_MODULES = YES; 735 | CLANG_ENABLE_OBJC_ARC = YES; 736 | CLANG_WARN_BOOL_CONVERSION = YES; 737 | CLANG_WARN_CONSTANT_CONVERSION = YES; 738 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 739 | CLANG_WARN_EMPTY_BODY = YES; 740 | CLANG_WARN_ENUM_CONVERSION = YES; 741 | CLANG_WARN_INT_CONVERSION = YES; 742 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 743 | CLANG_WARN_UNREACHABLE_CODE = YES; 744 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 745 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 746 | COPY_PHASE_STRIP = YES; 747 | ENABLE_NS_ASSERTIONS = NO; 748 | ENABLE_STRICT_OBJC_MSGSEND = YES; 749 | GCC_C_LANGUAGE_STANDARD = gnu99; 750 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 751 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 752 | GCC_WARN_UNDECLARED_SELECTOR = YES; 753 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 754 | GCC_WARN_UNUSED_FUNCTION = YES; 755 | GCC_WARN_UNUSED_VARIABLE = YES; 756 | HEADER_SEARCH_PATHS = ( 757 | "$(inherited)", 758 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 759 | "$(SRCROOT)/../node_modules/react-native/React/**", 760 | ); 761 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 762 | MTL_ENABLE_DEBUG_INFO = NO; 763 | SDKROOT = iphoneos; 764 | VALIDATE_PRODUCT = YES; 765 | }; 766 | name = Release; 767 | }; 768 | /* End XCBuildConfiguration section */ 769 | 770 | /* Begin XCConfigurationList section */ 771 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "NavigationMobxExampleTests" */ = { 772 | isa = XCConfigurationList; 773 | buildConfigurations = ( 774 | 00E356F61AD99517003FC87E /* Debug */, 775 | 00E356F71AD99517003FC87E /* Release */, 776 | ); 777 | defaultConfigurationIsVisible = 0; 778 | defaultConfigurationName = Release; 779 | }; 780 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "NavigationMobxExample" */ = { 781 | isa = XCConfigurationList; 782 | buildConfigurations = ( 783 | 13B07F941A680F5B00A75B9A /* Debug */, 784 | 13B07F951A680F5B00A75B9A /* Release */, 785 | ); 786 | defaultConfigurationIsVisible = 0; 787 | defaultConfigurationName = Release; 788 | }; 789 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "NavigationMobxExample" */ = { 790 | isa = XCConfigurationList; 791 | buildConfigurations = ( 792 | 83CBBA201A601CBA00E9B192 /* Debug */, 793 | 83CBBA211A601CBA00E9B192 /* Release */, 794 | ); 795 | defaultConfigurationIsVisible = 0; 796 | defaultConfigurationName = Release; 797 | }; 798 | /* End XCConfigurationList section */ 799 | }; 800 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 801 | } 802 | -------------------------------------------------------------------------------- /ios/NavigationMobxExample.xcodeproj/xcshareddata/xcschemes/NavigationMobxExample.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/NavigationMobxExample/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/NavigationMobxExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | // ********************************************** 4 | // *** DON'T MISS: THE NEXT LINE IS IMPORTANT *** 5 | // ********************************************** 6 | #import "RCCManager.h" 7 | 8 | // IMPORTANT: if you're getting an Xcode error that RCCManager.h isn't found, you've probably ran "npm install" 9 | // with npm ver 2. You'll need to "npm install" with npm 3 (see https://github.com/wix/react-native-navigation/issues/1) 10 | 11 | #import "RCTRootView.h" 12 | 13 | @implementation AppDelegate 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 16 | { 17 | NSURL *jsCodeLocation; 18 | jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"]; 19 | // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 20 | 21 | 22 | // ********************************************** 23 | // *** DON'T MISS: THIS IS HOW WE BOOTSTRAP ***** 24 | // ********************************************** 25 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 26 | self.window.backgroundColor = [UIColor whiteColor]; 27 | [[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation]; 28 | 29 | return YES; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /ios/NavigationMobxExample/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/NavigationMobxExample/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/NavigationMobxExample/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 | NSExceptionDomains 28 | 29 | localhost 30 | 31 | NSTemporaryExceptionAllowsInsecureHTTPLoads 32 | 33 | 34 | 35 | 36 | NSLocationWhenInUseUsageDescription 37 | 38 | UILaunchStoryboardName 39 | LaunchScreen 40 | UIRequiredDeviceCapabilities 41 | 42 | armv7 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UIViewControllerBasedStatusBarAppearance 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /ios/NavigationMobxExample/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/NavigationMobxExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/NavigationMobxExampleTests/NavigationMobxExampleTests.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 600 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface NavigationMobxExampleTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation NavigationMobxExampleTests 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, RCTLogSource source, 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 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NavigationMobxExample", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "node_modules/react-native/packager/packager.sh" 7 | }, 8 | "dependencies": { 9 | "babel-preset-react-native-stage-0": "^1.0.1", 10 | "mobx": "^2.4.3", 11 | "mobx-react": "^3.5.5", 12 | "react": "15.2.1", 13 | "react-native": "^0.30.0", 14 | "react-native-navigation": "^1.0.30" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/app.js: -------------------------------------------------------------------------------- 1 | import { reaction } from 'mobx'; 2 | import { Navigation } from 'react-native-navigation'; 3 | import { app } from './stores'; 4 | 5 | 6 | // screen related book keeping 7 | import { registerScreens } from './screens'; 8 | registerScreens(); 9 | 10 | // notice that this is just a simple class, it's not a React component 11 | export default class App { 12 | constructor() { 13 | // when the root of the app changes, call the startApp function 14 | reaction(() => app.root, () => this.startApp(app.root)); 15 | 16 | app.appInitialized(); 17 | } 18 | 19 | startApp(root) { 20 | console.log("starting app..."); 21 | 22 | switch (root) { 23 | case 'login': 24 | Navigation.startSingleScreenApp({ 25 | screen: { 26 | screen: 'example.LoginScreen', 27 | title: 'Login', 28 | navigatorStyle: {} 29 | }, 30 | }); 31 | return; 32 | case 'after-login': 33 | Navigation.startTabBasedApp({ 34 | tabs: [ 35 | { 36 | label: 'One', 37 | screen: 'example.FirstTabScreen', 38 | icon: require('../img/one.png'), 39 | selectedIcon: require('../img/one_selected.png'), 40 | title: 'Screen One', 41 | navigatorStyle: {}, 42 | }, 43 | { 44 | label: 'Two', 45 | screen: 'example.SecondTabScreen', 46 | icon: require('../img/two.png'), 47 | selectedIcon: require('../img/two_selected.png'), 48 | title: 'Screen Two', 49 | navigatorStyle: {}, 50 | } 51 | ], 52 | animationType: 'slide-down', 53 | title: 'MobX Example' 54 | }); 55 | return; 56 | default: 57 | console.error('Unknown app root'); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/screens/FirstTabScreen.js: -------------------------------------------------------------------------------- 1 | import React, {Component, PropTypes} from 'react'; 2 | import { 3 | Text, 4 | View, 5 | ScrollView, 6 | TouchableOpacity, 7 | StyleSheet, 8 | Alert 9 | } from 'react-native'; 10 | import { observer } from 'mobx-react/native'; 11 | import { counter } from '../stores'; 12 | 13 | 14 | // this is a traditional React component connected wrapped in an observer function 15 | @observer 16 | export default class FirstTabScreen extends Component { 17 | constructor(props) { 18 | super(props); 19 | 20 | this.counter = counter; 21 | } 22 | 23 | render() { 24 | return ( 25 | 26 | 27 | Same Counter: {this.counter.count} 28 | 29 | 30 | 31 | Increment Counter 32 | 33 | 34 | 35 | Push Screen 36 | 37 | 38 | ); 39 | } 40 | 41 | onIncrementPress() { 42 | this.counter.increment(); 43 | } 44 | 45 | onPushPress() { 46 | this.props.navigator.push({ 47 | title: "More", 48 | screen: "example.PushedScreen", 49 | }); 50 | } 51 | } 52 | 53 | const styles = StyleSheet.create({ 54 | text: { 55 | textAlign: 'center', 56 | fontSize: 18, 57 | marginBottom: 10, 58 | marginTop:10 59 | }, 60 | button: { 61 | textAlign: 'center', 62 | fontSize: 18, 63 | marginBottom: 10, 64 | marginTop:10, 65 | color: 'blue' 66 | } 67 | }); -------------------------------------------------------------------------------- /src/screens/LoginScreen.js: -------------------------------------------------------------------------------- 1 | import React, {Component, PropTypes} from 'react'; 2 | import { 3 | Text, 4 | View, 5 | ScrollView, 6 | TouchableOpacity, 7 | StyleSheet 8 | } from 'react-native'; 9 | import { observer } from 'mobx-react/native'; 10 | import { app, counter } from '../stores'; 11 | 12 | // this is a traditional React component connected wrapped in an observer function 13 | @observer 14 | export default class LoginScreen extends Component { 15 | constructor(props) { 16 | super(props); 17 | 18 | this.app = app; 19 | this.counter = counter; 20 | } 21 | 22 | render() { 23 | return ( 24 | 25 | 26 | Counter: {this.counter.count} 27 | 28 | 29 | 30 | Increment Counter 31 | 32 | 33 | 34 | Login 35 | 36 | 37 | ); 38 | } 39 | 40 | onIncrementPress() { 41 | this.counter.increment(); 42 | } 43 | 44 | onLoginPress() { 45 | this.app.login(); 46 | } 47 | } 48 | 49 | const styles = StyleSheet.create({ 50 | text: { 51 | textAlign: 'center', 52 | fontSize: 18, 53 | marginBottom: 10, 54 | marginTop: 10, 55 | }, 56 | button: { 57 | textAlign: 'center', 58 | fontSize: 18, 59 | marginBottom: 10, 60 | marginTop: 10, 61 | color: 'blue' 62 | } 63 | }); -------------------------------------------------------------------------------- /src/screens/PushedScreen.js: -------------------------------------------------------------------------------- 1 | import React, {Component, PropTypes} from 'react'; 2 | import { 3 | Text, 4 | View, 5 | ScrollView, 6 | TouchableOpacity, 7 | StyleSheet, 8 | TextInput 9 | } from 'react-native'; 10 | import { observer } from 'mobx-react/native'; 11 | import { counter } from '../stores'; 12 | 13 | @observer 14 | export default class PushedScreen extends Component { 15 | constructor(props) { 16 | super(props); 17 | 18 | this.counter = counter; 19 | } 20 | 21 | render() { 22 | return ( 23 | 24 | 25 | Counter: {this.counter.count} 26 | 27 | 28 | 29 | Increment Counter 30 | 31 | 32 | 33 | Push Another 34 | 35 | 36 | ); 37 | } 38 | 39 | onIncrementPress() { 40 | this.counter.increment(); 41 | } 42 | 43 | onPushPress() { 44 | this.props.navigator.push({ 45 | title: "More", 46 | screen: "example.PushedScreen", 47 | }); 48 | } 49 | } 50 | 51 | const styles = StyleSheet.create({ 52 | text: { 53 | textAlign: 'center', 54 | fontSize: 18, 55 | marginBottom: 10, 56 | marginTop:10 57 | }, 58 | button: { 59 | textAlign: 'center', 60 | fontSize: 18, 61 | marginBottom: 10, 62 | marginTop:10, 63 | color: 'blue' 64 | } 65 | }); -------------------------------------------------------------------------------- /src/screens/SecondTabScreen.js: -------------------------------------------------------------------------------- 1 | import React, {Component, PropTypes} from 'react'; 2 | import { 3 | Text, 4 | Image, 5 | View, 6 | ScrollView, 7 | TouchableOpacity, 8 | StyleSheet, 9 | } from 'react-native'; 10 | import { observer } from 'mobx-react/native'; 11 | import { counter } from '../stores'; 12 | 13 | 14 | @observer 15 | export default class SecondTabScreen extends Component { 16 | constructor(props) { 17 | super(props); 18 | this.buttonsCounter = 0; 19 | 20 | this.counter = counter; 21 | } 22 | 23 | render() { 24 | return ( 25 | 26 | 27 | 28 | Here Too: {this.counter.count} 29 | 30 | 31 | 32 | Increment Counter 33 | 34 | 35 | 36 | ); 37 | } 38 | 39 | onIncrementPress() { 40 | this.counter.increment(); 41 | } 42 | } 43 | 44 | const styles = StyleSheet.create({ 45 | text: { 46 | textAlign: 'center', 47 | fontSize: 18, 48 | marginBottom: 10, 49 | marginTop:10, 50 | }, 51 | button: { 52 | textAlign: 'center', 53 | fontSize: 18, 54 | marginBottom: 10, 55 | marginTop:10, 56 | color: 'blue' 57 | } 58 | }); -------------------------------------------------------------------------------- /src/screens/index.js: -------------------------------------------------------------------------------- 1 | import {Navigation} from 'react-native-navigation'; 2 | 3 | import LoginScreen from './LoginScreen'; 4 | import FirstTabScreen from './FirstTabScreen'; 5 | import SecondTabScreen from './SecondTabScreen'; 6 | import PushedScreen from './PushedScreen'; 7 | 8 | // register all screens of the app (including internal ones) 9 | export function registerScreens() { 10 | Navigation.registerComponent('example.LoginScreen', () => LoginScreen); 11 | Navigation.registerComponent('example.FirstTabScreen', () => FirstTabScreen); 12 | Navigation.registerComponent('example.SecondTabScreen', () => SecondTabScreen); 13 | Navigation.registerComponent('example.PushedScreen', () => PushedScreen); 14 | } 15 | -------------------------------------------------------------------------------- /src/stores/app.js: -------------------------------------------------------------------------------- 1 | import { observable } from 'mobx'; 2 | 3 | 4 | class AppStore { 5 | @observable root = undefined; // 'login' / 'after-login' 6 | 7 | constructor() {} 8 | 9 | appInitialized() { 10 | this.root = 'login'; 11 | } 12 | 13 | login() { 14 | this.root = 'after-login'; 15 | } 16 | } 17 | 18 | export default new AppStore(); -------------------------------------------------------------------------------- /src/stores/counter.js: -------------------------------------------------------------------------------- 1 | import { observable } from 'mobx'; 2 | 3 | 4 | class CounterStore { 5 | @observable count = 0; 6 | 7 | constructor() {} 8 | 9 | increment() { 10 | this.count++; 11 | } 12 | 13 | decrement() { 14 | this.count--; 15 | } 16 | } 17 | 18 | export default new CounterStore(); -------------------------------------------------------------------------------- /src/stores/index.js: -------------------------------------------------------------------------------- 1 | import app from './app'; 2 | import counter from './counter'; 3 | 4 | export { 5 | app, 6 | counter 7 | }; 8 | --------------------------------------------------------------------------------