diff --git a/.gitignore b/.gitignore
index eb1535e4..8cf2d1ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,14 +28,33 @@ project.xcworkspace
.idea
.gradle
local.properties
+android/.settings/*
+android/.project
+lib/android/.project
+playground/android/app/.project
+playground/android/.project
# node.js
#
node_modules/
npm-debug.log
+# npm
+package-lock.json
+
+# yarn
+yarn.lock
+yarn-error.log
+
# BUCK
buck-out/
\.buckd/
android/app/libs
-android/keystores/debug.keystore
+*.keystore
+!debug.keystore
+
+# Bundle artifact
+*.jsbundle
+
+# CocoaPods
+playground/ios/Pods
diff --git a/.npmignore b/.npmignore
index 649af0f2..9a70e78a 100644
--- a/.npmignore
+++ b/.npmignore
@@ -1,8 +1,12 @@
-example
-real-life-example
+.ghp/
+
+
+playground
+e2e
logos
./index.ios.js
./index.android.js
+./rn-cli.config.js
#################
# from .gitignore:
@@ -83,6 +87,9 @@ fabric.properties
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
+#Cocoapods
+# *.podspec
+
## Build generated
ios/build/
ios/DerivedData/
@@ -152,6 +159,7 @@ android/bin/
android/gen/
android/out/
android/app/build/
+lib/android/gradle/
# Gradle files
android/.gradle/
diff --git a/Interactable.podspec b/Interactable.podspec
index b0ddb442..c97031ab 100644
--- a/Interactable.podspec
+++ b/Interactable.podspec
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.homepage = "https://github.com/wix/react-native-interactable"
s.license = "MIT"
- s.authors = { "Tal Kol" => "talkol@gmail.com" }
+ s.authors = package["author"]
s.platform = :ios, "7.0"
s.source = { :git => "https://github.com/wix/react-native-interactable.git" }
diff --git a/PROPS.md b/PROPS.md
index d69ef7f4..abfba2c4 100644
--- a/PROPS.md
+++ b/PROPS.md
@@ -102,6 +102,15 @@ horizontalOnly={true}
Optional, whether the view should be locked to horizontal movement only. Default `false`.
+#### `startOnFront` (boolean) **[Android Only]**
+
+```jsx
+startOnFront
+```
+
+Optional, whether the view should call `view.bringToFront()` when the view is first loaded.
+*Usually using zIndex does the trick. Use this in cases it doesn't*
+
#### `verticalOnly` (boolean)
```jsx
@@ -131,7 +140,18 @@ Optional, an object providing limits to movement relative to the view's center (
onSnap={this.onDrawerSnap}
```
-Optional, a function called whenever the view snaps to a `snapPoints` point (after being dragged). Example for [drawer](https://github.com/wix/react-native-interactable/blob/b72eff0649b48dd50548593e5ecfe4c42b026a02/example/src/IconDrawer.js#L63). When the function is called, an event object is passed as argument, containing the following properties:
+Optional, a function called whenever the view finishes snapping to a `snapPoints` point (after being dragged). Example for [drawer](https://github.com/wix/react-native-interactable/blob/b72eff0649b48dd50548593e5ecfe4c42b026a02/example/src/IconDrawer.js#L63). When the function is called, an event object is passed as argument, containing the following properties:
+
+* `index` - The zero-based index of the point in the `snapPoints` array.
+* `id` - The string `id` of the point in the `snapPoints` array (assuming it was provided).
+
+#### `onSnapStart` (function)
+
+```jsx
+onSnapStart={this.onDrawerSnapStart}
+```
+
+Optional, a function called whenever the view starts snapping to a `snapPoints` point (after being dragged). When the function is called, an event object is passed as argument, containing the following properties:
* `index` - The zero-based index of the point in the `snapPoints` array.
* `id` - The string `id` of the point in the `snapPoints` array (assuming it was provided).
@@ -158,7 +178,7 @@ Optional, a function called whenever the user starts or stops dragging the view.
* `state` - `start` or `end`, whether the user started or finished dragging.
* `x` - The horizontal position of the view (relative to the center).
* `y` - The vertical position of the view (relative to the center).
-* `targetSnapPointId` - For `end` state, the string `id` of the target point in the `snapPoints` array (assuming it was provided). Otherwise, empty string.
+* `targetSnapPointId` - For `end` state, the string `id` of the target point in the `snapPoints` array (assuming it was provided).
#### `onAlert` (function)
diff --git a/README.md b/README.md
index 45959270..becb5c54 100644
--- a/README.md
+++ b/README.md
@@ -8,10 +8,13 @@
+[](https://www.npmjs.com/package/react-native-interactable)
+[](https://jenkins-oss.wixpress.com/job/multi-react-native-interactable-master/)
+[](https://www.npmjs.com/package/react-native-interactable)
### LOOKING FOR A MAINTAINER
-We love this project, but currently we don’t have enough time to work on it. So we are looking for a maintainer. If you have enough time and knowledge and want to become one - please let us know (levv@wix.com, sergeyi@wix.com)
+We love this project, but currently we don’t have enough time to work on it. So we are looking for a maintainer. If you have enough time and knowledge and want to become one - please let us know (levv@wix.com)
@@ -80,36 +83,18 @@ pod 'Interactable', :path => '../node_modules/react-native-interactable'
## Example
-To see the library in action you have several options:
+
The [playground](https://github.com/wix/react-native-interactable/tree/master/playground) project has few use-cases implemented like: *swipeable card*, *drawer*, *collapsible header* and *chat heads* under the "Basic examples" section. It's simplistic but easy to learn from.
+
Under the "Real life example" you'll find more complex demonstrations. They're harder to learn from, but they're cool to watch. More info about the [UX inspirations](https://github.com/wix/react-native-interactable/blob/master/UX-INSPIRATIONS.md) for the demo app.
-* **Build and run the example project on your computer**
-
The [example](example) project has 4 use-cases implemented: *swipeable card*, *drawer*, *collapsible header* and *chat heads*. It's simplistic but easy to learn from.
-
*Note: It's recommended to experience it on a [real device](http://facebook.github.io/react-native/docs/running-on-device.html) and not on a simulator. The simulator has poor performance so the framerate isn't like the real thing.*
-
-To run the example, clone the repo and run from the root folder:
+* **Build and run the example project**
+To see the library in action, clone the repo and run the playground from the root folder:
```
- cd real-life-example
- npm install
- react-native run-ios
+ npm start
+ npm run ios
```
-
-* **Install and run the demo app from the App Store/Google Play on your phone**
-
If you don't want to mess with building yourself, you can play with a pre-built demo on your phone.
-
Download from [Apple App Store (iOS)](https://itunes.apple.com/us/app/react-native-interactions/id1209875831?ls=1&mt=8) Download from [Google Play Store (Android)](https://play.google.com/store/apps/details?id=com.wix.interactions&hl=en)
-
-
-* **Build and run the demo app on your computer**
-
The [demo app](real-life-example) contains more complex demonstrations than the [example](example) project. They're harder to learn from, but they're cool to watch. More info about the [UX inspirations](https://github.com/wix/react-native-interactable/blob/master/UX-INSPIRATIONS.md) for the demo app.
*Note: It's recommended to experience it on a [real device](http://facebook.github.io/react-native/docs/running-on-device.html) and not on a simulator. The simulator has poor performance so the framerate isn't like the real thing.*
-To run the demo app, clone the repo and run from the root folder:
-```
- cd real-life-example
- npm install
- react-native run-ios
-```
-
## Usage
@@ -169,6 +154,12 @@ alertAreas={[{id: 'myArea', influenceArea: {top: 0}}]}
horizontalOnly={true}
```
+* [`startOnFront`](https://github.com/wix/react-native-interactable/blob/master/PROPS.md#startOnFront-boolean) - [ANDROID ONLY] whether the view should call `bringToFront`
+
+```jsx
+startOnFront
+```
+
* [`verticalOnly`](https://github.com/wix/react-native-interactable/blob/master/PROPS.md#verticalonly-boolean) - whether the view should be locked to vertical movement only
```jsx
@@ -181,12 +172,18 @@ verticalOnly={true}
boundaries={{left: -100, right: 100, bounce: 0.5}}
```
-* [`onSnap`](https://github.com/wix/react-native-interactable/blob/master/PROPS.md#onsnap-function) - a function called whenever the view snaps to a `snapPoints` point (after dragging)
+* [`onSnap`](https://github.com/wix/react-native-interactable/blob/master/PROPS.md#onsnap-function) - a function called whenever the view finishes snapping to a `snapPoints` point (after dragging)
```jsx
onSnap={this.onDrawerSnap}
```
+* [`onSnapStart`](https://github.com/wix/react-native-interactable/blob/master/PROPS.md#onsnapstart-function) - a function called whenever the view starts snapping to a `snapPoints` point (after dragging)
+
+```jsx
+onSnapStart={this.onDrawerSnapStart}
+```
+
* [`onStop`](https://github.com/wix/react-native-interactable/blob/master/PROPS.md#onstop-function) - a function called whenever the interaction stops (views freeze momentarily)
```jsx
@@ -273,7 +270,7 @@ Takes a single argument, which is a params object containing:
##### `changePosition(params)` - used to imperatively set the view's position
```jsx
-instance.setPosition({x: 120, y: 40});
+instance.changePosition({x: 120, y: 40});
```
Takes a single argument, which is a params object containing:
@@ -282,6 +279,12 @@ Takes a single argument, which is a params object containing:
+##### `bringToFront()` - bring view to front (Android Only)
+
+```jsx
+instance.bringToFront();
+```
+
## Animating other views according to `Interactable.View` position
This library is integrated with the [Animated](https://facebook.github.io/react-native/docs/animated.html) library in order to support performant animations of other views according to the movement of the `Interactable.View`.
diff --git a/android b/android
new file mode 120000
index 00000000..92be4bb0
--- /dev/null
+++ b/android
@@ -0,0 +1 @@
+lib/android
\ No newline at end of file
diff --git a/e2e/firstTest.spec.js b/e2e/firstTest.spec.js
new file mode 100644
index 00000000..e697e0d7
--- /dev/null
+++ b/e2e/firstTest.spec.js
@@ -0,0 +1,14 @@
+describe('Example', () => {
+ beforeEach(async () => {
+ await device.reloadReactNative();
+ });
+
+ it('should show Overview screen', async () => {
+ await expect(element(by.id('Overview'))).toBeVisible();
+ });
+
+ it('Chat Heads is clickable', async () => {
+ await element(by.text('Chat Heads')).tap();
+ });
+
+})
diff --git a/e2e/init.js b/e2e/init.js
new file mode 100644
index 00000000..b7b58350
--- /dev/null
+++ b/e2e/init.js
@@ -0,0 +1,19 @@
+const detox = require('detox');
+const config = require('../package.json').detox;
+const adapter = require('detox/runners/mocha/adapter');
+
+before(async () => {
+ await detox.init(config);
+});
+
+beforeEach(async function () {
+ await adapter.beforeEach(this);
+});
+
+afterEach(async function () {
+ await adapter.afterEach(this);
+});
+
+after(async () => {
+ await detox.cleanup();
+});
diff --git a/e2e/mocha.opts b/e2e/mocha.opts
new file mode 100644
index 00000000..dcff2e92
--- /dev/null
+++ b/e2e/mocha.opts
@@ -0,0 +1 @@
+--recursive --timeout 120000 --bail
\ No newline at end of file
diff --git a/example/.babelrc b/example/.babelrc
deleted file mode 100644
index 8df53fe4..00000000
--- a/example/.babelrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-"presets": ["react-native"]
-}
\ No newline at end of file
diff --git a/example/.flowconfig b/example/.flowconfig
deleted file mode 100644
index 876e701f..00000000
--- a/example/.flowconfig
+++ /dev/null
@@ -1,44 +0,0 @@
-[ignore]
-; We fork some components by platform
-.*/*[.]android.js
-
-; Ignore "BUCK" generated dirs
-/\.buckd/
-
-; Ignore unexpected extra "@providesModule"
-.*/node_modules/.*/node_modules/fbjs/.*
-
-; Ignore duplicate module providers
-; For RN Apps installed via npm, "Libraries" folder is inside
-; "node_modules/react-native" but in the source repo it is in the root
-.*/Libraries/react-native/React.js
-.*/Libraries/react-native/ReactNative.js
-
-[include]
-
-[libs]
-node_modules/react-native/Libraries/react-native/react-native-interface.js
-node_modules/react-native/flow
-flow/
-
-[options]
-module.system=haste
-
-experimental.strict_type_args=true
-
-munge_underscores=true
-
-module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
-
-suppress_type=$FlowIssue
-suppress_type=$FlowFixMe
-suppress_type=$FixMe
-
-suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-6]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
-suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-6]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
-suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
-
-unsafe.enable_getters_and_setters=true
-
-[version]
-^0.36.0
diff --git a/example/.gitattributes b/example/.gitattributes
deleted file mode 100644
index d42ff183..00000000
--- a/example/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-*.pbxproj -text
diff --git a/example/.gitignore b/example/.gitignore
deleted file mode 100644
index fc13f169..00000000
--- a/example/.gitignore
+++ /dev/null
@@ -1,53 +0,0 @@
-# OSX
-#
-.DS_Store
-
-# Xcode
-#
-build/
-*.pbxuser
-!default.pbxuser
-*.mode1v3
-!default.mode1v3
-*.mode2v3
-!default.mode2v3
-*.perspectivev3
-!default.perspectivev3
-xcuserdata
-*.xccheckout
-*.moved-aside
-DerivedData
-*.hmap
-*.ipa
-*.xcuserstate
-project.xcworkspace
-
-# Android/IntelliJ
-#
-build/
-.idea
-.gradle
-local.properties
-*.iml
-
-# node.js
-#
-node_modules/
-npm-debug.log
-
-# BUCK
-buck-out/
-\.buckd/
-android/app/libs
-*.keystore
-
-# fastlane
-#
-# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
-# screenshots whenever they are needed.
-# For more information about the recommended setup visit:
-# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
-
-fastlane/report.xml
-fastlane/Preview.html
-fastlane/screenshots
diff --git a/example/.watchmanconfig b/example/.watchmanconfig
deleted file mode 100644
index 9e26dfee..00000000
--- a/example/.watchmanconfig
+++ /dev/null
@@ -1 +0,0 @@
-{}
\ No newline at end of file
diff --git a/example/__tests__/index.android.js b/example/__tests__/index.android.js
deleted file mode 100644
index b49b9087..00000000
--- a/example/__tests__/index.android.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import 'react-native';
-import React from 'react';
-import Index from '../index.android.js';
-
-// Note: test renderer must be required after react-native.
-import renderer from 'react-test-renderer';
-
-it('renders correctly', () => {
- const tree = renderer.create(
-
- );
-});
diff --git a/example/__tests__/index.ios.js b/example/__tests__/index.ios.js
deleted file mode 100644
index ba7c5b5e..00000000
--- a/example/__tests__/index.ios.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import 'react-native';
-import React from 'react';
-import Index from '../index.ios.js';
-
-// Note: test renderer must be required after react-native.
-import renderer from 'react-test-renderer';
-
-it('renders correctly', () => {
- const tree = renderer.create(
-
- );
-});
diff --git a/example/android/app/BUCK b/example/android/app/BUCK
deleted file mode 100644
index 2ebdb984..00000000
--- a/example/android/app/BUCK
+++ /dev/null
@@ -1,66 +0,0 @@
-import re
-
-# To learn about Buck see [Docs](https://buckbuild.com/).
-# To run your application with Buck:
-# - install Buck
-# - `npm start` - to start the packager
-# - `cd android`
-# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
-# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
-# - `buck install -r android/app` - compile, install and run application
-#
-
-lib_deps = []
-for jarfile in glob(['libs/*.jar']):
- name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
- lib_deps.append(':' + name)
- prebuilt_jar(
- name = name,
- binary_jar = jarfile,
- )
-
-for aarfile in glob(['libs/*.aar']):
- name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
- lib_deps.append(':' + name)
- android_prebuilt_aar(
- name = name,
- aar = aarfile,
- )
-
-android_library(
- name = 'all-libs',
- exported_deps = lib_deps
-)
-
-android_library(
- name = 'app-code',
- srcs = glob([
- 'src/main/java/**/*.java',
- ]),
- deps = [
- ':all-libs',
- ':build_config',
- ':res',
- ],
-)
-
-android_build_config(
- name = 'build_config',
- package = 'com.example',
-)
-
-android_resource(
- name = 'res',
- res = 'src/main/res',
- package = 'com.example',
-)
-
-android_binary(
- name = 'app',
- package_type = 'debug',
- manifest = 'src/main/AndroidManifest.xml',
- keystore = '//android/keystores:debug',
- deps = [
- ':app-code',
- ],
-)
diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
deleted file mode 100644
index c91f8795..00000000
--- a/example/android/app/build.gradle
+++ /dev/null
@@ -1,61 +0,0 @@
-apply plugin: "com.android.application"
-
-import com.android.build.OutputFile
-apply from: "../../../node_modules/react-native/react.gradle"
-
-android {
- compileSdkVersion 25
- buildToolsVersion "25.0.1"
-
- defaultConfig {
- applicationId "com.example"
- minSdkVersion 16
- targetSdkVersion 22
- versionCode 1
- versionName "1.0"
- ndk {
- abiFilters "armeabi-v7a", "x86"
- }
- }
- splits {
- abi {
- reset()
- enable false
- universalApk false // If true, also generate a universal APK
- include "armeabi-v7a", "x86"
- }
- }
- buildTypes {
- release {
- minifyEnabled false
- 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.android.support:appcompat-v7:25.1.1"
- compile "com.facebook.react:react-native:+" // From node_modules
- compile project(path: ':react-native-interactable')
-}
-
-// Run this once to be able to run the application with BUCK
-// puts all compile dependencies into folder libs for BUCK to use
-task copyDownloadableDepsToLibs(type: Copy) {
- from configurations.compile
- into 'libs'
-}
diff --git a/example/android/app/proguard-rules.pro b/example/android/app/proguard-rules.pro
deleted file mode 100644
index 48361a90..00000000
--- a/example/android/app/proguard-rules.pro
+++ /dev/null
@@ -1,66 +0,0 @@
-# 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
--keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
-
-# Do not strip any method/class that is annotated with @DoNotStrip
--keep @com.facebook.proguard.annotations.DoNotStrip class *
--keep @com.facebook.common.internal.DoNotStrip class *
--keepclassmembers class * {
- @com.facebook.proguard.annotations.DoNotStrip *;
- @com.facebook.common.internal.DoNotStrip *;
-}
-
--keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
- void set*(***);
- *** get*();
-}
-
--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 okhttp3.** { *; }
--keep interface okhttp3.** { *; }
--dontwarn okhttp3.**
-
-# okio
-
--keep class sun.misc.Unsafe { *; }
--dontwarn java.nio.file.*
--dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
--dontwarn okio.**
diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 802178cc..00000000
--- a/example/android/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/android/app/src/main/java/com/example/MainApplication.java b/example/android/app/src/main/java/com/example/MainApplication.java
deleted file mode 100644
index 902e732e..00000000
--- a/example/android/app/src/main/java/com/example/MainApplication.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package com.example;
-
-import android.app.Application;
-
-import com.facebook.react.ReactApplication;
-import com.facebook.react.ReactNativeHost;
-import com.facebook.react.ReactPackage;
-import com.facebook.react.shell.MainReactPackage;
-import com.facebook.soloader.SoLoader;
-import com.wix.interactable.Interactable;
-
-import java.util.Arrays;
-import java.util.List;
-
-public class MainApplication extends Application implements ReactApplication {
-
- private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
- @Override
- public boolean getUseDeveloperSupport() {
- return BuildConfig.DEBUG;
- }
-
- @Override
- protected List getPackages() {
- return Arrays.asList(
- new MainReactPackage(),
- new Interactable()
- );
- }
- };
-
- @Override
- public ReactNativeHost getReactNativeHost() {
- return mReactNativeHost;
- }
-
- @Override
- public void onCreate() {
- super.onCreate();
- SoLoader.init(this, /* native exopackage */ false);
- }
-}
diff --git a/example/android/app/src/main/res/values/strings.xml b/example/android/app/src/main/res/values/strings.xml
deleted file mode 100644
index 5e81c913..00000000
--- a/example/android/app/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Interactable
-
diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml
deleted file mode 100644
index 25fe7ea9..00000000
--- a/example/android/app/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/example/android/build.gradle b/example/android/build.gradle
deleted file mode 100644
index 0d911f26..00000000
--- a/example/android/build.gradle
+++ /dev/null
@@ -1,24 +0,0 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
- repositories {
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:2.3.0'
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- mavenLocal()
- jcenter()
- 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/android/gradle.properties b/example/android/gradle.properties
deleted file mode 100644
index 21edee9d..00000000
--- a/example/android/gradle.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-# 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/android/gradle/wrapper/gradle-wrapper.jar b/example/android/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index b5166dad..00000000
Binary files a/example/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/example/android/keystores/BUCK b/example/android/keystores/BUCK
deleted file mode 100644
index 15da20e6..00000000
--- a/example/android/keystores/BUCK
+++ /dev/null
@@ -1,8 +0,0 @@
-keystore(
- name = 'debug',
- store = 'debug.keystore',
- properties = 'debug.keystore.properties',
- visibility = [
- 'PUBLIC',
- ],
-)
diff --git a/example/android/keystores/debug.keystore.properties b/example/android/keystores/debug.keystore.properties
deleted file mode 100644
index 121bfb49..00000000
--- a/example/android/keystores/debug.keystore.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-key.store=debug.keystore
-key.alias=androiddebugkey
-key.store.password=android
-key.alias.password=android
diff --git a/example/android/settings.gradle b/example/android/settings.gradle
deleted file mode 100644
index 59a97039..00000000
--- a/example/android/settings.gradle
+++ /dev/null
@@ -1,6 +0,0 @@
-rootProject.name = 'example'
-
-include ':app'
-
-include ':react-native-interactable'
-project(':react-native-interactable').projectDir = new File(rootProject.projectDir, '../../lib/android')
diff --git a/example/index.android.js b/example/index.android.js
deleted file mode 100644
index 89a61f8b..00000000
--- a/example/index.android.js
+++ /dev/null
@@ -1 +0,0 @@
-require('./src/app');
\ No newline at end of file
diff --git a/example/index.ios.js b/example/index.ios.js
deleted file mode 100644
index 89a61f8b..00000000
--- a/example/index.ios.js
+++ /dev/null
@@ -1 +0,0 @@
-require('./src/app');
\ No newline at end of file
diff --git a/example/ios/example/AppDelegate.m b/example/ios/example/AppDelegate.m
deleted file mode 100644
index 0f5c06b3..00000000
--- a/example/ios/example/AppDelegate.m
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * 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 "AppDelegate.h"
-
-#import
-#import
-
-@implementation AppDelegate
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
-{
- NSURL *jsCodeLocation;
-
- jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
-
- RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
- moduleName:@"example"
- initialProperties:nil
- launchOptions:launchOptions];
- rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
-
- 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/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json b/example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json
deleted file mode 100644
index 118c98f7..00000000
--- a/example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "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/src/TouchesInside.js b/example/src/TouchesInside.js
deleted file mode 100644
index 033e3ad4..00000000
--- a/example/src/TouchesInside.js
+++ /dev/null
@@ -1,81 +0,0 @@
-import React, { Component } from 'react';
-import { StyleSheet, View, Text, Switch, Button, Picker, Slider, WebView } from 'react-native';
-import Interactable from 'react-native-interactable';
-
-export default class TouchesInside extends Component {
- constructor(props) {
- super(props);
- this.state = {
- vertical: true,
- dragEnabled: true,
- language: 'java',
- switch: true
- };
- }
- render() {
- return (
-
-
-
- Vertical:
- this.setState({vertical: value})} />
- Can drag:
- this.setState({dragEnabled: value})} />
-
-
-
-
-
-
-
-
- );
- }
-}
-
-const styles = StyleSheet.create({
- container: {
- flex: 1,
- justifyContent: 'center',
- alignItems: 'center',
- backgroundColor: 'white',
- },
- direction: {
- flexDirection: 'row',
- alignItems: 'center',
- marginBottom: 20
- }
-});
diff --git a/example/src/app.js b/example/src/app.js
deleted file mode 100644
index 43670077..00000000
--- a/example/src/app.js
+++ /dev/null
@@ -1,166 +0,0 @@
-import React, { Component } from 'react';
-import {
- AppRegistry,
- StyleSheet,
- View,
- Image,
- ScrollView,
- TouchableOpacity,
- Text
-} from 'react-native';
-import ChatHeads from './ChatHeads';
-import SwipeableCard from './SwipeableCard';
-import IconDrawer from './IconDrawer';
-import CollapsingHeader from './CollapsingHeader';
-import MoreDrawers from './MoreDrawers';
-import MoreChatHeads from './MoreChatHeads';
-import HandleTouches from './HandleTouches';
-import TouchesInside from './TouchesInside';
-import TouchesInsideStatic from './TouchesInsideStatic';
-import HandleRelayout from './HandleRelayout';
-import SideMenu from './SideMenu';
-import SnapTo from './SnapTo';
-import ChangePosition from './ChangePosition';
-import AlertAreas from './AlertAreas';
-import CollapsingHeaderWithScroll from './CollapsingHeaderWithScroll';
-
-export default class example extends Component {
- constructor(props) {
- super(props);
- this.state = {
- currentExample: undefined
- }
- }
-
- render() {
- return (
-
-
-
-
-
-
- React Native Interactions
-
-
-
- {this.renderContent()}
-
-
-
- );
- }
-
- renderContent() {
- if (this.state.currentExample) {
- const ExampleComponent = this.state.currentExample;
- return ;
- }
-
- return (
-
-
- Chat Heads
-
-
- Swipeable Card
-
-
- Icon Drawer (row actions)
-
-
- Collapsing Header
-
-
- More Drawers (row actions)
-
-
- More Chat Heads
-
-
- Handle Touches
-
-
- Touches Inside (interactive)
-
-
- Touches Inside (static)
-
-
- Handle Relayout
-
-
- Side Menu (imperative cmd)
-
-
- Snap To (imperative cmd)
-
-
- Change Position (imperative cmd)
-
-
- Alert Areas and Drag Event
-
-
- Collapsing Header with Scroll
-
-
- );
- }
-
- onExamplePress(currentExample) {
- this.setState({currentExample});
- }
-
- onMenuPress() {
- this.setState({currentExample: undefined});
- }
-}
-
-const styles = StyleSheet.create({
- container: {
- flex: 1,
- alignItems: 'stretch',
- backgroundColor: 'white',
- },
- header: {
- height: 75,
- paddingTop: 22,
- paddingLeft: 20,
- flexDirection: 'row',
- backgroundColor: '#5894f3',
- alignItems: 'center',
- zIndex: 1001
- },
- body: {
- flex: 1,
- zIndex: 1000
- },
- menuContainer: {
- flex: 1,
- paddingTop: 15,
- paddingLeft: 40,
- backgroundColor: '#223f6b'
- },
- menuIcon: {
- width: 30,
- height: 30
- },
- headerTitle: {
- marginLeft: 30,
- color: 'white',
- fontSize: 20
- },
- button: {
- color: '#e0e0e0',
- fontSize: 20,
- marginBottom: 24
- },
- button2: {
- color: '#F09B95',
- fontSize: 20,
- marginBottom: 24
- }
-});
-
-AppRegistry.registerComponent('example', () => example);
diff --git a/index.android.js b/index.android.js
deleted file mode 100644
index 0d4ac79e..00000000
--- a/index.android.js
+++ /dev/null
@@ -1 +0,0 @@
-require('./example/index.android');
\ No newline at end of file
diff --git a/index.ios.js b/index.ios.js
deleted file mode 100644
index 2427c8f9..00000000
--- a/index.ios.js
+++ /dev/null
@@ -1 +0,0 @@
-require('./example/index.ios');
\ No newline at end of file
diff --git a/index.js b/index.js
new file mode 100644
index 00000000..d498d78c
--- /dev/null
+++ b/index.js
@@ -0,0 +1 @@
+require('./playground/index.js');
\ No newline at end of file
diff --git a/ios b/ios
new file mode 120000
index 00000000..879d307c
--- /dev/null
+++ b/ios
@@ -0,0 +1 @@
+lib/ios
\ No newline at end of file
diff --git a/lib/android/build.gradle b/lib/android/build.gradle
index 3ee59200..5a492c3e 100644
--- a/lib/android/build.gradle
+++ b/lib/android/build.gradle
@@ -1,14 +1,14 @@
apply plugin: 'com.android.library'
android {
- compileSdkVersion 25
- buildToolsVersion "25.0.2"
+ compileSdkVersion rootProject.ext.has("compileSdkVersion") ? rootProject.ext.compileSdkVersion : 27
+ buildToolsVersion rootProject.ext.has("buildToolsVersion") ? rootProject.ext.buildToolsVersion : "27.0.3"
defaultConfig {
- minSdkVersion 16
- targetSdkVersion 25
+ minSdkVersion rootProject.ext.has("minSdkVersion") ? rootProject.ext.minSdkVersion : 16
+ targetSdkVersion rootProject.ext.has("targetSdkVersion") ? rootProject.ext.targetSdkVersion : 26
versionCode 1
versionName "1.0"
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
@@ -39,9 +39,9 @@ android {
}
dependencies {
- compile fileTree(dir: 'libs', include: ['*.jar'])
- testCompile 'junit:junit:4.12'
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ testImplementation 'junit:junit:4.12'
// node_modules
- compile 'com.facebook.react:react-native:+'
+ implementation 'com.facebook.react:react-native:+'
}
diff --git a/lib/android/gradle/wrapper/gradle-wrapper.properties b/lib/android/gradle/wrapper/gradle-wrapper.properties
index b7169b1e..a048a19c 100644
--- a/lib/android/gradle/wrapper/gradle-wrapper.properties
+++ b/lib/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-3.3-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
diff --git a/lib/android/src/androidTest/java/com/wix/interactable/ExampleInstrumentedTest.java b/lib/android/src/androidTest/java/com/wix/interactable/ExampleInstrumentedTest.java
deleted file mode 100644
index 0411aacd..00000000
--- a/lib/android/src/androidTest/java/com/wix/interactable/ExampleInstrumentedTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.wix.interactable;
-
-import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-/**
- * Instrumentation test, which will execute on an Android device.
- *
- * @see Testing documentation
- */
-@RunWith(AndroidJUnit4.class)
-public class ExampleInstrumentedTest {
- @Test
- public void useAppContext() throws Exception {
- // Context of the app under test.
- Context appContext = InstrumentationRegistry.getTargetContext();
-
- assertEquals("com.wix.interactable", appContext.getPackageName());
- }
-}
diff --git a/lib/android/src/main/java/com/wix/interactable/Events.java b/lib/android/src/main/java/com/wix/interactable/Events.java
index c3f86a58..733c4ed8 100644
--- a/lib/android/src/main/java/com/wix/interactable/Events.java
+++ b/lib/android/src/main/java/com/wix/interactable/Events.java
@@ -34,6 +34,28 @@ public void dispatch(RCTEventEmitter rctEventEmitter) {
}
}
+ public static class OnSnapStartEvent extends Event {
+
+ WritableMap eventData;
+
+ public OnSnapStartEvent(int viewTag, int indexOfSnapPoint, String snapPointId) {
+ super(viewTag);
+ eventData = Arguments.createMap();
+ eventData.putInt("index",indexOfSnapPoint);
+ eventData.putString("id", snapPointId);
+ }
+
+ @Override
+ public String getEventName() {
+ return "onSnapStart";
+ }
+
+ @Override
+ public void dispatch(RCTEventEmitter rctEventEmitter) {
+ rctEventEmitter.receiveEvent(getViewTag(), getEventName(), eventData);
+ }
+ }
+
public static class OnAnimatedEvent extends Event {
WritableMap eventData;
diff --git a/lib/android/src/main/java/com/wix/interactable/InteractableSpring.java b/lib/android/src/main/java/com/wix/interactable/InteractableSpring.java
index 642693d8..e55fd49f 100644
--- a/lib/android/src/main/java/com/wix/interactable/InteractableSpring.java
+++ b/lib/android/src/main/java/com/wix/interactable/InteractableSpring.java
@@ -5,13 +5,11 @@
*/
public class InteractableSpring {
- float toss;
float tension;
float damping;
- public InteractableSpring(float toss, float tension, float damping) {
- this.toss = toss;
+ public InteractableSpring(float tension, float damping) {
this.tension = tension;
this.damping = damping;
}
diff --git a/lib/android/src/main/java/com/wix/interactable/InteractableView.java b/lib/android/src/main/java/com/wix/interactable/InteractableView.java
index c90485fa..feacd5cb 100644
--- a/lib/android/src/main/java/com/wix/interactable/InteractableView.java
+++ b/lib/android/src/main/java/com/wix/interactable/InteractableView.java
@@ -45,7 +45,9 @@ public class InteractableView extends ViewGroup implements PhysicsAnimator.Physi
private PointF initialPosition;
private InteractableArea boundaries;
- private InteractableSpring dragWithSprings;
+ private PhysicsBounceBehavior oldBoundariesBehavior;
+
+ private InteractableSpring dragWithSpring;
private float dragToss;
private PointF velocity;
private boolean reportOnAnimatedEvents;
@@ -284,7 +286,7 @@ private void startDrag(MotionEvent ev) {
this.dragStartLocation = new PointF(ev.getX(),ev.getY());
this.animator.removeTempBehaviors();
this.animator.setDragging(true);
- this.dragBehavior = addTempDragBehavior(this.dragWithSprings);
+ this.dragBehavior = addTempDragBehavior(this.dragWithSpring);
try {
getReactRoot().onChildStartedNativeGesture(ev);
} catch (Exception e) {
@@ -294,23 +296,29 @@ private void startDrag(MotionEvent ev) {
private void handleEndOfDrag() {
this.animator.removeTempBehaviors();
- this.dragBehavior = null;
this.animator.setDragging(false);
PointF velocity = this.animator.getTargetVelocity(this);
if (this.horizontalOnly) velocity.y = 0;
if (this.verticalOnly) velocity.x = 0;
- float toss = 0.1f;
- if (this.dragWithSprings != null) toss = this.dragWithSprings.toss;
PointF currentPosition = getCurrentPosition();
+ float toss = this.dragToss;
PointF projectedCenter = new PointF(getTranslationX() + toss*velocity.x,
getTranslationY() + toss*velocity.y);
InteractablePoint snapPoint = InteractablePoint.findClosestPoint(snapPoints,projectedCenter);
- listener.onDrag("end",currentPosition.x, currentPosition.y, snapPoint.id);
+ String targetSnapPointId = "";
+ if (snapPoint != null && snapPoint.id != null) {
+ targetSnapPointId = snapPoint.id;
+ }
+
+ if (this.dragBehavior != null) {
+ listener.onDrag("end",currentPosition.x, currentPosition.y, targetSnapPointId);
+ }
+ this.dragBehavior = null;
addTempSnapToPointBehavior(snapPoint);
addTempBounceBehaviorWithBoundaries(this.boundaries);
@@ -321,6 +329,7 @@ private void addTempSnapToPointBehavior(InteractablePoint snapPoint) {
return;
}
listener.onSnap(snapPoints.indexOf(snapPoint), snapPoint.id);
+ listener.onSnapStart(snapPoints.indexOf(snapPoint), snapPoint.id);
PhysicsSpringBehavior snapBehavior = new PhysicsSpringBehavior(this,snapPoint.positionWithOrigin());
snapBehavior.tension = snapPoint.tension;
@@ -368,6 +377,7 @@ private void addConstantBoundaries(InteractableArea boundaries) {
PhysicsBounceBehavior bounceBehavior = new PhysicsBounceBehavior(this,minPoint, maxPoint,0, boundaries.isHaptic());
this.animator.addBehavior(bounceBehavior);
+ this.oldBoundariesBehavior = bounceBehavior;
}
}
@@ -455,7 +465,7 @@ public void setHorizontalOnly(boolean horizontalOnly) {
public void setDragEnabled(boolean dragEnabled) {
this.dragEnabled = dragEnabled;
-
+
if (this.dragBehavior != null && !dragEnabled) {
handleEndOfDrag();
}
@@ -469,12 +479,13 @@ public void setInitialPosition(PointF initialPosition) {
public void setBoundaries(InteractableArea boundaries) {
this.boundaries = boundaries;
+ animator.removeBehavior(this.oldBoundariesBehavior);
addConstantBoundaries(boundaries);
}
- public void setDragWithSprings(InteractableSpring dragWithSprings) {
- this.dragWithSprings = dragWithSprings;
+ public void setDragWithSpring(InteractableSpring dragWithSpring) {
+ this.dragWithSpring = dragWithSpring;
}
public void setDragToss(float dragToss) {
@@ -518,7 +529,7 @@ public void setFrictionAreas(ArrayList frictionAreas) {
public void setVelocity(PointF velocity) {
- if(dragBehavior!=null) return;
+ if(this.dragBehavior != null) return;
this.velocity = velocity;
this.animator.setTargetVelocity(this,this.velocity);
handleEndOfDrag();
@@ -526,7 +537,7 @@ public void setVelocity(PointF velocity) {
public void snapTo(int index) {
- if(this.snapPoints!=null && index >= 0 && index < this.snapPoints.size())
+ if(this.snapPoints != null && index >= 0 && index < this.snapPoints.size())
{
this.animator.removeTempBehaviors();
this.dragBehavior = null;
@@ -537,7 +548,7 @@ public void snapTo(int index) {
}
public void changePosition(PointF position) {
- if(dragBehavior != null) return;
+ if(this.dragBehavior != null) return;
setTranslationX(position.x);
setTranslationY(position.y);
handleEndOfDrag();
@@ -546,6 +557,7 @@ public void changePosition(PointF position) {
public interface InteractionListener {
void onSnap(int indexOfSnapPoint, String snapPointId);
+ void onSnapStart(int indexOfSnapPoint, String snapPointId);
void onAlert(String alertAreaId, String alertType);
void onAnimatedEvent(float x, float y);
void onDrag(String state, float x, float y, String targetSnapPointId);
diff --git a/lib/android/src/main/java/com/wix/interactable/InteractableViewManager.java b/lib/android/src/main/java/com/wix/interactable/InteractableViewManager.java
index 5c72bae7..db4a647e 100644
--- a/lib/android/src/main/java/com/wix/interactable/InteractableViewManager.java
+++ b/lib/android/src/main/java/com/wix/interactable/InteractableViewManager.java
@@ -1,8 +1,5 @@
package com.wix.interactable;
-import android.support.annotation.Nullable;
-import android.util.Log;
-
import com.facebook.infer.annotation.Assertions;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
@@ -16,12 +13,15 @@
import java.util.Map;
+import androidx.annotation.Nullable;
+
public class InteractableViewManager extends ViewGroupManager {
public static final String REACT_CLASS = "InteractableView";
public static final int COMMAND_SET_VELOCITY = 1;
public static final int COMMAND_SNAP_TO = 2;
public static final int COMMAND_CHANGE_POSITION = 3;
+ public static final int COMMAND_BRING_TO_FRONT = 4;
@Override
@@ -39,7 +39,8 @@ public Map getCommandsMap() {
return MapBuilder.of(
"setVelocity", COMMAND_SET_VELOCITY,
"snapTo", COMMAND_SNAP_TO,
- "changePosition", COMMAND_CHANGE_POSITION
+ "changePosition", COMMAND_CHANGE_POSITION,
+ "bringToFront", COMMAND_BRING_TO_FRONT
);
}
@@ -64,6 +65,10 @@ public void receiveCommand(
view.changePosition(RNConvert.pointF(args.getMap(0)));
return;
}
+ case COMMAND_BRING_TO_FRONT: {
+ view.bringToFront();
+ return;
+ }
default:
throw new IllegalArgumentException(String.format(
"Unsupported command %d received by %s.",
@@ -77,6 +82,11 @@ public void setVerticalOnly(InteractableView view, @Nullable boolean verticalOnl
view.setVerticalOnly(verticalOnly);
}
+ @ReactProp(name = "startOnFront")
+ public void setStartOnFront(InteractableView view, @Nullable boolean startOnFront) {
+ view.bringToFront();
+ }
+
@ReactProp(name = "horizontalOnly")
public void setHorizontalOnly(InteractableView view, @Nullable boolean horizontalOnly) {
view.setHorizontalOnly(horizontalOnly);
@@ -112,9 +122,9 @@ public void setAlertAreas(InteractableView view, @Nullable ReadableArray alertAr
view.setAlertAreas(RNConvert.interactablePoints(alertAreas));
}
- @ReactProp(name = "dragWithSprings")
- public void setDrag(InteractableView view, @Nullable ReadableMap dragWithSprings) {
- view.setDragWithSprings(RNConvert.interactableDrag(dragWithSprings));
+ @ReactProp(name = "dragWithSpring")
+ public void setDrag(InteractableView view, @Nullable ReadableMap dragWithSpring) {
+ view.setDragWithSpring(RNConvert.interactableDrag(dragWithSpring));
}
@ReactProp(name = "dragToss")
@@ -148,6 +158,7 @@ protected void addEventEmitters(ThemedReactContext reactContext, InteractableVie
public Map getExportedCustomDirectEventTypeConstants() {
return MapBuilder.builder()
.put("onSnap", MapBuilder.of("registrationName", "onSnap"))
+ .put("onSnapStart", MapBuilder.of("registrationName", "onSnapStart"))
.put("onAlert", MapBuilder.of("registrationName", "onAlert"))
.put("onAnimatedEvent", MapBuilder.of("registrationName", "onAnimatedEvent"))
.put("onDrag", MapBuilder.of("registrationName", "onDrag"))
@@ -169,6 +180,11 @@ public void onSnap(int indexOfSnapPoint, String snapPointId) {
eventDispatcher.dispatchEvent(new Events.OnSnapEvent(interactableView.getId(), indexOfSnapPoint, snapPointId));
}
+ @Override
+ public void onSnapStart(int indexOfSnapPoint, String snapPointId) {
+ eventDispatcher.dispatchEvent(new Events.OnSnapStartEvent(interactableView.getId(), indexOfSnapPoint, snapPointId));
+ }
+
@Override
public void onAlert(String alertAreaId, String alertType) {
eventDispatcher.dispatchEvent(new Events.OnAlertEvent(interactableView.getId(), alertAreaId, alertType));
@@ -190,4 +206,3 @@ public void onStop(float x, float y) {
}
}
}
-
diff --git a/lib/android/src/main/java/com/wix/interactable/RNConvert/RNConvert.java b/lib/android/src/main/java/com/wix/interactable/RNConvert/RNConvert.java
index 2ee3cce0..431cb9dc 100644
--- a/lib/android/src/main/java/com/wix/interactable/RNConvert/RNConvert.java
+++ b/lib/android/src/main/java/com/wix/interactable/RNConvert/RNConvert.java
@@ -42,11 +42,10 @@ public static InteractablePoint interactablePoint(ReadableMap params) {
}
public static InteractableSpring interactableDrag(ReadableMap params) {
- float toss = params.hasKey("toss") ? (float) params.getDouble("toss") : 0.1f;
float tension = params.hasKey("tension") ? (float) params.getDouble("tension") : Float.MAX_VALUE;
float damping = params.hasKey("damping") ? (float) params.getDouble("damping") : 0f;
- return new InteractableSpring(toss, tension, damping);
+ return new InteractableSpring(tension, damping);
}
public static ArrayList interactablePoints(ReadableArray points) {
diff --git a/lib/android/src/main/java/com/wix/interactable/physics/PhysicsAnimator.java b/lib/android/src/main/java/com/wix/interactable/physics/PhysicsAnimator.java
index 8606d19f..7f6e0c9b 100644
--- a/lib/android/src/main/java/com/wix/interactable/physics/PhysicsAnimator.java
+++ b/lib/android/src/main/java/com/wix/interactable/physics/PhysicsAnimator.java
@@ -79,6 +79,17 @@ public void addBehavior(PhysicsBehavior behavior) {
ensureRunning();
}
+ public void removeBehavior(PhysicsBehavior behavior) {
+ Iterator iterator = behaviors.iterator();
+
+ while (iterator.hasNext()) {
+ if (iterator.next() == behavior) {
+ iterator.remove();
+ break;
+ }
+ }
+ }
+
public void addTempBehavior(PhysicsBehavior behavior) {
behavior.isTemp = true;
addBehavior(behavior);
diff --git a/example/ios/example/Info.plist b/lib/ios/Interactable-tvOS/Info.plist
similarity index 89%
rename from example/ios/example/Info.plist
rename to lib/ios/Interactable-tvOS/Info.plist
index 108a7e0c..ecbd496b 100644
--- a/example/ios/example/Info.plist
+++ b/lib/ios/Interactable-tvOS/Info.plist
@@ -7,7 +7,7 @@
CFBundleExecutable$(EXECUTABLE_NAME)CFBundleIdentifier
- org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
+ $(PRODUCT_BUNDLE_IDENTIFIER)CFBundleInfoDictionaryVersion6.0CFBundleName
@@ -44,9 +44,9 @@
UISupportedInterfaceOrientationsUIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
- UIStatusBarStyle
- UIStatusBarStyleLightContentUIViewControllerBasedStatusBarAppearance
diff --git a/example/ios/exampleTests/Info.plist b/lib/ios/Interactable-tvOSTests/Info.plist
similarity index 100%
rename from example/ios/exampleTests/Info.plist
rename to lib/ios/Interactable-tvOSTests/Info.plist
diff --git a/lib/ios/Interactable.xcodeproj/project.pbxproj b/lib/ios/Interactable.xcodeproj/project.pbxproj
index d79ee89b..485c0916 100644
--- a/lib/ios/Interactable.xcodeproj/project.pbxproj
+++ b/lib/ios/Interactable.xcodeproj/project.pbxproj
@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
+ BDFEED7880E51461687F39A7 /* libPods-Interactable.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A92E78403382EF489E3D83C2 /* libPods-Interactable.a */; };
CC01279C1E3ACC3900B23C9F /* InteractableViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = CC01279B1E3ACC3900B23C9F /* InteractableViewManager.m */; };
CC01279D1E3ACC3900B23C9F /* InteractableViewManager.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CC01279A1E3ACC3900B23C9F /* InteractableViewManager.h */; };
CC0127DC1E3AD42C00B23C9F /* InteractableView.m in Sources */ = {isa = PBXBuildFile; fileRef = CC0127DB1E3AD42C00B23C9F /* InteractableView.m */; };
@@ -39,6 +40,9 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ 99DBCE82136182BC38B6F207 /* Pods-Interactable.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Interactable.release.xcconfig"; path = "Target Support Files/Pods-Interactable/Pods-Interactable.release.xcconfig"; sourceTree = ""; };
+ 9D230B1B6E29DD56F501C6B0 /* Pods-Interactable.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Interactable.debug.xcconfig"; path = "Target Support Files/Pods-Interactable/Pods-Interactable.debug.xcconfig"; sourceTree = ""; };
+ A92E78403382EF489E3D83C2 /* libPods-Interactable.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Interactable.a"; sourceTree = BUILT_PRODUCTS_DIR; };
CC0127971E3ACC3900B23C9F /* libInteractable.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libInteractable.a; sourceTree = BUILT_PRODUCTS_DIR; };
CC01279A1E3ACC3900B23C9F /* InteractableViewManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InteractableViewManager.h; sourceTree = ""; };
CC01279B1E3ACC3900B23C9F /* InteractableViewManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InteractableViewManager.m; sourceTree = ""; };
@@ -77,17 +81,37 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ BDFEED7880E51461687F39A7 /* libPods-Interactable.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
+ A5DDF57F3F7D0B187E1689EC /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ A92E78403382EF489E3D83C2 /* libPods-Interactable.a */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+ BBF5D5EA22BA66A67AF6BA89 /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ 9D230B1B6E29DD56F501C6B0 /* Pods-Interactable.debug.xcconfig */,
+ 99DBCE82136182BC38B6F207 /* Pods-Interactable.release.xcconfig */,
+ );
+ path = Pods;
+ sourceTree = "";
+ };
CC01278E1E3ACC3900B23C9F = {
isa = PBXGroup;
children = (
CC0127991E3ACC3900B23C9F /* Interactable */,
CC0127981E3ACC3900B23C9F /* Products */,
+ BBF5D5EA22BA66A67AF6BA89 /* Pods */,
+ A5DDF57F3F7D0B187E1689EC /* Frameworks */,
);
sourceTree = "";
};
@@ -151,6 +175,7 @@
isa = PBXNativeTarget;
buildConfigurationList = CC0127A01E3ACC3900B23C9F /* Build configuration list for PBXNativeTarget "Interactable" */;
buildPhases = (
+ BE9A56418E0DFC4858BA5936 /* [CP] Check Pods Manifest.lock */,
CC0127931E3ACC3900B23C9F /* Sources */,
CC0127941E3ACC3900B23C9F /* Frameworks */,
CC0127951E3ACC3900B23C9F /* CopyFiles */,
@@ -184,6 +209,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
+ English,
en,
);
mainGroup = CC01278E1E3ACC3900B23C9F;
@@ -196,6 +222,31 @@
};
/* End PBXProject section */
+/* Begin PBXShellScriptBuildPhase section */
+ BE9A56418E0DFC4858BA5936 /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Interactable-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
+/* End PBXShellScriptBuildPhase section */
+
/* Begin PBXSourcesBuildPhase section */
CC0127931E3ACC3900B23C9F /* Sources */ = {
isa = PBXSourcesBuildPhase;
@@ -312,6 +363,7 @@
};
CC0127A11E3ACC3900B23C9F /* Debug */ = {
isa = XCBuildConfiguration;
+ baseConfigurationReference = 9D230B1B6E29DD56F501C6B0 /* Pods-Interactable.debug.xcconfig */;
buildSettings = {
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -321,6 +373,7 @@
};
CC0127A21E3ACC3900B23C9F /* Release */ = {
isa = XCBuildConfiguration;
+ baseConfigurationReference = 99DBCE82136182BC38B6F207 /* Pods-Interactable.release.xcconfig */;
buildSettings = {
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
diff --git a/real-life-example/ios/example.xcodeproj/xcshareddata/xcschemes/example Release.xcscheme b/lib/ios/Interactable.xcodeproj/xcshareddata/xcschemes/Interactable-tvOS.xcscheme
similarity index 53%
rename from real-life-example/ios/example.xcodeproj/xcshareddata/xcschemes/example Release.xcscheme
rename to lib/ios/Interactable.xcodeproj/xcshareddata/xcschemes/Interactable-tvOS.xcscheme
index 459153a3..849b6020 100644
--- a/real-life-example/ios/example.xcodeproj/xcshareddata/xcschemes/example Release.xcscheme
+++ b/lib/ios/Interactable.xcodeproj/xcshareddata/xcschemes/Interactable-tvOS.xcscheme
@@ -1,6 +1,6 @@
@@ -28,37 +28,61 @@
buildForAnalyzing = "YES">
+ BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
+ BuildableName = "Interactable-tvOS.app"
+ BlueprintName = "Interactable-tvOS"
+ ReferencedContainer = "container:Interactable.xcodeproj">
+
+
+
+
+
+
+
+
+ BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
+ BuildableName = "Interactable-tvOS.app"
+ BlueprintName = "Interactable-tvOS"
+ ReferencedContainer = "container:Interactable.xcodeproj">
+ BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
+ BuildableName = "Interactable-tvOS.app"
+ BlueprintName = "Interactable-tvOS"
+ ReferencedContainer = "container:Interactable.xcodeproj">
@@ -88,10 +112,10 @@
runnableDebuggingMode = "0">
+ BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
+ BuildableName = "Interactable-tvOS.app"
+ BlueprintName = "Interactable-tvOS"
+ ReferencedContainer = "container:Interactable.xcodeproj">
diff --git a/example/ios/example.xcodeproj/xcshareddata/xcschemes/example Release.xcscheme b/lib/ios/Interactable.xcodeproj/xcshareddata/xcschemes/Interactable.xcscheme
similarity index 65%
rename from example/ios/example.xcodeproj/xcshareddata/xcschemes/example Release.xcscheme
rename to lib/ios/Interactable.xcodeproj/xcshareddata/xcschemes/Interactable.xcscheme
index 459153a3..605a58c7 100644
--- a/example/ios/example.xcodeproj/xcshareddata/xcschemes/example Release.xcscheme
+++ b/lib/ios/Interactable.xcodeproj/xcshareddata/xcschemes/Interactable.xcscheme
@@ -1,6 +1,6 @@
+ ReferencedContainer = "container:../../playground/ios/Pods/Pods.xcodeproj">
+ BlueprintIdentifier = "CC0127961E3ACC3900B23C9F"
+ BuildableName = "libInteractable.a"
+ BlueprintName = "Interactable"
+ ReferencedContainer = "container:Interactable.xcodeproj">
@@ -46,19 +46,19 @@
+ BlueprintIdentifier = "CC0127961E3ACC3900B23C9F"
+ BuildableName = "libInteractable.a"
+ BlueprintName = "Interactable"
+ ReferencedContainer = "container:Interactable.xcodeproj">
+ BlueprintIdentifier = "CC0127961E3ACC3900B23C9F"
+ BuildableName = "libInteractable.a"
+ BlueprintName = "Interactable"
+ ReferencedContainer = "container:Interactable.xcodeproj">
@@ -88,10 +88,10 @@
runnableDebuggingMode = "0">
+ BlueprintIdentifier = "CC0127961E3ACC3900B23C9F"
+ BuildableName = "libInteractable.a"
+ BlueprintName = "Interactable"
+ ReferencedContainer = "container:Interactable.xcodeproj">
diff --git a/lib/ios/Interactable.xcworkspace/contents.xcworkspacedata b/lib/ios/Interactable.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 00000000..61000ceb
--- /dev/null
+++ b/lib/ios/Interactable.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
diff --git a/lib/ios/Interactable.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/lib/ios/Interactable.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 00000000..18d98100
--- /dev/null
+++ b/lib/ios/Interactable.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/lib/ios/Interactable/InteractableView.h b/lib/ios/Interactable/InteractableView.h
index 2b3b418b..d39eea6f 100644
--- a/lib/ios/Interactable/InteractableView.h
+++ b/lib/ios/Interactable/InteractableView.h
@@ -29,6 +29,7 @@
@property (nonatomic, copy) InteractableSpring *dragWithSpring;
@property (nonatomic, assign) CGFloat dragToss;
@property (nonatomic, copy) RCTDirectEventBlock onSnap;
+@property (nonatomic, copy) RCTDirectEventBlock onSnapStart;
@property (nonatomic, copy) RCTDirectEventBlock onStop;
@property (nonatomic, copy) RCTDirectEventBlock onAlert;
@property (nonatomic, copy) RCTDirectEventBlock onDrag;
@@ -40,5 +41,6 @@
- (void)setVelocity:(NSDictionary*)params;
- (void)snapTo:(NSDictionary*)params;
- (void)changePosition:(NSDictionary*)params;
+- (void)bringToFront:(NSDictionary*)params;
@end
diff --git a/lib/ios/Interactable/InteractableView.m b/lib/ios/Interactable/InteractableView.m
index 2472e07e..d413a5da 100644
--- a/lib/ios/Interactable/InteractableView.m
+++ b/lib/ios/Interactable/InteractableView.m
@@ -201,9 +201,12 @@ - (void)initializeAnimator
}
}
+
+// MARK: - PhysicsAnimatorDelegate
+
- (void)physicsAnimatorDidPause:(PhysicsAnimator *)animator
{
- if (self.onSnap)
+ if (self.onSnap && self.pan.state == UIGestureRecognizerStatePossible )
{
InteractablePoint *snapPoint = [InteractablePoint findClosestPoint:self.snapPoints toPoint:self.center withOrigin:self.origin];
if (snapPoint)
@@ -227,6 +230,8 @@ - (void)physicsAnimatorDidPause:(PhysicsAnimator *)animator
}
}
+// MARK: - Reports
+
- (void)reportAnimatedEvent
{
if (self.reportOnAnimatedEvents && self.originSet)
@@ -286,17 +291,22 @@ - (void)reportAlertEvent
}
}
+- (void)reportDragEvent:(NSString*)state
+{
+ [self reportDragEvent:state targetSnapPointId:@""];
+}
+
- (void)reportDragEvent:(NSString*)state targetSnapPointId:(NSString*)targetSnapPointId
{
if (self.onDrag)
{
CGPoint deltaFromOrigin = [InteractablePoint deltaBetweenPoint:self.center andOrigin:self.origin];
self.onDrag(@{
- @"state": state,
- @"x": @(deltaFromOrigin.x),
- @"y": @(deltaFromOrigin.y),
- @"targetSnapPointId":targetSnapPointId
- });
+ @"state": state,
+ @"x": @(deltaFromOrigin.x),
+ @"y": @(deltaFromOrigin.y),
+ @"targetSnapPointId":targetSnapPointId
+ });
}
}
@@ -309,7 +319,7 @@ - (void)handlePan:(UIPanGestureRecognizer *)pan
[self cancelCurrentReactTouch];
self.dragStartCenter = self.center;
[self setTempBehaviorsForDragStart];
- [self reportDragEvent:@"start" targetSnapPointId:@""];
+ [self reportDragEvent:@"start"];
}
CGPoint translation = [pan translationInView:self];
@@ -321,7 +331,13 @@ - (void)handlePan:(UIPanGestureRecognizer *)pan
pan.state == UIGestureRecognizerStateCancelled)
{
InteractablePoint* point = [self setTempBehaviorsForDragEnd];
- [self reportDragEvent:@"end" targetSnapPointId:point.id];
+ NSString* targetSnapPointId = point && point.id != nil ? point.id : @"";
+ if (targetSnapPointId == (id)[NSNull null] || targetSnapPointId.length == 0 ) {
+ [self reportDragEvent:@"end"];
+ } else {
+ [self reportDragEvent:@"end" targetSnapPointId:targetSnapPointId];
+ }
+
}
}
@@ -416,8 +432,20 @@ - (InteractablePoint*)setTempBehaviorsForDragEnd
CGPoint projectedCenter = CGPointMake(self.center.x + toss*velocity.x, self.center.y + toss*velocity.y);
InteractablePoint *snapPoint = [InteractablePoint findClosestPoint:self.snapPoints toPoint:projectedCenter withOrigin:self.origin];
- if (snapPoint) [self addTempSnapToPointBehavior:snapPoint];
+ if (snapPoint)
+ {
+ [self addTempSnapToPointBehavior:snapPoint];
+ if (self.onSnapStart)
+ {
+ self.onSnapStart(@
+ {
+ @"index": @([self.snapPoints indexOfObject:snapPoint]),
+ @"id": snapPoint.id
+ });
+ }
+ }
+
[self addTempBounceBehaviorWithBoundaries:self.boundaries];
return snapPoint;
}
@@ -579,7 +607,16 @@ - (void)snapTo:(NSDictionary*)params
self.dragBehavior = nil;
InteractablePoint *snapPoint = [self.snapPoints objectAtIndex:index];
- if (snapPoint) [self addTempSnapToPointBehavior:snapPoint];
+ if (snapPoint) {
+ [self addTempSnapToPointBehavior:snapPoint];
+ if (self.onSnapStart) {
+ self.onSnapStart(@
+ {
+ @"index": @([self.snapPoints indexOfObject:snapPoint]),
+ @"id": snapPoint.id
+ });
+ }
+ }
[self addTempBounceBehaviorWithBoundaries:self.boundaries];
[self.animator ensureRunning];
@@ -597,6 +634,11 @@ - (void)changePosition:(NSDictionary*)params
[self.animator ensureRunning];
}
+- (void)bringToFront:(NSDictionary*)params
+{
+
+}
+
@end
diff --git a/lib/ios/Interactable/InteractableViewManager.m b/lib/ios/Interactable/InteractableViewManager.m
index 3634611a..fb00ec6b 100644
--- a/lib/ios/Interactable/InteractableViewManager.m
+++ b/lib/ios/Interactable/InteractableViewManager.m
@@ -36,6 +36,7 @@ - (UIView *)view
RCT_EXPORT_VIEW_PROPERTY(dragWithSpring, InteractableSpring)
RCT_EXPORT_VIEW_PROPERTY(dragToss, CGFloat)
RCT_EXPORT_VIEW_PROPERTY(onSnap, RCTDirectEventBlock)
+RCT_EXPORT_VIEW_PROPERTY(onSnapStart, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onStop, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onAlert, RCTDirectEventBlock)
RCT_EXPORT_VIEW_PROPERTY(onDrag, RCTDirectEventBlock)
@@ -62,6 +63,12 @@ - (UIView *)view
}];
}
+RCT_EXPORT_METHOD(bringToFront:(nonnull NSNumber *)reactTag
+ params:(NSDictionary*)params)
+{
+
+}
+
RCT_EXPORT_METHOD(snapTo:(nonnull NSNumber *)reactTag
params:(NSDictionary*)params)
{
diff --git a/lib/ios/InteractableTests/Info.plist b/lib/ios/InteractableTests/Info.plist
new file mode 100644
index 00000000..ba72822e
--- /dev/null
+++ b/lib/ios/InteractableTests/Info.plist
@@ -0,0 +1,24 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ BNDL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1
+
+
diff --git a/real-life-example/ios/exampleTests/exampleTests.m b/lib/ios/InteractableTests/InteractableTests.m
similarity index 74%
rename from real-life-example/ios/exampleTests/exampleTests.m
rename to lib/ios/InteractableTests/InteractableTests.m
index 3fab38df..7983c7b1 100644
--- a/real-life-example/ios/exampleTests/exampleTests.m
+++ b/lib/ios/InteractableTests/InteractableTests.m
@@ -1,10 +1,8 @@
/**
- * Copyright (c) 2015-present, Facebook, Inc.
- * All rights reserved.
+ * Copyright (c) Facebook, Inc. and its affiliates.
*
- * 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.
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
*/
#import
@@ -14,13 +12,13 @@
#import
#define TIMEOUT_SECONDS 600
-#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
+#define TEXT_TO_LOOK_FOR @"Welcome to React"
-@interface exampleTests : XCTestCase
+@interface InteractableTests : XCTestCase
@end
-@implementation exampleTests
+@implementation InteractableTests
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
{
@@ -37,16 +35,18 @@ - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
- (void)testRendersWelcomeScreen
{
- UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
+ UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
BOOL foundElement = NO;
__block NSString *redboxError = nil;
+#ifdef DEBUG
RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
if (level >= RCTLogLevelError) {
redboxError = message;
}
});
+#endif
while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
@@ -59,8 +59,10 @@ - (void)testRendersWelcomeScreen
return NO;
}];
}
-
+
+#ifdef DEBUG
RCTSetLogFunction(RCTDefaultLogFunction);
+#endif
XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
diff --git a/lib/src/InteractableView.js b/lib/src/InteractableView.js
index 92f4fe76..7b65a1ba 100644
--- a/lib/src/InteractableView.js
+++ b/lib/src/InteractableView.js
@@ -40,11 +40,8 @@ class WrappedAnimatedInteractableView extends Component {
}
}
- componentWillMount() {
- // this.chokeTheBridge();
- }
-
- // this helps us verify that useNativeDriver actually works and we don't rely on the bridge
+ // this helps us verify that useNativeDriver actually works and we don't rely on the bridge - should be called in the constructor
+ /*
chokeTheBridge() {
let j = 0;
setInterval(() => {
@@ -53,6 +50,7 @@ class WrappedAnimatedInteractableView extends Component {
}
}, 500);
}
+ */
render() {
return (
@@ -102,6 +100,16 @@ class WrappedAnimatedInteractableView extends Component {
);
}
}
+
+ bringToFront() {
+ if (Platform.OS === 'android') {
+ UIManager.dispatchViewManagerCommand(
+ ReactNative.findNodeHandle(this),
+ UIManager.InteractableView.Commands.bringToFront,
+ [],
+ );
+ }
+ }
}
export default WrappedAnimatedInteractableView;
diff --git a/package.json b/package.json
index b9e87fa9..1a4de003 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "react-native-interactable",
- "version": "0.1.6",
+ "version": "2.0.1",
"description": "High performance interactable views in React Native",
"license": "MIT",
"author": "Tal Kol ",
@@ -19,25 +19,76 @@
"main": "lib/index.js",
"scripts": {
"start": "node ./node_modules/react-native/local-cli/cli.js start",
- "test": "jest",
- "postinstall": "ln -sf lib/{ios,android} ."
+ "ios": "react-native run-ios --project-path playground/ios/",
+ "android": "react-native run-android --root playground",
+ "podinstall": "cd playground/ios && pod install",
+ "test": ":",
+ "e2e:ios": "detox test --configuration ios.sim.release --debug-synchronization",
+ "e2e:ios-multi": "npm run e2e:ios -- -w 2",
+ "e2e:android": "npm run build:android && detox test --configuration android.emu.release --loglevel verbose",
+ "e2e:android:ci": "npm run build:android && detox test --configuration android.emu.release --loglevel verbose --headless",
+ "build:ios": "detox build --configuration ios.sim.release",
+ "build:android": "detox build --configuration android.emu.release"
},
- "dependencies": {},
"peerDependencies": {
"react": ">= 15.4.1",
"react-native": ">= 0.40.0"
},
"jest": {
- "preset": "jest-react-native"
+ "preset": "react-native"
},
"devDependencies": {
- "@types/react-native": ">= 0.42.0",
- "babel-jest": "18.0.0",
- "babel-preset-react-native": "1.9.1",
- "jest": "18.1.0",
- "react": "16.0.0-alpha.12",
- "react-native": "0.45.0",
- "react-test-renderer": "15.4.2"
- },
- "typings": "typings/react-native-interactable.d.ts"
+ "@babel/core": "7.6.0",
+ "@babel/runtime": "^7.4.2",
+ "@react-native-community/eslint-config": "^0.0.3",
+ "@types/react-native": ">= 0.52.2",
+ "babel-jest": "^24.5.0",
+ "detox": "^18.0.0",
+ "eslint": "^5.16.0",
+ "jest": "^24.5.0",
+ "metro-react-native-babel-preset": "^0.53.1",
+ "mocha": "^6.0.0",
+ "react": "16.9.0",
+ "react-native": "0.61.4",
+ "react-test-renderer": "16.8.3"
+ },
+ "typings": "typings/react-native-interactable.d.ts",
+ "babel": {
+ "env": {
+ "test": {
+ "presets": [
+ "react-native"
+ ]
+ }
+ }
+ },
+ "detox_ignore": {
+ "specs": "e2e",
+ "configurations": {
+ "ios.sim.debug": {
+ "binaryPath": "playground/ios/DerivedData/playground/Build/Products/Debug-iphonesimulator/playground.app",
+ "build": "RCT_NO_LAUNCH_PACKAGER=true xcodebuild build -scheme playground -project playground/ios/playground.xcodeproj -sdk iphonesimulator -configuration Debug -derivedDataPath playground/ios/DerivedData/playground ONLY_ACTIVE_ARCH=YES -quiet -UseModernBuildSystem=NO",
+ "type": "ios.simulator",
+ "name": "iPhone 11 Pro"
+ },
+ "ios.sim.release": {
+ "binaryPath": "playground/ios/DerivedData/playground/Build/Products/Release-iphonesimulator/playground.app",
+ "build": "RCT_NO_LAUNCH_PACKAGER=true xcodebuild build -scheme playground -project playground/ios/playground.xcodeproj -sdk iphonesimulator -configuration Release -derivedDataPath playground/ios/DerivedData/playground ONLY_ACTIVE_ARCH=YES -quiet -UseModernBuildSystem=NO",
+ "type": "ios.simulator",
+ "name": "iPhone 11 Pro"
+ },
+ "android.emu.debug": {
+ "binaryPath": "playground/android/app/build/outputs/apk/debug/app-debug.apk",
+ "build": "cd playground/android && ./gradlew :app:assembleDebug :app:assembleAndroidTest -DtestBuildType=debug",
+ "type": "android.emulator",
+ "name": "Pixel_2_API_26"
+ },
+ "android.emu.release": {
+ "binaryPath": "playground/android/app/build/outputs/apk/release/app-release.apk",
+ "build": "cd playground/android && ./gradlew :app:assembleRelease :app:assembleAndroidTest -DtestBuildType=release",
+ "type": "android.emulator",
+ "name": "Pixel_2_API_26"
+ }
+ }
+ }
}
diff --git a/playground/.babelrc-IGNORE b/playground/.babelrc-IGNORE
new file mode 100644
index 00000000..d4b74b5b
--- /dev/null
+++ b/playground/.babelrc-IGNORE
@@ -0,0 +1,3 @@
+{
+ "presets": ["module:metro-react-native-babel-preset"]
+}
diff --git a/example/.buckconfig b/playground/.buckconfig
similarity index 100%
rename from example/.buckconfig
rename to playground/.buckconfig
diff --git a/playground/.flowconfig b/playground/.flowconfig
new file mode 100644
index 00000000..4afc766a
--- /dev/null
+++ b/playground/.flowconfig
@@ -0,0 +1,75 @@
+[ignore]
+; We fork some components by platform
+.*/*[.]android.js
+
+; Ignore "BUCK" generated dirs
+/\.buckd/
+
+; Ignore polyfills
+node_modules/react-native/Libraries/polyfills/.*
+
+; These should not be required directly
+; require from fbjs/lib instead: require('fbjs/lib/warning')
+node_modules/warning/.*
+
+; Flow doesn't support platforms
+.*/Libraries/Utilities/LoadingView.js
+
+[untyped]
+.*/node_modules/@react-native-community/cli/.*/.*
+
+[include]
+
+[libs]
+node_modules/react-native/Libraries/react-native/react-native-interface.js
+node_modules/react-native/flow/
+
+[options]
+emoji=true
+
+esproposal.optional_chaining=enable
+esproposal.nullish_coalescing=enable
+
+module.file_ext=.js
+module.file_ext=.json
+module.file_ext=.ios.js
+
+munge_underscores=true
+
+module.name_mapper='^react-native$' -> '/node_modules/react-native/Libraries/react-native/react-native-implementation'
+module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1'
+module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub'
+
+suppress_type=$FlowIssue
+suppress_type=$FlowFixMe
+suppress_type=$FlowFixMeProps
+suppress_type=$FlowFixMeState
+
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
+suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
+suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
+
+[lints]
+sketchy-null-number=warn
+sketchy-null-mixed=warn
+sketchy-number=warn
+untyped-type-import=warn
+nonstrict-import=warn
+deprecated-type=warn
+unsafe-getters-setters=warn
+inexact-spread=warn
+unnecessary-invariant=warn
+signature-verification-failure=warn
+deprecated-utility=error
+
+[strict]
+deprecated-type
+nonstrict-import
+sketchy-null
+unclear-type
+unsafe-getters-setters
+untyped-import
+untyped-type-import
+
+[version]
+^0.105.0
diff --git a/playground/android/app/BUCK b/playground/android/app/BUCK
new file mode 100644
index 00000000..0bb9604a
--- /dev/null
+++ b/playground/android/app/BUCK
@@ -0,0 +1,55 @@
+# To learn about Buck see [Docs](https://buckbuild.com/).
+# To run your application with Buck:
+# - install Buck
+# - `npm start` - to start the packager
+# - `cd android`
+# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
+# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
+# - `buck install -r android/app` - compile, install and run application
+#
+
+load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
+
+lib_deps = []
+
+create_aar_targets(glob(["libs/*.aar"]))
+
+create_jar_targets(glob(["libs/*.jar"]))
+
+android_library(
+ name = "all-libs",
+ exported_deps = lib_deps,
+)
+
+android_library(
+ name = "app-code",
+ srcs = glob([
+ "src/main/java/**/*.java",
+ ]),
+ deps = [
+ ":all-libs",
+ ":build_config",
+ ":res",
+ ],
+)
+
+android_build_config(
+ name = "build_config",
+ package = "com.playground",
+)
+
+android_resource(
+ name = "res",
+ package = "com.playground",
+ res = "src/main/res",
+)
+
+android_binary(
+ name = "app",
+ keystore = "//android/keystores:debug",
+ manifest = "src/main/AndroidManifest.xml",
+ package_type = "debug",
+ deps = [
+ ":app-code",
+ ],
+)
diff --git a/playground/android/app/build.gradle b/playground/android/app/build.gradle
new file mode 100644
index 00000000..5839e59e
--- /dev/null
+++ b/playground/android/app/build.gradle
@@ -0,0 +1,192 @@
+apply plugin: "com.android.application"
+
+import com.android.build.OutputFile
+
+/**
+ * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
+ * and bundleReleaseJsAndAssets).
+ * These basically call `react-native bundle` with the correct arguments during the Android build
+ * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
+ * bundle directly from the development server. Below you can see all the possible configurations
+ * and their defaults. If you decide to add a configuration block, make sure to add it before the
+ * `apply from: "../../node_modules/react-native/react.gradle"` line.
+ *
+ * project.ext.react = [
+ * // the name of the generated asset file containing your JS bundle
+ * bundleAssetName: "index.android.bundle",
+ *
+ * // the entry file for bundle generation
+ * entryFile: "index.android.js",
+ *
+ * // whether to bundle JS and assets in debug mode
+ * bundleInDebug: false,
+ *
+ * // whether to bundle JS and assets in release mode
+ * bundleInRelease: true,
+ *
+ * // whether to bundle JS and assets in another build variant (if configured).
+ * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
+ * // The configuration property can be in the following formats
+ * // 'bundleIn${productFlavor}${buildType}'
+ * // 'bundleIn${buildType}'
+ * // bundleInFreeDebug: true,
+ * // bundleInPaidRelease: true,
+ * // bundleInBeta: true,
+ *
+ * // whether to disable dev mode in custom build variants (by default only disabled in release)
+ * // for example: to disable dev mode in the staging build type (if configured)
+ * devDisabledInStaging: true,
+ * // The configuration property can be in the following formats
+ * // 'devDisabledIn${productFlavor}${buildType}'
+ * // 'devDisabledIn${buildType}'
+ *
+ * // the root of your project, i.e. where "package.json" lives
+ * root: "../../",
+ *
+ * // where to put the JS bundle asset in debug mode
+ * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
+ *
+ * // where to put the JS bundle asset in release mode
+ * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
+ *
+ * // where to put drawable resources / React Native assets, e.g. the ones you use via
+ * // require('./image.png')), in debug mode
+ * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
+ *
+ * // where to put drawable resources / React Native assets, e.g. the ones you use via
+ * // require('./image.png')), in release mode
+ * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
+ *
+ * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
+ * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
+ * // date; if you have any other folders that you want to ignore for performance reasons (gradle
+ * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
+ * // for example, you might want to remove it from here.
+ * inputExcludes: ["android/**", "ios/**"],
+ *
+ * // override which node gets called and with what additional arguments
+ * nodeExecutableAndArgs: ["node"],
+ *
+ * // supply additional arguments to the packager
+ * extraPackagerArgs: []
+ * ]
+ */
+
+project.ext.react = [
+ root : "../../../",
+ entryFile : "playground/index.js",
+ enableHermes: false // clean and rebuild if changing
+]
+
+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
+
+def djscFlavor = 'org.webkit:android-jsc:+'
+
+/**
+ * Whether to enable the Hermes VM.
+ *
+ * This should be set on project.ext.react and mirrored here. If it is not set
+ * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
+ * and the benefits of using Hermes will therefore be sharply reduced.
+ */
+def enableHermes = project.ext.react.get("enableHermes", false);
+
+/**
+ * Run Proguard to shrink the Java bytecode in release builds.
+ */
+def enableProguardInReleaseBuilds = false
+
+android {
+ compileSdkVersion rootProject.ext.compileSdkVersion
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ defaultConfig {
+ applicationId "com.playground"
+ minSdkVersion rootProject.ext.minSdkVersion
+ targetSdkVersion rootProject.ext.targetSdkVersion
+ versionCode 1
+ versionName "1.0"
+ testBuildType System.getProperty('testBuildType', 'debug')
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ }
+ signingConfigs {
+ release {
+ storeFile file('../playground.keystore')
+ storePassword "playground"
+ keyAlias "playground"
+ keyPassword "playground"
+ }
+ }
+ splits {
+ abi {
+ reset()
+ enable enableSeparateBuildPerCPUArchitecture
+ universalApk false // If true, also generate a universal APK
+ include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
+ }
+ }
+ buildTypes {
+ release {
+ minifyEnabled enableProguardInReleaseBuilds
+ signingConfig signingConfigs.release
+ 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, "arm64-v8a": 3, "x86_64": 4]
+ 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 {
+ implementation fileTree(dir: "libs", include: ["*.jar"])
+ implementation 'androidx.appcompat:appcompat:1.0.0'
+ implementation "com.facebook.react:react-native:+" // From node_modules
+
+ if (enableHermes) {
+ def hermesPath = "../../node_modules/hermes-engine/android/";
+ debugImplementation files(hermesPath + "hermes-debug.aar")
+ releaseImplementation files(hermesPath + "hermes-release.aar")
+ } else {
+ implementation 'org.webkit:android-jsc:+'
+ }
+
+ implementation project(path: ':react-native-interactable')
+
+ androidTestImplementation(project(path: ":detox"))
+ androidTestImplementation 'junit:junit:4.12'
+}
+
+// Run this once to be able to run the application with BUCK
+// puts all compile dependencies into folder libs for BUCK to use
+task copyDownloadableDepsToLibs(type: Copy) {
+ from configurations.compile
+ into 'libs'
+}
+
+
+apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
diff --git a/playground/android/app/build_defs.bzl b/playground/android/app/build_defs.bzl
new file mode 100644
index 00000000..a92f0e9f
--- /dev/null
+++ b/playground/android/app/build_defs.bzl
@@ -0,0 +1,19 @@
+"""Helper definitions to glob .aar and .jar targets"""
+
+def create_aar_targets(aarfiles):
+ for aarfile in aarfiles:
+ name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
+ lib_deps.append(":" + name)
+ android_prebuilt_aar(
+ name = name,
+ aar = aarfile,
+ )
+
+def create_jar_targets(jarfiles):
+ for jarfile in jarfiles:
+ name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
+ lib_deps.append(":" + name)
+ prebuilt_jar(
+ name = name,
+ binary_jar = jarfile,
+ )
\ No newline at end of file
diff --git a/real-life-example/android/app/proguard-rules.pro b/playground/android/app/proguard-rules.pro
similarity index 90%
rename from real-life-example/android/app/proguard-rules.pro
rename to playground/android/app/proguard-rules.pro
index 48361a90..19a30742 100644
--- a/real-life-example/android/app/proguard-rules.pro
+++ b/playground/android/app/proguard-rules.pro
@@ -9,13 +9,6 @@
# 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
@@ -50,6 +43,10 @@
-dontwarn com.facebook.react.**
+# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
+# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
+-dontwarn android.text.StaticLayout
+
# okhttp
-keepattributes Signature
diff --git a/playground/android/app/src/androidTest/java/com/playground/DetoxTest.java b/playground/android/app/src/androidTest/java/com/playground/DetoxTest.java
new file mode 100644
index 00000000..edeeca9e
--- /dev/null
+++ b/playground/android/app/src/androidTest/java/com/playground/DetoxTest.java
@@ -0,0 +1,24 @@
+package com.playground;
+
+import com.wix.detox.Detox;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.test.filters.LargeTest;
+import androidx.test.rule.ActivityTestRule;
+
+@RunWith(AndroidJUnit4.class)
+@LargeTest
+public class DetoxTest {
+
+ @Rule
+ public ActivityTestRule mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false);
+
+ @Test
+ public void runDetoxTests() {
+ Detox.runTests(mActivityRule);
+ }
+}
\ No newline at end of file
diff --git a/playground/android/app/src/debug/AndroidManifest.xml b/playground/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 00000000..7feb33d6
--- /dev/null
+++ b/playground/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/real-life-example/android/app/src/main/AndroidManifest.xml b/playground/android/app/src/main/AndroidManifest.xml
similarity index 68%
rename from real-life-example/android/app/src/main/AndroidManifest.xml
rename to playground/android/app/src/main/AndroidManifest.xml
index 802178cc..e5e67333 100644
--- a/real-life-example/android/app/src/main/AndroidManifest.xml
+++ b/playground/android/app/src/main/AndroidManifest.xml
@@ -1,26 +1,19 @@
+ package="com.playground">
-
-
-
-
+ android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
+ android:windowSoftInputMode="adjustResize">
diff --git a/example/android/app/src/main/java/com/example/MainActivity.java b/playground/android/app/src/main/java/com/playground/MainActivity.java
similarity index 85%
rename from example/android/app/src/main/java/com/example/MainActivity.java
rename to playground/android/app/src/main/java/com/playground/MainActivity.java
index e84b7255..5ab775bc 100644
--- a/example/android/app/src/main/java/com/example/MainActivity.java
+++ b/playground/android/app/src/main/java/com/playground/MainActivity.java
@@ -1,4 +1,4 @@
-package com.example;
+package com.playground;
import com.facebook.react.ReactActivity;
@@ -10,6 +10,6 @@ public class MainActivity extends ReactActivity {
*/
@Override
protected String getMainComponentName() {
- return "example";
+ return "playground";
}
}
diff --git a/playground/android/app/src/main/java/com/playground/MainApplication.java b/playground/android/app/src/main/java/com/playground/MainApplication.java
new file mode 100644
index 00000000..e3c02964
--- /dev/null
+++ b/playground/android/app/src/main/java/com/playground/MainApplication.java
@@ -0,0 +1,76 @@
+package com.playground;
+
+import android.app.Application;
+import android.content.Context;
+import com.facebook.react.PackageList;
+import com.facebook.react.ReactApplication;
+import com.facebook.react.ReactNativeHost;
+import com.facebook.react.ReactPackage;
+import com.facebook.react.shell.MainReactPackage;
+import com.facebook.soloader.SoLoader;
+import com.wix.interactable.Interactable;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Arrays;
+import java.util.List;
+
+public class MainApplication extends Application implements ReactApplication {
+
+ private final ReactNativeHost mReactNativeHost =
+ new ReactNativeHost(this) {
+ @Override
+ public boolean getUseDeveloperSupport() {
+ return BuildConfig.DEBUG;
+ }
+
+ @Override
+ protected List getPackages() {
+ return Arrays.asList(
+ new MainReactPackage(),
+ new Interactable()
+ );
+ }
+
+ @Override
+ protected String getJSMainModuleName() {
+ return "index";
+ }
+ };
+
+ @Override
+ public ReactNativeHost getReactNativeHost() {
+ return mReactNativeHost;
+ }
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ SoLoader.init(this, /* native exopackage */ false);
+ initializeFlipper(this); // Remove this line if you don't want Flipper enabled
+ }
+ /**
+ * Loads Flipper in React Native templates.
+ *
+ * @param context
+ */
+ private static void initializeFlipper(Context context) {
+ if (BuildConfig.DEBUG) {
+ try {
+ /*
+ We use reflection here to pick up the class that initializes Flipper,
+ since Flipper library is not available in release mode
+ */
+ Class> aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper");
+ aClass.getMethod("initializeFlipper", Context.class).invoke(null, context);
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ } catch (NoSuchMethodException e) {
+ e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+}
diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/playground/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
rename to playground/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/playground/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
rename to playground/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/playground/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
rename to playground/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/playground/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
rename to playground/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/playground/android/app/src/main/res/values/strings.xml b/playground/android/app/src/main/res/values/strings.xml
new file mode 100644
index 00000000..a4230f88
--- /dev/null
+++ b/playground/android/app/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ playground
+
diff --git a/playground/android/app/src/main/res/values/styles.xml b/playground/android/app/src/main/res/values/styles.xml
new file mode 100644
index 00000000..62fe59fa
--- /dev/null
+++ b/playground/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
diff --git a/playground/android/build.gradle b/playground/android/build.gradle
new file mode 100644
index 00000000..7ace9e56
--- /dev/null
+++ b/playground/android/build.gradle
@@ -0,0 +1,41 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ ext {
+ buildToolsVersion = "28.0.3"
+ minSdkVersion = 18
+ compileSdkVersion = 28
+ targetSdkVersion = 28
+ supportLibVersion = "28.0.0"
+ kotlinVersion = '1.3.31'
+ }
+ repositories {
+ google()
+ mavenLocal()
+ jcenter()
+ }
+ dependencies {
+ classpath('com.android.tools.build:gradle:3.4.2')
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ mavenLocal()
+ maven {
+ // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
+ url "$rootDir/../../node_modules/react-native/android"
+ }
+ maven {
+ // Android JSC is installed from npm
+ url("$rootDir/../../node_modules/jsc-android/dist")
+ }
+ jcenter()
+ google()
+ maven { url 'https://jitpack.io' }
+ }
+}
diff --git a/real-life-example/android/gradle.properties b/playground/android/gradle.properties
similarity index 82%
rename from real-life-example/android/gradle.properties
rename to playground/android/gradle.properties
index 21edee9d..027ef9db 100644
--- a/real-life-example/android/gradle.properties
+++ b/playground/android/gradle.properties
@@ -10,11 +10,12 @@
# 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
+# 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
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/playground/android/gradle/wrapper/gradle-wrapper.jar b/playground/android/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000..5c2d1cf0
Binary files /dev/null and b/playground/android/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/playground/android/gradle/wrapper/gradle-wrapper.properties
similarity index 80%
rename from example/android/gradle/wrapper/gradle-wrapper.properties
rename to playground/android/gradle/wrapper/gradle-wrapper.properties
index c62d377d..e0c4de36 100644
--- a/example/android/gradle/wrapper/gradle-wrapper.properties
+++ b/playground/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Thu Feb 09 18:04:42 IST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/example/android/gradlew b/playground/android/gradlew
similarity index 73%
rename from example/android/gradlew
rename to playground/android/gradlew
index 91a7e269..8e25e6c1 100755
--- a/example/android/gradlew
+++ b/playground/android/gradlew
@@ -1,4 +1,20 @@
-#!/usr/bin/env bash
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
##############################################################################
##
@@ -6,20 +22,38 @@
##
##############################################################################
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
+# 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='"-Xmx64m" "-Xms64m"'
+
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
-warn ( ) {
+warn () {
echo "$*"
}
-die ( ) {
+die () {
echo
echo "$*"
echo
@@ -30,6 +64,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
+nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
@@ -40,31 +75,11 @@ case "`uname`" in
MINGW* )
msys=true
;;
+ NONSTOP* )
+ nonstop=true
+ ;;
esac
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# 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\"`/" >&-
-APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
@@ -90,7 +105,7 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+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
@@ -114,6 +129,7 @@ fi
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`
@@ -154,11 +170,19 @@ if $cygwin ; then
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=("$@")
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
+exec "$JAVACMD" "$@"
diff --git a/example/android/gradlew.bat b/playground/android/gradlew.bat
similarity index 71%
rename from example/android/gradlew.bat
rename to playground/android/gradlew.bat
index aec99730..24467a14 100644
--- a/example/android/gradlew.bat
+++ b/playground/android/gradlew.bat
@@ -1,3 +1,19 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@@ -8,14 +24,14 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
-@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=
-
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="-Xmx64m" "-Xms64m"
+
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
@@ -46,10 +62,9 @@ echo location of your Java installation.
goto fail
:init
-@rem Get command-line arguments, handling Windowz variants
+@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.
@@ -60,11 +75,6 @@ set _SKIP=2
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
diff --git a/playground/android/playground.keystore b/playground/android/playground.keystore
new file mode 100644
index 00000000..20918e5c
Binary files /dev/null and b/playground/android/playground.keystore differ
diff --git a/real-life-example/android/settings.gradle b/playground/android/settings.gradle
similarity index 50%
rename from real-life-example/android/settings.gradle
rename to playground/android/settings.gradle
index 59a97039..be8517ee 100644
--- a/real-life-example/android/settings.gradle
+++ b/playground/android/settings.gradle
@@ -1,6 +1,8 @@
-rootProject.name = 'example'
-
+rootProject.name = 'playground'
include ':app'
include ':react-native-interactable'
project(':react-native-interactable').projectDir = new File(rootProject.projectDir, '../../lib/android')
+
+include ':detox'
+project(':detox').projectDir = new File(rootProject.projectDir, '../../`node_modules/detox/android/detox')
\ No newline at end of file
diff --git a/playground/app.json b/playground/app.json
new file mode 100644
index 00000000..f462299f
--- /dev/null
+++ b/playground/app.json
@@ -0,0 +1,4 @@
+{
+ "name": "playground",
+ "displayName": "playground"
+}
\ No newline at end of file
diff --git a/real-life-example/img/airport-photo.jpg b/playground/assets/airport-photo.jpg
similarity index 100%
rename from real-life-example/img/airport-photo.jpg
rename to playground/assets/airport-photo.jpg
diff --git a/real-life-example/img/calendar-body.png b/playground/assets/calendar-body.png
similarity index 100%
rename from real-life-example/img/calendar-body.png
rename to playground/assets/calendar-body.png
diff --git a/real-life-example/img/calendar-header.png b/playground/assets/calendar-header.png
similarity index 100%
rename from real-life-example/img/calendar-header.png
rename to playground/assets/calendar-header.png
diff --git a/real-life-example/img/card-photo.jpg b/playground/assets/card-photo.jpg
similarity index 100%
rename from real-life-example/img/card-photo.jpg
rename to playground/assets/card-photo.jpg
diff --git a/real-life-example/img/chatheads-delete.png b/playground/assets/chatheads-delete.png
similarity index 100%
rename from real-life-example/img/chatheads-delete.png
rename to playground/assets/chatheads-delete.png
diff --git a/real-life-example/img/chatheads-face1.jpg b/playground/assets/chatheads-face1.jpg
similarity index 100%
rename from real-life-example/img/chatheads-face1.jpg
rename to playground/assets/chatheads-face1.jpg
diff --git a/real-life-example/img/chatheads-face2.jpg b/playground/assets/chatheads-face2.jpg
similarity index 100%
rename from real-life-example/img/chatheads-face2.jpg
rename to playground/assets/chatheads-face2.jpg
diff --git a/real-life-example/img/icon-check.png b/playground/assets/icon-check.png
similarity index 100%
rename from real-life-example/img/icon-check.png
rename to playground/assets/icon-check.png
diff --git a/real-life-example/img/icon-clock.png b/playground/assets/icon-clock.png
similarity index 100%
rename from real-life-example/img/icon-clock.png
rename to playground/assets/icon-clock.png
diff --git a/example/img/icon-menu.png b/playground/assets/icon-menu.png
similarity index 100%
rename from example/img/icon-menu.png
rename to playground/assets/icon-menu.png
diff --git a/real-life-example/img/icon-trash.png b/playground/assets/icon-trash.png
similarity index 100%
rename from real-life-example/img/icon-trash.png
rename to playground/assets/icon-trash.png
diff --git a/real-life-example/img/icon-up.png b/playground/assets/icon-up.png
similarity index 100%
rename from real-life-example/img/icon-up.png
rename to playground/assets/icon-up.png
diff --git a/real-life-example/img/map-bg.jpg b/playground/assets/map-bg.jpg
similarity index 100%
rename from real-life-example/img/map-bg.jpg
rename to playground/assets/map-bg.jpg
diff --git a/real-life-example/img/tinder-photo.jpg b/playground/assets/tinder-photo.jpg
similarity index 100%
rename from real-life-example/img/tinder-photo.jpg
rename to playground/assets/tinder-photo.jpg
diff --git a/playground/babel.config.js b/playground/babel.config.js
new file mode 100644
index 00000000..f842b77f
--- /dev/null
+++ b/playground/babel.config.js
@@ -0,0 +1,3 @@
+module.exports = {
+ presets: ['module:metro-react-native-babel-preset'],
+};
diff --git a/playground/index.js b/playground/index.js
new file mode 100644
index 00000000..f68479c0
--- /dev/null
+++ b/playground/index.js
@@ -0,0 +1,4 @@
+import { AppRegistry } from 'react-native';
+import App from './src/app';
+
+AppRegistry.registerComponent('playground', () => App);
diff --git a/real-life-example/ios/example/Info.plist b/playground/ios/Playground-tvOS/Info.plist
similarity index 88%
rename from real-life-example/ios/example/Info.plist
rename to playground/ios/Playground-tvOS/Info.plist
index 791a20b4..ecbd496b 100644
--- a/real-life-example/ios/example/Info.plist
+++ b/playground/ios/Playground-tvOS/Info.plist
@@ -4,8 +4,6 @@
CFBundleDevelopmentRegionen
- CFBundleDisplayName
- InteractionsCFBundleExecutable$(EXECUTABLE_NAME)CFBundleIdentifier
@@ -17,11 +15,11 @@
CFBundlePackageTypeAPPLCFBundleShortVersionString
- 1.2
+ 1.0CFBundleSignature????CFBundleVersion
- 3
+ 1LSRequiresIPhoneOSNSAppTransportSecurity
@@ -43,11 +41,11 @@
armv7
- UIStatusBarStyle
- UIStatusBarStyleLightContentUISupportedInterfaceOrientationsUIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRightUIViewControllerBasedStatusBarAppearance
diff --git a/real-life-example/ios/exampleTests/Info.plist b/playground/ios/Playground-tvOSTests/Info.plist
similarity index 100%
rename from real-life-example/ios/exampleTests/Info.plist
rename to playground/ios/Playground-tvOSTests/Info.plist
diff --git a/playground/ios/PlaygroundTests/Info.plist b/playground/ios/PlaygroundTests/Info.plist
new file mode 100644
index 00000000..ba72822e
--- /dev/null
+++ b/playground/ios/PlaygroundTests/Info.plist
@@ -0,0 +1,24 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ BNDL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1
+
+
diff --git a/example/ios/exampleTests/exampleTests.m b/playground/ios/PlaygroundTests/PlaygroundTests.m
similarity index 74%
rename from example/ios/exampleTests/exampleTests.m
rename to playground/ios/PlaygroundTests/PlaygroundTests.m
index 3fab38df..e5f9a4ba 100644
--- a/example/ios/exampleTests/exampleTests.m
+++ b/playground/ios/PlaygroundTests/PlaygroundTests.m
@@ -1,10 +1,8 @@
/**
- * Copyright (c) 2015-present, Facebook, Inc.
- * All rights reserved.
+ * Copyright (c) Facebook, Inc. and its affiliates.
*
- * 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.
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
*/
#import
@@ -14,13 +12,13 @@
#import
#define TIMEOUT_SECONDS 600
-#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
+#define TEXT_TO_LOOK_FOR @"Welcome to React"
-@interface exampleTests : XCTestCase
+@interface PlaygroundTests : XCTestCase
@end
-@implementation exampleTests
+@implementation PlaygroundTests
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
{
@@ -37,16 +35,18 @@ - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
- (void)testRendersWelcomeScreen
{
- UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
+ UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
BOOL foundElement = NO;
__block NSString *redboxError = nil;
+#ifdef DEBUG
RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
if (level >= RCTLogLevelError) {
redboxError = message;
}
});
+#endif
while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
@@ -59,8 +59,10 @@ - (void)testRendersWelcomeScreen
return NO;
}];
}
-
+
+#ifdef DEBUG
RCTSetLogFunction(RCTDefaultLogFunction);
+#endif
XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
diff --git a/playground/ios/Podfile b/playground/ios/Podfile
new file mode 100644
index 00000000..6d8908df
--- /dev/null
+++ b/playground/ios/Podfile
@@ -0,0 +1,42 @@
+platform :ios, '9.0'
+require_relative '../../node_modules/@react-native-community/cli-platform-ios/native_modules'
+
+target 'playground' do
+ # Pods for Playground
+ pod 'Interactable', :path => "../../Interactable.podspec"
+ pod 'FBLazyVector', :path => "../../node_modules/react-native/Libraries/FBLazyVector"
+ pod 'FBReactNativeSpec', :path => "../../node_modules/react-native/Libraries/FBReactNativeSpec"
+ pod 'RCTRequired', :path => "../../node_modules/react-native/Libraries/RCTRequired"
+ pod 'RCTTypeSafety', :path => "../../node_modules/react-native/Libraries/TypeSafety"
+ pod 'React', :path => '../../node_modules/react-native/'
+ pod 'React-Core', :path => '../../node_modules/react-native/'
+ pod 'React-CoreModules', :path => '../../node_modules/react-native/React/CoreModules'
+ pod 'React-Core/DevSupport', :path => '../../node_modules/react-native/'
+ pod 'React-RCTActionSheet', :path => '../../node_modules/react-native/Libraries/ActionSheetIOS'
+ pod 'React-RCTAnimation', :path => '../../node_modules/react-native/Libraries/NativeAnimation'
+ pod 'React-RCTBlob', :path => '../../node_modules/react-native/Libraries/Blob'
+ pod 'React-RCTImage', :path => '../../node_modules/react-native/Libraries/Image'
+ pod 'React-RCTLinking', :path => '../../node_modules/react-native/Libraries/LinkingIOS'
+ pod 'React-RCTNetwork', :path => '../../node_modules/react-native/Libraries/Network'
+ pod 'React-RCTSettings', :path => '../../node_modules/react-native/Libraries/Settings'
+ pod 'React-RCTText', :path => '../../node_modules/react-native/Libraries/Text'
+ pod 'React-RCTVibration', :path => '../../node_modules/react-native/Libraries/Vibration'
+ pod 'React-Core/RCTWebSocket', :path => '../../node_modules/react-native/'
+ pod 'React-cxxreact', :path => '../../node_modules/react-native/ReactCommon/cxxreact'
+ pod 'React-jsi', :path => '../../node_modules/react-native/ReactCommon/jsi'
+ pod 'React-jsiexecutor', :path => '../../node_modules/react-native/ReactCommon/jsiexecutor'
+ pod 'React-jsinspector', :path => '../../node_modules/react-native/ReactCommon/jsinspector'
+ pod 'ReactCommon/jscallinvoker', :path => "../../node_modules/react-native/ReactCommon"
+ pod 'ReactCommon/turbomodule/core', :path => "../../node_modules/react-native/ReactCommon"
+ pod 'Yoga', :path => '../../node_modules/react-native/ReactCommon/yoga'
+
+ pod 'DoubleConversion', :podspec => '../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
+ pod 'glog', :podspec => '../../node_modules/react-native/third-party-podspecs/glog.podspec'
+ pod 'Folly', :podspec => '../../node_modules/react-native/third-party-podspecs/Folly.podspec'
+
+ use_native_modules!
+
+ pre_install do |installer|
+ Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
+ end
+end
diff --git a/playground/ios/Podfile.lock b/playground/ios/Podfile.lock
new file mode 100644
index 00000000..968c0cd6
--- /dev/null
+++ b/playground/ios/Podfile.lock
@@ -0,0 +1,344 @@
+PODS:
+ - boost-for-react-native (1.63.0)
+ - DoubleConversion (1.1.6)
+ - FBLazyVector (0.61.4)
+ - FBReactNativeSpec (0.61.4):
+ - Folly (= 2018.10.22.00)
+ - RCTRequired (= 0.61.4)
+ - RCTTypeSafety (= 0.61.4)
+ - React-Core (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - ReactCommon/turbomodule/core (= 0.61.4)
+ - Folly (2018.10.22.00):
+ - boost-for-react-native
+ - DoubleConversion
+ - Folly/Default (= 2018.10.22.00)
+ - glog
+ - Folly/Default (2018.10.22.00):
+ - boost-for-react-native
+ - DoubleConversion
+ - glog
+ - glog (0.3.5)
+ - Interactable (1.0.0):
+ - React
+ - RCTRequired (0.61.4)
+ - RCTTypeSafety (0.61.4):
+ - FBLazyVector (= 0.61.4)
+ - Folly (= 2018.10.22.00)
+ - RCTRequired (= 0.61.4)
+ - React-Core (= 0.61.4)
+ - React (0.61.4):
+ - React-Core (= 0.61.4)
+ - React-Core/DevSupport (= 0.61.4)
+ - React-Core/RCTWebSocket (= 0.61.4)
+ - React-RCTActionSheet (= 0.61.4)
+ - React-RCTAnimation (= 0.61.4)
+ - React-RCTBlob (= 0.61.4)
+ - React-RCTImage (= 0.61.4)
+ - React-RCTLinking (= 0.61.4)
+ - React-RCTNetwork (= 0.61.4)
+ - React-RCTSettings (= 0.61.4)
+ - React-RCTText (= 0.61.4)
+ - React-RCTVibration (= 0.61.4)
+ - React-Core (0.61.4):
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-Core/Default (= 0.61.4)
+ - React-cxxreact (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - React-jsiexecutor (= 0.61.4)
+ - Yoga
+ - React-Core/CoreModulesHeaders (0.61.4):
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-Core/Default
+ - React-cxxreact (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - React-jsiexecutor (= 0.61.4)
+ - Yoga
+ - React-Core/Default (0.61.4):
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-cxxreact (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - React-jsiexecutor (= 0.61.4)
+ - Yoga
+ - React-Core/DevSupport (0.61.4):
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-Core/Default (= 0.61.4)
+ - React-Core/RCTWebSocket (= 0.61.4)
+ - React-cxxreact (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - React-jsiexecutor (= 0.61.4)
+ - React-jsinspector (= 0.61.4)
+ - Yoga
+ - React-Core/RCTActionSheetHeaders (0.61.4):
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-Core/Default
+ - React-cxxreact (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - React-jsiexecutor (= 0.61.4)
+ - Yoga
+ - React-Core/RCTAnimationHeaders (0.61.4):
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-Core/Default
+ - React-cxxreact (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - React-jsiexecutor (= 0.61.4)
+ - Yoga
+ - React-Core/RCTBlobHeaders (0.61.4):
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-Core/Default
+ - React-cxxreact (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - React-jsiexecutor (= 0.61.4)
+ - Yoga
+ - React-Core/RCTImageHeaders (0.61.4):
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-Core/Default
+ - React-cxxreact (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - React-jsiexecutor (= 0.61.4)
+ - Yoga
+ - React-Core/RCTLinkingHeaders (0.61.4):
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-Core/Default
+ - React-cxxreact (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - React-jsiexecutor (= 0.61.4)
+ - Yoga
+ - React-Core/RCTNetworkHeaders (0.61.4):
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-Core/Default
+ - React-cxxreact (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - React-jsiexecutor (= 0.61.4)
+ - Yoga
+ - React-Core/RCTSettingsHeaders (0.61.4):
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-Core/Default
+ - React-cxxreact (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - React-jsiexecutor (= 0.61.4)
+ - Yoga
+ - React-Core/RCTTextHeaders (0.61.4):
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-Core/Default
+ - React-cxxreact (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - React-jsiexecutor (= 0.61.4)
+ - Yoga
+ - React-Core/RCTVibrationHeaders (0.61.4):
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-Core/Default
+ - React-cxxreact (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - React-jsiexecutor (= 0.61.4)
+ - Yoga
+ - React-Core/RCTWebSocket (0.61.4):
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-Core/Default (= 0.61.4)
+ - React-cxxreact (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - React-jsiexecutor (= 0.61.4)
+ - Yoga
+ - React-CoreModules (0.61.4):
+ - FBReactNativeSpec (= 0.61.4)
+ - Folly (= 2018.10.22.00)
+ - RCTTypeSafety (= 0.61.4)
+ - React-Core/CoreModulesHeaders (= 0.61.4)
+ - React-RCTImage (= 0.61.4)
+ - ReactCommon/turbomodule/core (= 0.61.4)
+ - React-cxxreact (0.61.4):
+ - boost-for-react-native (= 1.63.0)
+ - DoubleConversion
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-jsinspector (= 0.61.4)
+ - React-jsi (0.61.4):
+ - boost-for-react-native (= 1.63.0)
+ - DoubleConversion
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-jsi/Default (= 0.61.4)
+ - React-jsi/Default (0.61.4):
+ - boost-for-react-native (= 1.63.0)
+ - DoubleConversion
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-jsiexecutor (0.61.4):
+ - DoubleConversion
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-cxxreact (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - React-jsinspector (0.61.4)
+ - React-RCTActionSheet (0.61.4):
+ - React-Core/RCTActionSheetHeaders (= 0.61.4)
+ - React-RCTAnimation (0.61.4):
+ - React-Core/RCTAnimationHeaders (= 0.61.4)
+ - React-RCTBlob (0.61.4):
+ - React-Core/RCTBlobHeaders (= 0.61.4)
+ - React-Core/RCTWebSocket (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - React-RCTNetwork (= 0.61.4)
+ - React-RCTImage (0.61.4):
+ - React-Core/RCTImageHeaders (= 0.61.4)
+ - React-RCTNetwork (= 0.61.4)
+ - React-RCTLinking (0.61.4):
+ - React-Core/RCTLinkingHeaders (= 0.61.4)
+ - React-RCTNetwork (0.61.4):
+ - React-Core/RCTNetworkHeaders (= 0.61.4)
+ - React-RCTSettings (0.61.4):
+ - React-Core/RCTSettingsHeaders (= 0.61.4)
+ - React-RCTText (0.61.4):
+ - React-Core/RCTTextHeaders (= 0.61.4)
+ - React-RCTVibration (0.61.4):
+ - React-Core/RCTVibrationHeaders (= 0.61.4)
+ - ReactCommon/jscallinvoker (0.61.4):
+ - DoubleConversion
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-cxxreact (= 0.61.4)
+ - ReactCommon/turbomodule/core (0.61.4):
+ - DoubleConversion
+ - Folly (= 2018.10.22.00)
+ - glog
+ - React-Core (= 0.61.4)
+ - React-cxxreact (= 0.61.4)
+ - React-jsi (= 0.61.4)
+ - ReactCommon/jscallinvoker (= 0.61.4)
+ - Yoga (1.14.0)
+
+DEPENDENCIES:
+ - DoubleConversion (from `../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
+ - FBLazyVector (from `../../node_modules/react-native/Libraries/FBLazyVector`)
+ - FBReactNativeSpec (from `../../node_modules/react-native/Libraries/FBReactNativeSpec`)
+ - Folly (from `../../node_modules/react-native/third-party-podspecs/Folly.podspec`)
+ - glog (from `../../node_modules/react-native/third-party-podspecs/glog.podspec`)
+ - Interactable (from `../../Interactable.podspec`)
+ - RCTRequired (from `../../node_modules/react-native/Libraries/RCTRequired`)
+ - RCTTypeSafety (from `../../node_modules/react-native/Libraries/TypeSafety`)
+ - React (from `../../node_modules/react-native/`)
+ - React-Core (from `../../node_modules/react-native/`)
+ - React-Core/DevSupport (from `../../node_modules/react-native/`)
+ - React-Core/RCTWebSocket (from `../../node_modules/react-native/`)
+ - React-CoreModules (from `../../node_modules/react-native/React/CoreModules`)
+ - React-cxxreact (from `../../node_modules/react-native/ReactCommon/cxxreact`)
+ - React-jsi (from `../../node_modules/react-native/ReactCommon/jsi`)
+ - React-jsiexecutor (from `../../node_modules/react-native/ReactCommon/jsiexecutor`)
+ - React-jsinspector (from `../../node_modules/react-native/ReactCommon/jsinspector`)
+ - React-RCTActionSheet (from `../../node_modules/react-native/Libraries/ActionSheetIOS`)
+ - React-RCTAnimation (from `../../node_modules/react-native/Libraries/NativeAnimation`)
+ - React-RCTBlob (from `../../node_modules/react-native/Libraries/Blob`)
+ - React-RCTImage (from `../../node_modules/react-native/Libraries/Image`)
+ - React-RCTLinking (from `../../node_modules/react-native/Libraries/LinkingIOS`)
+ - React-RCTNetwork (from `../../node_modules/react-native/Libraries/Network`)
+ - React-RCTSettings (from `../../node_modules/react-native/Libraries/Settings`)
+ - React-RCTText (from `../../node_modules/react-native/Libraries/Text`)
+ - React-RCTVibration (from `../../node_modules/react-native/Libraries/Vibration`)
+ - ReactCommon/jscallinvoker (from `../../node_modules/react-native/ReactCommon`)
+ - ReactCommon/turbomodule/core (from `../../node_modules/react-native/ReactCommon`)
+ - Yoga (from `../../node_modules/react-native/ReactCommon/yoga`)
+
+SPEC REPOS:
+ trunk:
+ - boost-for-react-native
+
+EXTERNAL SOURCES:
+ DoubleConversion:
+ :podspec: "../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
+ FBLazyVector:
+ :path: "../../node_modules/react-native/Libraries/FBLazyVector"
+ FBReactNativeSpec:
+ :path: "../../node_modules/react-native/Libraries/FBReactNativeSpec"
+ Folly:
+ :podspec: "../../node_modules/react-native/third-party-podspecs/Folly.podspec"
+ glog:
+ :podspec: "../../node_modules/react-native/third-party-podspecs/glog.podspec"
+ Interactable:
+ :path: "../../Interactable.podspec"
+ RCTRequired:
+ :path: "../../node_modules/react-native/Libraries/RCTRequired"
+ RCTTypeSafety:
+ :path: "../../node_modules/react-native/Libraries/TypeSafety"
+ React:
+ :path: "../../node_modules/react-native/"
+ React-Core:
+ :path: "../../node_modules/react-native/"
+ React-CoreModules:
+ :path: "../../node_modules/react-native/React/CoreModules"
+ React-cxxreact:
+ :path: "../../node_modules/react-native/ReactCommon/cxxreact"
+ React-jsi:
+ :path: "../../node_modules/react-native/ReactCommon/jsi"
+ React-jsiexecutor:
+ :path: "../../node_modules/react-native/ReactCommon/jsiexecutor"
+ React-jsinspector:
+ :path: "../../node_modules/react-native/ReactCommon/jsinspector"
+ React-RCTActionSheet:
+ :path: "../../node_modules/react-native/Libraries/ActionSheetIOS"
+ React-RCTAnimation:
+ :path: "../../node_modules/react-native/Libraries/NativeAnimation"
+ React-RCTBlob:
+ :path: "../../node_modules/react-native/Libraries/Blob"
+ React-RCTImage:
+ :path: "../../node_modules/react-native/Libraries/Image"
+ React-RCTLinking:
+ :path: "../../node_modules/react-native/Libraries/LinkingIOS"
+ React-RCTNetwork:
+ :path: "../../node_modules/react-native/Libraries/Network"
+ React-RCTSettings:
+ :path: "../../node_modules/react-native/Libraries/Settings"
+ React-RCTText:
+ :path: "../../node_modules/react-native/Libraries/Text"
+ React-RCTVibration:
+ :path: "../../node_modules/react-native/Libraries/Vibration"
+ ReactCommon:
+ :path: "../../node_modules/react-native/ReactCommon"
+ Yoga:
+ :path: "../../node_modules/react-native/ReactCommon/yoga"
+
+SPEC CHECKSUMS:
+ boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
+ DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
+ FBLazyVector: feb35a6b7f7b50f367be07f34012f34a79282fa3
+ FBReactNativeSpec: 51477b84b1bf7ab6f9ef307c24e3dd675391be44
+ Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
+ glog: 1f3da668190260b06b429bb211bfbee5cd790c28
+ Interactable: 2b4f49bc06addd037e60c06bff3baf2721d499bb
+ RCTRequired: f3b3fb6f4723e8e52facb229d0c75fdc76773849
+ RCTTypeSafety: 2ec60de6abb1db050b56ecc4b60188026078fd10
+ React: 10e0130b57e55a7cd8c3dee37c1261102ce295f4
+ React-Core: 636212410772d05f3a1eb79d965df2962ca1c70b
+ React-CoreModules: 6f70d5e41919289c582f88c9ad9923fe5c87400a
+ React-cxxreact: ddecbe9157ec1743f52ea17bf8d95debc0d6e846
+ React-jsi: ca921f4041505f9d5197139b2d09eeb020bb12e8
+ React-jsiexecutor: 8dfb73b987afa9324e4009bdce62a18ce23d983c
+ React-jsinspector: d15478d0a8ada19864aa4d1cc1c697b41b3fa92f
+ React-RCTActionSheet: 7369b7c85f99b6299491333affd9f01f5a130c22
+ React-RCTAnimation: d07be15b2bd1d06d89417eb0343f98ffd2b099a7
+ React-RCTBlob: 8e0b23d95c9baa98f6b0e127e07666aaafd96c34
+ React-RCTImage: 443050d14a66e8c2332e9c055f45689d23e15cc7
+ React-RCTLinking: ce9a90ba155aec41be49e75ec721bbae2d48a47e
+ React-RCTNetwork: 41fe54bacc67dd00e6e4c4d30dd98a13e4beabc8
+ React-RCTSettings: 45e3e0a6470310b2dab2ccc6d1d73121ba3ea936
+ React-RCTText: 21934e0a51d522abcd0a275407e80af45d6fd9ec
+ React-RCTVibration: 0f76400ee3cec6edb9c125da49fed279340d145a
+ ReactCommon: a6a294e7028ed67b926d29551aa9394fd989c24c
+ Yoga: ba3d99dbee6c15ea6bbe3783d1f0cb1ffb79af0f
+
+PODFILE CHECKSUM: 0330f68f4b219b6a3539711eb50dc6d7f01e7eea
+
+COCOAPODS: 1.8.4
diff --git a/example/ios/example.xcodeproj/project.pbxproj b/playground/ios/playground.xcodeproj/project.pbxproj
similarity index 73%
rename from example/ios/example.xcodeproj/project.pbxproj
rename to playground/ios/playground.xcodeproj/project.pbxproj
index ec20d1b1..0238f36a 100644
--- a/example/ios/example.xcodeproj/project.pbxproj
+++ b/playground/ios/playground.xcodeproj/project.pbxproj
@@ -7,24 +7,11 @@
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 */; };
- 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
- 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
- 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
- 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
- A71254AB1F0E9F7F0066860E /* libInteractable.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A75ACA031F0E6C2F00B0EEA2 /* libInteractable.a */; };
+ B68E1DC32FEA4F977B1B8B20 /* libPods-playground.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 72A8595415A8F566A2626B5D /* libPods-playground.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -63,13 +50,6 @@
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 */;
@@ -91,6 +71,55 @@
remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
remoteInfo = React;
};
+ 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = ADD01A681E09402E00F6D226;
+ remoteInfo = "RCTBlob-tvOS";
+ };
+ 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 3DBE0D001F3B181A0099AA32;
+ remoteInfo = fishhook;
+ };
+ 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32;
+ remoteInfo = "fishhook-tvOS";
+ };
+ 398EEB6A225A18FD004C3591 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = EDEBC6D6214B3E7000DD5AC8;
+ remoteInfo = jsi;
+ };
+ 398EEB6C225A18FD004C3591 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = EDEBC73B214B45A300DD5AC8;
+ remoteInfo = jsiexecutor;
+ };
+ 398EEB6E225A18FD004C3591 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = ED296FB6214C9A0900B7C4FE;
+ remoteInfo = "jsi-tvOS";
+ };
+ 398EEB70225A18FD004C3591 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = ED296FEE214C9CF800B7C4FE;
+ remoteInfo = "jsiexecutor-tvOS";
+ };
3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
@@ -168,20 +197,6 @@
remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4;
remoteInfo = "cxxreact-tvOS";
};
- 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4;
- remoteInfo = jschelpers;
- };
- 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
- remoteInfo = "jschelpers-tvOS";
- };
5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
@@ -210,40 +225,54 @@
remoteGlobalIDString = 58B5119B1A9E6C1200147676;
remoteInfo = RCTText;
};
- A71254891F0E9DB80066860E /* PBXContainerItemProxy */ = {
+ ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
- containerPortal = A75AC9FE1F0E6C2E00B0EEA2 /* Interactable.xcodeproj */;
- proxyType = 1;
- remoteGlobalIDString = CC0127961E3ACC3900B23C9F;
- remoteInfo = Interactable;
+ containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 358F4ED71D1E81A9004DF814;
+ remoteInfo = RCTBlob;
};
- A71254A71F0E9DB80066860E /* PBXContainerItemProxy */ = {
+ DA39D3BA2073441100E787CD /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = EBF21BDC1FC498900052F4D5;
+ remoteInfo = jsinspector;
+ };
+ DA39D3BC2073441100E787CD /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = EBF21BFA1FC4989A0052F4D5;
+ remoteInfo = "jsinspector-tvOS";
+ };
+ DA39D3BE2073441100E787CD /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7;
remoteInfo = "third-party";
};
- A71254A91F0E9DB80066860E /* PBXContainerItemProxy */ = {
+ DA39D3C02073441100E787CD /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
- remoteGlobalIDString = 139D7E881E25C6D100323FB7;
- remoteInfo = "double-conversion";
+ remoteGlobalIDString = 3D383D3C1EBD27B6005632C8;
+ remoteInfo = "third-party-tvOS";
};
- A75ACA021F0E6C2F00B0EEA2 /* PBXContainerItemProxy */ = {
+ DA39D3C22073441100E787CD /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
- containerPortal = A75AC9FE1F0E6C2E00B0EEA2 /* Interactable.xcodeproj */;
+ containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
proxyType = 2;
- remoteGlobalIDString = CC0127971E3ACC3900B23C9F;
- remoteInfo = Interactable;
+ remoteGlobalIDString = 139D7E881E25C6D100323FB7;
+ remoteInfo = "double-conversion";
};
- A761CB8C1F20D427004720AF /* PBXContainerItemProxy */ = {
+ DA39D3C42073441100E787CD /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
- proxyType = 1;
- remoteGlobalIDString = 83CBBA2D1A601D0E00E9B192;
- remoteInfo = React;
+ proxyType = 2;
+ remoteGlobalIDString = 3D383D621EBD27B9005632C8;
+ remoteInfo = "double-conversion-tvOS";
};
/* End PBXContainerItemProxy section */
@@ -254,50 +283,33 @@
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 = ""; };
+ 13B07F961A680F5B00A75B9A /* playground.temp_caseinsensitive_rename.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = playground.temp_caseinsensitive_rename.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = playground/AppDelegate.h; sourceTree = ""; };
+ 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = playground/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 = ""; };
+ 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = playground/Images.xcassets; sourceTree = ""; };
+ 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = playground/Info.plist; sourceTree = ""; };
+ 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = playground/main.m; sourceTree = ""; };
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; };
+ 2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 398EEB43225A18FD004C3591 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; };
+ 72A8595415A8F566A2626B5D /* libPods-playground.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-playground.a"; sourceTree = BUILT_PRODUCTS_DIR; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; };
- A75AC9FE1F0E6C2E00B0EEA2 /* Interactable.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Interactable.xcodeproj; path = ../../lib/ios/Interactable.xcodeproj; sourceTree = ""; };
+ A35D3A68918A497C0DB93F05 /* Pods-playground.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-playground.debug.xcconfig"; path = "Target Support Files/Pods-playground/Pods-playground.debug.xcconfig"; sourceTree = ""; };
+ ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = ""; };
+ FBA70104A5879A054D23B971 /* Pods-playground.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-playground.release.xcconfig"; path = "Target Support Files/Pods-playground/Pods-playground.release.xcconfig"; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
- 00E356EB1AD99517003FC87E /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- A71254AB1F0E9F7F0066860E /* libInteractable.a in Frameworks */,
- 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.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 */,
+ B68E1DC32FEA4F977B1B8B20 /* libPods-playground.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -346,23 +358,6 @@
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 = (
@@ -377,11 +372,13 @@
children = (
139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */,
+ 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */,
+ 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */,
);
name = Products;
sourceTree = "";
};
- 13B07FAE1A68108700A75B9A /* example */ = {
+ 13B07FAE1A68108700A75B9A /* playground */ = {
isa = PBXGroup;
children = (
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
@@ -392,7 +389,7 @@
13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
13B07FB71A68108700A75B9A /* main.m */,
);
- name = example;
+ name = playground;
sourceTree = "";
};
146834001AC3E56700842450 /* Products */ = {
@@ -404,14 +401,39 @@
3DAD3EA71DF850E9000B6D8A /* libyoga.a */,
3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */,
3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
- 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */,
- 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */,
- A71254A81F0E9DB80066860E /* libthird-party.a */,
- A71254AA1F0E9DB80066860E /* libdouble-conversion.a */,
+ DA39D3BB2073441100E787CD /* libjsinspector.a */,
+ DA39D3BD2073441100E787CD /* libjsinspector-tvOS.a */,
+ DA39D3BF2073441100E787CD /* libthird-party.a */,
+ DA39D3C12073441100E787CD /* libthird-party.a */,
+ DA39D3C32073441100E787CD /* libdouble-conversion.a */,
+ DA39D3C52073441100E787CD /* libdouble-conversion.a */,
+ 398EEB6B225A18FD004C3591 /* libjsi.a */,
+ 398EEB6D225A18FD004C3591 /* libjsiexecutor.a */,
+ 398EEB6F225A18FD004C3591 /* libjsi-tvOS.a */,
+ 398EEB71225A18FD004C3591 /* libjsiexecutor-tvOS.a */,
);
name = Products;
sourceTree = "";
};
+ 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 398EEB43225A18FD004C3591 /* JavaScriptCore.framework */,
+ 2D16E6891FA4F8E400B85C8A /* libReact.a */,
+ 72A8595415A8F566A2626B5D /* libPods-playground.a */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+ 5CE12862075A4BDC22D754EB /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ A35D3A68918A497C0DB93F05 /* Pods-playground.debug.xcconfig */,
+ FBA70104A5879A054D23B971 /* Pods-playground.release.xcconfig */,
+ );
+ path = Pods;
+ sourceTree = "";
+ };
5E91572E1DD0AC6500FF2AA8 /* Products */ = {
isa = PBXGroup;
children = (
@@ -433,10 +455,10 @@
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup;
children = (
- A75AC9FE1F0E6C2E00B0EEA2 /* Interactable.xcodeproj */,
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */,
146833FF1AC3E56700842450 /* React.xcodeproj */,
00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
+ ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */,
00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
@@ -461,28 +483,30 @@
83CBB9F61A601CBA00E9B192 = {
isa = PBXGroup;
children = (
- 13B07FAE1A68108700A75B9A /* example */,
+ 13B07FAE1A68108700A75B9A /* playground */,
832341AE1AAA6A7D00B99B32 /* Libraries */,
- 00E356EF1AD99517003FC87E /* exampleTests */,
83CBBA001A601CBA00E9B192 /* Products */,
+ 2D16E6871FA4F8E400B85C8A /* Frameworks */,
+ 5CE12862075A4BDC22D754EB /* Pods */,
);
indentWidth = 2;
sourceTree = "";
tabWidth = 2;
+ usesTabs = 0;
};
83CBBA001A601CBA00E9B192 /* Products */ = {
isa = PBXGroup;
children = (
- 13B07F961A680F5B00A75B9A /* example.app */,
- 00E356EE1AD99517003FC87E /* exampleTests.xctest */,
+ 13B07F961A680F5B00A75B9A /* playground.temp_caseinsensitive_rename.app */,
);
name = Products;
sourceTree = "";
};
- A75AC9FF1F0E6C2E00B0EEA2 /* Products */ = {
+ ADBDB9201DFEBF0600ED6528 /* Products */ = {
isa = PBXGroup;
children = (
- A75ACA031F0E6C2F00B0EEA2 /* libInteractable.a */,
+ ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */,
+ 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */,
);
name = Products;
sourceTree = "";
@@ -490,28 +514,11 @@
/* 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 */ = {
+ 13B07F861A680F5B00A75B9A /* playground */ = {
isa = PBXNativeTarget;
- buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */;
+ buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "playground" */;
buildPhases = (
+ 4386045E587D9330E5F1B620 /* [CP] Check Pods Manifest.lock */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
@@ -520,12 +527,10 @@
buildRules = (
);
dependencies = (
- A761CB8D1F20D427004720AF /* PBXTargetDependency */,
- A712548A1F0E9DB80066860E /* PBXTargetDependency */,
);
- name = example;
+ name = playground;
productName = "Hello World";
- productReference = 13B07F961A680F5B00A75B9A /* example.app */;
+ productReference = 13B07F961A680F5B00A75B9A /* playground.temp_caseinsensitive_rename.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
@@ -536,22 +541,13 @@
attributes = {
LastUpgradeCheck = 0610;
ORGANIZATIONNAME = Facebook;
- TargetAttributes = {
- 00E356ED1AD99517003FC87E = {
- CreatedOnToolsVersion = 6.2;
- DevelopmentTeam = S3GLW74Y8N;
- TestTargetID = 13B07F861A680F5B00A75B9A;
- };
- 13B07F861A680F5B00A75B9A = {
- DevelopmentTeam = S3GLW74Y8N;
- };
- };
};
- buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */;
+ buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "playground" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
+ English,
en,
Base,
);
@@ -559,10 +555,6 @@
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
projectDirPath = "";
projectReferences = (
- {
- ProductGroup = A75AC9FF1F0E6C2E00B0EEA2 /* Products */;
- ProjectRef = A75AC9FE1F0E6C2E00B0EEA2 /* Interactable.xcodeproj */;
- },
{
ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
@@ -571,6 +563,10 @@
ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */;
ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
},
+ {
+ ProductGroup = ADBDB9201DFEBF0600ED6528 /* Products */;
+ ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
+ },
{
ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
@@ -610,8 +606,7 @@
);
projectRoot = "";
targets = (
- 13B07F861A680F5B00A75B9A /* example */,
- 00E356ED1AD99517003FC87E /* exampleTests */,
+ 13B07F861A680F5B00A75B9A /* playground */,
);
};
/* End PBXProject section */
@@ -673,6 +668,55 @@
remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
+ 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = "libRCTBlob-tvOS.a";
+ remoteRef = 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libfishhook.a;
+ remoteRef = 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = "libfishhook-tvOS.a";
+ remoteRef = 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 398EEB6B225A18FD004C3591 /* libjsi.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libjsi.a;
+ remoteRef = 398EEB6A225A18FD004C3591 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 398EEB6D225A18FD004C3591 /* libjsiexecutor.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libjsiexecutor.a;
+ remoteRef = 398EEB6C225A18FD004C3591 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 398EEB6F225A18FD004C3591 /* libjsi-tvOS.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = "libjsi-tvOS.a";
+ remoteRef = 398EEB6E225A18FD004C3591 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ 398EEB71225A18FD004C3591 /* libjsiexecutor-tvOS.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = "libjsiexecutor-tvOS.a";
+ remoteRef = 398EEB70225A18FD004C3591 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@@ -750,20 +794,6 @@
remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
- 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = {
- isa = PBXReferenceProxy;
- fileType = archive.ar;
- path = libjschelpers.a;
- remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
- 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = {
- isa = PBXReferenceProxy;
- fileType = archive.ar;
- path = libjschelpers.a;
- remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@@ -792,37 +822,58 @@
remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
- A71254A81F0E9DB80066860E /* libthird-party.a */ = {
+ ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libRCTBlob.a;
+ remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ DA39D3BB2073441100E787CD /* libjsinspector.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libjsinspector.a;
+ remoteRef = DA39D3BA2073441100E787CD /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ DA39D3BD2073441100E787CD /* libjsinspector-tvOS.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = "libjsinspector-tvOS.a";
+ remoteRef = DA39D3BC2073441100E787CD /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ DA39D3BF2073441100E787CD /* libthird-party.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = "libthird-party.a";
+ remoteRef = DA39D3BE2073441100E787CD /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+ DA39D3C12073441100E787CD /* libthird-party.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libthird-party.a";
- remoteRef = A71254A71F0E9DB80066860E /* PBXContainerItemProxy */;
+ remoteRef = DA39D3C02073441100E787CD /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
- A71254AA1F0E9DB80066860E /* libdouble-conversion.a */ = {
+ DA39D3C32073441100E787CD /* libdouble-conversion.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = "libdouble-conversion.a";
- remoteRef = A71254A91F0E9DB80066860E /* PBXContainerItemProxy */;
+ remoteRef = DA39D3C22073441100E787CD /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
- A75ACA031F0E6C2F00B0EEA2 /* libInteractable.a */ = {
+ DA39D3C52073441100E787CD /* libdouble-conversion.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
- path = libInteractable.a;
- remoteRef = A75ACA021F0E6C2F00B0EEA2 /* PBXContainerItemProxy */;
+ path = "libdouble-conversion.a";
+ remoteRef = DA39D3C42073441100E787CD /* 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;
@@ -837,7 +888,7 @@
/* Begin PBXShellScriptBuildPhase section */
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
isa = PBXShellScriptBuildPhase;
- buildActionMask = 12;
+ buildActionMask = 2147483647;
files = (
);
inputPaths = (
@@ -847,19 +898,33 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "export NODE_BINARY=node\n../../node_modules/react-native/packager/react-native-xcode.sh index.ios.js\n";
+ 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;
+ 4386045E587D9330E5F1B620 /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
- 00E356F31AD99517003FC87E /* exampleTests.m in Sources */,
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-playground-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
13B07F871A680F5B00A75B9A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -871,24 +936,6 @@
};
/* End PBXSourcesBuildPhase section */
-/* Begin PBXTargetDependency section */
- 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 13B07F861A680F5B00A75B9A /* example */;
- targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
- };
- A712548A1F0E9DB80066860E /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- name = Interactable;
- targetProxy = A71254891F0E9DB80066860E /* PBXContainerItemProxy */;
- };
- A761CB8D1F20D427004720AF /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- name = React;
- targetProxy = A761CB8C1F20D427004720AF /* PBXContainerItemProxy */;
- };
-/* End PBXTargetDependency section */
-
/* Begin PBXVariantGroup section */
13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
@@ -896,76 +943,49 @@
13B07FB21A68108700A75B9A /* Base */,
);
name = LaunchScreen.xib;
- path = example;
+ path = playground;
sourceTree = "";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
- 00E356F61AD99517003FC87E /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- BUNDLE_LOADER = "$(TEST_HOST)";
- DEVELOPMENT_TEAM = S3GLW74Y8N;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- INFOPLIST_FILE = exampleTests/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
- 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;
- DEVELOPMENT_TEAM = S3GLW74Y8N;
- INFOPLIST_FILE = exampleTests/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
- 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;
+ baseConfigurationReference = A35D3A68918A497C0DB93F05 /* Pods-playground.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = NO;
- DEVELOPMENT_TEAM = S3GLW74Y8N;
- INFOPLIST_FILE = example/Info.plist;
+ DEVELOPMENT_TEAM = "";
+ INFOPLIST_FILE = playground/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-lc++",
);
- PRODUCT_NAME = example;
+ PRODUCT_NAME = playground.temp_caseinsensitive_rename;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration;
+ baseConfigurationReference = FBA70104A5879A054D23B971 /* Pods-playground.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
- DEVELOPMENT_TEAM = S3GLW74Y8N;
- INFOPLIST_FILE = example/Info.plist;
+ DEVELOPMENT_TEAM = "";
+ INFOPLIST_FILE = playground/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-lc++",
);
- PRODUCT_NAME = example;
+ PRODUCT_NAME = playground.temp_caseinsensitive_rename;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
@@ -1004,7 +1024,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -1039,7 +1059,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
@@ -1049,16 +1069,7 @@
/* 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" */ = {
+ 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "playground" */ = {
isa = XCConfigurationList;
buildConfigurations = (
13B07F941A680F5B00A75B9A /* Debug */,
@@ -1067,7 +1078,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */ = {
+ 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "playground" */ = {
isa = XCConfigurationList;
buildConfigurations = (
83CBBA201A601CBA00E9B192 /* Debug */,
diff --git a/real-life-example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme b/playground/ios/playground.xcodeproj/xcshareddata/xcschemes/playground-tvOS.xcscheme
similarity index 69%
rename from real-life-example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme
rename to playground/ios/playground.xcodeproj/xcshareddata/xcschemes/playground-tvOS.xcscheme
index eae95137..eee5e82f 100644
--- a/real-life-example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme
+++ b/playground/ios/playground.xcodeproj/xcshareddata/xcschemes/playground-tvOS.xcscheme
@@ -1,6 +1,6 @@
@@ -28,10 +28,10 @@
buildForAnalyzing = "YES">
+ BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
+ BuildableName = "playground-tvOS.app"
+ BlueprintName = "playground-tvOS"
+ ReferencedContainer = "container:playground.xcodeproj">
+ BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
+ BuildableName = "playground-tvOSTests.xctest"
+ BlueprintName = "playground-tvOSTests"
+ ReferencedContainer = "container:playground.xcodeproj">
@@ -60,20 +60,20 @@
skipped = "NO">
+ BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
+ BuildableName = "playground-tvOSTests.xctest"
+ BlueprintName = "playground-tvOSTests"
+ ReferencedContainer = "container:playground.xcodeproj">
+ BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
+ BuildableName = "playground-tvOS.app"
+ BlueprintName = "playground-tvOS"
+ ReferencedContainer = "container:playground.xcodeproj">
@@ -93,10 +93,10 @@
runnableDebuggingMode = "0">
+ BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
+ BuildableName = "playground-tvOS.app"
+ BlueprintName = "playground-tvOS"
+ ReferencedContainer = "container:playground.xcodeproj">
@@ -112,10 +112,10 @@
runnableDebuggingMode = "0">
+ BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
+ BuildableName = "playground-tvOS.app"
+ BlueprintName = "playground-tvOS"
+ ReferencedContainer = "container:playground.xcodeproj">
diff --git a/example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme b/playground/ios/playground.xcodeproj/xcshareddata/xcschemes/playground.xcscheme
similarity index 67%
rename from example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme
rename to playground/ios/playground.xcodeproj/xcshareddata/xcschemes/playground.xcscheme
index 825d4536..9d303f68 100644
--- a/example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme
+++ b/playground/ios/playground.xcodeproj/xcshareddata/xcschemes/playground.xcscheme
@@ -14,24 +14,38 @@
buildForAnalyzing = "YES">
+ BlueprintIdentifier = "1BEE828C124E6416179B904A9F66D794"
+ BuildableName = "React"
+ BlueprintName = "React"
+ ReferencedContainer = "container:Pods/Pods.xcodeproj">
+ BlueprintIdentifier = "CC0127961E3ACC3900B23C9F"
+ BuildableName = "libInteractable.a"
+ BlueprintName = "Interactable"
+ ReferencedContainer = "container:../../lib/ios/Interactable.xcodeproj">
+
+
+
+
@@ -42,24 +56,14 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
-
-
-
-
+ BuildableName = "playground.temp_caseinsensitive_rename.app"
+ BlueprintName = "playground"
+ ReferencedContainer = "container:playground.xcodeproj">
@@ -80,9 +84,9 @@
+ BuildableName = "playground.temp_caseinsensitive_rename.app"
+ BlueprintName = "playground"
+ ReferencedContainer = "container:playground.xcodeproj">
@@ -99,9 +103,9 @@
+ BuildableName = "playground.temp_caseinsensitive_rename.app"
+ BlueprintName = "playground"
+ ReferencedContainer = "container:playground.xcodeproj">
diff --git a/playground/ios/playground.xcworkspace/contents.xcworkspacedata b/playground/ios/playground.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 00000000..fad06a95
--- /dev/null
+++ b/playground/ios/playground.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
diff --git a/playground/ios/playground.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/playground/ios/playground.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 00000000..18d98100
--- /dev/null
+++ b/playground/ios/playground.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/example/ios/example/AppDelegate.h b/playground/ios/playground/AppDelegate.h
similarity index 77%
rename from example/ios/example/AppDelegate.h
rename to playground/ios/playground/AppDelegate.h
index a9654d5e..556946d4 100644
--- a/example/ios/example/AppDelegate.h
+++ b/playground/ios/playground/AppDelegate.h
@@ -7,9 +7,10 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
+#import
#import
-@interface AppDelegate : UIResponder
+@interface AppDelegate : UIResponder
@property (nonatomic, strong) UIWindow *window;
diff --git a/real-life-example/ios/example/AppDelegate.m b/playground/ios/playground/AppDelegate.m
similarity index 61%
rename from real-life-example/ios/example/AppDelegate.m
rename to playground/ios/playground/AppDelegate.m
index f6d2f2bf..d05bd645 100644
--- a/real-life-example/ios/example/AppDelegate.m
+++ b/playground/ios/playground/AppDelegate.m
@@ -9,6 +9,7 @@
#import "AppDelegate.h"
+#import
#import
#import
@@ -16,20 +17,12 @@ @implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
- NSURL *jsCodeLocation;
-
-#ifdef DEBUG
- jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
-#else
- jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
-#endif
-
- RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
- moduleName:@"example"
- initialProperties:nil
- launchOptions:launchOptions];
+ RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
+ RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
+ moduleName:@"playground"
+ initialProperties:nil];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
-
+
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
@@ -38,4 +31,13 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
return YES;
}
+- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
+{
+#if DEBUG
+ return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
+#else
+ return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
+#endif
+}
+
@end
diff --git a/example/ios/example/Base.lproj/LaunchScreen.xib b/playground/ios/playground/Base.lproj/LaunchScreen.xib
similarity index 93%
rename from example/ios/example/Base.lproj/LaunchScreen.xib
rename to playground/ios/playground/Base.lproj/LaunchScreen.xib
index 9e04807a..c04d201d 100644
--- a/example/ios/example/Base.lproj/LaunchScreen.xib
+++ b/playground/ios/playground/Base.lproj/LaunchScreen.xib
@@ -18,7 +18,7 @@
-