├── .flowconfig
├── .gitignore
├── .watchmanconfig
├── Peekable.ios.js
├── PreviewView.ios.js
├── android
├── app
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── peekpopattempt
│ │ │ └── MainActivity.java
│ │ └── res
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── index.android.js
├── index.ios.js
├── ios
├── PeekPopAttempt.xcodeproj
│ ├── project.pbxproj
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── PeekPopAttempt.xcscheme
├── PeekPopAttempt
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Base.lproj
│ │ └── LaunchScreen.xib
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── RNPreviewView.h
│ ├── RNPreviewView.m
│ ├── RNPreviewViewController.h
│ ├── RNPreviewViewController.m
│ ├── RNPreviewViewManager.h
│ ├── RNPreviewViewManager.m
│ ├── RootViewController.h
│ ├── RootViewController.m
│ └── main.m
├── PeekPopAttemptTests
│ ├── Info.plist
│ └── PeekPopAttemptTests.m
└── main.jsbundle
└── package.json
/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 |
3 | # We fork some components by platform.
4 | .*/*.web.js
5 | .*/*.android.js
6 |
7 | # Some modules have their own node_modules with overlap
8 | .*/node_modules/node-haste/.*
9 |
10 | # Ignore react-tools where there are overlaps, but don't ignore anything that
11 | # react-native relies on
12 | .*/node_modules/react-tools/src/React.js
13 | .*/node_modules/react-tools/src/renderers/shared/event/EventPropagators.js
14 | .*/node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
15 | .*/node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js
16 |
17 |
18 | # Ignore commoner tests
19 | .*/node_modules/commoner/test/.*
20 |
21 | # See https://github.com/facebook/flow/issues/442
22 | .*/react-tools/node_modules/commoner/lib/reader.js
23 |
24 | # Ignore jest
25 | .*/react-native/node_modules/jest-cli/.*
26 |
27 | [include]
28 |
29 | [libs]
30 | node_modules/react-native/Libraries/react-native/react-native-interface.js
31 |
32 | [options]
33 | module.system=haste
34 |
35 | munge_underscores=true
36 |
37 | suppress_type=$FlowIssue
38 | suppress_type=$FlowFixMe
39 | suppress_type=$FixMe
40 |
41 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-4]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
42 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-4]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
43 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
44 |
45 | [version]
46 | 0.14.0
47 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # node.js
26 | #
27 | node_modules/
28 | npm-debug.log
29 |
--------------------------------------------------------------------------------
/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/Peekable.ios.js:
--------------------------------------------------------------------------------
1 | var React = require('react-native');
2 | var {
3 | AppRegistry,
4 | StyleSheet,
5 | Text,
6 | View,
7 | PropTypes,
8 | TouchableWithoutFeedback,
9 | NativeModules,
10 | } = React;
11 |
12 | var Peekable = {};
13 |
14 | var PREVIEW_REF = 'peekable-preview';
15 |
16 | Peekable.Preview = require('./PreviewView');
17 |
18 | Peekable.View = React.createClass({
19 | propTypes: {
20 | renderPreview: PropTypes.func,
21 | onPop: PropTypes.func,
22 | ...View.propTypes,
23 | },
24 |
25 | render() {
26 | let preview = (
27 |
28 | {this.props.renderPreview()}
29 |
30 | );
31 |
32 | return (
33 |
34 | { this._root = view; }}>
35 | {this.props.children}
36 | {preview}
37 |
38 |
39 | )
40 | },
41 |
42 | _handlePressIn() {
43 | this.refs[PREVIEW_REF].activate({
44 | sourceView: React.findNodeHandle(this._root)
45 | });
46 | },
47 | });
48 |
49 | module.exports = Peekable;
50 |
--------------------------------------------------------------------------------
/PreviewView.ios.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var React = require('react-native');
4 | var {
5 | View,
6 | PropTypes,
7 | StyleSheet,
8 | NativeModules,
9 | requireNativeComponent,
10 | } = React;
11 | var { RNPreviewViewManager } = NativeModules;
12 |
13 | var RN_PREVIEW_VIEW_REF = 'native-preview-view-ref';
14 |
15 | var PreviewView = React.createClass({
16 | propTypes: {
17 | onPop: PropTypes.func,
18 | },
19 |
20 | activate({sourceView}) {
21 | RNPreviewViewManager.setSourceView(sourceView);
22 | RNPreviewViewManager.activate(this.getRootNodeHandle());
23 | },
24 |
25 | getRootNodeHandle() {
26 | return React.findNodeHandle(this.refs[RN_PREVIEW_VIEW_REF]);
27 | },
28 |
29 | render() {
30 | return (
31 |
32 | {React.Children.map(this.props.children, React.addons.cloneWithProps)}
33 |
34 | );
35 | },
36 | });
37 |
38 | var RNPreviewView = requireNativeComponent('RNPreviewView', PreviewView);
39 |
40 | module.exports = PreviewView;
41 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.1"
6 |
7 | defaultConfig {
8 | applicationId "com.peekpopattempt"
9 | minSdkVersion 16
10 | targetSdkVersion 22
11 | versionCode 1
12 | versionName "1.0"
13 | ndk {
14 | abiFilters "armeabi-v7a", "x86"
15 | }
16 | }
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 | }
24 |
25 | dependencies {
26 | compile fileTree(dir: 'libs', include: ['*.jar'])
27 | compile 'com.android.support:appcompat-v7:23.0.0'
28 | compile 'com.facebook.react:react-native:0.11.+'
29 | }
30 |
--------------------------------------------------------------------------------
/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
11 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/peekpopattempt/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.peekpopattempt;
2 |
3 | import android.app.Activity;
4 | import android.os.Bundle;
5 | import android.view.KeyEvent;
6 |
7 | import com.facebook.react.LifecycleState;
8 | import com.facebook.react.ReactInstanceManager;
9 | import com.facebook.react.ReactRootView;
10 | import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
11 | import com.facebook.react.shell.MainReactPackage;
12 | import com.facebook.soloader.SoLoader;
13 |
14 | public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {
15 |
16 | private ReactInstanceManager mReactInstanceManager;
17 | private ReactRootView mReactRootView;
18 |
19 | @Override
20 | protected void onCreate(Bundle savedInstanceState) {
21 | super.onCreate(savedInstanceState);
22 | mReactRootView = new ReactRootView(this);
23 |
24 | mReactInstanceManager = ReactInstanceManager.builder()
25 | .setApplication(getApplication())
26 | .setBundleAssetName("index.android.bundle")
27 | .setJSMainModuleName("index.android")
28 | .addPackage(new MainReactPackage())
29 | .setUseDeveloperSupport(BuildConfig.DEBUG)
30 | .setInitialLifecycleState(LifecycleState.RESUMED)
31 | .build();
32 |
33 | mReactRootView.startReactApplication(mReactInstanceManager, "PeekPopAttempt", null);
34 |
35 | setContentView(mReactRootView);
36 | }
37 |
38 | @Override
39 | public boolean onKeyUp(int keyCode, KeyEvent event) {
40 | if (keyCode == KeyEvent.KEYCODE_MENU && mReactInstanceManager != null) {
41 | mReactInstanceManager.showDevOptionsDialog();
42 | return true;
43 | }
44 | return super.onKeyUp(keyCode, event);
45 | }
46 |
47 | @Override
48 | public void invokeDefaultOnBackPressed() {
49 | super.onBackPressed();
50 | }
51 |
52 | @Override
53 | protected void onPause() {
54 | super.onPause();
55 |
56 | if (mReactInstanceManager != null) {
57 | mReactInstanceManager.onPause();
58 | }
59 | }
60 |
61 | @Override
62 | protected void onResume() {
63 | super.onResume();
64 |
65 | if (mReactInstanceManager != null) {
66 | mReactInstanceManager.onResume(this);
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brentvatne/PeekPopAttempt/4137f76eec5972bfd9cd95b2cc08b703aa53cf3b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brentvatne/PeekPopAttempt/4137f76eec5972bfd9cd95b2cc08b703aa53cf3b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brentvatne/PeekPopAttempt/4137f76eec5972bfd9cd95b2cc08b703aa53cf3b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brentvatne/PeekPopAttempt/4137f76eec5972bfd9cd95b2cc08b703aa53cf3b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | PeekPopAttempt
3 |
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.3.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | mavenLocal()
18 | jcenter()
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useDeprecatedNdk=true
21 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/brentvatne/PeekPopAttempt/4137f76eec5972bfd9cd95b2cc08b703aa53cf3b/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
6 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'PeekPopAttempt'
2 |
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/index.android.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | */
5 | 'use strict';
6 |
7 | var React = require('react-native');
8 | var {
9 | AppRegistry,
10 | StyleSheet,
11 | Text,
12 | View,
13 | } = React;
14 |
15 | var PeekPopAttempt = React.createClass({
16 | render: function() {
17 | return (
18 |
19 |
20 | Welcome to React Native!
21 |
22 |
23 | To get started, edit index.android.js
24 |
25 |
26 | Shake or press menu button for dev menu
27 |
28 |
29 | );
30 | }
31 | });
32 |
33 | var styles = StyleSheet.create({
34 | container: {
35 | flex: 1,
36 | justifyContent: 'center',
37 | alignItems: 'center',
38 | backgroundColor: '#F5FCFF',
39 | },
40 | welcome: {
41 | fontSize: 20,
42 | textAlign: 'center',
43 | margin: 10,
44 | },
45 | instructions: {
46 | textAlign: 'center',
47 | color: '#333333',
48 | marginBottom: 5,
49 | },
50 | });
51 |
52 | AppRegistry.registerComponent('PeekPopAttempt', () => PeekPopAttempt);
53 |
--------------------------------------------------------------------------------
/index.ios.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | */
5 | 'use strict';
6 |
7 | var React = require('react-native');
8 | var {
9 | AppRegistry,
10 | StyleSheet,
11 | Text,
12 | View,
13 | PropTypes,
14 | TouchableWithoutFeedback,
15 | NativeModules,
16 | Image,
17 | } = React;
18 | var Peekable = require('./Peekable');
19 |
20 | var PeekPopAttempt = React.createClass({
21 | render: function() {
22 | return (
23 |
24 |
27 |
28 | Tap me to peek!
29 |
30 |
31 |
32 |
35 |
36 | Or maybe tap me to peek!?
37 |
38 |
39 |
40 | );
41 | },
42 |
43 | _renderPreviewOne() {
44 | return (
45 |
46 | )
47 | },
48 |
49 | _handlePopOne() {
50 | alert('pop first one!');
51 | },
52 |
53 | _renderPreviewTwo() {
54 | return (
55 |
56 | Peeked!
57 |
58 | )
59 | },
60 |
61 | _handlePopTwo() {
62 | alert('pop second one!');
63 | }
64 | });
65 |
66 | var styles = StyleSheet.create({
67 | container: {
68 | flex: 1,
69 | alignItems: 'center',
70 | justifyContent: 'center',
71 | },
72 | button: {
73 | padding: 20,
74 | backgroundColor: '#eee',
75 | borderRadius: 3,
76 | }
77 | });
78 |
79 | AppRegistry.registerComponent('PeekPopAttempt', () => PeekPopAttempt);
80 |
--------------------------------------------------------------------------------
/ios/PeekPopAttempt.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 008F07F21AC5B25A0029DE68 /* main.jsbundle */; };
11 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
12 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
13 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; };
14 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
15 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; };
16 | 00E356F31AD99517003FC87E /* PeekPopAttemptTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* PeekPopAttemptTests.m */; };
17 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
18 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; };
19 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; };
20 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
21 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
22 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
23 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
24 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
25 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
26 | CEDAEDCC1BBC72D700A21DB6 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CEDAEDCA1BBC72D700A21DB6 /* RootViewController.m */; settings = {ASSET_TAGS = (); }; };
27 | CEDAEDE51BBC812600A21DB6 /* RNPreviewView.m in Sources */ = {isa = PBXBuildFile; fileRef = CEDAEDE21BBC812600A21DB6 /* RNPreviewView.m */; settings = {ASSET_TAGS = (); }; };
28 | CEDAEDE61BBC812600A21DB6 /* RNPreviewViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = CEDAEDE41BBC812600A21DB6 /* RNPreviewViewManager.m */; settings = {ASSET_TAGS = (); }; };
29 | CEEBE7BF1BBCE3C00076B632 /* RNPreviewViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CEEBE7BE1BBCE3C00076B632 /* RNPreviewViewController.m */; settings = {ASSET_TAGS = (); }; };
30 | /* End PBXBuildFile section */
31 |
32 | /* Begin PBXContainerItemProxy section */
33 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = {
34 | isa = PBXContainerItemProxy;
35 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
36 | proxyType = 2;
37 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
38 | remoteInfo = RCTActionSheet;
39 | };
40 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = {
41 | isa = PBXContainerItemProxy;
42 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
43 | proxyType = 2;
44 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
45 | remoteInfo = RCTGeolocation;
46 | };
47 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = {
48 | isa = PBXContainerItemProxy;
49 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
50 | proxyType = 2;
51 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676;
52 | remoteInfo = RCTImage;
53 | };
54 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = {
55 | isa = PBXContainerItemProxy;
56 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
57 | proxyType = 2;
58 | remoteGlobalIDString = 58B511DB1A9E6C8500147676;
59 | remoteInfo = RCTNetwork;
60 | };
61 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = {
62 | isa = PBXContainerItemProxy;
63 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
64 | proxyType = 2;
65 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
66 | remoteInfo = RCTVibration;
67 | };
68 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
69 | isa = PBXContainerItemProxy;
70 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
71 | proxyType = 1;
72 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
73 | remoteInfo = PeekPopAttempt;
74 | };
75 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
76 | isa = PBXContainerItemProxy;
77 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
78 | proxyType = 2;
79 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
80 | remoteInfo = RCTSettings;
81 | };
82 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = {
83 | isa = PBXContainerItemProxy;
84 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
85 | proxyType = 2;
86 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
87 | remoteInfo = RCTWebSocket;
88 | };
89 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = {
90 | isa = PBXContainerItemProxy;
91 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
92 | proxyType = 2;
93 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
94 | remoteInfo = React;
95 | };
96 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
97 | isa = PBXContainerItemProxy;
98 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
99 | proxyType = 2;
100 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
101 | remoteInfo = RCTLinking;
102 | };
103 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = {
104 | isa = PBXContainerItemProxy;
105 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
106 | proxyType = 2;
107 | remoteGlobalIDString = 58B5119B1A9E6C1200147676;
108 | remoteInfo = RCTText;
109 | };
110 | /* End PBXContainerItemProxy section */
111 |
112 | /* Begin PBXFileReference section */
113 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; };
114 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; };
115 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; };
116 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; };
117 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; };
118 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; };
119 | 00E356EE1AD99517003FC87E /* PeekPopAttemptTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PeekPopAttemptTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
120 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
121 | 00E356F21AD99517003FC87E /* PeekPopAttemptTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PeekPopAttemptTests.m; sourceTree = ""; };
122 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; };
123 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; };
124 | 13B07F961A680F5B00A75B9A /* PeekPopAttempt.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PeekPopAttempt.app; sourceTree = BUILT_PRODUCTS_DIR; };
125 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = PeekPopAttempt/AppDelegate.h; sourceTree = ""; };
126 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = PeekPopAttempt/AppDelegate.m; sourceTree = ""; };
127 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
128 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = PeekPopAttempt/Images.xcassets; sourceTree = ""; };
129 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = PeekPopAttempt/Info.plist; sourceTree = ""; };
130 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = PeekPopAttempt/main.m; sourceTree = ""; };
131 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; };
132 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; };
133 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; };
134 | CEDAEDC91BBC72D700A21DB6 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RootViewController.h; path = PeekPopAttempt/RootViewController.h; sourceTree = ""; };
135 | CEDAEDCA1BBC72D700A21DB6 /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RootViewController.m; path = PeekPopAttempt/RootViewController.m; sourceTree = ""; };
136 | CEDAEDE11BBC812600A21DB6 /* RNPreviewView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNPreviewView.h; path = PeekPopAttempt/RNPreviewView.h; sourceTree = ""; };
137 | CEDAEDE21BBC812600A21DB6 /* RNPreviewView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RNPreviewView.m; path = PeekPopAttempt/RNPreviewView.m; sourceTree = ""; };
138 | CEDAEDE31BBC812600A21DB6 /* RNPreviewViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNPreviewViewManager.h; path = PeekPopAttempt/RNPreviewViewManager.h; sourceTree = ""; };
139 | CEDAEDE41BBC812600A21DB6 /* RNPreviewViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RNPreviewViewManager.m; path = PeekPopAttempt/RNPreviewViewManager.m; sourceTree = ""; };
140 | CEEBE7BD1BBCE3C00076B632 /* RNPreviewViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNPreviewViewController.h; path = PeekPopAttempt/RNPreviewViewController.h; sourceTree = ""; };
141 | CEEBE7BE1BBCE3C00076B632 /* RNPreviewViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RNPreviewViewController.m; path = PeekPopAttempt/RNPreviewViewController.m; sourceTree = ""; };
142 | /* End PBXFileReference section */
143 |
144 | /* Begin PBXFrameworksBuildPhase section */
145 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
146 | isa = PBXFrameworksBuildPhase;
147 | buildActionMask = 2147483647;
148 | files = (
149 | );
150 | runOnlyForDeploymentPostprocessing = 0;
151 | };
152 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
153 | isa = PBXFrameworksBuildPhase;
154 | buildActionMask = 2147483647;
155 | files = (
156 | 146834051AC3E58100842450 /* libReact.a in Frameworks */,
157 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
158 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
159 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
160 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */,
161 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */,
162 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */,
163 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
164 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
165 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
166 | );
167 | runOnlyForDeploymentPostprocessing = 0;
168 | };
169 | /* End PBXFrameworksBuildPhase section */
170 |
171 | /* Begin PBXGroup section */
172 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = {
173 | isa = PBXGroup;
174 | children = (
175 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */,
176 | );
177 | name = Products;
178 | sourceTree = "";
179 | };
180 | 00C302B61ABCB90400DB3ED1 /* Products */ = {
181 | isa = PBXGroup;
182 | children = (
183 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */,
184 | );
185 | name = Products;
186 | sourceTree = "";
187 | };
188 | 00C302BC1ABCB91800DB3ED1 /* Products */ = {
189 | isa = PBXGroup;
190 | children = (
191 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */,
192 | );
193 | name = Products;
194 | sourceTree = "";
195 | };
196 | 00C302D41ABCB9D200DB3ED1 /* Products */ = {
197 | isa = PBXGroup;
198 | children = (
199 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */,
200 | );
201 | name = Products;
202 | sourceTree = "";
203 | };
204 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = {
205 | isa = PBXGroup;
206 | children = (
207 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */,
208 | );
209 | name = Products;
210 | sourceTree = "";
211 | };
212 | 00E356EF1AD99517003FC87E /* PeekPopAttemptTests */ = {
213 | isa = PBXGroup;
214 | children = (
215 | 00E356F21AD99517003FC87E /* PeekPopAttemptTests.m */,
216 | 00E356F01AD99517003FC87E /* Supporting Files */,
217 | );
218 | path = PeekPopAttemptTests;
219 | sourceTree = "";
220 | };
221 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
222 | isa = PBXGroup;
223 | children = (
224 | 00E356F11AD99517003FC87E /* Info.plist */,
225 | );
226 | name = "Supporting Files";
227 | sourceTree = "";
228 | };
229 | 139105B71AF99BAD00B5F7CC /* Products */ = {
230 | isa = PBXGroup;
231 | children = (
232 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */,
233 | );
234 | name = Products;
235 | sourceTree = "";
236 | };
237 | 139FDEE71B06529A00C62182 /* Products */ = {
238 | isa = PBXGroup;
239 | children = (
240 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
241 | );
242 | name = Products;
243 | sourceTree = "";
244 | };
245 | 13B07FAE1A68108700A75B9A /* PeekPopAttempt */ = {
246 | isa = PBXGroup;
247 | children = (
248 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
249 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
250 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
251 | CEEBE7BD1BBCE3C00076B632 /* RNPreviewViewController.h */,
252 | CEEBE7BE1BBCE3C00076B632 /* RNPreviewViewController.m */,
253 | CEDAEDC91BBC72D700A21DB6 /* RootViewController.h */,
254 | CEDAEDCA1BBC72D700A21DB6 /* RootViewController.m */,
255 | CEDAEDE11BBC812600A21DB6 /* RNPreviewView.h */,
256 | CEDAEDE21BBC812600A21DB6 /* RNPreviewView.m */,
257 | CEDAEDE31BBC812600A21DB6 /* RNPreviewViewManager.h */,
258 | CEDAEDE41BBC812600A21DB6 /* RNPreviewViewManager.m */,
259 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
260 | 13B07FB61A68108700A75B9A /* Info.plist */,
261 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
262 | 13B07FB71A68108700A75B9A /* main.m */,
263 | );
264 | name = PeekPopAttempt;
265 | sourceTree = "";
266 | };
267 | 146834001AC3E56700842450 /* Products */ = {
268 | isa = PBXGroup;
269 | children = (
270 | 146834041AC3E56700842450 /* libReact.a */,
271 | );
272 | name = Products;
273 | sourceTree = "";
274 | };
275 | 78C398B11ACF4ADC00677621 /* Products */ = {
276 | isa = PBXGroup;
277 | children = (
278 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */,
279 | );
280 | name = Products;
281 | sourceTree = "";
282 | };
283 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
284 | isa = PBXGroup;
285 | children = (
286 | 146833FF1AC3E56700842450 /* React.xcodeproj */,
287 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
288 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
289 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
290 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
291 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */,
292 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */,
293 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
294 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
295 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
296 | );
297 | name = Libraries;
298 | sourceTree = "";
299 | };
300 | 832341B11AAA6A8300B99B32 /* Products */ = {
301 | isa = PBXGroup;
302 | children = (
303 | 832341B51AAA6A8300B99B32 /* libRCTText.a */,
304 | );
305 | name = Products;
306 | sourceTree = "";
307 | };
308 | 83CBB9F61A601CBA00E9B192 = {
309 | isa = PBXGroup;
310 | children = (
311 | 13B07FAE1A68108700A75B9A /* PeekPopAttempt */,
312 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
313 | 00E356EF1AD99517003FC87E /* PeekPopAttemptTests */,
314 | 83CBBA001A601CBA00E9B192 /* Products */,
315 | );
316 | indentWidth = 2;
317 | sourceTree = "";
318 | tabWidth = 2;
319 | };
320 | 83CBBA001A601CBA00E9B192 /* Products */ = {
321 | isa = PBXGroup;
322 | children = (
323 | 13B07F961A680F5B00A75B9A /* PeekPopAttempt.app */,
324 | 00E356EE1AD99517003FC87E /* PeekPopAttemptTests.xctest */,
325 | );
326 | name = Products;
327 | sourceTree = "";
328 | };
329 | /* End PBXGroup section */
330 |
331 | /* Begin PBXNativeTarget section */
332 | 00E356ED1AD99517003FC87E /* PeekPopAttemptTests */ = {
333 | isa = PBXNativeTarget;
334 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "PeekPopAttemptTests" */;
335 | buildPhases = (
336 | 00E356EA1AD99517003FC87E /* Sources */,
337 | 00E356EB1AD99517003FC87E /* Frameworks */,
338 | 00E356EC1AD99517003FC87E /* Resources */,
339 | );
340 | buildRules = (
341 | );
342 | dependencies = (
343 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
344 | );
345 | name = PeekPopAttemptTests;
346 | productName = PeekPopAttemptTests;
347 | productReference = 00E356EE1AD99517003FC87E /* PeekPopAttemptTests.xctest */;
348 | productType = "com.apple.product-type.bundle.unit-test";
349 | };
350 | 13B07F861A680F5B00A75B9A /* PeekPopAttempt */ = {
351 | isa = PBXNativeTarget;
352 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "PeekPopAttempt" */;
353 | buildPhases = (
354 | 13B07F871A680F5B00A75B9A /* Sources */,
355 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
356 | 13B07F8E1A680F5B00A75B9A /* Resources */,
357 | );
358 | buildRules = (
359 | );
360 | dependencies = (
361 | );
362 | name = PeekPopAttempt;
363 | productName = "Hello World";
364 | productReference = 13B07F961A680F5B00A75B9A /* PeekPopAttempt.app */;
365 | productType = "com.apple.product-type.application";
366 | };
367 | /* End PBXNativeTarget section */
368 |
369 | /* Begin PBXProject section */
370 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
371 | isa = PBXProject;
372 | attributes = {
373 | LastUpgradeCheck = 0610;
374 | ORGANIZATIONNAME = Facebook;
375 | TargetAttributes = {
376 | 00E356ED1AD99517003FC87E = {
377 | CreatedOnToolsVersion = 6.2;
378 | TestTargetID = 13B07F861A680F5B00A75B9A;
379 | };
380 | };
381 | };
382 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "PeekPopAttempt" */;
383 | compatibilityVersion = "Xcode 3.2";
384 | developmentRegion = English;
385 | hasScannedForEncodings = 0;
386 | knownRegions = (
387 | en,
388 | Base,
389 | );
390 | mainGroup = 83CBB9F61A601CBA00E9B192;
391 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
392 | projectDirPath = "";
393 | projectReferences = (
394 | {
395 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
396 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
397 | },
398 | {
399 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
400 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
401 | },
402 | {
403 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */;
404 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
405 | },
406 | {
407 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */;
408 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
409 | },
410 | {
411 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */;
412 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
413 | },
414 | {
415 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */;
416 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
417 | },
418 | {
419 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */;
420 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
421 | },
422 | {
423 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */;
424 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
425 | },
426 | {
427 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */;
428 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
429 | },
430 | {
431 | ProductGroup = 146834001AC3E56700842450 /* Products */;
432 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
433 | },
434 | );
435 | projectRoot = "";
436 | targets = (
437 | 13B07F861A680F5B00A75B9A /* PeekPopAttempt */,
438 | 00E356ED1AD99517003FC87E /* PeekPopAttemptTests */,
439 | );
440 | };
441 | /* End PBXProject section */
442 |
443 | /* Begin PBXReferenceProxy section */
444 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = {
445 | isa = PBXReferenceProxy;
446 | fileType = archive.ar;
447 | path = libRCTActionSheet.a;
448 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */;
449 | sourceTree = BUILT_PRODUCTS_DIR;
450 | };
451 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = {
452 | isa = PBXReferenceProxy;
453 | fileType = archive.ar;
454 | path = libRCTGeolocation.a;
455 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */;
456 | sourceTree = BUILT_PRODUCTS_DIR;
457 | };
458 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = {
459 | isa = PBXReferenceProxy;
460 | fileType = archive.ar;
461 | path = libRCTImage.a;
462 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */;
463 | sourceTree = BUILT_PRODUCTS_DIR;
464 | };
465 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = {
466 | isa = PBXReferenceProxy;
467 | fileType = archive.ar;
468 | path = libRCTNetwork.a;
469 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */;
470 | sourceTree = BUILT_PRODUCTS_DIR;
471 | };
472 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = {
473 | isa = PBXReferenceProxy;
474 | fileType = archive.ar;
475 | path = libRCTVibration.a;
476 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */;
477 | sourceTree = BUILT_PRODUCTS_DIR;
478 | };
479 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = {
480 | isa = PBXReferenceProxy;
481 | fileType = archive.ar;
482 | path = libRCTSettings.a;
483 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */;
484 | sourceTree = BUILT_PRODUCTS_DIR;
485 | };
486 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = {
487 | isa = PBXReferenceProxy;
488 | fileType = archive.ar;
489 | path = libRCTWebSocket.a;
490 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */;
491 | sourceTree = BUILT_PRODUCTS_DIR;
492 | };
493 | 146834041AC3E56700842450 /* libReact.a */ = {
494 | isa = PBXReferenceProxy;
495 | fileType = archive.ar;
496 | path = libReact.a;
497 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
498 | sourceTree = BUILT_PRODUCTS_DIR;
499 | };
500 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
501 | isa = PBXReferenceProxy;
502 | fileType = archive.ar;
503 | path = libRCTLinking.a;
504 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */;
505 | sourceTree = BUILT_PRODUCTS_DIR;
506 | };
507 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = {
508 | isa = PBXReferenceProxy;
509 | fileType = archive.ar;
510 | path = libRCTText.a;
511 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
512 | sourceTree = BUILT_PRODUCTS_DIR;
513 | };
514 | /* End PBXReferenceProxy section */
515 |
516 | /* Begin PBXResourcesBuildPhase section */
517 | 00E356EC1AD99517003FC87E /* Resources */ = {
518 | isa = PBXResourcesBuildPhase;
519 | buildActionMask = 2147483647;
520 | files = (
521 | );
522 | runOnlyForDeploymentPostprocessing = 0;
523 | };
524 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
525 | isa = PBXResourcesBuildPhase;
526 | buildActionMask = 2147483647;
527 | files = (
528 | 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */,
529 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
530 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
531 | );
532 | runOnlyForDeploymentPostprocessing = 0;
533 | };
534 | /* End PBXResourcesBuildPhase section */
535 |
536 | /* Begin PBXSourcesBuildPhase section */
537 | 00E356EA1AD99517003FC87E /* Sources */ = {
538 | isa = PBXSourcesBuildPhase;
539 | buildActionMask = 2147483647;
540 | files = (
541 | 00E356F31AD99517003FC87E /* PeekPopAttemptTests.m in Sources */,
542 | );
543 | runOnlyForDeploymentPostprocessing = 0;
544 | };
545 | 13B07F871A680F5B00A75B9A /* Sources */ = {
546 | isa = PBXSourcesBuildPhase;
547 | buildActionMask = 2147483647;
548 | files = (
549 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
550 | CEDAEDE61BBC812600A21DB6 /* RNPreviewViewManager.m in Sources */,
551 | CEDAEDE51BBC812600A21DB6 /* RNPreviewView.m in Sources */,
552 | CEEBE7BF1BBCE3C00076B632 /* RNPreviewViewController.m in Sources */,
553 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
554 | CEDAEDCC1BBC72D700A21DB6 /* RootViewController.m in Sources */,
555 | );
556 | runOnlyForDeploymentPostprocessing = 0;
557 | };
558 | /* End PBXSourcesBuildPhase section */
559 |
560 | /* Begin PBXTargetDependency section */
561 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
562 | isa = PBXTargetDependency;
563 | target = 13B07F861A680F5B00A75B9A /* PeekPopAttempt */;
564 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
565 | };
566 | /* End PBXTargetDependency section */
567 |
568 | /* Begin PBXVariantGroup section */
569 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
570 | isa = PBXVariantGroup;
571 | children = (
572 | 13B07FB21A68108700A75B9A /* Base */,
573 | );
574 | name = LaunchScreen.xib;
575 | path = PeekPopAttempt;
576 | sourceTree = "";
577 | };
578 | /* End PBXVariantGroup section */
579 |
580 | /* Begin XCBuildConfiguration section */
581 | 00E356F61AD99517003FC87E /* Debug */ = {
582 | isa = XCBuildConfiguration;
583 | buildSettings = {
584 | BUNDLE_LOADER = "$(TEST_HOST)";
585 | FRAMEWORK_SEARCH_PATHS = (
586 | "$(SDKROOT)/Developer/Library/Frameworks",
587 | "$(inherited)",
588 | );
589 | GCC_PREPROCESSOR_DEFINITIONS = (
590 | "DEBUG=1",
591 | "$(inherited)",
592 | );
593 | INFOPLIST_FILE = PeekPopAttemptTests/Info.plist;
594 | IPHONEOS_DEPLOYMENT_TARGET = 8.2;
595 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
596 | PRODUCT_NAME = "$(TARGET_NAME)";
597 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PeekPopAttempt.app/PeekPopAttempt";
598 | };
599 | name = Debug;
600 | };
601 | 00E356F71AD99517003FC87E /* Release */ = {
602 | isa = XCBuildConfiguration;
603 | buildSettings = {
604 | BUNDLE_LOADER = "$(TEST_HOST)";
605 | COPY_PHASE_STRIP = NO;
606 | FRAMEWORK_SEARCH_PATHS = (
607 | "$(SDKROOT)/Developer/Library/Frameworks",
608 | "$(inherited)",
609 | );
610 | INFOPLIST_FILE = PeekPopAttemptTests/Info.plist;
611 | IPHONEOS_DEPLOYMENT_TARGET = 8.2;
612 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
613 | PRODUCT_NAME = "$(TARGET_NAME)";
614 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PeekPopAttempt.app/PeekPopAttempt";
615 | };
616 | name = Release;
617 | };
618 | 13B07F941A680F5B00A75B9A /* Debug */ = {
619 | isa = XCBuildConfiguration;
620 | buildSettings = {
621 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
622 | HEADER_SEARCH_PATHS = (
623 | "$(inherited)",
624 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
625 | "$(SRCROOT)/../node_modules/react-native/React/**",
626 | );
627 | INFOPLIST_FILE = PeekPopAttempt/Info.plist;
628 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
629 | OTHER_LDFLAGS = "-ObjC";
630 | PRODUCT_NAME = PeekPopAttempt;
631 | };
632 | name = Debug;
633 | };
634 | 13B07F951A680F5B00A75B9A /* Release */ = {
635 | isa = XCBuildConfiguration;
636 | buildSettings = {
637 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
638 | HEADER_SEARCH_PATHS = (
639 | "$(inherited)",
640 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
641 | "$(SRCROOT)/../node_modules/react-native/React/**",
642 | );
643 | INFOPLIST_FILE = PeekPopAttempt/Info.plist;
644 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
645 | OTHER_LDFLAGS = "-ObjC";
646 | PRODUCT_NAME = PeekPopAttempt;
647 | };
648 | name = Release;
649 | };
650 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
651 | isa = XCBuildConfiguration;
652 | buildSettings = {
653 | ALWAYS_SEARCH_USER_PATHS = NO;
654 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
655 | CLANG_CXX_LIBRARY = "libc++";
656 | CLANG_ENABLE_MODULES = YES;
657 | CLANG_ENABLE_OBJC_ARC = YES;
658 | CLANG_WARN_BOOL_CONVERSION = YES;
659 | CLANG_WARN_CONSTANT_CONVERSION = YES;
660 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
661 | CLANG_WARN_EMPTY_BODY = YES;
662 | CLANG_WARN_ENUM_CONVERSION = YES;
663 | CLANG_WARN_INT_CONVERSION = YES;
664 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
665 | CLANG_WARN_UNREACHABLE_CODE = YES;
666 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
667 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
668 | COPY_PHASE_STRIP = NO;
669 | ENABLE_STRICT_OBJC_MSGSEND = YES;
670 | GCC_C_LANGUAGE_STANDARD = gnu99;
671 | GCC_DYNAMIC_NO_PIC = NO;
672 | GCC_OPTIMIZATION_LEVEL = 0;
673 | GCC_PREPROCESSOR_DEFINITIONS = (
674 | "DEBUG=1",
675 | "$(inherited)",
676 | );
677 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
678 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
679 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
680 | GCC_WARN_UNDECLARED_SELECTOR = YES;
681 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
682 | GCC_WARN_UNUSED_FUNCTION = YES;
683 | GCC_WARN_UNUSED_VARIABLE = YES;
684 | HEADER_SEARCH_PATHS = (
685 | "$(inherited)",
686 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
687 | "$(SRCROOT)/../node_modules/react-native/React/**",
688 | );
689 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
690 | MTL_ENABLE_DEBUG_INFO = YES;
691 | ONLY_ACTIVE_ARCH = YES;
692 | SDKROOT = iphoneos;
693 | };
694 | name = Debug;
695 | };
696 | 83CBBA211A601CBA00E9B192 /* Release */ = {
697 | isa = XCBuildConfiguration;
698 | buildSettings = {
699 | ALWAYS_SEARCH_USER_PATHS = NO;
700 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
701 | CLANG_CXX_LIBRARY = "libc++";
702 | CLANG_ENABLE_MODULES = YES;
703 | CLANG_ENABLE_OBJC_ARC = YES;
704 | CLANG_WARN_BOOL_CONVERSION = YES;
705 | CLANG_WARN_CONSTANT_CONVERSION = YES;
706 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
707 | CLANG_WARN_EMPTY_BODY = YES;
708 | CLANG_WARN_ENUM_CONVERSION = YES;
709 | CLANG_WARN_INT_CONVERSION = YES;
710 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
711 | CLANG_WARN_UNREACHABLE_CODE = YES;
712 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
713 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
714 | COPY_PHASE_STRIP = YES;
715 | ENABLE_NS_ASSERTIONS = NO;
716 | ENABLE_STRICT_OBJC_MSGSEND = YES;
717 | GCC_C_LANGUAGE_STANDARD = gnu99;
718 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
719 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
720 | GCC_WARN_UNDECLARED_SELECTOR = YES;
721 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
722 | GCC_WARN_UNUSED_FUNCTION = YES;
723 | GCC_WARN_UNUSED_VARIABLE = YES;
724 | HEADER_SEARCH_PATHS = (
725 | "$(inherited)",
726 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
727 | "$(SRCROOT)/../node_modules/react-native/React/**",
728 | );
729 | IPHONEOS_DEPLOYMENT_TARGET = 7.0;
730 | MTL_ENABLE_DEBUG_INFO = NO;
731 | SDKROOT = iphoneos;
732 | VALIDATE_PRODUCT = YES;
733 | };
734 | name = Release;
735 | };
736 | /* End XCBuildConfiguration section */
737 |
738 | /* Begin XCConfigurationList section */
739 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "PeekPopAttemptTests" */ = {
740 | isa = XCConfigurationList;
741 | buildConfigurations = (
742 | 00E356F61AD99517003FC87E /* Debug */,
743 | 00E356F71AD99517003FC87E /* Release */,
744 | );
745 | defaultConfigurationIsVisible = 0;
746 | defaultConfigurationName = Release;
747 | };
748 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "PeekPopAttempt" */ = {
749 | isa = XCConfigurationList;
750 | buildConfigurations = (
751 | 13B07F941A680F5B00A75B9A /* Debug */,
752 | 13B07F951A680F5B00A75B9A /* Release */,
753 | );
754 | defaultConfigurationIsVisible = 0;
755 | defaultConfigurationName = Release;
756 | };
757 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "PeekPopAttempt" */ = {
758 | isa = XCConfigurationList;
759 | buildConfigurations = (
760 | 83CBBA201A601CBA00E9B192 /* Debug */,
761 | 83CBBA211A601CBA00E9B192 /* Release */,
762 | );
763 | defaultConfigurationIsVisible = 0;
764 | defaultConfigurationName = Release;
765 | };
766 | /* End XCConfigurationList section */
767 | };
768 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
769 | }
770 |
--------------------------------------------------------------------------------
/ios/PeekPopAttempt.xcodeproj/xcshareddata/xcschemes/PeekPopAttempt.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
75 |
77 |
83 |
84 |
85 |
86 |
87 |
88 |
94 |
96 |
102 |
103 |
104 |
105 |
107 |
108 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/ios/PeekPopAttempt/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 |
14 | @property (nonatomic, strong) UIWindow *window;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ios/PeekPopAttempt/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "AppDelegate.h"
11 | #import "RootViewController.h"
12 | #import "RCTRootView.h"
13 |
14 | @implementation AppDelegate
15 |
16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
17 | {
18 | NSURL *jsCodeLocation;
19 |
20 | /**
21 | * Loading JavaScript code - uncomment the one you want.
22 | *
23 | * OPTION 1
24 | * Load from development server. Start the server from the repository root:
25 | *
26 | * $ npm start
27 | *
28 | * To run on device, change `localhost` to the IP address of your computer
29 | * (you can get this by typing `ifconfig` into the terminal and selecting the
30 | * `inet` value under `en0:`) and make sure your computer and iOS device are
31 | * on the same Wi-Fi network.
32 | */
33 |
34 | jsCodeLocation = [NSURL URLWithString:@"http://5d9159ee.ngrok.com/index.ios.bundle?platform=ios"];
35 |
36 | /**
37 | * OPTION 2
38 | * Load from pre-bundled file on disk. To re-generate the static bundle
39 | * from the root of your project directory, run
40 | *
41 | * $ react-native bundle --minify
42 | *
43 | * see http://facebook.github.io/react-native/docs/runningondevice.html
44 | */
45 |
46 | // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
47 |
48 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
49 | moduleName:@"PeekPopAttempt"
50 | initialProperties:nil
51 | launchOptions:launchOptions];
52 |
53 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
54 | UIViewController *rootViewController = [[RootViewController alloc] init];
55 | rootViewController.view = rootView;
56 | self.window.rootViewController = rootViewController;
57 | [self.window makeKeyAndVisible];
58 | return YES;
59 | }
60 |
61 | @end
62 |
--------------------------------------------------------------------------------
/ios/PeekPopAttempt/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/ios/PeekPopAttempt/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/ios/PeekPopAttempt/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UIViewControllerBasedStatusBarAppearance
38 |
39 | NSLocationWhenInUseUsageDescription
40 |
41 | NSAppTransportSecurity
42 |
43 |
44 | NSAllowsArbitraryLoads
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/ios/PeekPopAttempt/RNPreviewView.h:
--------------------------------------------------------------------------------
1 | #import "RCTView.h"
2 | #import "RNPreviewViewController.h"
3 | #import "RCTBridge.h"
4 | #import "RCTComponent.h"
5 |
6 | @interface RNPreviewView : RCTView
7 |
8 | @property (nonatomic, copy) RCTBubblingEventBlock onPop;
9 |
10 | - (id)initWithBridge:(RCTBridge *)bridge;
11 | - (RNPreviewViewController *)getPreviewViewController;
12 | - (void)didPop;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/ios/PeekPopAttempt/RNPreviewView.m:
--------------------------------------------------------------------------------
1 | #import "RNPreviewView.h"
2 | #import "RNPreviewViewController.h"
3 | #import "RCTUIManager.h"
4 | #import "RCTView.h"
5 | #import "UIView+React.h"
6 |
7 | @implementation RNPreviewView {
8 | RNPreviewViewController *_controller;
9 | RCTView *_previewBaseView;
10 | }
11 |
12 | - (id)initWithBridge:(RCTBridge *)bridge
13 | {
14 | if ((self = [super initWithFrame:CGRectZero])) {
15 | _controller = [[RNPreviewViewController alloc] init];
16 | _previewBaseView = [[RCTView alloc] init];
17 | _controller.view = _previewBaseView;
18 | }
19 |
20 | return self;
21 | }
22 |
23 | - (RNPreviewViewController *)getPreviewViewController {
24 | return _controller;
25 | }
26 |
27 | - (void)didPop
28 | {
29 | if (_onPop) {
30 | _onPop(@{});
31 | }
32 | }
33 |
34 | - (NSArray *)reactSubviews
35 | {
36 | return [NSArray arrayWithObjects:_previewBaseView, nil];
37 | }
38 |
39 | - (void)insertReactSubview:(UIView *)view atIndex:(NSInteger)atIndex
40 | {
41 | [_previewBaseView insertReactSubview:view atIndex:atIndex];
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/ios/PeekPopAttempt/RNPreviewViewController.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface RNPreviewViewController : UIViewController
4 |
5 | @end
6 |
--------------------------------------------------------------------------------
/ios/PeekPopAttempt/RNPreviewViewController.m:
--------------------------------------------------------------------------------
1 | #import "RNPreviewViewController.h"
2 |
3 | @implementation RNPreviewViewController
4 |
5 | #pragma mark - Preview Actions
6 |
7 | - (NSArray> *)previewActionItems {
8 | // setup a list of preview actions
9 | UIPreviewAction *action1 = [UIPreviewAction actionWithTitle:@"Action 1" style:UIPreviewActionStyleDefault handler:^(UIPreviewAction * _Nonnull action, UIViewController * _Nonnull previewViewController) {
10 | NSLog(@"Action 1 triggered");
11 | }];
12 |
13 | UIPreviewAction *action2 = [UIPreviewAction actionWithTitle:@"Destructive Action" style:UIPreviewActionStyleDestructive handler:^(UIPreviewAction * _Nonnull action, UIViewController * _Nonnull previewViewController) {
14 | NSLog(@"Destructive Action triggered");
15 | }];
16 |
17 | UIPreviewAction *action3 = [UIPreviewAction actionWithTitle:@"Selected Action" style:UIPreviewActionStyleSelected handler:^(UIPreviewAction * _Nonnull action, UIViewController * _Nonnull previewViewController) {
18 | NSLog(@"Selected Action triggered");
19 | }];
20 |
21 | // add them to an arrary
22 | NSArray *actions = @[action1, action2, action3];
23 |
24 | // add all actions to a group
25 | UIPreviewActionGroup *group1 = [UIPreviewActionGroup actionGroupWithTitle:@"Action Group" style:UIPreviewActionStyleDefault actions:actions];
26 | NSArray *group = @[group1];
27 |
28 | // and return them (return the array of actions instead to see all items ungrouped)
29 | return group;
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/ios/PeekPopAttempt/RNPreviewViewManager.h:
--------------------------------------------------------------------------------
1 | #import "RCTViewManager.h"
2 |
3 | @interface RNPreviewViewManager : RCTViewManager
4 |
5 | @end
6 |
--------------------------------------------------------------------------------
/ios/PeekPopAttempt/RNPreviewViewManager.m:
--------------------------------------------------------------------------------
1 | #import "RNPreviewViewManager.h"
2 | #import "RNPreviewView.h"
3 | #import "RCTBridge.h"
4 | #import "RCTUIManager.h"
5 | #import "RCTSparseArray.h"
6 | #import "AppDelegate.h"
7 | #import "RootViewController.h"
8 | #import "RCTConvert.h"
9 |
10 | @implementation RNPreviewViewManager
11 |
12 | RCT_EXPORT_MODULE();
13 |
14 | @synthesize bridge = _bridge;
15 | @synthesize methodQueue = _methodQueue;
16 |
17 | - (UIView *)view
18 | {
19 | return [[RNPreviewView alloc] initWithBridge:_bridge];
20 | }
21 |
22 | - (dispatch_queue_t)methodQueue
23 | {
24 | return _bridge.uiManager.methodQueue;
25 | }
26 |
27 | RCT_EXPORT_METHOD(setSourceView:(nonnull NSNumber *)reactTag)
28 | {
29 | [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, RCTSparseArray *viewRegistry) {
30 | RCTView *view = viewRegistry[reactTag];
31 | RootViewController *rootViewController = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
32 | [rootViewController setSourceView:view];
33 | }];
34 | }
35 |
36 | /* Need to be able to set the target view too */
37 | RCT_EXPORT_METHOD(activate:(nonnull NSNumber *)reactTag)
38 | {
39 | [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, RCTSparseArray *viewRegistry) {
40 | RNPreviewView *view = viewRegistry[reactTag];
41 |
42 | if (![view isKindOfClass:[RNPreviewView class]]) {
43 | RCTLogError(@"Invalid view returned from registry, expecting RNPreviewView, got: %@", view);
44 | } else {
45 | RNPreviewViewController *controller = [view getPreviewViewController];
46 | RootViewController *rootViewController = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
47 | [rootViewController setPreviewController:controller forReactPreviewView:view];
48 | }
49 | }];
50 | }
51 |
52 | RCT_EXPORT_VIEW_PROPERTY(onPop, RCTBubblingEventBlock);
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/ios/PeekPopAttempt/RootViewController.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "RNPreviewViewController.h"
3 | #import "RNPreviewView.h"
4 |
5 | @interface RootViewController : UIViewController
6 |
7 | - (void)setPreviewController:(RNPreviewViewController *)controller forReactPreviewView:(RNPreviewView *)reactView;
8 | - (void)setSourceView:(UIView *)view;
9 |
10 | @end
11 |
12 |
--------------------------------------------------------------------------------
/ios/PeekPopAttempt/RootViewController.m:
--------------------------------------------------------------------------------
1 | #import "RootViewController.h"
2 | #import "RNPreviewViewController.h"
3 | #import "RNPreviewView.h"
4 |
5 | @interface RootViewController ()
6 | @end
7 |
8 | @implementation RootViewController {
9 | RNPreviewViewController *_previewController;
10 | RNPreviewView *_reactView;
11 | }
12 |
13 | - (void)setPreviewController:(RNPreviewViewController *)controller forReactPreviewView:(RNPreviewView *)reactView
14 | {
15 | _previewController = controller;
16 | _reactView = reactView;
17 | }
18 |
19 | - (void)setSourceView:(RCTView *)view
20 | {
21 | NSLog(@"setting source view!");
22 | [self registerForPreviewingWithDelegate:(id)self sourceView:view];
23 | }
24 |
25 | # pragma mark - 3D Touch Delegate
26 |
27 | - (UIViewController *)previewingContext:(id)previewingContext viewControllerForLocation:(CGPoint)location
28 | {
29 | if ([self.presentedViewController isKindOfClass:[RNPreviewViewController class]]) {
30 | return nil;
31 | }
32 |
33 | return _previewController;
34 | }
35 |
36 | - (void)previewingContext:(id)previewingContext
37 | commitViewController:(UIViewController *)viewControllerToCommit
38 | {
39 | [_reactView didPop];
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/ios/PeekPopAttempt/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "AppDelegate.h"
13 |
14 | int main(int argc, char * argv[]) {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/ios/PeekPopAttemptTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ios/PeekPopAttemptTests/PeekPopAttemptTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | #import "RCTLog.h"
14 | #import "RCTRootView.h"
15 |
16 | #define TIMEOUT_SECONDS 240
17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
18 |
19 | @interface PeekPopAttemptTests : XCTestCase
20 |
21 | @end
22 |
23 | @implementation PeekPopAttemptTests
24 |
25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
26 | {
27 | if (test(view)) {
28 | return YES;
29 | }
30 | for (UIView *subview in [view subviews]) {
31 | if ([self findSubviewInView:subview matching:test]) {
32 | return YES;
33 | }
34 | }
35 | return NO;
36 | }
37 |
38 | - (void)testRendersWelcomeScreen
39 | {
40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
42 | BOOL foundElement = NO;
43 |
44 | __block NSString *redboxError = nil;
45 |
46 |
47 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
48 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
49 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
50 |
51 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
52 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
53 | return YES;
54 | }
55 | return NO;
56 | }];
57 | }
58 |
59 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
60 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
61 | }
62 |
63 |
64 | @end
65 |
--------------------------------------------------------------------------------
/ios/main.jsbundle:
--------------------------------------------------------------------------------
1 | // Offline JS
2 | // To re-generate the offline bundle, run this from the root of your project:
3 | //
4 | // $ react-native bundle --minify
5 | //
6 | // See http://facebook.github.io/react-native/docs/runningondevice.html for more details.
7 |
8 | throw new Error('Offline JS file is empty. See iOS/main.jsbundle for instructions');
9 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "PeekPopAttempt",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node_modules/react-native/packager/packager.sh"
7 | },
8 | "dependencies": {
9 | "react-native": "facebook/react-native#v0.12.0-rc"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------