diff --git a/.gitignore b/.gitignore index 82e64d4..627c387 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,5 @@ project.xcworkspace *.iml .gradle local.properties -android/build \ No newline at end of file +android/build +**/.DS_Store diff --git a/README.md b/README.md index 053baa5..dcceecf 100644 --- a/README.md +++ b/README.md @@ -42,8 +42,43 @@ eg. Have a look at the demo in the example directory if you need more help. -## Issues -Currently we are working through an issue at #8 with Android devices on that latest version of React Native not properly passing through touch events. +## Android Installation +For Android you have to do the normal react-native link. Also you have to change MainActivity inside you project. See example below + +```java +package com.reactnativetouchthroughviewexample; + +import com.facebook.react.ReactActivity; +import android.view.MotionEvent; +import com.rome2rio.android.reactnativetouchthroughview.TouchThroughTouchHandlerInterface; +import com.rome2rio.android.reactnativetouchthroughview.TouchThroughTouchHandler; + +public class MainActivity extends ReactActivity implements TouchThroughTouchHandlerInterface { + + private TouchThroughTouchHandler touchThroughTouchHandler = new TouchThroughTouchHandler(); + + /** + * Returns the name of the main component registered from JavaScript. + * This is used to schedule rendering of the component. + */ + @Override + protected String getMainComponentName() { + return "reactnativetouchthroughviewexample"; + } + + public TouchThroughTouchHandler getTouchThroughTouchHandler() { + return touchThroughTouchHandler; + } + + @Override + public boolean dispatchTouchEvent(MotionEvent ev) { + touchThroughTouchHandler.handleTouchEvent(ev); + + return super.dispatchTouchEvent(ev); + } +} + +``` ## Credits Brought to you by the team at [Rome2rio](https://www.rome2rio.com). Find out how to join our team at diff --git a/RNTouchThroughView.podspec b/RNTouchThroughView.podspec new file mode 100644 index 0000000..240dc7b --- /dev/null +++ b/RNTouchThroughView.podspec @@ -0,0 +1,16 @@ +require 'json' +package = JSON.parse(File.read('package.json')) + +Pod::Spec.new do |s| + s.name = "RNTouchThroughView" + s.version = package["version"] + s.summary = package["description"] + s.requires_arc = true + s.license = package["license"] + s.homepage = 'n/a' + s.authors = { package["author"] => package["repository"]["url"] } + s.source = { :git => package["repository"]["url"] } + s.source_files = ['ios/*.{h,m}'] + s.platform = :ios, "8.0" + s.dependency 'React' +end diff --git a/android/build.gradle b/android/build.gradle index 43d7690..31c5ca6 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,9 +1,13 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. apply plugin: 'com.android.library' +def DEFAULT_COMPILE_SDK_VERSION = 23 +def DEFAULT_BUILD_TOOLS_VERSION = "23.0.3" +def DEFAULT_TARGET_SDK_VERSION = 23 buildscript { repositories { + google() jcenter() } dependencies { @@ -16,6 +20,7 @@ buildscript { allprojects { repositories { + google() mavenLocal() jcenter() maven { @@ -29,12 +34,12 @@ allprojects { android { - compileSdkVersion 23 - buildToolsVersion "23.0.3" + compileSdkVersion project.hasProperty('compileSdkVersion') ? project.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION + buildToolsVersion project.hasProperty('buildToolsVersion') ? project.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION defaultConfig { minSdkVersion 16 - targetSdkVersion 23 + targetSdkVersion project.hasProperty('targetSdkVersion') ? project.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION } lintOptions { diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 2f866df..bbef935 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip +distributionUrl=https://services.gradle.org/distributions/gradle-2.10-all.zip diff --git a/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughTouchHandler.java b/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughTouchHandler.java new file mode 100644 index 0000000..af69317 --- /dev/null +++ b/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughTouchHandler.java @@ -0,0 +1,25 @@ +package com.rome2rio.android.reactnativetouchthroughview; + +import android.view.MotionEvent; + +import java.util.ArrayList; +import java.util.List; + +public class TouchThroughTouchHandler { + + private List listeners = new ArrayList(); + + public void addListener(TouchThroughTouchHandlerListener listener) { + listeners.add(listener); + } + + public void removeListener(TouchThroughTouchHandlerListener listener) { + listeners.remove(listener); + } + + public void handleTouchEvent(MotionEvent ev) { + for (TouchThroughTouchHandlerListener listener : listeners) { + listener.handleTouch(ev); + } + } +} diff --git a/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughTouchHandlerInterface.java b/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughTouchHandlerInterface.java new file mode 100644 index 0000000..51d2ae1 --- /dev/null +++ b/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughTouchHandlerInterface.java @@ -0,0 +1,7 @@ +package com.rome2rio.android.reactnativetouchthroughview; + +import android.view.MotionEvent; + +public interface TouchThroughTouchHandlerInterface { + public TouchThroughTouchHandler getTouchThroughTouchHandler(); +} diff --git a/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughTouchHandlerListener.java b/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughTouchHandlerListener.java new file mode 100644 index 0000000..79f0e72 --- /dev/null +++ b/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughTouchHandlerListener.java @@ -0,0 +1,7 @@ +package com.rome2rio.android.reactnativetouchthroughview; + +import android.view.MotionEvent; + +public abstract class TouchThroughTouchHandlerListener { + abstract void handleTouch(MotionEvent ev); +} diff --git a/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughViewManager.java b/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughViewManager.java index cc163ad..784401b 100644 --- a/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughViewManager.java +++ b/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughViewManager.java @@ -1,10 +1,10 @@ package com.rome2rio.android.reactnativetouchthroughview; -import com.facebook.react.uimanager.SimpleViewManager; import com.facebook.react.uimanager.ThemedReactContext; +import com.facebook.react.uimanager.ViewGroupManager; public class TouchThroughViewManager - extends SimpleViewManager { + extends ViewGroupManager { public static final String REACT_CLASS = "R2RTouchThroughView"; diff --git a/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughViewPackage.java b/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughViewPackage.java index 193fa17..1c34e7c 100644 --- a/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughViewPackage.java +++ b/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughViewPackage.java @@ -24,7 +24,6 @@ public List createNativeModules(ReactApplicationContext reactConte return Collections.emptyList(); } - @Override public List> createJSModules() { return Collections.emptyList(); } diff --git a/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughWrapper.java b/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughWrapper.java index c808234..3125029 100644 --- a/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughWrapper.java +++ b/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughWrapper.java @@ -1,49 +1,94 @@ package com.rome2rio.android.reactnativetouchthroughview; import com.facebook.react.views.view.ReactViewGroup; +import com.facebook.react.touch.ReactHitSlopView; +import com.facebook.react.bridge.ReactContext; +import android.app.Activity; import android.content.Context; +import android.util.Log; import android.view.MotionEvent; import android.view.View; import android.graphics.Rect; import android.view.ViewGroup; -public class TouchThroughWrapper extends ReactViewGroup { - public TouchThroughWrapper(Context context) { +public class TouchThroughWrapper extends ReactViewGroup implements ReactHitSlopView { + private boolean lastTouchWasNotValid = false; + private final ViewGroup viewGroup = this; + private TouchThroughTouchHandler handler; + + public TouchThroughWrapper(ReactContext context) { super(context); + if (context == null) { + return; + } + Activity activity = context.getCurrentActivity(); + if (activity == null) { + return; + } + if (activity instanceof TouchThroughTouchHandlerInterface) { + TouchThroughTouchHandlerInterface handlerInterface = (TouchThroughTouchHandlerInterface) activity; + handler = handlerInterface.getTouchThroughTouchHandler(); + } else { + throw new RuntimeException("TouchThroughTouchHandlerInterface was not set on app activity"); + } } @Override public boolean onInterceptTouchEvent(MotionEvent event) { - // Recursively find out if an absolute x/y position is hitting a child view and stop event - // propagation if a hit is found. - return this.isTouchingTouchThroughView(this, Math.round(event.getX()), Math.round(event.getY())); + return lastTouchWasNotValid; + } + + private TouchThroughTouchHandlerListener listener = new TouchThroughTouchHandlerListener() { + @Override + void handleTouch(MotionEvent ev) { + if (ev.getAction() == MotionEvent.ACTION_DOWN) { + lastTouchWasNotValid = isTouchingTouchThroughView(viewGroup, (int) ev.getX(), (int) ev.getY()); + } + } + }; + public void addActivityListener() { + if(handler != null) { + handler.addListener(listener); + } } + public void removeActivityListener() { + if(handler != null) { + handler.removeListener(listener); + } + } + + // Recursively find out if an absolute x/y position is hitting a child view and stop event + // propagation if a hit is found. private boolean isTouchingTouchThroughView(ViewGroup viewgroup, int x, int y) { boolean isTouchingTouchThroughView = false; - for(int i = 0; i < viewgroup.getChildCount(); i++) { + for (int i = 0; i < viewgroup.getChildCount(); i++) { View child = viewgroup.getChildAt(i); boolean isViewGroup = child instanceof ViewGroup; boolean isTouchThroughView = child instanceof TouchThroughView; if (isTouchThroughView) { + Rect bounds = new Rect(); + isTouchingTouchThroughView = child.getGlobalVisibleRect(bounds) && bounds.contains(x, y); + /* int[] location = new int[2]; int[] thisLocation = new int[2]; - child.getLocationOnScreen(location); + + //child.getLocationOnScreen(location); this.getLocationOnScreen(thisLocation); int childX = location[0] - thisLocation[0]; int childY = location[1] - thisLocation[1]; - Rect bounds = new Rect(childX, childY, childX + child.getWidth(), childY + child.getHeight()); + //Rect bounds = new Rect(childX, childY, childX + child.getWidth(), childY + child.getHeight()); isTouchingTouchThroughView = bounds.contains(x, y); - } - else if (isViewGroup) { + */ + } else if (isViewGroup) { isTouchingTouchThroughView = this.isTouchingTouchThroughView((ViewGroup) child, x, y); } @@ -60,4 +105,12 @@ public boolean onTouchEvent(MotionEvent event) { // Pass through touch events to layer behind. return false; } -} + + //If the touch was not on the list make the slop rect small so react-native dont use this view as responder + public Rect getHitSlopRect() { + if (lastTouchWasNotValid) { + return new Rect(-1000, -1000, -1000, -1000); + } + return new Rect(0, 0, 0, 0); + } +} \ No newline at end of file diff --git a/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughWrapperManager.java b/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughWrapperManager.java index c3290b3..d171457 100644 --- a/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughWrapperManager.java +++ b/android/src/main/java/com/rome2rio/android/reactnativetouchthroughview/TouchThroughWrapperManager.java @@ -13,8 +13,16 @@ public class TouchThroughWrapperManager public String getName() { return REACT_CLASS; } + @Override public TouchThroughWrapper createViewInstance(ThemedReactContext context) { - return new TouchThroughWrapper(context); + TouchThroughWrapper view = new TouchThroughWrapper(context); + view.addActivityListener(); + return view; + } + + @Override + public void onDropViewInstance(TouchThroughWrapper view) { + view.removeActivityListener(); } } diff --git a/example-react-native-navigation/README.md b/example-react-native-navigation/README.md new file mode 100644 index 0000000..ff82f25 --- /dev/null +++ b/example-react-native-navigation/README.md @@ -0,0 +1,28 @@ +# Example for react-native-navigation + +This example is copied from https://github.com/wix/react-native-navigation/tree/master/example + +It shows how to implement react-native-navigation for android + +## Javascript + +An example for the javascript part is under the "Push" section and in the file: src/screens/types/Push.js + +## Android + +### Implementation Details + +Use TouchThroughActivity from `android/app/src/main/java/com/example/TouchThroughActivity.java` as implementation for the `TouchThroughTouchHandlerInterface` interface + +Add `` to `AndroidManifest.xml` + +Override `startActivity` in NavigationApplication + +```java +@Override +public void startActivity(Intent intent) { + intent.setClass(NavigationApplication.instance, TouchThroughActivity.class); + + super.startActivity(intent); +} +``` \ No newline at end of file diff --git a/example-react-native-navigation/android/.project b/example-react-native-navigation/android/.project new file mode 100644 index 0000000..d3c6d7c --- /dev/null +++ b/example-react-native-navigation/android/.project @@ -0,0 +1,17 @@ + + + example + Project example created by Buildship. + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/example-react-native-navigation/android/.settings/org.eclipse.buildship.core.prefs b/example-react-native-navigation/android/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..b244040 --- /dev/null +++ b/example-react-native-navigation/android/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +#Thu Apr 05 19:51:51 CEST 2018 +connection.project.dir= diff --git a/example-react-native-navigation/android/app/.classpath b/example-react-native-navigation/android/app/.classpath new file mode 100644 index 0000000..8d8d85f --- /dev/null +++ b/example-react-native-navigation/android/app/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/example-react-native-navigation/android/app/.project b/example-react-native-navigation/android/app/.project new file mode 100644 index 0000000..ac485d7 --- /dev/null +++ b/example-react-native-navigation/android/app/.project @@ -0,0 +1,23 @@ + + + app + Project app created by Buildship. + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/example-react-native-navigation/android/app/.settings/org.eclipse.buildship.core.prefs b/example-react-native-navigation/android/app/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..d6c76d6 --- /dev/null +++ b/example-react-native-navigation/android/app/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +#Thu Apr 05 19:51:51 CEST 2018 +connection.project.dir=.. diff --git a/example-react-native-navigation/android/app/build.gradle b/example-react-native-navigation/android/app/build.gradle new file mode 100644 index 0000000..4d113f8 --- /dev/null +++ b/example-react-native-navigation/android/app/build.gradle @@ -0,0 +1,69 @@ +apply plugin: "com.android.application" + +import com.android.build.OutputFile +apply from: "../../node_modules/react-native/react.gradle" + +/** + * Set this to true to create two separate APKs instead of one: + * - An APK that only works on ARM devices + * - An APK that only works on x86 devices + * The advantage is the size of the APK is reduced by about 4MB. + * Upload all the APKs to the Play Store and people will download + * the correct one based on the CPU architecture of their device. + */ +def enableSeparateBuildPerCPUArchitecture = false + +/** + * Run Proguard to shrink the Java bytecode in release builds. + */ +def enableProguardInReleaseBuilds = false + +android { + compileSdkVersion 25 + buildToolsVersion '26.0.2' + + defaultConfig { + applicationId "com.example" + minSdkVersion 16 + targetSdkVersion 23 + versionCode 1 + versionName "1.0" + ndk { + abiFilters "armeabi-v7a", "x86" + } + } + splits { + abi { + reset() + enable enableSeparateBuildPerCPUArchitecture + universalApk false // If true, also generate a universal APK + include "armeabi-v7a", "x86" + } + } + buildTypes { + release { + minifyEnabled enableProguardInReleaseBuilds + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + } + } + // applicationVariants are e.g. debug, release + applicationVariants.all { variant -> + variant.outputs.each { output -> + // For each separate APK per architecture, set a unique version code as described here: + // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits + def versionCodes = ["armeabi-v7a": 1, "x86": 2] + def abi = output.getFilter(OutputFile.ABI) + if (abi != null) { // null for the universal-debug, universal-release variants + output.versionCodeOverride = + versionCodes.get(abi) * 1048576 + defaultConfig.versionCode + } + } + } +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + compile 'com.facebook.react:react-native:+' + compile project(':react-native-navigation') + compile project(':react-native-touch-through-view') +} diff --git a/example-react-native-navigation/android/app/proguard-rules.pro b/example-react-native-navigation/android/app/proguard-rules.pro new file mode 100644 index 0000000..8728082 --- /dev/null +++ b/example-react-native-navigation/android/app/proguard-rules.pro @@ -0,0 +1,67 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Disabling obfuscation is useful if you collect stack traces from production crashes +# (unless you are using a system that supports de-obfuscate the stack traces). +-dontobfuscate + +# React Native + +# Keep our interfaces so they can be used by other ProGuard rules. +# See http://sourceforge.net/p/proguard/bugs/466/ +-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip +-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters + +# Do not strip any method/class that is annotated with @DoNotStrip +-keep @com.facebook.proguard.annotations.DoNotStrip class * +-keepclassmembers class * { + @com.facebook.proguard.annotations.DoNotStrip *; +} + +-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { + void set*(***); + *** withOrder*(); +} + +-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } +-keep class * extends com.facebook.react.bridge.NativeModule { *; } +-keepclassmembers,includedescriptorclasses class * { native ; } +-keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } +-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } +-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } + +-dontwarn com.facebook.react.** + +# okhttp + +-keepattributes Signature +-keepattributes *Annotation* +-keep class com.squareup.okhttp.** { *; } +-keep interface com.squareup.okhttp.** { *; } +-dontwarn com.squareup.okhttp.** + +# okio + +-keep class sun.misc.Unsafe { *; } +-dontwarn java.nio.file.* +-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement +-dontwarn okio.** + +# stetho + +-dontwarn com.facebook.stetho.** diff --git a/example-react-native-navigation/android/app/src/main/AndroidManifest.xml b/example-react-native-navigation/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..3450a34 --- /dev/null +++ b/example-react-native-navigation/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + diff --git a/example-react-native-navigation/android/app/src/main/ic_launcher-web.png b/example-react-native-navigation/android/app/src/main/ic_launcher-web.png new file mode 100644 index 0000000..b986e39 Binary files /dev/null and b/example-react-native-navigation/android/app/src/main/ic_launcher-web.png differ diff --git a/example-react-native-navigation/android/app/src/main/java/com/example/MainActivity.java b/example-react-native-navigation/android/app/src/main/java/com/example/MainActivity.java new file mode 100644 index 0000000..d29c3fd --- /dev/null +++ b/example-react-native-navigation/android/app/src/main/java/com/example/MainActivity.java @@ -0,0 +1,17 @@ +package com.example; + +import com.reactnativenavigation.controllers.SplashActivity; + +import android.os.Bundle; +import android.support.annotation.Nullable; +import android.view.MotionEvent; +import com.rome2rio.android.reactnativetouchthroughview.TouchThroughTouchHandlerInterface; +import com.rome2rio.android.reactnativetouchthroughview.TouchThroughTouchHandler; +import android.view.View; + +public class MainActivity extends SplashActivity { + @Override + public View createSplashLayout() { + return new View(this); // <====== TO AVOID WHITE BACKGROUND + } +} \ No newline at end of file diff --git a/example-react-native-navigation/android/app/src/main/java/com/example/MainApplication.java b/example-react-native-navigation/android/app/src/main/java/com/example/MainApplication.java new file mode 100644 index 0000000..1c586ba --- /dev/null +++ b/example-react-native-navigation/android/app/src/main/java/com/example/MainApplication.java @@ -0,0 +1,38 @@ +package com.example; + +import android.content.Intent; +import android.support.annotation.Nullable; + +import com.facebook.react.ReactPackage; +import com.reactnativenavigation.NavigationApplication; +import com.reactnativenavigation.controllers.NavigationActivity; +import com.rome2rio.android.reactnativetouchthroughview.TouchThroughViewPackage; + +import java.util.List; +import java.util.Arrays; + +public class MainApplication extends NavigationApplication { + @Override + public boolean isDebug() { + return BuildConfig.DEBUG; + } + + @Nullable + @Override + public List createAdditionalReactPackages() { + return Arrays.asList(new TouchThroughViewPackage()); + } + + @Nullable + @Override + public String getJSMainModuleName() { + return "index"; + } + + @Override + public void startActivity(Intent intent) { + intent.setClass(NavigationApplication.instance, TouchThroughActivity.class); + + super.startActivity(intent); + } +} diff --git a/example-react-native-navigation/android/app/src/main/java/com/example/TouchThroughActivity.java b/example-react-native-navigation/android/app/src/main/java/com/example/TouchThroughActivity.java new file mode 100644 index 0000000..ce41cbd --- /dev/null +++ b/example-react-native-navigation/android/app/src/main/java/com/example/TouchThroughActivity.java @@ -0,0 +1,23 @@ +package com.example; + + +import android.view.MotionEvent; + +import com.reactnativenavigation.controllers.NavigationActivity; +import com.rome2rio.android.reactnativetouchthroughview.TouchThroughTouchHandler; +import com.rome2rio.android.reactnativetouchthroughview.TouchThroughTouchHandlerInterface; + +public class TouchThroughActivity extends NavigationActivity implements TouchThroughTouchHandlerInterface { + private TouchThroughTouchHandler touchThroughTouchHandler = new TouchThroughTouchHandler(); + + public TouchThroughTouchHandler getTouchThroughTouchHandler() { + return touchThroughTouchHandler; + } + + @Override + public boolean dispatchTouchEvent(MotionEvent ev) { + touchThroughTouchHandler.handleTouchEvent(ev); + + return super.dispatchTouchEvent(ev); + } +} diff --git a/example-react-native-navigation/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example-react-native-navigation/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..80c0303 Binary files /dev/null and b/example-react-native-navigation/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/example-react-native-navigation/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example-react-native-navigation/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..1db4b9d Binary files /dev/null and b/example-react-native-navigation/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/example-react-native-navigation/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example-react-native-navigation/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..6631828 Binary files /dev/null and b/example-react-native-navigation/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/example-react-native-navigation/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example-react-native-navigation/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..c2c3b7a Binary files /dev/null and b/example-react-native-navigation/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/example-react-native-navigation/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example-react-native-navigation/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..cb3d21d Binary files /dev/null and b/example-react-native-navigation/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/example-react-native-navigation/android/app/src/main/res/values/strings.xml b/example-react-native-navigation/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..e90a30a --- /dev/null +++ b/example-react-native-navigation/android/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + React Native Navigation + diff --git a/example-react-native-navigation/android/build.gradle b/example-react-native-navigation/android/build.gradle new file mode 100644 index 0000000..ba204f9 --- /dev/null +++ b/example-react-native-navigation/android/build.gradle @@ -0,0 +1,26 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + google() + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:3.0.1' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + mavenLocal() + jcenter() + google() + maven { + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url "$rootDir/../node_modules/react-native/android" + } + } +} diff --git a/example-react-native-navigation/android/gradle.properties b/example-react-native-navigation/android/gradle.properties new file mode 100644 index 0000000..1fd964e --- /dev/null +++ b/example-react-native-navigation/android/gradle.properties @@ -0,0 +1,20 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx10248m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true + +android.useDeprecatedNdk=true diff --git a/example-react-native-navigation/android/gradle/wrapper/gradle-wrapper.jar b/example-react-native-navigation/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..3baa851 Binary files /dev/null and b/example-react-native-navigation/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/example-react-native-navigation/android/gradle/wrapper/gradle-wrapper.properties b/example-react-native-navigation/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..0e27bcc --- /dev/null +++ b/example-react-native-navigation/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Sun Jan 28 19:31:28 IST 2018 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip diff --git a/example-react-native-navigation/android/gradlew b/example-react-native-navigation/android/gradlew new file mode 100755 index 0000000..27309d9 --- /dev/null +++ b/example-react-native-navigation/android/gradlew @@ -0,0 +1,164 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/example-react-native-navigation/android/gradlew.bat b/example-react-native-navigation/android/gradlew.bat new file mode 100644 index 0000000..f6d5974 --- /dev/null +++ b/example-react-native-navigation/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/example-react-native-navigation/android/settings.gradle b/example-react-native-navigation/android/settings.gradle new file mode 100644 index 0000000..df0e133 --- /dev/null +++ b/example-react-native-navigation/android/settings.gradle @@ -0,0 +1,8 @@ +rootProject.name = 'example' + +include ':app' +include ':react-native-navigation' +project(':react-native-navigation').projectDir = new File( + rootProject.projectDir, '../node_modules/react-native-navigation/android/app/') +include ':react-native-touch-through-view' +project(':react-native-touch-through-view').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-touch-through-view/android') \ No newline at end of file diff --git a/example-react-native-navigation/img/beach.jpg b/example-react-native-navigation/img/beach.jpg new file mode 100644 index 0000000..c8b0036 Binary files /dev/null and b/example-react-native-navigation/img/beach.jpg differ diff --git a/example-react-native-navigation/img/colors.png b/example-react-native-navigation/img/colors.png new file mode 100644 index 0000000..aa86bcc Binary files /dev/null and b/example-react-native-navigation/img/colors.png differ diff --git a/example-react-native-navigation/img/delete@1x.png b/example-react-native-navigation/img/delete@1x.png new file mode 100644 index 0000000..999aa4c Binary files /dev/null and b/example-react-native-navigation/img/delete@1x.png differ diff --git a/example-react-native-navigation/img/delete@2x.png b/example-react-native-navigation/img/delete@2x.png new file mode 100644 index 0000000..796ccd2 Binary files /dev/null and b/example-react-native-navigation/img/delete@2x.png differ diff --git a/example-react-native-navigation/img/edit@1x.png b/example-react-native-navigation/img/edit@1x.png new file mode 100644 index 0000000..9efbaae Binary files /dev/null and b/example-react-native-navigation/img/edit@1x.png differ diff --git a/example-react-native-navigation/img/edit@2x.png b/example-react-native-navigation/img/edit@2x.png new file mode 100644 index 0000000..87f8de1 Binary files /dev/null and b/example-react-native-navigation/img/edit@2x.png differ diff --git a/example-react-native-navigation/img/gyro_header.jpg b/example-react-native-navigation/img/gyro_header.jpg new file mode 100644 index 0000000..c08d38e Binary files /dev/null and b/example-react-native-navigation/img/gyro_header.jpg differ diff --git a/example-react-native-navigation/img/heroes/bouny_hunter.png b/example-react-native-navigation/img/heroes/bouny_hunter.png new file mode 100644 index 0000000..127c206 Binary files /dev/null and b/example-react-native-navigation/img/heroes/bouny_hunter.png differ diff --git a/example-react-native-navigation/img/heroes/earthspirit.png b/example-react-native-navigation/img/heroes/earthspirit.png new file mode 100644 index 0000000..45a6163 Binary files /dev/null and b/example-react-native-navigation/img/heroes/earthspirit.png differ diff --git a/example-react-native-navigation/img/heroes/oracle.png b/example-react-native-navigation/img/heroes/oracle.png new file mode 100644 index 0000000..13ccbc1 Binary files /dev/null and b/example-react-native-navigation/img/heroes/oracle.png differ diff --git a/example-react-native-navigation/img/heroes/skywrath_mage.png b/example-react-native-navigation/img/heroes/skywrath_mage.png new file mode 100644 index 0000000..7cc4881 Binary files /dev/null and b/example-react-native-navigation/img/heroes/skywrath_mage.png differ diff --git a/example-react-native-navigation/img/heroes/templar_assasin.png b/example-react-native-navigation/img/heroes/templar_assasin.png new file mode 100644 index 0000000..f79b5d0 Binary files /dev/null and b/example-react-native-navigation/img/heroes/templar_assasin.png differ diff --git a/example-react-native-navigation/img/list@1.5x.android.png b/example-react-native-navigation/img/list@1.5x.android.png new file mode 100644 index 0000000..313c43f Binary files /dev/null and b/example-react-native-navigation/img/list@1.5x.android.png differ diff --git a/example-react-native-navigation/img/list@1x.png b/example-react-native-navigation/img/list@1x.png new file mode 100644 index 0000000..64ad8e1 Binary files /dev/null and b/example-react-native-navigation/img/list@1x.png differ diff --git a/example-react-native-navigation/img/list@2x.android.png b/example-react-native-navigation/img/list@2x.android.png new file mode 100644 index 0000000..f0a2bbc Binary files /dev/null and b/example-react-native-navigation/img/list@2x.android.png differ diff --git a/example-react-native-navigation/img/list@3x.android.png b/example-react-native-navigation/img/list@3x.android.png new file mode 100644 index 0000000..6d4c06e Binary files /dev/null and b/example-react-native-navigation/img/list@3x.android.png differ diff --git a/example-react-native-navigation/img/list@4x.android.png b/example-react-native-navigation/img/list@4x.android.png new file mode 100644 index 0000000..cd9d1ca Binary files /dev/null and b/example-react-native-navigation/img/list@4x.android.png differ diff --git a/example-react-native-navigation/img/masonry/158xD4xbeh.jpeg b/example-react-native-navigation/img/masonry/158xD4xbeh.jpeg new file mode 100644 index 0000000..ac550ef Binary files /dev/null and b/example-react-native-navigation/img/masonry/158xD4xbeh.jpeg differ diff --git a/example-react-native-navigation/img/masonry/37r6Cqp1B8.jpeg b/example-react-native-navigation/img/masonry/37r6Cqp1B8.jpeg new file mode 100644 index 0000000..986460f Binary files /dev/null and b/example-react-native-navigation/img/masonry/37r6Cqp1B8.jpeg differ diff --git a/example-react-native-navigation/img/masonry/5Gi8kova3k.jpeg b/example-react-native-navigation/img/masonry/5Gi8kova3k.jpeg new file mode 100644 index 0000000..c2ffb5f Binary files /dev/null and b/example-react-native-navigation/img/masonry/5Gi8kova3k.jpeg differ diff --git a/example-react-native-navigation/img/masonry/61mpAVRV73.jpeg b/example-react-native-navigation/img/masonry/61mpAVRV73.jpeg new file mode 100644 index 0000000..0645bd0 Binary files /dev/null and b/example-react-native-navigation/img/masonry/61mpAVRV73.jpeg differ diff --git a/example-react-native-navigation/img/masonry/A4g0lZ33Z8.jpeg b/example-react-native-navigation/img/masonry/A4g0lZ33Z8.jpeg new file mode 100644 index 0000000..db35643 Binary files /dev/null and b/example-react-native-navigation/img/masonry/A4g0lZ33Z8.jpeg differ diff --git a/example-react-native-navigation/img/masonry/AdGXmD1CH6.jpeg b/example-react-native-navigation/img/masonry/AdGXmD1CH6.jpeg new file mode 100644 index 0000000..57351b8 Binary files /dev/null and b/example-react-native-navigation/img/masonry/AdGXmD1CH6.jpeg differ diff --git a/example-react-native-navigation/img/masonry/Cfw87359UT.jpeg b/example-react-native-navigation/img/masonry/Cfw87359UT.jpeg new file mode 100644 index 0000000..5b7ccf0 Binary files /dev/null and b/example-react-native-navigation/img/masonry/Cfw87359UT.jpeg differ diff --git a/example-react-native-navigation/img/masonry/N30E32431C.jpeg b/example-react-native-navigation/img/masonry/N30E32431C.jpeg new file mode 100644 index 0000000..84317c3 Binary files /dev/null and b/example-react-native-navigation/img/masonry/N30E32431C.jpeg differ diff --git a/example-react-native-navigation/img/masonry/a848dHxA4e.jpeg b/example-react-native-navigation/img/masonry/a848dHxA4e.jpeg new file mode 100644 index 0000000..d65ea81 Binary files /dev/null and b/example-react-native-navigation/img/masonry/a848dHxA4e.jpeg differ diff --git a/example-react-native-navigation/img/masonry/j51Pva1P8L.jpeg b/example-react-native-navigation/img/masonry/j51Pva1P8L.jpeg new file mode 100644 index 0000000..c261ded Binary files /dev/null and b/example-react-native-navigation/img/masonry/j51Pva1P8L.jpeg differ diff --git a/example-react-native-navigation/img/masonry/kVN0FryOZk.jpeg b/example-react-native-navigation/img/masonry/kVN0FryOZk.jpeg new file mode 100644 index 0000000..cafa34c Binary files /dev/null and b/example-react-native-navigation/img/masonry/kVN0FryOZk.jpeg differ diff --git a/example-react-native-navigation/img/masonry/pqgylg80SD.jpeg b/example-react-native-navigation/img/masonry/pqgylg80SD.jpeg new file mode 100644 index 0000000..b90e39c Binary files /dev/null and b/example-react-native-navigation/img/masonry/pqgylg80SD.jpeg differ diff --git a/example-react-native-navigation/img/masonry/rVOcz7rd0z.jpeg b/example-react-native-navigation/img/masonry/rVOcz7rd0z.jpeg new file mode 100644 index 0000000..12065c7 Binary files /dev/null and b/example-react-native-navigation/img/masonry/rVOcz7rd0z.jpeg differ diff --git a/example-react-native-navigation/img/masonry/ri90ueind7.jpeg b/example-react-native-navigation/img/masonry/ri90ueind7.jpeg new file mode 100644 index 0000000..a11649e Binary files /dev/null and b/example-react-native-navigation/img/masonry/ri90ueind7.jpeg differ diff --git a/example-react-native-navigation/img/masonry/v8KLi2f0Tr.jpeg b/example-react-native-navigation/img/masonry/v8KLi2f0Tr.jpeg new file mode 100644 index 0000000..6ae2c27 Binary files /dev/null and b/example-react-native-navigation/img/masonry/v8KLi2f0Tr.jpeg differ diff --git a/example-react-native-navigation/img/masonry/xU42hx19BB.jpeg b/example-react-native-navigation/img/masonry/xU42hx19BB.jpeg new file mode 100644 index 0000000..16dc7b0 Binary files /dev/null and b/example-react-native-navigation/img/masonry/xU42hx19BB.jpeg differ diff --git a/example-react-native-navigation/img/navicon_add@2x.android.png b/example-react-native-navigation/img/navicon_add@2x.android.png new file mode 100644 index 0000000..d64c22e Binary files /dev/null and b/example-react-native-navigation/img/navicon_add@2x.android.png differ diff --git a/example-react-native-navigation/img/navicon_add@2x.ios.png b/example-react-native-navigation/img/navicon_add@2x.ios.png new file mode 100644 index 0000000..4df23af Binary files /dev/null and b/example-react-native-navigation/img/navicon_add@2x.ios.png differ diff --git a/example-react-native-navigation/img/navicon_add@3x.android.png b/example-react-native-navigation/img/navicon_add@3x.android.png new file mode 100644 index 0000000..7e69913 Binary files /dev/null and b/example-react-native-navigation/img/navicon_add@3x.android.png differ diff --git a/example-react-native-navigation/img/navicon_edit@2x.png b/example-react-native-navigation/img/navicon_edit@2x.png new file mode 100644 index 0000000..dce506a Binary files /dev/null and b/example-react-native-navigation/img/navicon_edit@2x.png differ diff --git a/example-react-native-navigation/img/navicon_menu@2x.png b/example-react-native-navigation/img/navicon_menu@2x.png new file mode 100644 index 0000000..12c5403 Binary files /dev/null and b/example-react-native-navigation/img/navicon_menu@2x.png differ diff --git a/example-react-native-navigation/img/one@1.5x.android.png b/example-react-native-navigation/img/one@1.5x.android.png new file mode 100644 index 0000000..9f61d7b Binary files /dev/null and b/example-react-native-navigation/img/one@1.5x.android.png differ diff --git a/example-react-native-navigation/img/one@1x.android.png b/example-react-native-navigation/img/one@1x.android.png new file mode 100644 index 0000000..9f2c3d2 Binary files /dev/null and b/example-react-native-navigation/img/one@1x.android.png differ diff --git a/example-react-native-navigation/img/one@2x.ios.png b/example-react-native-navigation/img/one@2x.ios.png new file mode 100644 index 0000000..d57eefa Binary files /dev/null and b/example-react-native-navigation/img/one@2x.ios.png differ diff --git a/example-react-native-navigation/img/one@3x.android.png b/example-react-native-navigation/img/one@3x.android.png new file mode 100644 index 0000000..2e86cc2 Binary files /dev/null and b/example-react-native-navigation/img/one@3x.android.png differ diff --git a/example-react-native-navigation/img/one@4x.android.png b/example-react-native-navigation/img/one@4x.android.png new file mode 100644 index 0000000..04e2b26 Binary files /dev/null and b/example-react-native-navigation/img/one@4x.android.png differ diff --git a/example-react-native-navigation/img/one_selected@2x.png b/example-react-native-navigation/img/one_selected@2x.png new file mode 100644 index 0000000..acd8fcb Binary files /dev/null and b/example-react-native-navigation/img/one_selected@2x.png differ diff --git a/example-react-native-navigation/img/swap@1x.png b/example-react-native-navigation/img/swap@1x.png new file mode 100644 index 0000000..6566746 Binary files /dev/null and b/example-react-native-navigation/img/swap@1x.png differ diff --git a/example-react-native-navigation/img/swap@2x.png b/example-react-native-navigation/img/swap@2x.png new file mode 100644 index 0000000..6f73255 Binary files /dev/null and b/example-react-native-navigation/img/swap@2x.png differ diff --git a/example-react-native-navigation/img/three@2x.png b/example-react-native-navigation/img/three@2x.png new file mode 100644 index 0000000..bb51a97 Binary files /dev/null and b/example-react-native-navigation/img/three@2x.png differ diff --git a/example-react-native-navigation/img/three_selected@2x.png b/example-react-native-navigation/img/three_selected@2x.png new file mode 100644 index 0000000..683daa7 Binary files /dev/null and b/example-react-native-navigation/img/three_selected@2x.png differ diff --git a/example-react-native-navigation/img/transform@1x.png b/example-react-native-navigation/img/transform@1x.png new file mode 100644 index 0000000..d5503ce Binary files /dev/null and b/example-react-native-navigation/img/transform@1x.png differ diff --git a/example-react-native-navigation/img/transform@2x.png b/example-react-native-navigation/img/transform@2x.png new file mode 100644 index 0000000..18f89da Binary files /dev/null and b/example-react-native-navigation/img/transform@2x.png differ diff --git a/example-react-native-navigation/img/two@2x.png b/example-react-native-navigation/img/two@2x.png new file mode 100644 index 0000000..6cb7566 Binary files /dev/null and b/example-react-native-navigation/img/two@2x.png differ diff --git a/example-react-native-navigation/img/two_selected@2x.png b/example-react-native-navigation/img/two_selected@2x.png new file mode 100644 index 0000000..dbfc9b7 Binary files /dev/null and b/example-react-native-navigation/img/two_selected@2x.png differ diff --git a/example-react-native-navigation/index.js b/example-react-native-navigation/index.js new file mode 100644 index 0000000..e627acc --- /dev/null +++ b/example-react-native-navigation/index.js @@ -0,0 +1,2 @@ +__STRESS_TEST__ = false; +import App from './src/app'; diff --git a/example-react-native-navigation/ios/example.xcodeproj/project.pbxproj b/example-react-native-navigation/ios/example.xcodeproj/project.pbxproj new file mode 100644 index 0000000..40395a2 --- /dev/null +++ b/example-react-native-navigation/ios/example.xcodeproj/project.pbxproj @@ -0,0 +1,1150 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; + 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; + 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; + 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; + 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; + 00E356F31AD99517003FC87E /* exampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* exampleTests.m */; }; + 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; + 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; + 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; + 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; + 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; + 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; + 2647D65F1DB175C200B23722 /* libReactNativeNavigation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2647D65E1DB175B300B23722 /* libReactNativeNavigation.a */; }; + 7B9B39861DEB4091004A6281 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B9B39631DEB4076004A6281 /* libRCTAnimation.a */; }; + 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTActionSheet; + }; + 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTGeolocation; + }; + 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 58B5115D1A9E6B3D00147676; + remoteInfo = RCTImage; + }; + 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 58B511DB1A9E6C8500147676; + remoteInfo = RCTNetwork; + }; + 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; + remoteInfo = RCTVibration; + }; + 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 13B07F861A680F5B00A75B9A; + remoteInfo = example; + }; + 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTSettings; + }; + 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3C86DF461ADF2C930047B81A; + remoteInfo = RCTWebSocket; + }; + 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; + remoteInfo = React; + }; + 2647D65D1DB175B300B23722 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 2647D6591DB175B300B23722 /* ReactNativeNavigation.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D8AFADBD1BEE6F3F00A4592D; + remoteInfo = ReactNativeNavigation; + }; + 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTLinking; + }; + 7B9B39621DEB4076004A6281 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7B9B395C1DEB4076004A6281 /* RCTAnimation.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTAnimation; + }; + 7B9B39641DEB4076004A6281 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7B9B395C1DEB4076004A6281 /* RCTAnimation.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28201D9B03D100D4039D; + remoteInfo = "RCTAnimation-tvOS"; + }; + 7B9B39691DEB4076004A6281 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; + remoteInfo = "RCTImage-tvOS"; + }; + 7B9B396D1DEB4076004A6281 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28471D9B043800D4039D; + remoteInfo = "RCTLinking-tvOS"; + }; + 7B9B39711DEB4076004A6281 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28541D9B044C00D4039D; + remoteInfo = "RCTNetwork-tvOS"; + }; + 7B9B39751DEB4076004A6281 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28611D9B046600D4039D; + remoteInfo = "RCTSettings-tvOS"; + }; + 7B9B39791DEB4076004A6281 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A287B1D9B048500D4039D; + remoteInfo = "RCTText-tvOS"; + }; + 7B9B397E1DEB4076004A6281 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28881D9B049200D4039D; + remoteInfo = "RCTWebSocket-tvOS"; + }; + 7B9B39821DEB4076004A6281 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 2D2A28131D9B038B00D4039D; + remoteInfo = "React-tvOS"; + }; + 7BFF94261E5F10F20054957C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3C059A1DE3340900C268FA; + remoteInfo = yoga; + }; + 7BFF94281E5F10F20054957C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3C06751DE3340C00C268FA; + remoteInfo = "yoga-tvOS"; + }; + 7BFF942A1E5F10F20054957C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; + remoteInfo = cxxreact; + }; + 7BFF942C1E5F10F20054957C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; + remoteInfo = "cxxreact-tvOS"; + }; + 7BFF942E1E5F10F20054957C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4; + remoteInfo = jschelpers; + }; + 7BFF94301E5F10F20054957C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; + remoteInfo = "jschelpers-tvOS"; + }; + 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 58B5119B1A9E6C1200147676; + remoteInfo = RCTText; + }; + E5E62BA91FFA2FF40025960D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3DBE0D001F3B181A0099AA32; + remoteInfo = fishhook; + }; + E5E62BAB1FFA2FF40025960D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32; + remoteInfo = "fishhook-tvOS"; + }; + E5E62BBB1FFA2FF40025960D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7; + remoteInfo = "third-party"; + }; + E5E62BBD1FFA2FF40025960D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D383D3C1EBD27B6005632C8; + remoteInfo = "third-party-tvOS"; + }; + E5E62BBF1FFA2FF40025960D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 139D7E881E25C6D100323FB7; + remoteInfo = "double-conversion"; + }; + E5E62BC11FFA2FF40025960D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3D383D621EBD27B9005632C8; + remoteInfo = "double-conversion-tvOS"; + }; + E5E62BC31FFA2FF40025960D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 9936F3131F5F2E4B0010BF04; + remoteInfo = privatedata; + }; + E5E62BC51FFA2FF40025960D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04; + remoteInfo = "privatedata-tvOS"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; + 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; + 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; + 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; + 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; + 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; + 00E356EE1AD99517003FC87E /* exampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = exampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 00E356F21AD99517003FC87E /* exampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = exampleTests.m; sourceTree = ""; }; + 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; + 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; + 13B07F961A680F5B00A75B9A /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = example/AppDelegate.h; sourceTree = ""; }; + 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = example/AppDelegate.m; sourceTree = ""; }; + 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = example/Images.xcassets; sourceTree = ""; }; + 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = example/Info.plist; sourceTree = ""; }; + 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = example/main.m; sourceTree = ""; }; + 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; + 2647D6591DB175B300B23722 /* ReactNativeNavigation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ReactNativeNavigation.xcodeproj; path = "../node_modules/react-native-navigation/ios/ReactNativeNavigation.xcodeproj"; sourceTree = ""; }; + 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; + 7B9B395C1DEB4076004A6281 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; + 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 00E356EB1AD99517003FC87E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7B9B39861DEB4091004A6281 /* libRCTAnimation.a in Frameworks */, + 2647D65F1DB175C200B23722 /* libReactNativeNavigation.a in Frameworks */, + 146834051AC3E58100842450 /* libReact.a in Frameworks */, + 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, + 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, + 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, + 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, + 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, + 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, + 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, + 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, + 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 00C302A81ABCB8CE00DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, + ); + name = Products; + sourceTree = ""; + }; + 00C302B61ABCB90400DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, + ); + name = Products; + sourceTree = ""; + }; + 00C302BC1ABCB91800DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, + 7B9B396A1DEB4076004A6281 /* libRCTImage-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 00C302D41ABCB9D200DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, + 7B9B39721DEB4076004A6281 /* libRCTNetwork-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 00C302E01ABCB9EE00DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, + ); + name = Products; + sourceTree = ""; + }; + 00E356EF1AD99517003FC87E /* exampleTests */ = { + isa = PBXGroup; + children = ( + 00E356F21AD99517003FC87E /* exampleTests.m */, + 00E356F01AD99517003FC87E /* Supporting Files */, + ); + path = exampleTests; + sourceTree = ""; + }; + 00E356F01AD99517003FC87E /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 00E356F11AD99517003FC87E /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 139105B71AF99BAD00B5F7CC /* Products */ = { + isa = PBXGroup; + children = ( + 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, + 7B9B39761DEB4076004A6281 /* libRCTSettings-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 139FDEE71B06529A00C62182 /* Products */ = { + isa = PBXGroup; + children = ( + 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, + 7B9B397F1DEB4076004A6281 /* libRCTWebSocket-tvOS.a */, + E5E62BAA1FFA2FF40025960D /* libfishhook.a */, + E5E62BAC1FFA2FF40025960D /* libfishhook-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 13B07FAE1A68108700A75B9A /* example */ = { + isa = PBXGroup; + children = ( + 008F07F21AC5B25A0029DE68 /* main.jsbundle */, + 13B07FAF1A68108700A75B9A /* AppDelegate.h */, + 13B07FB01A68108700A75B9A /* AppDelegate.m */, + 13B07FB51A68108700A75B9A /* Images.xcassets */, + 13B07FB61A68108700A75B9A /* Info.plist */, + 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, + 13B07FB71A68108700A75B9A /* main.m */, + ); + name = example; + sourceTree = ""; + }; + 146834001AC3E56700842450 /* Products */ = { + isa = PBXGroup; + children = ( + 146834041AC3E56700842450 /* libReact.a */, + 7B9B39831DEB4076004A6281 /* libReact.a */, + 7BFF94271E5F10F20054957C /* libyoga.a */, + 7BFF94291E5F10F20054957C /* libyoga.a */, + 7BFF942B1E5F10F20054957C /* libcxxreact.a */, + 7BFF942D1E5F10F20054957C /* libcxxreact.a */, + 7BFF942F1E5F10F20054957C /* libjschelpers.a */, + 7BFF94311E5F10F20054957C /* libjschelpers.a */, + E5E62BBC1FFA2FF40025960D /* libthird-party.a */, + E5E62BBE1FFA2FF40025960D /* libthird-party.a */, + E5E62BC01FFA2FF40025960D /* libdouble-conversion.a */, + E5E62BC21FFA2FF40025960D /* libdouble-conversion.a */, + E5E62BC41FFA2FF40025960D /* libprivatedata.a */, + E5E62BC61FFA2FF40025960D /* libprivatedata-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 2647D65A1DB175B300B23722 /* Products */ = { + isa = PBXGroup; + children = ( + 2647D65E1DB175B300B23722 /* libReactNativeNavigation.a */, + ); + name = Products; + sourceTree = ""; + }; + 78C398B11ACF4ADC00677621 /* Products */ = { + isa = PBXGroup; + children = ( + 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, + 7B9B396E1DEB4076004A6281 /* libRCTLinking-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 7B9B395D1DEB4076004A6281 /* Products */ = { + isa = PBXGroup; + children = ( + 7B9B39631DEB4076004A6281 /* libRCTAnimation.a */, + 7B9B39651DEB4076004A6281 /* libRCTAnimation.a */, + ); + name = Products; + sourceTree = ""; + }; + 832341AE1AAA6A7D00B99B32 /* Libraries */ = { + isa = PBXGroup; + children = ( + 7B9B395C1DEB4076004A6281 /* RCTAnimation.xcodeproj */, + 2647D6591DB175B300B23722 /* ReactNativeNavigation.xcodeproj */, + 146833FF1AC3E56700842450 /* React.xcodeproj */, + 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, + 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, + 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, + 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, + 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, + 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, + 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, + 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, + 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, + ); + name = Libraries; + sourceTree = ""; + }; + 832341B11AAA6A8300B99B32 /* Products */ = { + isa = PBXGroup; + children = ( + 832341B51AAA6A8300B99B32 /* libRCTText.a */, + 7B9B397A1DEB4076004A6281 /* libRCTText-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; + 83CBB9F61A601CBA00E9B192 = { + isa = PBXGroup; + children = ( + 13B07FAE1A68108700A75B9A /* example */, + 832341AE1AAA6A7D00B99B32 /* Libraries */, + 00E356EF1AD99517003FC87E /* exampleTests */, + 83CBBA001A601CBA00E9B192 /* Products */, + ); + indentWidth = 2; + sourceTree = ""; + tabWidth = 2; + }; + 83CBBA001A601CBA00E9B192 /* Products */ = { + isa = PBXGroup; + children = ( + 13B07F961A680F5B00A75B9A /* example.app */, + 00E356EE1AD99517003FC87E /* exampleTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 00E356ED1AD99517003FC87E /* exampleTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "exampleTests" */; + buildPhases = ( + 00E356EA1AD99517003FC87E /* Sources */, + 00E356EB1AD99517003FC87E /* Frameworks */, + 00E356EC1AD99517003FC87E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 00E356F51AD99517003FC87E /* PBXTargetDependency */, + ); + name = exampleTests; + productName = exampleTests; + productReference = 00E356EE1AD99517003FC87E /* exampleTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 13B07F861A680F5B00A75B9A /* example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */; + buildPhases = ( + 13B07F871A680F5B00A75B9A /* Sources */, + 13B07F8C1A680F5B00A75B9A /* Frameworks */, + 13B07F8E1A680F5B00A75B9A /* Resources */, + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = example; + productName = "Hello World"; + productReference = 13B07F961A680F5B00A75B9A /* example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 83CBB9F71A601CBA00E9B192 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0610; + ORGANIZATIONNAME = Facebook; + TargetAttributes = { + 00E356ED1AD99517003FC87E = { + CreatedOnToolsVersion = 6.2; + TestTargetID = 13B07F861A680F5B00A75B9A; + }; + }; + }; + buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 83CBB9F61A601CBA00E9B192; + productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; + ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; + }, + { + ProductGroup = 7B9B395D1DEB4076004A6281 /* Products */; + ProjectRef = 7B9B395C1DEB4076004A6281 /* RCTAnimation.xcodeproj */; + }, + { + ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; + ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; + }, + { + ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; + ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; + }, + { + ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; + ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; + }, + { + ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; + ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; + }, + { + ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; + ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; + }, + { + ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; + ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; + }, + { + ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; + ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; + }, + { + ProductGroup = 139FDEE71B06529A00C62182 /* Products */; + ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + }, + { + ProductGroup = 146834001AC3E56700842450 /* Products */; + ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; + }, + { + ProductGroup = 2647D65A1DB175B300B23722 /* Products */; + ProjectRef = 2647D6591DB175B300B23722 /* ReactNativeNavigation.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 13B07F861A680F5B00A75B9A /* example */, + 00E356ED1AD99517003FC87E /* exampleTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTActionSheet.a; + remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTGeolocation.a; + remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTImage.a; + remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTNetwork.a; + remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTVibration.a; + remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTSettings.a; + remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTWebSocket.a; + remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 146834041AC3E56700842450 /* libReact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libReact.a; + remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 2647D65E1DB175B300B23722 /* libReactNativeNavigation.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libReactNativeNavigation.a; + remoteRef = 2647D65D1DB175B300B23722 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTLinking.a; + remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7B9B39631DEB4076004A6281 /* libRCTAnimation.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTAnimation.a; + remoteRef = 7B9B39621DEB4076004A6281 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7B9B39651DEB4076004A6281 /* libRCTAnimation.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTAnimation.a; + remoteRef = 7B9B39641DEB4076004A6281 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7B9B396A1DEB4076004A6281 /* libRCTImage-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTImage-tvOS.a"; + remoteRef = 7B9B39691DEB4076004A6281 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7B9B396E1DEB4076004A6281 /* libRCTLinking-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTLinking-tvOS.a"; + remoteRef = 7B9B396D1DEB4076004A6281 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7B9B39721DEB4076004A6281 /* libRCTNetwork-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTNetwork-tvOS.a"; + remoteRef = 7B9B39711DEB4076004A6281 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7B9B39761DEB4076004A6281 /* libRCTSettings-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTSettings-tvOS.a"; + remoteRef = 7B9B39751DEB4076004A6281 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7B9B397A1DEB4076004A6281 /* libRCTText-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTText-tvOS.a"; + remoteRef = 7B9B39791DEB4076004A6281 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7B9B397F1DEB4076004A6281 /* libRCTWebSocket-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRCTWebSocket-tvOS.a"; + remoteRef = 7B9B397E1DEB4076004A6281 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7B9B39831DEB4076004A6281 /* libReact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libReact.a; + remoteRef = 7B9B39821DEB4076004A6281 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7BFF94271E5F10F20054957C /* libyoga.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libyoga.a; + remoteRef = 7BFF94261E5F10F20054957C /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7BFF94291E5F10F20054957C /* libyoga.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libyoga.a; + remoteRef = 7BFF94281E5F10F20054957C /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7BFF942B1E5F10F20054957C /* libcxxreact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libcxxreact.a; + remoteRef = 7BFF942A1E5F10F20054957C /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7BFF942D1E5F10F20054957C /* libcxxreact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libcxxreact.a; + remoteRef = 7BFF942C1E5F10F20054957C /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7BFF942F1E5F10F20054957C /* libjschelpers.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libjschelpers.a; + remoteRef = 7BFF942E1E5F10F20054957C /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 7BFF94311E5F10F20054957C /* libjschelpers.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libjschelpers.a; + remoteRef = 7BFF94301E5F10F20054957C /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTText.a; + remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + E5E62BAA1FFA2FF40025960D /* libfishhook.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libfishhook.a; + remoteRef = E5E62BA91FFA2FF40025960D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + E5E62BAC1FFA2FF40025960D /* libfishhook-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libfishhook-tvOS.a"; + remoteRef = E5E62BAB1FFA2FF40025960D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + E5E62BBC1FFA2FF40025960D /* libthird-party.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libthird-party.a"; + remoteRef = E5E62BBB1FFA2FF40025960D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + E5E62BBE1FFA2FF40025960D /* libthird-party.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libthird-party.a"; + remoteRef = E5E62BBD1FFA2FF40025960D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + E5E62BC01FFA2FF40025960D /* libdouble-conversion.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libdouble-conversion.a"; + remoteRef = E5E62BBF1FFA2FF40025960D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + E5E62BC21FFA2FF40025960D /* libdouble-conversion.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libdouble-conversion.a"; + remoteRef = E5E62BC11FFA2FF40025960D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + E5E62BC41FFA2FF40025960D /* libprivatedata.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libprivatedata.a; + remoteRef = E5E62BC31FFA2FF40025960D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + E5E62BC61FFA2FF40025960D /* libprivatedata-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libprivatedata-tvOS.a"; + remoteRef = E5E62BC51FFA2FF40025960D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 00E356EC1AD99517003FC87E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F8E1A680F5B00A75B9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, + 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Bundle React Native code and images"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 00E356EA1AD99517003FC87E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 00E356F31AD99517003FC87E /* exampleTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 13B07F871A680F5B00A75B9A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, + 13B07FC11A68108700A75B9A /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 13B07F861A680F5B00A75B9A /* example */; + targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 13B07FB21A68108700A75B9A /* Base */, + ); + name = LaunchScreen.xib; + path = example; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 00E356F61AD99517003FC87E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = exampleTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/example"; + }; + name = Debug; + }; + 00E356F71AD99517003FC87E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + INFOPLIST_FILE = exampleTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.2; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/example"; + }; + name = Release; + }; + 13B07F941A680F5B00A75B9A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEAD_CODE_STRIPPING = NO; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../node_modules/react-native-navigation/ios/**", + ); + INFOPLIST_FILE = example/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ( + "-ObjC", + "-l\"c++\"", + ); + PRODUCT_NAME = example; + }; + name = Debug; + }; + 13B07F951A680F5B00A75B9A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "$(SRCROOT)/../node_modules/react-native-navigation/ios/**", + ); + INFOPLIST_FILE = example/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ( + "-ObjC", + "-l\"c++\"", + ); + PRODUCT_NAME = example; + }; + name = Release; + }; + 83CBBA201A601CBA00E9B192 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + OTHER_LDFLAGS = ""; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 83CBBA211A601CBA00E9B192 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "exampleTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 00E356F61AD99517003FC87E /* Debug */, + 00E356F71AD99517003FC87E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 13B07F941A680F5B00A75B9A /* Debug */, + 13B07F951A680F5B00A75B9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83CBBA201A601CBA00E9B192 /* Debug */, + 83CBBA211A601CBA00E9B192 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; +} diff --git a/example-react-native-navigation/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme b/example-react-native-navigation/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme new file mode 100644 index 0000000..eae9513 --- /dev/null +++ b/example-react-native-navigation/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example-react-native-navigation/ios/example.xcodeproj/xcshareddata/xcschemes/example_release.xcscheme b/example-react-native-navigation/ios/example.xcodeproj/xcshareddata/xcschemes/example_release.xcscheme new file mode 100644 index 0000000..fcc0daf --- /dev/null +++ b/example-react-native-navigation/ios/example.xcodeproj/xcshareddata/xcschemes/example_release.xcscheme @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example-react-native-navigation/ios/example/AppDelegate.h b/example-react-native-navigation/ios/example/AppDelegate.h new file mode 100644 index 0000000..a9654d5 --- /dev/null +++ b/example-react-native-navigation/ios/example/AppDelegate.h @@ -0,0 +1,16 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +@interface AppDelegate : UIResponder + +@property (nonatomic, strong) UIWindow *window; + +@end diff --git a/example-react-native-navigation/ios/example/AppDelegate.m b/example-react-native-navigation/ios/example/AppDelegate.m new file mode 100644 index 0000000..ec926a7 --- /dev/null +++ b/example-react-native-navigation/ios/example/AppDelegate.m @@ -0,0 +1,51 @@ +#import "AppDelegate.h" +#import + +// ********************************************** +// *** DON'T MISS: THE NEXT LINE IS IMPORTANT *** +// ********************************************** +#import "RCCManager.h" + +// IMPORTANT: if you're getting an Xcode error that RCCManager.h isn't found, you've probably ran "npm install" +// with npm ver 2. You'll need to "npm install" with npm 3 (see https://github.com/wix/react-native-navigation/issues/1) + +#import + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + NSURL *jsCodeLocation; +#ifdef DEBUG +// jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.bundle?platform=ios&dev=true"]; + jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; +#else + jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif + + + // ********************************************** + // *** DON'T MISS: THIS IS HOW WE BOOTSTRAP ***** + // ********************************************** + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + self.window.backgroundColor = [UIColor whiteColor]; + [[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation launchOptions:launchOptions]; + + /* + // original RN bootstrap - remove this part + RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation + moduleName:@"example" + initialProperties:nil + launchOptions:launchOptions]; + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + UIViewController *rootViewController = [UIViewController new]; + rootViewController.view = rootView; + self.window.rootViewController = rootViewController; + [self.window makeKeyAndVisible]; + */ + + + return YES; +} + +@end diff --git a/example-react-native-navigation/ios/example/Base.lproj/LaunchScreen.xib b/example-react-native-navigation/ios/example/Base.lproj/LaunchScreen.xib new file mode 100644 index 0000000..9e04807 --- /dev/null +++ b/example-react-native-navigation/ios/example/Base.lproj/LaunchScreen.xib @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example-react-native-navigation/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json b/example-react-native-navigation/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..118c98f --- /dev/null +++ b/example-react-native-navigation/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/example-react-native-navigation/ios/example/Info.plist b/example-react-native-navigation/ios/example/Info.plist new file mode 100644 index 0000000..3f1e7c1 --- /dev/null +++ b/example-react-native-navigation/ios/example/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + NSLocationWhenInUseUsageDescription + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + + diff --git a/example-react-native-navigation/ios/example/main.m b/example-react-native-navigation/ios/example/main.m new file mode 100644 index 0000000..3d767fc --- /dev/null +++ b/example-react-native-navigation/ios/example/main.m @@ -0,0 +1,18 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/example-react-native-navigation/ios/exampleTests/Info.plist b/example-react-native-navigation/ios/exampleTests/Info.plist new file mode 100644 index 0000000..886825c --- /dev/null +++ b/example-react-native-navigation/ios/exampleTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/example-react-native-navigation/ios/exampleTests/exampleTests.m b/example-react-native-navigation/ios/exampleTests/exampleTests.m new file mode 100644 index 0000000..96c0b6b --- /dev/null +++ b/example-react-native-navigation/ios/exampleTests/exampleTests.m @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import +#import + +#import +#import + +#define TIMEOUT_SECONDS 240 +#define TEXT_TO_LOOK_FOR @"Welcome to React Native!" + +@interface exampleTests : XCTestCase + +@end + +@implementation exampleTests + +- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test +{ + if (test(view)) { + return YES; + } + for (UIView *subview in [view subviews]) { + if ([self findSubviewInView:subview matching:test]) { + return YES; + } + } + return NO; +} + +- (void)testRendersWelcomeScreen +{ + UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; + NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; + BOOL foundElement = NO; + + __block NSString *redboxError = nil; + RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { + if (level >= RCTLogLevelError) { + redboxError = message; + } + }); + + while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { + [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + + foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { + if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { + return YES; + } + return NO; + }]; + } + + RCTSetLogFunction(RCTDefaultLogFunction); + + XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); + XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); +} + + +@end diff --git a/example-react-native-navigation/package.json b/example-react-native-navigation/package.json new file mode 100644 index 0000000..d8845e9 --- /dev/null +++ b/example-react-native-navigation/package.json @@ -0,0 +1,39 @@ +{ + "name": "example", + "version": "0.0.1", + "private": true, + "scripts": { + "postinstall": "node ./scripts/postinstall.js", + "start": "watchman watch-del-all && (adb reverse tcp:8081 tcp:8081 || true) && node node_modules/react-native/local-cli/cli.js start --reset-cache", + "xcode": "open ios/example.xcodeproj", + "android": "cd android && ./gradlew installDebug", + "e2e": "detox test --configuration ios.sim.debug", + "e2e-release": "detox test --configuration ios.sim.release" + }, + "dependencies": { + "react": "16.0.0", + "react-native": "0.53.0", + "react-native-animatable": "^1.1.0", + "react-native-navigation": "latest", + "react-native-touch-through-view": "https://github.com/simonhoss/react-native-touch-through-view.git" + }, + "devDependencies": { + "detox": "^5.0.0", + "mocha": "^3.4.2" + }, + "detox": { + "specs": "test/e2e", + "configurations": { + "ios.sim.debug": { + "binaryPath": "ios/DerivedData/example/Build/Products/Debug-iphonesimulator/example.app", + "type": "ios.simulator", + "name": "iPhone 6s" + }, + "ios.sim.release": { + "binaryPath": "ios/DerivedData/example/Build/Products/Release-iphonesimulator/example.app", + "type": "ios.simulator", + "name": "iPhone 6s" + } + } + } +} diff --git a/example-react-native-navigation/scripts/postinstall.js b/example-react-native-navigation/scripts/postinstall.js new file mode 100644 index 0000000..56b8b5c --- /dev/null +++ b/example-react-native-navigation/scripts/postinstall.js @@ -0,0 +1,3 @@ +const cp = require('child_process'); +cp.execSync(`rm -rf node_modules/react-native-navigation/node_modules`); +cp.execSync(`rm -rf node_modules/react-native-navigation/example `); diff --git a/example-react-native-navigation/src/app.js b/example-react-native-navigation/src/app.js new file mode 100644 index 0000000..d5d22d3 --- /dev/null +++ b/example-react-native-navigation/src/app.js @@ -0,0 +1,57 @@ +import {Platform} from 'react-native'; +import {Navigation} from 'react-native-navigation'; +import {registerScreens, registerScreenVisibilityListener} from './screens'; + + +// screen related book keeping +registerScreens(); +registerScreenVisibilityListener(); + +const tabs = [{ + label: 'Navigation', + screen: 'example.Types', + icon: require('../img/list.png'), + title: 'Navigation Types', +}, { + label: 'Actions', + screen: 'example.Actions', + icon: require('../img/swap.png'), + title: 'Navigation Actions', +}]; + +if (Platform.OS === 'android') { + tabs.push({ + label: 'Transitions', + screen: 'example.Transitions', + icon: require('../img/transform.png'), + title: 'Navigation Transitions', + }); +} + +// this will start our app +Navigation.startTabBasedApp({ + tabs, + animationType: Platform.OS === 'ios' ? 'slide-down' : 'fade', + tabsStyle: { + tabBarBackgroundColor: '#003a66', + tabBarButtonColor: '#ffffff', + tabBarSelectedButtonColor: '#ff505c', + tabFontFamily: 'BioRhyme-Bold', + }, + appStyle: { + tabBarBackgroundColor: '#003a66', + navBarButtonColor: '#ffffff', + tabBarButtonColor: '#ffffff', + navBarTextColor: '#ffffff', + tabBarSelectedButtonColor: '#ff505c', + navigationBarColor: '#003a66', + navBarBackgroundColor: '#003a66', + statusBarColor: '#002b4c', + tabFontFamily: 'BioRhyme-Bold', + }, + drawer: { + left: { + screen: 'example.Types.Drawer' + } + } +}); diff --git a/example-react-native-navigation/src/components/Row.js b/example-react-native-navigation/src/components/Row.js new file mode 100644 index 0000000..97e484b --- /dev/null +++ b/example-react-native-navigation/src/components/Row.js @@ -0,0 +1,48 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import {StyleSheet, View, Text, TouchableHighlight, Platform} from 'react-native'; + +class Row extends React.PureComponent { + render() { + const {title, onPress, onPressIn, platform, testID} = this.props; + if (platform && platform !== Platform.OS) { + return ; + } + + return ( + + + {title} + + + ); + } +} + +Row.propTypes = { + title: PropTypes.string.isRequired, + onPress: PropTypes.func.isRequired, + onPressIn: PropTypes.func +}; + +const styles = StyleSheet.create({ + row: { + height: 48, + paddingHorizontal: 16, + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + borderBottomWidth: 1, + borderBottomColor: 'rgba(0, 0, 0, 0.054)', + }, + text: { + fontSize: 16, + }, +}); + +export default Row; diff --git a/example-react-native-navigation/src/screens/Actions.js b/example-react-native-navigation/src/screens/Actions.js new file mode 100644 index 0000000..24f1673 --- /dev/null +++ b/example-react-native-navigation/src/screens/Actions.js @@ -0,0 +1,172 @@ +import React from 'react'; +import {StyleSheet, ScrollView} from 'react-native'; +import Row from '../components/Row'; + +class Actions extends React.Component { + + constructor(props) { + super(props); + + this._fab = false; + this._rightButton = null; + this._contextualMenu = false; + this._toggleTabs = 'shown'; + this._toggleNavBar = 'shown'; + this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent.bind(this)); + } + + onNavigatorEvent(event) { + if (event.id === 'contextualMenuDismissed') { + this._contextualMenu = false; + } + } + + setTitle = () => { + this.props.navigator.setTitle({ + title: 'New Title!' + }); + }; + + setSubtitle = () => { + this.props.navigator.setSubTitle({ + subtitle: 'New SubTitle!', + navigatorStyle: { + navBarSubtitleColor: 'red' + } + }); + }; + + toggleTabs = () => { + const to = this._toggleTabs === 'shown' ? 'hidden' : 'shown'; + + this.props.navigator.toggleTabs({ + to, + animated: true + }); + this._toggleTabs = to; + }; + + setTabBadge = () => { + this.props.navigator.setTabBadge({ + tabIndex: 1, + badge: Math.floor(Math.random() * 20) + 1 + }); + }; + + switchToTab = () => { + this.props.navigator.switchToTab({ + tabIndex: 0 + }); + }; + + toggleNavBar = () => { + const to = this._toggleNavBar === 'shown' ? 'hidden' : 'shown'; + + this.props.navigator.toggleNavBar({ + to, + animated: true + }); + this._toggleNavBar = to; + }; + + showSnackbar = () => { + this.props.navigator.showSnackbar({ + text: 'Woo Snacks!' + }); + }; + + toggleContextualMenu = () => { + if (!this._contextualMenu) { + this.props.navigator.showContextualMenu({ + rightButtons: [{ + title: 'Edit', + icon: require('../../img/edit.png') + }, { + title: 'Delete', + icon: require('../../img/delete.png') + }], + onButtonPressed: (index) => console.log(`Button ${index} tapped`) + }); + this._contextualMenu = true; + } else { + this.props.navigator.dismissContextualMenu(); + this._contextualMenu = false; + } + + }; + + setButtons = () => { + let title = ''; + + if (!this._rightButton) { + title = 'Hello'; + } else if (this._rightButton === 'Hello') { + title = 'Its Me'; + } + + this.props.navigator.setButtons({ + rightButtons: [{ + title, + id: 'topRight' + }], + animated: true + }); + this._rightButton = title; + }; + + toggleFAB = () => { + if (this._fab) { + this.props.navigator.setButtons({ + fab: {} + }); + this._fab = false; + } else { + this.props.navigator.setButtons({ + fab: { + collapsedId: 'share', + collapsedIcon: require('../../img/edit.png'), + expendedId: 'clear', + expendedIcon: require('../../img/edit.png'), + backgroundColor: '#ff505c', + actions: [ + { + id: 'mail', + icon: require('../../img/edit.png'), + backgroundColor: '#03A9F4' + }, + { + id: 'delete', + icon: require('../../img/delete.png'), + backgroundColor: '#4CAF50' + } + ] + }, + animated: true + }); + this._fab = true; + } + }; + + render() { + return ( + + + + + + + + + + + + + ); + } +} + +const styles = StyleSheet.create({ + container: {} +}); + +export default Actions; diff --git a/example-react-native-navigation/src/screens/NavigationTypes.js b/example-react-native-navigation/src/screens/NavigationTypes.js new file mode 100644 index 0000000..4973829 --- /dev/null +++ b/example-react-native-navigation/src/screens/NavigationTypes.js @@ -0,0 +1,169 @@ +import React from 'react'; +import {StyleSheet, ScrollView} from 'react-native'; +import Row from '../components/Row'; + +class NavigationTypes extends React.Component { + + constructor(props) { + super(props); + this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent.bind(this)); + } + + onNavigatorEvent(event) { + if (event.type === 'DeepLink') { + const parts = event.link.split('/'); + if (parts[0] === 'tab1') { + this.props.navigator.push({ + screen: parts[1] + }); + } + } + } + + toggleDrawer = () => { + this.props.navigator.toggleDrawer({ + side: 'left', + animated: true + }); + }; + + pushScreen = () => { + this.props.navigator.push({ + screen: 'example.Types.Push', + title: 'New Screen', + }); + }; + + previewScreen = () => { + this.props.navigator.push({ + screen: 'example.Types.Push', + title: 'New Screen', + previewCommit: true, + previewHeight: 250, + previewView: this.previewRef, + previewActions: [{ + id: 'action-cancel', + title: 'Cancel' + }, { + id: 'action-delete', + title: 'Delete', + actions: [{ + id: 'action-delete-sure', + title: 'Are you sure?', + style: 'destructive' + }] + }] + }); + }; + + pushListScreen = () => { + console.log('RANG', 'pushListScreen'); + this.props.navigator.push({ + screen: 'example.Types.ListScreen', + title: 'List Screen', + }); + }; + + pushCustomTopBarScreen = () => { + this.props.navigator.push({ + screen: 'example.Types.CustomTopBarScreen' + }); + }; + + pushCustomButtonScreen = () => { + this.props.navigator.push({ + screen: 'example.Types.CustomButtonScreen', + title: 'Custom Buttons' + }); + }; + + pushTopTabsScreen = () => { + this.props.navigator.push({ + screen: 'example.Types.TopTabs', + title: 'Top Tabs', + topTabs: [{ + screenId: 'example.Types.TopTabs.TabOne', + title: 'Tab One', + }, { + screenId: 'example.Types.TopTabs.TabTwo', + title: 'Tab Two', + }], + }); + }; + + showModal = () => { + this.props.navigator.showModal({ + screen: 'example.Types.Modal', + title: 'Modal', + }); + }; + + showLightBox = () => { + this.props.navigator.showLightBox({ + screen: "example.Types.LightBox", + passProps: { + title: 'LightBox', + content: 'Hey there, I\'m a light box screen :D', + onClose: this.dismissLightBox, + }, + style: { + backgroundBlur: 'dark', + backgroundColor: 'rgba(0, 0, 0, 0.7)', + tapBackgroundToDismiss: true + } + }); + }; + + dismissLightBox = () => { + this.props.navigator.dismissLightBox(); + }; + + showInAppNotification = () => { + this.props.navigator.showInAppNotification({ + screen: 'example.Types.Notification', + }); + }; + + render() { + return ( + + + + (this.previewRef = ref)} + title={'Preview Screen'} + testID={'previewScreen'} + onPress={this.pushScreen} + onPressIn={this.previewScreen} + /> + {/**/} + + + + + + + + ); + } +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + }, + row: { + height: 48, + paddingHorizontal: 16, + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + borderBottomWidth: 1, + borderBottomColor: 'rgba(0, 0, 0, 0.054)', + }, + text: { + fontSize: 16, + }, +}); + +export default NavigationTypes; diff --git a/example-react-native-navigation/src/screens/Transitions.js b/example-react-native-navigation/src/screens/Transitions.js new file mode 100644 index 0000000..ff5d418 --- /dev/null +++ b/example-react-native-navigation/src/screens/Transitions.js @@ -0,0 +1,37 @@ +import React from 'react'; +import {StyleSheet, ScrollView, Text} from 'react-native'; +import Row from '../components/Row'; + +class Transitions extends React.Component { + + showCollapsingHeader = () => { + this.props.navigator.showModal({ + title: 'Collapsing Header', + screen: 'example.Transitions.CollapsingHeader', + }); + }; + + showSharedElementTransitions = () => { + this.props.navigator.showModal({ + title: 'Shared Element Transition Examples', + screen: 'example.Transitions.SharedElementTransitions', + }); + }; + + render() { + return ( + + + + + ); + } +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + }, +}); + +export default Transitions; diff --git a/example-react-native-navigation/src/screens/index.js b/example-react-native-navigation/src/screens/index.js new file mode 100644 index 0000000..38d6696 --- /dev/null +++ b/example-react-native-navigation/src/screens/index.js @@ -0,0 +1,63 @@ +import {Navigation, ScreenVisibilityListener} from 'react-native-navigation'; + +import Types from './NavigationTypes'; +import Actions from './Actions'; +import Transitions from './Transitions'; + +import Push from './types/Push'; +import Drawer from './types/Drawer'; +import ListScreen from './types/ListScreen'; +import DummyScreen from './types/DummyScreen'; +import LightBox from './types/LightBox'; +import Notification from './types/Notification'; +import Modal from './types/Modal'; +import CustomTopBarScreen from './types/CustomTopBarScreen'; +import CustomButtonScreen from './types/CustomButtonScreen'; +import TopTabs from './types/TopTabs'; +import TabOne from './types/tabs/TabOne'; +import TabTwo from './types/tabs/TabTwo'; + +import CollapsingHeader from './transitions/CollapsingHeader'; +import SharedElementTransitions from './transitions/SharedElementTransitions'; + +import Cards from './transitions/sharedElementTransitions/Cards/Cards'; +import CardsInfo from './transitions/sharedElementTransitions/Cards/Info'; + +import Masonry from './transitions/sharedElementTransitions/Masonry/Masonry'; +import MasonryItem from './transitions/sharedElementTransitions/Masonry/Item'; + +export function registerScreens() { + Navigation.registerComponent('example.Types', () => Types); + Navigation.registerComponent('example.Actions', () => Actions); + Navigation.registerComponent('example.Transitions', () => Transitions); + + Navigation.registerComponent('example.Types.Push', () => Push); + Navigation.registerComponent('example.Types.Drawer', () => Drawer); + Navigation.registerComponent('example.Types.Screen', () => Drawer); + Navigation.registerComponent('example.Types.ListScreen', () => ListScreen); + Navigation.registerComponent('example.Types.DummyScreen', () => DummyScreen); + Navigation.registerComponent('example.Types.Modal', () => Modal); + Navigation.registerComponent('example.Types.LightBox', () => LightBox); + Navigation.registerComponent('example.Types.Notification', () => Notification); + Navigation.registerComponent('example.Types.CustomTopBarScreen', () => CustomTopBarScreen); + Navigation.registerComponent('example.Types.CustomButtonScreen', () => CustomButtonScreen); + Navigation.registerComponent('example.Types.TopTabs', () => TopTabs); + Navigation.registerComponent('example.Types.TopTabs.TabOne', () => TabOne); + Navigation.registerComponent('example.Types.TopTabs.TabTwo', () => TabTwo); + + Navigation.registerComponent('example.Transitions.CollapsingHeader', () => CollapsingHeader); + Navigation.registerComponent('example.Transitions.SharedElementTransitions', () => SharedElementTransitions); + Navigation.registerComponent('example.Transitions.SharedElementTransitions.Cards', () => Cards); + Navigation.registerComponent('example.Transitions.SharedElementTransitions.Cards.Info', () => CardsInfo); + Navigation.registerComponent('example.Transitions.SharedElementTransitions.Masonry', () => Masonry); + Navigation.registerComponent('example.Transitions.SharedElementTransitions.Masonry.Item', () => MasonryItem); +} + +export function registerScreenVisibilityListener() { + new ScreenVisibilityListener({ + willAppear: ({screen}) => console.log(`Displaying screen ${screen}`), + didAppear: ({screen, startTime, endTime, commandType}) => console.log('screenVisibility', `Screen ${screen} displayed in ${endTime - startTime} millis [${commandType}]`), + willDisappear: ({screen}) => console.log(`Screen will disappear ${screen}`), + didDisappear: ({screen}) => console.log(`Screen disappeared ${screen}`) + }).register(); +} diff --git a/example-react-native-navigation/src/screens/transitions/CollapsingHeader.js b/example-react-native-navigation/src/screens/transitions/CollapsingHeader.js new file mode 100644 index 0000000..93c3de3 --- /dev/null +++ b/example-react-native-navigation/src/screens/transitions/CollapsingHeader.js @@ -0,0 +1,35 @@ +import React from 'react'; +import {StyleSheet, View, Text, ScrollView} from 'react-native'; + +class CollapsingHeader extends React.Component { + + static navigatorStyle = { + drawUnderTabBar: true, + navBarButtonColor: '#ffffff', + navBarTextColor: '#ffffff', + collapsingToolBarImage: require('../../../img/gyro_header.jpg'), + collapsingToolBarCollapsedColor: '#0f2362', + navBarBackgroundColor: '#eeeeee' + }; + + render() { + return ( + + + {[...new Array(40)].map((a, index) => ( + Row {index} + ))} + + + ); + } +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: '#fff', + }, +}); + +export default CollapsingHeader; diff --git a/example-react-native-navigation/src/screens/transitions/SharedElementTransitions.js b/example-react-native-navigation/src/screens/transitions/SharedElementTransitions.js new file mode 100644 index 0000000..1d44fde --- /dev/null +++ b/example-react-native-navigation/src/screens/transitions/SharedElementTransitions.js @@ -0,0 +1,46 @@ +import React from 'react'; +import {StyleSheet, ScrollView, Text} from 'react-native'; +import Row from '../../components/Row'; + +class Transitions extends React.Component { + + showCardsExample = () => { + this.props.navigator.showModal({ + title: 'Cards', + screen: 'example.Transitions.SharedElementTransitions.Cards', + }); + }; + + showProfileExample = () => { + this.props.navigator.showModal({ + title: 'Profiles', + screen: 'example.Transitions.SharedElementTransitions.Profiles', + }); + }; + + showMasonryExample = () => { + this.props.navigator.showModal({ + title: 'Masonry', + screen: 'example.Transitions.SharedElementTransitions.Masonry', + }); + }; + + render() { + return ( + + + {/**/} + + + ); + } +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: '#ffffff', + }, +}); + +export default Transitions; diff --git a/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Cards/Cards.js b/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Cards/Cards.js new file mode 100644 index 0000000..3c2eb91 --- /dev/null +++ b/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Cards/Cards.js @@ -0,0 +1,106 @@ +import React from 'react'; +import {ScrollView, TouchableHighlight, StyleSheet, Image, Text, View, ScrolView} from 'react-native'; +import {SharedElementTransition} from 'react-native-navigation'; + +const IMAGE_HEIGHT = 190; + +class CardScreen extends React.Component { + + goToCard = (index) => { + this.props.navigator.push({ + screen: 'example.Transitions.SharedElementTransitions.Cards.Info', + sharedElements: [`image${index}`], + animated: false, + overrideBackPress: true, + passProps: { + sharedImageId: `image${index}` + } + }) + }; + + _renderCard(index) { + return ( + + this.goToCard(index)} + > + + {this._renderImage(index)} + {this._renderCardContent()} + + + + ); + } + + _renderImage(index) { + return ( + + + + ); + } + + _renderCardContent() { + return ( + + This is a title + This is a very long long long long long long long long long long content + + ); + } + + render() { + return ( + + {this._renderCard(0)} + {this._renderCard(1)} + {this._renderCard(2)} + + ); + } +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: '#ffffff', + }, + content: { + marginHorizontal: 8, + }, + cardContainer: { + marginVertical: 8, + elevation: 2, + borderRadius: 2, + backgroundColor: '#F5F5F5' + }, + imageContainer: { + justifyContent: 'flex-start' + }, + image: { + height: IMAGE_HEIGHT, + borderTopLeftRadius: 2, + borderTopRightRadius: 2 + }, + cardContentContainer: { + padding: 8 + }, + title: { + fontWeight: '500', + paddingBottom: 8, + fontSize: 17 + }, +}); + +export default CardScreen; diff --git a/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Cards/Info.js b/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Cards/Info.js new file mode 100644 index 0000000..d43fb81 --- /dev/null +++ b/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Cards/Info.js @@ -0,0 +1,123 @@ +import React, {Component} from 'react'; +import { + ScrollView, + TouchableOpacity, + StyleSheet, + Image, + Text, + View, + Platform, + ScrolView +} from 'react-native'; +import {SharedElementTransition} from 'react-native-navigation'; +import * as Animatable from 'react-native-animatable'; + +const SHOW_DURATION = 400; +const HIDE_DURATION = 300; + +class InfoScreen extends Component { + + constructor(props) { + super(props); + this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent.bind(this)); + this.state = { + animationType: 'fadeInRight', + animationDuration: SHOW_DURATION + } + } + + onNavigatorEvent(event) { + if (event.id === 'backPress') { + this.setState({ + animationType: 'fadeOutRight', + animationDuration: HIDE_DURATION + }); + this.props.navigator.pop(); + } + } + + render() { + return ( + + {this._renderImage()} + {this._renderContent()} + + ); + } + + _renderImage() { + return ( + + + + ); + } + + _renderContent() { + return ( + + Line 1 + Line 2 + Line 3 + Line 4 + Line 5 + Line 6 + Line 7 + Line 8 + + ); + } +} + +const styles = StyleSheet.create({ + container: { + flex: 1 + }, + content: { + flex: 1, + marginTop: 190, + backgroundColor: 'white' + }, + imageContainer: { + position: 'absolute', + top: 0, + left: 0, + right: 0, + }, + image: { + height: 190 + }, + text: { + fontSize: 17, + paddingVertical: 4, + paddingLeft: 8 + } +}); + +export default InfoScreen; diff --git a/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Masonry/Item.js b/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Masonry/Item.js new file mode 100644 index 0000000..1996e86 --- /dev/null +++ b/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Masonry/Item.js @@ -0,0 +1,54 @@ +import React from 'react'; +import {StyleSheet, View, Text, Image} from 'react-native'; +import {SharedElementTransition} from 'react-native-navigation'; + +const SHOW_DURATION = 240; +const HIDE_DURATION = 200; + +class Item extends React.Component { + + static navigatorStyle = { + navBarHidden: true, + drawUnderNavBar: true + }; + + render() { + return ( + + + + + + ); + } +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: '#ffffff', + justifyContent: 'center', + }, + image: { + width: 400, + height: 400, + } +}); + +export default Item; diff --git a/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Masonry/Masonry.js b/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Masonry/Masonry.js new file mode 100644 index 0000000..310f9f8 --- /dev/null +++ b/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Masonry/Masonry.js @@ -0,0 +1,98 @@ +import React from 'react'; +import {StyleSheet, View, Text, PixelRatio, FlatList, Image, TouchableHighlight} from 'react-native'; +import {Navigation, SharedElementTransition} from 'react-native-navigation'; + +import images from './images'; + +const ROW_HEIGHT = 650; +const COLS = 2; + +class Masonry extends React.Component { + + onAssetPress = (image, key) => { + this.props.navigator.push({ + screen: 'example.Transitions.SharedElementTransitions.Masonry.Item', + sharedElements: [key], + passProps: { + image, + sharedImageId: key, + }, + }); + }; + + renderAsset = (asset, row, column, index) => { + const key = `row_${row}_column_${column}_asset_${index}`; + + return ( + { + this.onAssetPress(asset.source, key); + }} + style={[styles.assetContainer, {flex: asset.weight}]} + > + + + + + + + ); + }; + + renderItem = ({item, index}) => { + return ( + + {[...new Array(COLS)].map((column, columnIndex) => ( + + {item.images[columnIndex].map((asset, assetIndex) => this.renderAsset(asset, index, columnIndex, assetIndex))} + + ))} + + ); + }; + + render() { + return ( + + ({length: ROW_HEIGHT, offset: ROW_HEIGHT * index, index})} + /> + + ); + } +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: '#ffffff', + }, + item: { + flex: 1, + flexDirection: 'row', + }, + assetContainer: { + margin: 5, + borderRadius: 6, + borderWidth: StyleSheet.hairlineWidth, + }, + asset: { + flex: 1, + borderRadius: 6, + }, +}); + +export default Masonry; diff --git a/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Masonry/images.js b/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Masonry/images.js new file mode 100644 index 0000000..91acdff --- /dev/null +++ b/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Masonry/images.js @@ -0,0 +1,100 @@ +const images = [ + require('../../../../../img/masonry/Cfw87359UT.jpeg'), + require('../../../../../img/masonry/a848dHxA4e.jpeg'), + require('../../../../../img/masonry/AdGXmD1CH6.jpeg'), + require('../../../../../img/masonry/5Gi8kova3k.jpeg'), + require('../../../../../img/masonry/ri90ueind7.jpeg'), + require('../../../../../img/masonry/kVN0FryOZk.jpeg'), + require('../../../../../img/masonry/v8KLi2f0Tr.jpeg'), + require('../../../../../img/masonry/xU42hx19BB.jpeg'), + require('../../../../../img/masonry/61mpAVRV73.jpeg'), + require('../../../../../img/masonry/pqgylg80SD.jpeg'), + require('../../../../../img/masonry/37r6Cqp1B8.jpeg'), + require('../../../../../img/masonry/N30E32431C.jpeg'), + require('../../../../../img/masonry/rVOcz7rd0z.jpeg'), + require('../../../../../img/masonry/A4g0lZ33Z8.jpeg'), + require('../../../../../img/masonry/j51Pva1P8L.jpeg'), + require('../../../../../img/masonry/158xD4xbeh.jpeg'), +]; + +function randomImage() { + return images[Math.floor(Math.random() * images.length)]; +} + +export default [ + { + key: 1, + images: [[{ + weight: 2, + source: randomImage(), + }, { + weight: 1, + source: randomImage(), + }, { + weight: 3, + source: randomImage(), + }], [{ + weight: 1, + source: randomImage(), + }, { + weight: 3, + source: randomImage(), + }, { + weight: 1, + source: randomImage(), + }, { + weight: 1, + source: randomImage(), + }]], + }, + { + key: 2, + images: [[{ + weight: 1, + source: randomImage(), + }, { + weight: 1, + source: randomImage(), + }, { + weight: 1, + source: randomImage(), + }, { + weight: 3, + source: randomImage(), + }], [{ + weight: 3, + source: randomImage(), + }, { + weight: 3, + source: randomImage(), + }]], + }, + { + key: 3, + images: [[{ + weight: 1, + source: randomImage(), + }, { + weight: 2, + source: randomImage(), + }, { + weight: 1, + source: randomImage(), + }, { + weight: 2, + source: randomImage(), + }], [{ + weight: 2, + source: randomImage(), + }, { + weight: 1, + source: randomImage(), + }, { + weight: 2, + source: randomImage(), + }, { + weight: 1, + source: randomImage(), + }]], + } +]; diff --git a/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Profiles/Profiles.js b/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Profiles/Profiles.js new file mode 100644 index 0000000..b28edeb --- /dev/null +++ b/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Profiles/Profiles.js @@ -0,0 +1,213 @@ +import React, {Component} from 'react'; +import { + ScrollView, + TouchableOpacity, + StyleSheet, + Image, + Text, + View, + ScrolView +} from 'react-native'; +import {SharedElementTransition} from 'react-native-navigation'; +import * as Animatable from 'react-native-animatable'; + +const FADE_DURATION = 500; +const SHOW_DURATION = 500; +const HIDE_DURATION = 500; + +const ICON_MARGIN = 24; + +class Profiles extends Component { + + constructor(props) { + super(props); + this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent.bind(this)); + this.state = { + animationType: 'fadeIn' + } + } + + componentDidMount() { + if (__STRESS_TEST__) { + setTimeout(() => { + this.setState({ + animationType: 'fadeOut' + }); + this.props.navigator.pop(); + }, 650); + } + } + + onNavigatorEvent(event) { + if (event.id === 'backPress') { + this.setState({ + animationType: 'fadeOut' + }); + this.props.navigator.pop(); + } + } + + _renderHeader() { + return ( + + + + {this._renderIcon()} + {this._renderTitle()} + + + ); + } + + _renderTitle() { + return ( + + + {this.props.title} + + + ); + } + + _renderContent() { + return ( + + + {this._genRows()} + + + ); + } + + _genRows() { + const children = []; + for (let ii = 0; ii < 30; ii++) { + children.push( + {'row ' + ii} + ); + } + return children; + } + + _renderIcon() { + return ( + + + + ); + } + + render() { + return ( + + {this._renderHeader()} + {this._renderContent()} + + ); + } + +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + flexDirection: 'column', + backgroundColor: 'transparent' + }, + header: { + height: 110, + flexDirection: 'column-reverse' + }, + titleContainer: { + marginLeft: ICON_MARGIN + 90 + +16, + marginBottom: 8 + }, + title: { + fontSize: 23, + }, + iconContainer: { + position: 'absolute', + bottom: -ICON_MARGIN, + left: ICON_MARGIN + }, + heroIcon: { + width: 90, + height: 90, + resizeMode: 'contain' + }, + body: { + flex: 4, + backgroundColor: 'white', + }, + list: { + marginTop: 16, + marginHorizontal: 8 + } +}); + +export default Profiles; diff --git a/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Profiles/data.js b/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Profiles/data.js new file mode 100644 index 0000000..a8a5fdc --- /dev/null +++ b/example-react-native-navigation/src/screens/transitions/sharedElementTransitions/Profiles/data.js @@ -0,0 +1,32 @@ +export default heroes = [ + { + title: 'Bounty Hunter', + icon: require('../../../../../img/heroes/bouny_hunter.png'), + primaryColor: '#f0cb3c', + titleColor: '#993825' + }, + { + title: 'Templar Assasin', + icon: require('../../../../../img/heroes/templar_assasin.png'), + primaryColor: '#f6f6f6', + titleColor: 'red', + }, + { + title: 'Oracle', + icon: require('../../../../../img/heroes/oracle.png'), + primaryColor: '#19b0b9', + titleColor: '#a2195b' + }, + { + title: 'Earthspirit', + icon: require('../../../../../img/heroes/earthspirit.png'), + primaryColor: '#819c97', + titleColor: 'red', + }, + { + title: 'Skywrath Mage', + icon: require('../../../../../img/heroes/skywrath_mage.png'), + primaryColor: '#dfb42e', + titleColor: '#1e5ea6' + } +]; diff --git a/example-react-native-navigation/src/screens/types/CustomButtonScreen.js b/example-react-native-navigation/src/screens/types/CustomButtonScreen.js new file mode 100644 index 0000000..162adbf --- /dev/null +++ b/example-react-native-navigation/src/screens/types/CustomButtonScreen.js @@ -0,0 +1,75 @@ +import React from 'react'; +import { + View, + StyleSheet, + Text, + TouchableOpacity, + Button +} from 'react-native'; +import {Navigation} from 'react-native-navigation'; + +let navigator; +const CustomButton = ({text}) => + navigator.pop()} + > + + {text} + + ; +Navigation.registerComponent('CustomButton', () => CustomButton); + +export default class CustomButtonScreen extends React.Component { + static navigatorButtons = { + rightButtons: [ + { + id: 'custom-button', + component: 'CustomButton', + passProps: { + text: 'Hi!' + } + } + ] + }; + + componentWillMount() { + navigator = this.props.navigator; + } + + render() { + return ( + + Custom Left Button + + ); + } + + componentWillUnmount() { + navigator = null; + } +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + backgroundColor: 'white' + }, + buttonContainer: { + width: 48, + height: 48, + justifyContent: 'center', + alignItems: 'center' + }, + button: { + backgroundColor: 'tomato', + width: 34, + height: 34, + borderRadius: 34 / 2, + overflow: 'hidden', + justifyContent: 'center', + alignItems: 'center' + } +}); diff --git a/example-react-native-navigation/src/screens/types/CustomTopBar.js b/example-react-native-navigation/src/screens/types/CustomTopBar.js new file mode 100644 index 0000000..0e12374 --- /dev/null +++ b/example-react-native-navigation/src/screens/types/CustomTopBar.js @@ -0,0 +1,47 @@ +import React, {Component} from 'react'; +import { + StyleSheet, + View, + TouchableOpacity, + Text, + Alert, + Platform +} from 'react-native'; + +export default class CustomTopBar extends Component { + + constructor(props) { + super(props); + this.state = {}; + } + + render() { + return ( + + Alert.alert(this.props.title, 'Hello custom btn :)') }> + Custom + + + ); + } +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + // backgroundColor: 'yellow' + }, + button: { + alignSelf: 'center', + // backgroundColor: 'green' + }, + text: { + alignSelf: 'center', + color: 'white' + } +}); + + + diff --git a/example-react-native-navigation/src/screens/types/CustomTopBarScreen.js b/example-react-native-navigation/src/screens/types/CustomTopBarScreen.js new file mode 100644 index 0000000..3aad405 --- /dev/null +++ b/example-react-native-navigation/src/screens/types/CustomTopBarScreen.js @@ -0,0 +1,67 @@ +import React, {Component} from 'react'; +import { + View, + StyleSheet, + Text +} from 'react-native'; +import {Navigation} from 'react-native-navigation'; +import CustomTopBar from './CustomTopBar'; + +Navigation.registerComponent('example.CustomTopBar', () => CustomTopBar); + +export default class CustomTopBarScreen extends Component { + + static navigatorButtons = { + leftButtons: [ + { + title: 'Back', + id: 'helloBtn', + } + ], + rightButtons: [ + { + title: 'Right', + id: 'helloBtn2', + } + ], + }; + + componentDidMount() { + this.props.navigator.setStyle({ + navBarCustomView: 'example.CustomTopBar', + navBarComponentAlignment: 'center', + navBarCustomViewInitialProps: { + title: 'Hi Custom', + navigator: this.props.navigator, + }, + }); + this.props.navigator.setOnNavigatorEvent((e) => { + if (e.type == 'NavBarButtonPress') { // this is the event type for button presses + if (e.id == 'helloBtn') { // this is the same id field from the static navigatorButtons definition + this.props.navigator.pop(); + // alert('Hello left btn'); + } + if (e.id == 'helloBtn2') { // this is the same id field from the static navigatorButtons definition + alert('Hello right btn'); + } + } + }); + } + + render() { + return ( + + Custom component in TopBar + + ); + } +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + backgroundColor: 'white' + } +}); diff --git a/example-react-native-navigation/src/screens/types/Drawer.js b/example-react-native-navigation/src/screens/types/Drawer.js new file mode 100644 index 0000000..4d7cc39 --- /dev/null +++ b/example-react-native-navigation/src/screens/types/Drawer.js @@ -0,0 +1,58 @@ +import React from 'react'; +import {StyleSheet, View, Button} from 'react-native'; + +class MyClass extends React.Component { + + onShowModal = () => { + this.toggleDrawer(); + this.props.navigator.showModal({ + screen: 'example.Types.Modal', + title: `Modal` + }); + }; + + onPushToFirstTab = () => { + this.toggleDrawer(); + this.props.navigator.handleDeepLink({ + link: 'tab1/example.Types.Push' + }); + }; + + toggleDrawer = () => { + this.props.navigator.toggleDrawer({ + side: 'left' + }); + }; + + render() { + return ( + + + + + ); + })} + + + + ); + } +} + +function getRandomColor(index) { + return Colors[index % Colors.length]; +} + +const styles = StyleSheet.create({ + cellContainer: { + flex: 1, + paddingVertical: 30, + } +}); + + + +module.exports = ListScreen; \ No newline at end of file diff --git a/example-react-native-navigation/src/screens/types/Modal.js b/example-react-native-navigation/src/screens/types/Modal.js new file mode 100644 index 0000000..d645900 --- /dev/null +++ b/example-react-native-navigation/src/screens/types/Modal.js @@ -0,0 +1,109 @@ +import React, {Component} from 'react'; +import {StyleSheet, View, Text, Button, TouchableOpacity, Platform} from 'react-native'; +import {Navigation} from 'react-native-navigation'; + +const CloseModalButton = ({text}) => + navigator.dismissModal()} +> + + {text} + +; +Navigation.registerComponent('CloseModalButton', () => CloseModalButton); + +class Modal extends Component { + static navigatorButtons = { + rightButtons: [ + { + id: 'close-modal-button', + component: Platform.OS === 'ios' ? 'CloseModalButton' : null, + passProps: { + text: 'Close' + } + } + ] + }; + + componentWillMount() { + navigator = this.props.navigator; + } + + onPushScreen = () => { + this.props.navigator.push({ + screen: 'example.Types.Modal', + title: `Screen ${this.props.count || 1}`, + passProps: { + count: this.props.count ? this.props.count + 1 : 2 + } + }); + }; + + onResetTo = () => { + this.props.navigator.resetTo({ + screen: 'example.Types.Modal', + icon: require('../../../img/list.png'), + title: 'Modal' + }); + }; + + onPopToRoot = () => { + this.props.navigator.popToRoot(); + }; + + render() { + return ( + + Modal Screen + +