├── .watchmanconfig
├── .npmignore
├── example
├── .tern-port
├── .watchmanconfig
├── .gitattributes
├── .babelrc
├── app.json
├── android
│ ├── settings.gradle
│ ├── app
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── res
│ │ │ │ ├── values
│ │ │ │ │ ├── strings.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ └── mipmap-xxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── exemple
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ └── MainApplication.java
│ │ │ │ └── AndroidManifest.xml
│ │ ├── BUCK
│ │ ├── proguard-rules.pro
│ │ └── build.gradle
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── keystores
│ │ ├── debug.keystore.properties
│ │ └── BUCK
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradlew.bat
│ └── gradlew
├── .buckconfig
├── index.js
├── jsconfig.json
├── __tests__
│ ├── index.ios.js
│ └── index.android.js
├── ios
│ ├── Exemple
│ │ ├── AppDelegate.h
│ │ ├── main.m
│ │ ├── Images.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── AppDelegate.m
│ │ ├── Info.plist
│ │ └── Base.lproj
│ │ │ └── LaunchScreen.xib
│ ├── ExempleTests
│ │ ├── Info.plist
│ │ └── ExempleTests.m
│ ├── Exemple-tvOSTests
│ │ └── Info.plist
│ ├── Exemple-tvOS
│ │ └── Info.plist
│ └── Exemple.xcodeproj
│ │ ├── xcshareddata
│ │ └── xcschemes
│ │ │ ├── Exemple.xcscheme
│ │ │ └── Exemple-tvOS.xcscheme
│ │ └── project.pbxproj
├── package.json
├── .gitignore
├── .flowconfig
└── App.js
├── .babelrc
├── index.js
├── .gitignore
├── animation.gif
├── animation2.gif
├── animation3.gif
├── .buckconfig
├── LICENSE
├── .flowconfig
├── styles.js
├── package.json
├── index.d.ts
├── README.md
└── Swiper.js
/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | Example/
2 |
--------------------------------------------------------------------------------
/example/.tern-port:
--------------------------------------------------------------------------------
1 | 50229
--------------------------------------------------------------------------------
/example/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/example/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react-native"]
3 | }
--------------------------------------------------------------------------------
/example/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react-native"]
3 | }
4 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | import Swiper from './Swiper'
2 | export default Swiper
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | package-lock.json
3 | .vscode/
4 | .idea/
5 |
--------------------------------------------------------------------------------
/example/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Exemple",
3 | "displayName": "Exemple"
4 | }
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'Exemple'
2 |
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/animation.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/webraptor/react-native-deck-swiper/HEAD/animation.gif
--------------------------------------------------------------------------------
/animation2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/webraptor/react-native-deck-swiper/HEAD/animation2.gif
--------------------------------------------------------------------------------
/animation3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/webraptor/react-native-deck-swiper/HEAD/animation3.gif
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Exemple
3 |
4 |
--------------------------------------------------------------------------------
/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/example/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/webraptor/react-native-deck-swiper/HEAD/example/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/example/android/keystores/debug.keystore.properties:
--------------------------------------------------------------------------------
1 | key.store=debug.keystore
2 | key.alias=androiddebugkey
3 | key.store.password=android
4 | key.alias.password=android
5 |
--------------------------------------------------------------------------------
/example/index.js:
--------------------------------------------------------------------------------
1 | import Exemple from './App'
2 | import {
3 | AppRegistry
4 | } from 'react-native'
5 |
6 | AppRegistry.registerComponent('Exemple', () => Exemple)
7 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/webraptor/react-native-deck-swiper/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/webraptor/react-native-deck-swiper/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/webraptor/react-native-deck-swiper/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/webraptor/react-native-deck-swiper/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowJs": true,
4 | "allowSyntheticDefaultImports": true
5 | },
6 | "exclude": [
7 | "node_modules"
8 | ]
9 | }
--------------------------------------------------------------------------------
/example/android/keystores/BUCK:
--------------------------------------------------------------------------------
1 | keystore(
2 | name = "debug",
3 | properties = "debug.keystore.properties",
4 | store = "debug.keystore",
5 | visibility = [
6 | "PUBLIC",
7 | ],
8 | )
9 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6 |
--------------------------------------------------------------------------------
/example/__tests__/index.ios.js:
--------------------------------------------------------------------------------
1 | import 'react-native';
2 | import React from 'react';
3 | import Index from '../index.ios.js';
4 |
5 | // Note: test renderer must be required after react-native.
6 | import renderer from 'react-test-renderer';
7 |
8 | it('renders correctly', () => {
9 | const tree = renderer.create(
10 |
11 | );
12 | });
13 |
--------------------------------------------------------------------------------
/example/__tests__/index.android.js:
--------------------------------------------------------------------------------
1 | import 'react-native';
2 | import React from 'react';
3 | import Index from '../index.android.js';
4 |
5 | // Note: test renderer must be required after react-native.
6 | import renderer from 'react-test-renderer';
7 |
8 | it('renders correctly', () => {
9 | const tree = renderer.create(
10 |
11 | );
12 | });
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/exemple/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.exemple;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript.
9 | * This is used to schedule rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "Exemple";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/example/ios/Exemple/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 |
14 | @property (nonatomic, strong) UIWindow *window;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/example/ios/Exemple/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "AppDelegate.h"
13 |
14 | int main(int argc, char * argv[]) {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Exemple",
3 | "version": "0.0.2",
4 | "private": true,
5 | "scripts": {
6 | "start": "node node_modules/react-native/local-cli/cli.js start",
7 | "test": "jest"
8 | },
9 | "dependencies": {
10 | "lodash.isequal": "^4.5.0",
11 | "prop-types": "^15.5.10",
12 | "react": "^16.2.0",
13 | "react-native": "^0.49.5",
14 | "react-native-deck-swiper": "1.6.7"
15 | },
16 | "devDependencies": {
17 | "babel-jest": "19.0.0",
18 | "babel-preset-react-native": "1.9.1",
19 | "jest": "19.0.2",
20 | "react-test-renderer": "16.0.0-alpha.6"
21 | },
22 | "jest": {
23 | "preset": "react-native"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | mavenLocal()
18 | jcenter()
19 | maven {
20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
21 | url "$rootDir/../node_modules/react-native/android"
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | ISC License
2 |
3 | Copyright (c) 2018 Alexandre Brillant
4 | Copyright (c) 2020 Bogdan Pop / WebRaptor
5 |
6 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
7 |
8 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
9 |
--------------------------------------------------------------------------------
/example/ios/Exemple/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/example/ios/ExempleTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/example/ios/Exemple-tvOSTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useDeprecatedNdk=true
21 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 |
33 | # node.js
34 | #
35 | node_modules/
36 | npm-debug.log
37 | yarn-error.log
38 |
39 | # BUCK
40 | buck-out/
41 | \.buckd/
42 | *.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://docs.fastlane.tools/best-practices/source-control/
50 |
51 | */fastlane/report.xml
52 | */fastlane/Preview.html
53 | */fastlane/screenshots
54 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/exemple/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.exemple;
2 |
3 | import android.app.Application;
4 |
5 | import com.facebook.react.ReactApplication;
6 | import com.facebook.react.ReactNativeHost;
7 | import com.facebook.react.ReactPackage;
8 | import com.facebook.react.shell.MainReactPackage;
9 | import com.facebook.soloader.SoLoader;
10 |
11 | import java.util.Arrays;
12 | import java.util.List;
13 |
14 | public class MainApplication extends Application implements ReactApplication {
15 |
16 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
17 | @Override
18 | public boolean getUseDeveloperSupport() {
19 | return BuildConfig.DEBUG;
20 | }
21 |
22 | @Override
23 | protected List getPackages() {
24 | return Arrays.asList(
25 | new MainReactPackage()
26 | );
27 | }
28 |
29 | @Override
30 | protected String getJSMainModuleName() {
31 | return "index";
32 | }
33 | };
34 |
35 | @Override
36 | public ReactNativeHost getReactNativeHost() {
37 | return mReactNativeHost;
38 | }
39 |
40 | @Override
41 | public void onCreate() {
42 | super.onCreate();
43 | SoLoader.init(this, /* native exopackage */ false);
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
19 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/example/ios/Exemple/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "AppDelegate.h"
11 |
12 | #import
13 | #import
14 |
15 | @implementation AppDelegate
16 |
17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
18 | {
19 | NSURL *jsCodeLocation;
20 |
21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
22 |
23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
24 | moduleName:@"Exemple"
25 | initialProperties:nil
26 | launchOptions:launchOptions];
27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
28 |
29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
30 | UIViewController *rootViewController = [UIViewController new];
31 | rootViewController.view = rootView;
32 | self.window.rootViewController = rootViewController;
33 | [self.window makeKeyAndVisible];
34 | return YES;
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore unexpected extra "@providesModule"
9 | .*/node_modules/.*/node_modules/fbjs/.*
10 |
11 | ; Ignore duplicate module providers
12 | ; For RN Apps installed via npm, "Libraries" folder is inside
13 | ; "node_modules/react-native" but in the source repo it is in the root
14 | .*/Libraries/react-native/React.js
15 | .*/Libraries/react-native/ReactNative.js
16 |
17 | [include]
18 |
19 | [libs]
20 | node_modules/react-native/Libraries/react-native/react-native-interface.js
21 | node_modules/react-native/flow
22 | flow/
23 |
24 | [options]
25 | emoji=true
26 |
27 | module.system=haste
28 |
29 | experimental.strict_type_args=true
30 |
31 | munge_underscores=true
32 |
33 | 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'
34 |
35 | suppress_type=$FlowIssue
36 | suppress_type=$FlowFixMe
37 | suppress_type=$FixMe
38 |
39 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-8]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
40 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-8]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
41 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
42 |
43 | unsafe.enable_getters_and_setters=true
44 |
45 | [version]
46 | ^0.38.0
47 |
--------------------------------------------------------------------------------
/styles.js:
--------------------------------------------------------------------------------
1 | import { StyleSheet } from 'react-native'
2 |
3 | const styles = StyleSheet.create({
4 | card: {
5 | flex: 1,
6 | position: 'absolute'
7 | },
8 | container: {
9 | alignItems: 'stretch',
10 | position: 'absolute',
11 | top: 0,
12 | left: 0,
13 | right: 0,
14 | bottom: 0
15 | },
16 | childrenViewStyle: {
17 | position: 'absolute',
18 | top: 0,
19 | left: 0,
20 | right: 0,
21 | bottom: 0
22 | },
23 | overlayLabelWrapper: {
24 | position: 'absolute',
25 | backgroundColor: 'transparent',
26 | zIndex: 2,
27 | flex: 1,
28 | width: '100%',
29 | height: '100%'
30 | },
31 | hideOverlayLabel: {
32 | opacity: 0
33 | },
34 | overlayLabel: {
35 | fontSize: 45,
36 | fontWeight: 'bold',
37 | borderRadius: 10,
38 | padding: 10,
39 | overflow: 'hidden'
40 | },
41 | bottomOverlayLabelWrapper: {
42 | flexDirection: 'column',
43 | alignItems: 'center',
44 | justifyContent: 'center'
45 | },
46 | topOverlayLabelWrapper: {
47 | flexDirection: 'column',
48 | alignItems: 'center',
49 | justifyContent: 'center'
50 | },
51 | rightOverlayLabelWrapper: {
52 | flexDirection: 'column',
53 | alignItems: 'flex-start',
54 | justifyContent: 'flex-start',
55 | marginTop: 30,
56 | marginLeft: 30
57 | },
58 | leftOverlayLabelWrapper: {
59 | flexDirection: 'column',
60 | alignItems: 'flex-end',
61 | justifyContent: 'flex-start',
62 | marginTop: 30,
63 | marginLeft: -30
64 | }
65 | })
66 |
67 | export default styles
68 |
--------------------------------------------------------------------------------
/example/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore unexpected extra "@providesModule"
9 | .*/node_modules/.*/node_modules/fbjs/.*
10 |
11 | ; Ignore duplicate module providers
12 | ; For RN Apps installed via npm, "Libraries" folder is inside
13 | ; "node_modules/react-native" but in the source repo it is in the root
14 | .*/Libraries/react-native/React.js
15 |
16 | ; Ignore polyfills
17 | .*/Libraries/polyfills/.*
18 |
19 | [include]
20 |
21 | [libs]
22 | node_modules/react-native/Libraries/react-native/react-native-interface.js
23 | node_modules/react-native/flow/
24 |
25 | [options]
26 | emoji=true
27 |
28 | module.system=haste
29 |
30 | munge_underscores=true
31 |
32 | 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'
33 |
34 | suppress_type=$FlowIssue
35 | suppress_type=$FlowFixMe
36 | suppress_type=$FlowFixMeProps
37 | suppress_type=$FlowFixMeState
38 | suppress_type=$FixMe
39 |
40 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
41 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-3]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
42 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
43 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
44 |
45 | unsafe.enable_getters_and_setters=true
46 |
47 | [version]
48 | ^0.53.0
49 |
--------------------------------------------------------------------------------
/example/ios/Exemple-tvOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UIViewControllerBasedStatusBarAppearance
38 |
39 | NSLocationWhenInUseUsageDescription
40 |
41 | NSAppTransportSecurity
42 |
43 |
44 | NSExceptionDomains
45 |
46 | localhost
47 |
48 | NSExceptionAllowsInsecureHTTPLoads
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/example/android/app/BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | lib_deps = []
12 |
13 | for jarfile in glob(['libs/*.jar']):
14 | name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
15 | lib_deps.append(':' + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
21 | for aarfile in glob(['libs/*.aar']):
22 | name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
23 | lib_deps.append(':' + name)
24 | android_prebuilt_aar(
25 | name = name,
26 | aar = aarfile,
27 | )
28 |
29 | android_library(
30 | name = "all-libs",
31 | exported_deps = lib_deps,
32 | )
33 |
34 | android_library(
35 | name = "app-code",
36 | srcs = glob([
37 | "src/main/java/**/*.java",
38 | ]),
39 | deps = [
40 | ":all-libs",
41 | ":build_config",
42 | ":res",
43 | ],
44 | )
45 |
46 | android_build_config(
47 | name = "build_config",
48 | package = "com.exemple",
49 | )
50 |
51 | android_resource(
52 | name = "res",
53 | package = "com.exemple",
54 | res = "src/main/res",
55 | )
56 |
57 | android_binary(
58 | name = "app",
59 | keystore = "//android/keystores:debug",
60 | manifest = "src/main/AndroidManifest.xml",
61 | package_type = "debug",
62 | deps = [
63 | ":app-code",
64 | ],
65 | )
66 |
--------------------------------------------------------------------------------
/example/ios/Exemple/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | Exemple
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UIViewControllerBasedStatusBarAppearance
40 |
41 | NSLocationWhenInUseUsageDescription
42 |
43 | NSAppTransportSecurity
44 |
45 |
46 | NSExceptionDomains
47 |
48 | localhost
49 |
50 | NSExceptionAllowsInsecureHTTPLoads
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/example/ios/ExempleTests/ExempleTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | #import
14 | #import
15 |
16 | #define TIMEOUT_SECONDS 600
17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
18 |
19 | @interface ExempleTests : XCTestCase
20 |
21 | @end
22 |
23 | @implementation ExempleTests
24 |
25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
26 | {
27 | if (test(view)) {
28 | return YES;
29 | }
30 | for (UIView *subview in [view subviews]) {
31 | if ([self findSubviewInView:subview matching:test]) {
32 | return YES;
33 | }
34 | }
35 | return NO;
36 | }
37 |
38 | - (void)testRendersWelcomeScreen
39 | {
40 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
42 | BOOL foundElement = NO;
43 |
44 | __block NSString *redboxError = nil;
45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
46 | if (level >= RCTLogLevelError) {
47 | redboxError = message;
48 | }
49 | });
50 |
51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
54 |
55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
57 | return YES;
58 | }
59 | return NO;
60 | }];
61 | }
62 |
63 | RCTSetLogFunction(RCTDefaultLogFunction);
64 |
65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
67 | }
68 |
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/example/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-deck-swiper",
3 | "version": "2.0.19",
4 | "description": "Awesome tinder like card swiper for react-native. Highly Customizable!",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "jest --coverage",
8 | "lint": "standard --verbose | snazzy",
9 | "lintdiff": "git diff --name-only --cached --relative | grep '\\.js$' | xargs standard | snazzy",
10 | "format": "prettier-eslint \"./**/*.js\" --ignore \"./node_modules/**\" --write",
11 | "lint:fix": "eslint --fix Swiper.js index.js styles.js",
12 | "clean-example": "cd example && rm -rf node_modules && yarn cache clean && yarn",
13 | "run-ios-example": "cd example && npx react-native run-ios",
14 | "run-android-example": "cd example && npx react-native run-android"
15 | },
16 | "repository": {
17 | "type": "git",
18 | "url": "git+https://github.com/webraptor/react-native-deck-swiper.git"
19 | },
20 | "keywords": [
21 | "react-native",
22 | "react-native-component",
23 | "tinder",
24 | "cards",
25 | "card",
26 | "swipe",
27 | "swiper",
28 | "deck",
29 | "animation"
30 | ],
31 | "author": "Bogdan Pop / WebRaptor",
32 | "license": "ISC",
33 | "bugs": {
34 | "url": "https://github.com/webraptor/react-native-deck-swiper/issues"
35 | },
36 | "homepage": "https://github.com/webraptor/react-native-deck-swiper#readme",
37 | "dependencies": {
38 | "prop-types": "15.5.10",
39 | "lodash": "^4.17.21"
40 | },
41 | "peerDependencies": {
42 | "react": "^16.0.0-beta.5 || ^17.0.0 || ^18.0.0 || ^19.0.0",
43 | "react-native": ">=0.49.1"
44 | },
45 | "devDependencies": {
46 | "babel-eslint": "^7.2.3",
47 | "babel-jest": "18.0.0",
48 | "babel-preset-react-native": "1.9.1",
49 | "eslint": "^3.19.0",
50 | "eslint-config-standard": "^10.2.1",
51 | "eslint-config-standard-react": "^5.0.0",
52 | "eslint-plugin-import": "^2.7.0",
53 | "eslint-plugin-json": "^1.2.0",
54 | "eslint-plugin-node": "^5.1.1",
55 | "eslint-plugin-promise": "^3.5.0",
56 | "eslint-plugin-react": "^7.2.1",
57 | "eslint-plugin-standard": "^3.0.1",
58 | "jest": "18.1.0",
59 | "jest-cli": "^18.1.0",
60 | "prettier-eslint": "^6.4.2",
61 | "prettier-eslint-cli": "^4.1.1",
62 | "react-test-renderer": "15.4.2"
63 | },
64 | "jest": {
65 | "preset": "react-native"
66 | },
67 | "eslintConfig": {
68 | "parser": "babel-eslint",
69 | "extends": [
70 | "standard",
71 | "standard-react"
72 | ],
73 | "parserOptions": {
74 | "ecmaFeatures": {
75 | "jsx": true
76 | }
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/example/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Disabling obfuscation is useful if you collect stack traces from production crashes
20 | # (unless you are using a system that supports de-obfuscate the stack traces).
21 | -dontobfuscate
22 |
23 | # React Native
24 |
25 | # Keep our interfaces so they can be used by other ProGuard rules.
26 | # See http://sourceforge.net/p/proguard/bugs/466/
27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
30 |
31 | # Do not strip any method/class that is annotated with @DoNotStrip
32 | -keep @com.facebook.proguard.annotations.DoNotStrip class *
33 | -keep @com.facebook.common.internal.DoNotStrip class *
34 | -keepclassmembers class * {
35 | @com.facebook.proguard.annotations.DoNotStrip *;
36 | @com.facebook.common.internal.DoNotStrip *;
37 | }
38 |
39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
40 | void set*(***);
41 | *** get*();
42 | }
43 |
44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; }
46 | -keepclassmembers,includedescriptorclasses class * { native ; }
47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; }
48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; }
49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; }
50 |
51 | -dontwarn com.facebook.react.**
52 |
53 | # TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
54 | # See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
55 | -dontwarn android.text.StaticLayout
56 |
57 | # okhttp
58 |
59 | -keepattributes Signature
60 | -keepattributes *Annotation*
61 | -keep class okhttp3.** { *; }
62 | -keep interface okhttp3.** { *; }
63 | -dontwarn okhttp3.**
64 |
65 | # okio
66 |
67 | -keep class sun.misc.Unsafe { *; }
68 | -dontwarn java.nio.file.*
69 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
70 | -dontwarn okio.**
71 |
--------------------------------------------------------------------------------
/index.d.ts:
--------------------------------------------------------------------------------
1 | declare module 'react-native-deck-swiper' {
2 | import {StyleProp, ViewStyle} from 'react-native';
3 |
4 | export interface SwiperProps {
5 | animateCardOpacity?: boolean;
6 | animateOverlayLabelsOpacity?: boolean;
7 | backgroundColor?: string;
8 | cardHorizontalMargin?: number;
9 | cardIndex?: number;
10 | cards: T[];
11 | cardStyle?: number | object;
12 | cardVerticalMargin?: number;
13 | childrenOnTop?: boolean;
14 | containerStyle?: object;
15 | disableBottomSwipe?: boolean;
16 | disableLeftSwipe?: boolean;
17 | disableRightSwipe?: boolean;
18 | disableTopSwipe?: boolean;
19 | horizontalSwipe?: boolean;
20 | horizontalThreshold?: number;
21 | goBackToPreviousCardOnSwipeBottom?: boolean;
22 | goBackToPreviousCardOnSwipeLeft?: boolean;
23 | goBackToPreviousCardOnSwipeRight?: boolean;
24 | goBackToPreviousCardOnSwipeTop?: boolean;
25 | infinite?: boolean;
26 | inputCardOpacityRangeX?: [number, number, number, number, number];
27 | inputCardOpacityRangeY?: [number, number, number, number, number];
28 | inputOverlayLabelsOpacityRangeX?: [number, number, number, number, number];
29 | inputOverlayLabelsOpacityRangeY?: [number, number, number, number, number];
30 | inputRotationRange?: [number, number, number];
31 | keyExtractor?: (cardData: T) => string;
32 | marginBottom?: number;
33 | marginTop?: number;
34 | onSwiped?: (cardIndex: number) => void;
35 | onSwipedAborted?: () => void;
36 | onSwipedAll?: () => void;
37 | onSwipedBottom?: (cardIndex: number) => void;
38 | onSwipedLeft?: (cardIndex: number) => void;
39 | onSwipedRight?: (cardIndex: number) => void;
40 | onSwipedTop?: (cardIndex: number) => void;
41 | onSwiping?: (x: number, y: number) => void;
42 | onTapCard?: (cardIndex: number) => void;
43 | onTapCardDeadZone?: number;
44 | outputCardOpacityRangeX?: [number, number, number, number, number];
45 | outputCardOpacityRangeY?: [number, number, number, number, number];
46 | outputOverlayLabelsOpacityRangeX?: [number, number, number];
47 | outputOverlayLabelsOpacityRangeY?: [number, number, number];
48 | outputRotationRange?: [string, string, string];
49 | overlayLabels?: object;
50 | overlayLabelStyle?: StyleProp;
51 | overlayLabelWrapperStyle?: StyleProp;
52 | overlayOpacityHorizontalThreshold?: number;
53 | overlayOpacityVerticalThreshold?: number;
54 | pointerEvents?: string;
55 | previousCardDefaultPositionX?: number;
56 | previousCardDefaultPositionY?: number;
57 | renderCard: (cardData: T, cardIndex: number) => JSX.Element | null;
58 | secondCardZoom?: number;
59 | showSecondCard?: boolean;
60 | stackAnimationFriction?: number;
61 | stackAnimationTension?: number;
62 | stackScale?: number;
63 | stackSeparation?: number;
64 | stackSize?: number;
65 | swipeAnimationDuration?: number;
66 | swipeBackCard?: boolean;
67 | testID?: string;
68 | topCardResetAnimationFriction?: number;
69 | topCardResetAnimationTension?: number;
70 | useViewOverflow?: boolean;
71 | verticalSwipe?: boolean;
72 | verticalThreshold?: number;
73 | zoomAnimationDuration?: number;
74 | zoomFriction?: number;
75 | }
76 |
77 | export default class Swiper extends React.Component> {
78 | swipeLeft: (mustDecrementCardIndex?: boolean) => void;
79 | swipeRight: (mustDecrementCardIndex?: boolean) => void;
80 | swipeTop: (mustDecrementCardIndex?: boolean) => void;
81 | swipeBottom: (mustDecrementCardIndex?: boolean) => void;
82 | jumpToCardIndex: (cardIndex: number) => void;
83 | swipeBack: (
84 | cb?: (previousCardIndex: number, previousCard: T) => void
85 | ) => void;
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/example/ios/Exemple/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/example/App.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import Swiper from 'react-native-deck-swiper'
3 | import { Button, StyleSheet, Text, View } from 'react-native'
4 |
5 | // demo purposes only
6 | function * range (start, end) {
7 | for (let i = start; i <= end; i++) {
8 | yield i
9 | }
10 | }
11 |
12 | export default class Exemple extends Component {
13 | constructor (props) {
14 | super(props)
15 | this.state = {
16 | cards: [...range(1, 50)],
17 | swipedAllCards: false,
18 | swipeDirection: '',
19 | cardIndex: 0
20 | }
21 | }
22 |
23 | renderCard = (card, index) => {
24 | return (
25 |
26 | {card} - {index}
27 |
28 | )
29 | };
30 |
31 | onSwiped = (type) => {
32 | console.log(`on swiped ${type}`)
33 | }
34 |
35 | onSwipedAllCards = () => {
36 | this.setState({
37 | swipedAllCards: true
38 | })
39 | };
40 |
41 | swipeLeft = () => {
42 | this.swiper.swipeLeft()
43 | };
44 |
45 | render () {
46 | return (
47 |
48 | {
50 | this.swiper = swiper
51 | }}
52 | onSwiped={() => this.onSwiped('general')}
53 | onSwipedLeft={() => this.onSwiped('left')}
54 | onSwipedRight={() => this.onSwiped('right')}
55 | onSwipedTop={() => this.onSwiped('top')}
56 | onSwipedBottom={() => this.onSwiped('bottom')}
57 | onTapCard={this.swipeLeft}
58 | cards={this.state.cards}
59 | cardIndex={this.state.cardIndex}
60 | cardVerticalMargin={80}
61 | renderCard={this.renderCard}
62 | onSwipedAll={this.onSwipedAllCards}
63 | stackSize={3}
64 | stackSeparation={15}
65 | overlayLabels={{
66 | bottom: {
67 | title: 'BLEAH',
68 | style: {
69 | label: {
70 | backgroundColor: 'black',
71 | borderColor: 'black',
72 | color: 'white',
73 | borderWidth: 1
74 | },
75 | wrapper: {
76 | flexDirection: 'column',
77 | alignItems: 'center',
78 | justifyContent: 'center'
79 | }
80 | }
81 | },
82 | left: {
83 | title: 'NOPE',
84 | style: {
85 | label: {
86 | backgroundColor: 'black',
87 | borderColor: 'black',
88 | color: 'white',
89 | borderWidth: 1
90 | },
91 | wrapper: {
92 | flexDirection: 'column',
93 | alignItems: 'flex-end',
94 | justifyContent: 'flex-start',
95 | marginTop: 30,
96 | marginLeft: -30
97 | }
98 | }
99 | },
100 | right: {
101 | title: 'LIKE',
102 | style: {
103 | label: {
104 | backgroundColor: 'black',
105 | borderColor: 'black',
106 | color: 'white',
107 | borderWidth: 1
108 | },
109 | wrapper: {
110 | flexDirection: 'column',
111 | alignItems: 'flex-start',
112 | justifyContent: 'flex-start',
113 | marginTop: 30,
114 | marginLeft: 30
115 | }
116 | }
117 | },
118 | top: {
119 | title: 'SUPER LIKE',
120 | style: {
121 | label: {
122 | backgroundColor: 'black',
123 | borderColor: 'black',
124 | color: 'white',
125 | borderWidth: 1
126 | },
127 | wrapper: {
128 | flexDirection: 'column',
129 | alignItems: 'center',
130 | justifyContent: 'center'
131 | }
132 | }
133 | }
134 | }}
135 | animateOverlayLabelsOpacity
136 | animateCardOpacity
137 | swipeBackCard
138 | >
139 |
141 |
142 | )
143 | }
144 | }
145 |
146 | const styles = StyleSheet.create({
147 | container: {
148 | flex: 1,
149 | backgroundColor: '#F5FCFF'
150 | },
151 | card: {
152 | flex: 1,
153 | borderRadius: 4,
154 | borderWidth: 2,
155 | borderColor: '#E8E8E8',
156 | justifyContent: 'center',
157 | backgroundColor: 'white'
158 | },
159 | text: {
160 | textAlign: 'center',
161 | fontSize: 50,
162 | backgroundColor: 'transparent'
163 | },
164 | done: {
165 | textAlign: 'center',
166 | fontSize: 30,
167 | color: 'white',
168 | backgroundColor: 'transparent'
169 | }
170 | })
171 |
--------------------------------------------------------------------------------
/example/ios/Exemple.xcodeproj/xcshareddata/xcschemes/Exemple.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
43 |
49 |
50 |
51 |
52 |
53 |
58 |
59 |
61 |
67 |
68 |
69 |
70 |
71 |
77 |
78 |
79 |
80 |
81 |
82 |
92 |
94 |
100 |
101 |
102 |
103 |
104 |
105 |
111 |
113 |
119 |
120 |
121 |
122 |
124 |
125 |
128 |
129 |
130 |
--------------------------------------------------------------------------------
/example/ios/Exemple.xcodeproj/xcshareddata/xcschemes/Exemple-tvOS.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
43 |
49 |
50 |
51 |
52 |
53 |
58 |
59 |
61 |
67 |
68 |
69 |
70 |
71 |
77 |
78 |
79 |
80 |
81 |
82 |
92 |
94 |
100 |
101 |
102 |
103 |
104 |
105 |
111 |
113 |
119 |
120 |
121 |
122 |
124 |
125 |
128 |
129 |
130 |
--------------------------------------------------------------------------------
/example/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 |
3 | import com.android.build.OutputFile
4 |
5 | /**
6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7 | * and bundleReleaseJsAndAssets).
8 | * These basically call `react-native bundle` with the correct arguments during the Android build
9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10 | * bundle directly from the development server. Below you can see all the possible configurations
11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the
12 | * `apply from: "../../node_modules/react-native/react.gradle"` line.
13 | *
14 | * project.ext.react = [
15 | * // the name of the generated asset file containing your JS bundle
16 | * bundleAssetName: "index.android.bundle",
17 | *
18 | * // the entry file for bundle generation
19 | * entryFile: "index.android.js",
20 | *
21 | * // whether to bundle JS and assets in debug mode
22 | * bundleInDebug: false,
23 | *
24 | * // whether to bundle JS and assets in release mode
25 | * bundleInRelease: true,
26 | *
27 | * // whether to bundle JS and assets in another build variant (if configured).
28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
29 | * // The configuration property can be in the following formats
30 | * // 'bundleIn${productFlavor}${buildType}'
31 | * // 'bundleIn${buildType}'
32 | * // bundleInFreeDebug: true,
33 | * // bundleInPaidRelease: true,
34 | * // bundleInBeta: true,
35 | *
36 | * // whether to disable dev mode in custom build variants (by default only disabled in release)
37 | * // for example: to disable dev mode in the staging build type (if configured)
38 | * devDisabledInStaging: true,
39 | * // The configuration property can be in the following formats
40 | * // 'devDisabledIn${productFlavor}${buildType}'
41 | * // 'devDisabledIn${buildType}'
42 | *
43 | * // the root of your project, i.e. where "package.json" lives
44 | * root: "../../",
45 | *
46 | * // where to put the JS bundle asset in debug mode
47 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
48 | *
49 | * // where to put the JS bundle asset in release mode
50 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
51 | *
52 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
53 | * // require('./image.png')), in debug mode
54 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
55 | *
56 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
57 | * // require('./image.png')), in release mode
58 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
59 | *
60 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
61 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
62 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
63 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
64 | * // for example, you might want to remove it from here.
65 | * inputExcludes: ["android/**", "ios/**"],
66 | *
67 | * // override which node gets called and with what additional arguments
68 | * nodeExecutableAndArgs: ["node"],
69 | *
70 | * // supply additional arguments to the packager
71 | * extraPackagerArgs: []
72 | * ]
73 | */
74 |
75 | project.ext.react = [
76 | entryFile: "index.js"
77 | ]
78 |
79 | apply from: "../../node_modules/react-native/react.gradle"
80 |
81 | /**
82 | * Set this to true to create two separate APKs instead of one:
83 | * - An APK that only works on ARM devices
84 | * - An APK that only works on x86 devices
85 | * The advantage is the size of the APK is reduced by about 4MB.
86 | * Upload all the APKs to the Play Store and people will download
87 | * the correct one based on the CPU architecture of their device.
88 | */
89 | def enableSeparateBuildPerCPUArchitecture = false
90 |
91 | /**
92 | * Run Proguard to shrink the Java bytecode in release builds.
93 | */
94 | def enableProguardInReleaseBuilds = false
95 |
96 | android {
97 | compileSdkVersion 23
98 | buildToolsVersion "23.0.1"
99 |
100 | defaultConfig {
101 | applicationId "com.exemple"
102 | minSdkVersion 16
103 | targetSdkVersion 22
104 | versionCode 1
105 | versionName "1.0"
106 | ndk {
107 | abiFilters "armeabi-v7a", "x86"
108 | }
109 | }
110 | splits {
111 | abi {
112 | reset()
113 | enable enableSeparateBuildPerCPUArchitecture
114 | universalApk false // If true, also generate a universal APK
115 | include "armeabi-v7a", "x86"
116 | }
117 | }
118 | buildTypes {
119 | release {
120 | minifyEnabled enableProguardInReleaseBuilds
121 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
122 | }
123 | }
124 | // applicationVariants are e.g. debug, release
125 | applicationVariants.all { variant ->
126 | variant.outputs.each { output ->
127 | // For each separate APK per architecture, set a unique version code as described here:
128 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
129 | def versionCodes = ["armeabi-v7a":1, "x86":2]
130 | def abi = output.getFilter(OutputFile.ABI)
131 | if (abi != null) { // null for the universal-debug, universal-release variants
132 | output.versionCodeOverride =
133 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
134 | }
135 | }
136 | }
137 | }
138 |
139 | dependencies {
140 | compile fileTree(dir: "libs", include: ["*.jar"])
141 | compile "com.android.support:appcompat-v7:23.0.1"
142 | compile "com.facebook.react:react-native:+" // From node_modules
143 | }
144 |
145 | // Run this once to be able to run the application with BUCK
146 | // puts all compile dependencies into folder libs for BUCK to use
147 | task copyDownloadableDepsToLibs(type: Copy) {
148 | from configurations.compile
149 | into 'libs'
150 | }
151 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## react-native-deck-swiper
2 |
3 | [](https://github.com/dwyl/esta/issues)
4 | [](https://badge.fury.io/js/react-native-deck-swiper)
5 |
6 | ## Installation
7 |
8 | ```
9 | yarn add react-native-deck-swiper
10 | ```
11 | OR
12 | ```
13 | npm install react-native-deck-swiper --save
14 | ```
15 |
16 | ## Versions info
17 |
18 | Version 2.0.0-beta is technically version 1.7.2 of the package. However, npm recommended that due to the change in ownership the version be bumped.
19 |
20 | | react-native-deck-swiper | react-native | description |
21 | | :---------------------------- | :---------------- | :--------------------------------------------------------------------- |
22 | | <= 2.0.3-beta | <= 0.56.x | should install **react-native-view-overflow** and set **useViewOverflow** _true_ |
23 | | >= 2.0.4 | => 0.57.x | no longer requires react-native-view-overflow; **useViewOverflow removed** |
24 |
25 | ## Issues
26 |
27 | Before submitting a new issue please check if it hasn't [already been reported yet](https://github.com/webraptor/react-native-deck-swiper/issues).
28 | With respect to bugfixes and further developments, please check the [To Do](https://github.com/webraptor/react-native-deck-swiper/projects/1) board.
29 |
30 | ## Overview
31 |
32 | * [x] Rotation animation
33 | * [x] Opacity animation
34 | * [x] Zoom animation
35 | * [x] Overlay labels
36 | * [x] Show next card while swiping
37 | * [x] Swipe event callbacks
38 | * [x] Trigger swipe animations programmatically
39 | * [x] Jump to a card index
40 | * [x] Swipe to previous card
41 | * [x] Underlaying cards offset
42 | * [x] Never-ending, animated deck when infinite property is true
43 | * [x] Swipe back to previous card with a custom animation
44 |
45 | ## Preview
46 |
47 | 
48 | 
49 |
50 | ## Props
51 |
52 | ### Card props
53 |
54 | | Props | type | description | required | default |
55 | | :-------------- | :------------- | :------------------------------------------------------------------- | :------- | :------ |
56 | | cards | array | array of data for the cards to be rendered | required |
57 | | renderCard | func(cardData, cardIndex) | function to render the card based on the data | required |
58 | | keyExtractor | func(cardData) | function to get the card's react key | | null |
59 | | cardIndex | number | cardIndex to start with | | 0 |
60 | | infinite | bool | keep swiping indefinitely | | false |
61 | | horizontalSwipe | bool | enable/disable horizontal swiping | | true |
62 | | verticalSwipe | bool | enable/disable vertical swiping | | true |
63 | | showSecondCard | bool | enable/disable second card while swiping | | true |
64 | | stackSize | number | number of underlaying cards to show (showSecondCard must be enabled) | | 1 |
65 |
66 | ### Event callbacks
67 |
68 | | Props | type | description | default |
69 | | :---------------- | :----- | :------------------------------------------------------------------------------------ | :------ |
70 | | onSwipedAll | func | function to be called when all cards have been swiped | | () => {} |
71 | | onSwiped | func | function to be called when a card is swiped. it receives the swiped card index | | (cardIndex) => {} |
72 | | onSwipedAborted | func | function to be called when a card is released before reaching the threshold | | () => {} |
73 | | onSwipedLeft | func | function to be called when a card is swiped left. it receives the swiped card index | | (cardIndex) => {} |
74 | | onSwipedRight | func | function to be called when a card is swiped right. it receives the swiped card index | | (cardIndex) => {} |
75 | | onSwipedTop | func | function to be called when a card is swiped top. it receives the swiped card index | | (cardIndex) => {} |
76 | | onSwipedBottom | func | function to be called when a card is swiped bottom. it receives the swiped card index | | (cardIndex) => {} |
77 | | onSwiping | func | function to be called when a card is being moved. it receives X and Y positions | | (x, y) => {} |
78 | | dragStart | func | function to be called when drag start | |
79 | | dragEnd | func | function to be called when drag end
80 | | onTapCard | func | function to be called when tapping a card. it receives the tapped card index | | (cardIndex) => {} |
81 | | onTapCardDeadZone | number | maximum amount of movement before a tap is no longer recognized as a tap | 5 |
82 |
83 | ### Swipe animation props
84 |
85 | | Props | type | description | default |
86 | | :--------------------- | :----- | :------------------------------ | :--------- |
87 | | verticalThreshold | number | vertical swipe threshold | height / 5 |
88 | | horizontalThreshold | number | horizontal swipe threshold | width / 4 |
89 | | swipeAnimationDuration | number | duration of the swipe animation | 350 |
90 | | disableBottomSwipe | bool | disable bottom swipe | false |
91 | | disableLeftSwipe | bool | disable left swipe | false |
92 | | disableRightSwipe | bool | disable right swipe | false |
93 | | disableTopSwipe | bool | disable top swipe | false |
94 |
95 | ### Stack props
96 |
97 | | Props | type | description | default |
98 | | :--------------------- | :----- | :----------------------------------------------------- | :------ |
99 | | stackSeparation | number | vertical separation between underlaying cards | 10 |
100 | | stackScale | number | percentage to reduce the size of each underlaying card | 3 |
101 | | stackAnimationFriction | number | spring animation friction (bounciness) | 7 |
102 | | stackAnimationTension | number | spring animation tension (speed) | 40 |
103 |
104 | ### Rotation animation props
105 |
106 | | Props | type | description | default |
107 | | :------------------ | :---- | :----------------------------------------------------- | :-------------------------- |
108 | | inputRotationRange | array | x values range for the rotation output | [-width / 2, 0, width / 2] |
109 | | outputRotationRange | array | rotation values for the x values in inputRotationRange | ["-10deg", "0deg", "10deg"] |
110 |
111 | ### Opacity animation props
112 |
113 | | Props | type | description | default |
114 | | :-------------------------------- | :----- | :--------------------------------------------------------------- | :---------------------------------------------------- |
115 | | animateCardOpacity | bool | animate card opacity | false |
116 | | inputCardOpacityRangeX | array | pan x card opacity input range | [-width / 2, -width / 3, 0, width / 3, width / 2] |
117 | | outputCardOpacityRangeX | array | opacity values for the values in inputCardOpacityRangeX | [0.8, 1, 1, 1, 0.8] |
118 | | inputCardOpacityRangeY | array | pan y card opacity input range | [-height / 2, -height / 3, 0, height / 3, height / 2] |
119 | | outputCardOpacityRangeY | array | opacity values for the values in inputCardOpacityRangeY | [0.8, 1, 1, 1, 0.8] |
120 | | animateOverlayLabelsOpacity | bool | animate card overlay labels opacity | false |
121 | | inputOverlayLabelsOpacityRangeX | array | pan x overlay labels opacity input range | [-width / 3, -width / 4, 0, width / 4, width / 3] |
122 | | outputOverlayLabelsOpacityRangeX | array | opacity values for the values in inputOverlayLabelsOpacityRangeX | [1, 0, 0, 0, 1] |
123 | | inputOverlayLabelsOpacityRangeY | array | pan x overlay labels opacity input range | [-height / 4, -height / 5, 0, height / 5, height / 4] |
124 | | outputOverlayLabelsOpacityRangeY | array | opacity values for the values in inputOverlayLabelsOpacityRangeY | [1, 0, 0, 0, 1] |
125 | | overlayOpacityVerticalThreshold | number | vertical threshold for overlay label | height / 5 |
126 | | overlayOpacityHorizontalThreshold | number | horizontal threshold for overlay label | width / 4 |
127 |
128 | 2 steps of inputOverlayLabelsOpacityRangeX and inputOverlayLabelsOpacityRangeY should match horizontalThreshold and verticalThreshold, respectively.
129 |
130 | ### Swipe overlay labels
131 |
132 | | Props | type | description | default |
133 | | :----------------------- | :----- | :--------------------------- | :------------------------- |
134 | | overlayLabels | object | swipe labels title and style | null, see below for format |
135 | | overlayLabelStyle | object | swipe labels style | null, see below for format |
136 | | overlayLabelWrapperStyle | object | overlay label wrapper style | see below for default |
137 |
138 | ### overlayLabelStyle
139 |
140 | ```javascript
141 | {
142 | fontSize: 45,
143 | fontWeight: 'bold',
144 | borderRadius: 10,
145 | padding: 10,
146 | overflow: 'hidden'
147 | }
148 | ```
149 |
150 | ### overlayLabelWrapperStyle default props:
151 |
152 | ```javascript
153 | {
154 | position: 'absolute',
155 | backgroundColor: 'transparent',
156 | zIndex: 2,
157 | flex: 1,
158 | width: '100%',
159 | height: '100%'
160 | }
161 | ```
162 |
163 | ### overlayLabels default props :
164 |
165 | ```javascript
166 | {
167 | bottom: {
168 | element: BLEAH /* Optional */
169 | title: 'BLEAH',
170 | style: {
171 | label: {
172 | backgroundColor: 'black',
173 | borderColor: 'black',
174 | color: 'white',
175 | borderWidth: 1
176 | },
177 | wrapper: {
178 | flexDirection: 'column',
179 | alignItems: 'center',
180 | justifyContent: 'center'
181 | }
182 | }
183 | },
184 | left: {
185 | element: NOPE /* Optional */
186 | title: 'NOPE',
187 | style: {
188 | label: {
189 | backgroundColor: 'black',
190 | borderColor: 'black',
191 | color: 'white',
192 | borderWidth: 1
193 | },
194 | wrapper: {
195 | flexDirection: 'column',
196 | alignItems: 'flex-end',
197 | justifyContent: 'flex-start',
198 | marginTop: 30,
199 | marginLeft: -30
200 | }
201 | }
202 | },
203 | right: {
204 | element: LIKE /* Optional */
205 | title: 'LIKE',
206 | style: {
207 | label: {
208 | backgroundColor: 'black',
209 | borderColor: 'black',
210 | color: 'white',
211 | borderWidth: 1
212 | },
213 | wrapper: {
214 | flexDirection: 'column',
215 | alignItems: 'flex-start',
216 | justifyContent: 'flex-start',
217 | marginTop: 30,
218 | marginLeft: 30
219 | }
220 | }
221 | },
222 | top: {
223 | element: SUPER /* Optional */
224 | title: 'SUPER LIKE',
225 | style: {
226 | label: {
227 | backgroundColor: 'black',
228 | borderColor: 'black',
229 | color: 'white',
230 | borderWidth: 1
231 | },
232 | wrapper: {
233 | flexDirection: 'column',
234 | alignItems: 'center',
235 | justifyContent: 'center'
236 | }
237 | }
238 | }
239 | }
240 | ```
241 |
242 | ### Swipe back to previous card props
243 |
244 | Make sure you set showSecondCard={false} for smoother and proper transitions while going back to previous card.
245 |
246 | | Props | type | description | default |
247 | | :-------------------------------- | :--- | :---------------------------------------- | :------ |
248 | | goBackToPreviousCardOnSwipeLeft | bool | previous card is rendered on left swipe | false |
249 | | goBackToPreviousCardOnSwipeRight | bool | previous card is rendered on right swipe | false |
250 | | goBackToPreviousCardOnSwipeTop | bool | previous card is rendered on top swipe | false |
251 | | goBackToPreviousCardOnSwipeBottom | bool | previous card is rendered on bottom swipe | false |
252 |
253 | ### Style props
254 |
255 | | Props | type | description | default |
256 | | :------------------- | :----- | :------------------------------------------------- | :-------- |
257 | | backgroundColor | string | background color for the view containing the cards | '#4FD0E9' |
258 | | marginTop | number | marginTop for the swiper container | 0 |
259 | | marginBottom | number | marginBottom for the swiper container | 0 |
260 | | cardVerticalMargin | number | card vertical margin | 60 |
261 | | cardHorizontalMargin | number | card horizontal margin | 20 |
262 | | childrenOnTop | bool | render children on top or not | false |
263 | | cardStyle | node | override swipable card style | {} |
264 | | containerStyle | node | overrides for the containing style | {} |
265 | | pointerEvents | string | pointerEvents prop for the containing | 'auto' |
266 | | useViewOverflow | bool | use ViewOverflow instead of View for the Swiper component | true |
267 |
268 | ### Swipe back method info
269 | ## Method
270 |
271 | | Name | type | description |
272 | | :------------------- | :----- | :------------------------------------------------- |
273 | | swipeBack | callback | swipe back into deck last swiped card. stacksize should be 2 cards or more |
274 |
275 | ## Props
276 |
277 | | Props | type | description | default |
278 | | :------------------- | :----- | :------------------------------------------------- | :-------- |
279 | | previousCardDefaultPositionX | number | Animation start position oX when card swipes back into deck | -width |
280 | | previousCardDefaultPositionY | number | Animation start position oY when card swipes back into deck | -height |
281 | | stackAnimationFriction | number | spring animation friction (bounciness) | 7 |
282 | | stackAnimationTension | number | spring animation tension (speed) | 40 |
283 | | stackAnimationTension | number | spring animation tension (speed) | 40 |
284 | | swipeBackCard | bool | renders swipe back card, in order to animate it | false |
285 |
286 | ### Methods
287 |
288 | To trigger imperative animations, you can use a reference to the Swiper component.
289 |
290 | | Name | arguments | description |
291 | | :-------------- | :----------------------------- | :---------------------------- |
292 | | swipeLeft | mustDecrementCardIndex = false | swipe left to the next card |
293 | | swipeRight | mustDecrementCardIndex = false | swipe right to the next card |
294 | | swipeTop | mustDecrementCardIndex = false | swipe top to the next card |
295 | | swipeBottom | mustDecrementCardIndex = false | swipe bottom to the next card |
296 | | jumpToCardIndex | cardIndex | set the current card index |
297 |
298 | ## Usage example
299 |
300 | ```javascript
301 | render () {
302 |
303 | {
306 | return (
307 |
308 | {card}
309 |
310 | )
311 | }}
312 | onSwiped={(cardIndex) => {console.log(cardIndex)}}
313 | onSwipedAll={() => {console.log('onSwipedAll')}}
314 | cardIndex={0}
315 | backgroundColor={'#4FD0E9'}
316 | stackSize= {3}>
317 |
322 |
323 |
324 | }
325 | ```
326 |
327 | Demo inside the [Example Folder](https://github.com/webraptor/react-native-deck-swiper/tree/master/example)
328 |
329 | ## Stylesheet example
330 |
331 | ```javascript
332 | const styles = StyleSheet.create({
333 | container: {
334 | flex: 1,
335 | backgroundColor: "#F5FCFF"
336 | },
337 | card: {
338 | flex: 1,
339 | borderRadius: 4,
340 | borderWidth: 2,
341 | borderColor: "#E8E8E8",
342 | justifyContent: "center",
343 | backgroundColor: "white"
344 | },
345 | text: {
346 | textAlign: "center",
347 | fontSize: 50,
348 | backgroundColor: "transparent"
349 | }
350 | });
351 | ```
352 |
353 | ## Updating props on card content? (dynamic card content)
354 |
355 | Card properties may change, including on already swiped cards, which would yield no effects to users as the cards would no longer be displayed [based on [initial issue](https://github.com/alexbrillant/react-native-deck-swiper/issues/153)].
356 |
357 | A possible fix for the situation is setting the _cardIndex_ on the parent component whenever deck re-renders are needed.
358 |
359 | ```
360 | const { cardIndex } = this.props;
361 | return ( {
363 | this.swiper = swiper;
364 | }}
365 | {...customSwiperProps}
366 | cardIndex={cardIndex}
367 | />)
368 | ```
369 |
370 | Passing along the _cardIndex_ to the swiper will allow external changes on the property, thus triggering a re-render of the deck of cards. All _onSwipe_ callbacks return the _cardIndex_ that can be used to push the updated _cardIndex_ to app state (redux or something else).
371 |
372 | By making sure that external changes on the cardIndex match those the swiper performs (increment on swipes, decrement on swipeBack) one can ensure no re-renders occur when not needed.
373 |
374 | ## Development
375 |
376 | If you've encountered issues while running the example app located in the _example_ folder, try the following steps:
377 |
378 | **If you're using yarn**
379 | 1. rm -rf node_modules && rm yarn.lock
380 | 2. yarn cache clean
381 | 3. yarn
382 | 4. react-native run-ios
383 | 5. react-native run-android
384 |
385 | **If you're using npm**
386 | 1. rm -rf node_modules && rm package-lock.json
387 | 2. npm cache clean --force
388 | 3. npm install
389 | 4. react-native run-ios
390 | 5. react-native run-android
391 |
392 | **If bundler doesn't automatically start**
393 | Simply run _yarn start_ or _npm start_ in the Example folder.
394 |
395 | Don't forget to bump project and example versions in package.json whenever you submit a PR.
396 |
--------------------------------------------------------------------------------
/Swiper.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import { PanResponder, Text, View, Dimensions, Animated, InteractionManager } from 'react-native'
3 | import PropTypes from 'prop-types'
4 | import isEqual from 'lodash/isEqual'
5 |
6 | import styles from './styles'
7 |
8 | const { height, width } = Dimensions.get('window')
9 | const LABEL_TYPES = {
10 | NONE: 'none',
11 | LEFT: 'left',
12 | RIGHT: 'right',
13 | TOP: 'top',
14 | BOTTOM: 'bottom'
15 | }
16 | const SWIPE_MULTIPLY_FACTOR = 7
17 |
18 | const calculateCardIndexes = (firstCardIndex, cards) => {
19 | firstCardIndex = firstCardIndex || 0
20 | const previousCardIndex = firstCardIndex === 0 ? cards.length - 1 : firstCardIndex - 1
21 | const secondCardIndex = firstCardIndex === cards.length - 1 ? 0 : firstCardIndex + 1
22 | return { firstCardIndex, secondCardIndex, previousCardIndex }
23 | }
24 |
25 | const rebuildStackAnimatedValues = (props) => {
26 | const stackPositionsAndScales = {}
27 | const { stackSize, stackSeparation, stackScale } = props
28 |
29 | for (let position = 0; position < stackSize; position++) {
30 | stackPositionsAndScales[`stackPosition${position}`] = new Animated.Value(stackSeparation * position)
31 | stackPositionsAndScales[`stackScale${position}`] = new Animated.Value((100 - stackScale * position) * 0.01)
32 | }
33 |
34 | return stackPositionsAndScales
35 | }
36 |
37 | class Swiper extends Component {
38 | constructor (props) {
39 | super(props)
40 |
41 | this.state = {
42 | ...calculateCardIndexes(props.cardIndex, props.cards),
43 | pan: new Animated.ValueXY(),
44 |
45 | previousCardX: new Animated.Value(props.previousCardDefaultPositionX),
46 | previousCardY: new Animated.Value(props.previousCardDefaultPositionY),
47 | swipedAllCards: false,
48 | panResponderLocked: false,
49 | labelType: LABEL_TYPES.NONE,
50 | slideGesture: false,
51 | swipeBackXYPositions: [],
52 | isSwipingBack: false,
53 | ...rebuildStackAnimatedValues(props)
54 | }
55 |
56 | this._mounted = true
57 | this._animatedValueX = 0
58 | this._animatedValueY = 0
59 |
60 | this.state.pan.x.addListener(value => (this._animatedValueX = value.value))
61 | this.state.pan.y.addListener(value => (this._animatedValueY = value.value))
62 |
63 | this.initializeCardStyle()
64 | this.initializePanResponder()
65 | }
66 |
67 | shouldComponentUpdate = (nextProps, nextState) => {
68 | const { props, state } = this
69 | const propsChanged = (
70 | !isEqual(props.cards, nextProps.cards) ||
71 | props.cardIndex !== nextProps.cardIndex
72 | )
73 | const stateChanged = (
74 | nextState.firstCardIndex !== state.firstCardIndex ||
75 | nextState.secondCardIndex !== state.secondCardIndex ||
76 | nextState.previousCardIndex !== state.previousCardIndex ||
77 | nextState.labelType !== state.labelType ||
78 | nextState.swipedAllCards !== state.swipedAllCards
79 | )
80 | return propsChanged || stateChanged
81 | }
82 |
83 | componentWillUnmountAfterInteractions = () => {
84 | this.state.pan.x.removeAllListeners()
85 | this.state.pan.y.removeAllListeners()
86 | this.dimensionsChangeSubscription?.remove()
87 | }
88 |
89 | componentWillUnmount = () => {
90 | this._mounted = false;
91 | InteractionManager.runAfterInteractions(this.componentWillUnmountAfterInteractions.bind(this));
92 | }
93 |
94 | getCardStyle = () => {
95 | const { height, width } = Dimensions.get('window')
96 | const {
97 | cardVerticalMargin,
98 | cardHorizontalMargin,
99 | marginTop,
100 | marginBottom
101 | } = this.props
102 |
103 | const cardWidth = width - cardHorizontalMargin * 2
104 | const cardHeight =
105 | height - cardVerticalMargin * 2 - marginTop - marginBottom
106 |
107 | return {
108 | top: cardVerticalMargin,
109 | left: cardHorizontalMargin,
110 | width: cardWidth,
111 | height: cardHeight
112 | }
113 | }
114 |
115 | initializeCardStyle = () => {
116 | // this.forceUpdate()
117 | this.dimensionsChangeSubscription = Dimensions.addEventListener('change', this.onDimensionsChange)
118 | }
119 |
120 | initializePanResponder = () => {
121 | this._panResponder = PanResponder.create({
122 | onStartShouldSetPanResponder: (event, gestureState) => true,
123 | onMoveShouldSetPanResponder: (event, gestureState) => false,
124 |
125 | onMoveShouldSetPanResponderCapture: (evt, gestureState) => {
126 | const isVerticalSwipe = Math.sqrt(
127 | Math.pow(gestureState.dx, 2) < Math.pow(gestureState.dy, 2)
128 | )
129 | if (!this.props.verticalSwipe && isVerticalSwipe) {
130 | return false
131 | }
132 | return Math.sqrt(Math.pow(gestureState.dx, 2) + Math.pow(gestureState.dy, 2)) > 10
133 | },
134 | onPanResponderGrant: this.onPanResponderGrant,
135 | onPanResponderMove: this.onPanResponderMove,
136 | onPanResponderRelease: this.onPanResponderRelease,
137 | onPanResponderTerminate: this.onPanResponderRelease
138 | })
139 | }
140 |
141 | createAnimatedEvent = () => {
142 | const { horizontalSwipe, verticalSwipe } = this.props
143 | const { x, y } = this.state.pan
144 | const dx = horizontalSwipe ? x : new Animated.Value(0)
145 | const dy = verticalSwipe ? y : new Animated.Value(0)
146 | return { dx, dy }
147 | }
148 |
149 | onDimensionsChange = () => {
150 | this.forceUpdate()
151 | }
152 |
153 | onPanResponderMove = (event, gestureState) => {
154 | this.props.onSwiping(this._animatedValueX, this._animatedValueY)
155 |
156 | let { overlayOpacityHorizontalThreshold, overlayOpacityVerticalThreshold } = this.props
157 | if (!overlayOpacityHorizontalThreshold) {
158 | overlayOpacityHorizontalThreshold = this.props.horizontalThreshold
159 | }
160 | if (!overlayOpacityVerticalThreshold) {
161 | overlayOpacityVerticalThreshold = this.props.verticalThreshold
162 | }
163 |
164 | let isSwipingLeft,
165 | isSwipingRight,
166 | isSwipingTop,
167 | isSwipingBottom
168 |
169 | if (Math.abs(this._animatedValueX) > Math.abs(this._animatedValueY) && Math.abs(this._animatedValueX) > overlayOpacityHorizontalThreshold) {
170 | if (this._animatedValueX > 0) isSwipingRight = true
171 | else isSwipingLeft = true
172 | } else if (Math.abs(this._animatedValueY) > Math.abs(this._animatedValueX) && Math.abs(this._animatedValueY) > overlayOpacityVerticalThreshold) {
173 | if (this._animatedValueY > 0) isSwipingBottom = true
174 | else isSwipingTop = true
175 | }
176 |
177 | if (isSwipingRight) {
178 | this.setState({ labelType: LABEL_TYPES.RIGHT })
179 | } else if (isSwipingLeft) {
180 | this.setState({ labelType: LABEL_TYPES.LEFT })
181 | } else if (isSwipingTop) {
182 | this.setState({ labelType: LABEL_TYPES.TOP })
183 | } else if (isSwipingBottom) {
184 | this.setState({ labelType: LABEL_TYPES.BOTTOM })
185 | } else {
186 | this.setState({ labelType: LABEL_TYPES.NONE })
187 | }
188 |
189 | const { onTapCardDeadZone } = this.props
190 | if (
191 | this._animatedValueX < -onTapCardDeadZone ||
192 | this._animatedValueX > onTapCardDeadZone ||
193 | this._animatedValueY < -onTapCardDeadZone ||
194 | this._animatedValueY > onTapCardDeadZone
195 | ) {
196 | this.setState({
197 | slideGesture: true
198 | })
199 | }
200 |
201 | return Animated.event([null, this.createAnimatedEvent()], { useNativeDriver: false })(
202 | event,
203 | gestureState
204 | )
205 | }
206 |
207 | onPanResponderGrant = (event, gestureState) => {
208 | this.props.dragStart && this.props.dragStart()
209 | if (!this.state.panResponderLocked) {
210 | this.state.pan.setOffset({
211 | x: 0,
212 | y: 0
213 | })
214 | }
215 |
216 | this.state.pan.setValue({
217 | x: 0,
218 | y: 0
219 | })
220 | }
221 |
222 | validPanResponderRelease = () => {
223 | const {
224 | disableBottomSwipe,
225 | disableLeftSwipe,
226 | disableRightSwipe,
227 | disableTopSwipe
228 | } = this.props
229 |
230 | const {
231 | isSwipingLeft,
232 | isSwipingRight,
233 | isSwipingTop,
234 | isSwipingBottom
235 | } = this.getSwipeDirection(this._animatedValueX, this._animatedValueY)
236 |
237 | return (
238 | (isSwipingLeft && !disableLeftSwipe) ||
239 | (isSwipingRight && !disableRightSwipe) ||
240 | (isSwipingTop && !disableTopSwipe) ||
241 | (isSwipingBottom && !disableBottomSwipe)
242 | )
243 | }
244 |
245 | onPanResponderRelease = (e, gestureState) => {
246 | this.props.dragEnd && this.props.dragEnd()
247 | if (this.state.panResponderLocked) {
248 | this.state.pan.setValue({
249 | x: 0,
250 | y: 0
251 | })
252 | this.state.pan.setOffset({
253 | x: 0,
254 | y: 0
255 | })
256 |
257 | return
258 | }
259 |
260 | const { horizontalThreshold, verticalThreshold } = this.props
261 |
262 | const animatedValueX = Math.abs(this._animatedValueX)
263 | const animatedValueY = Math.abs(this._animatedValueY)
264 |
265 | const isSwiping =
266 | animatedValueX > horizontalThreshold || animatedValueY > verticalThreshold
267 |
268 | if (isSwiping && this.validPanResponderRelease()) {
269 | const onSwipeDirectionCallback = this.getOnSwipeDirectionCallback(
270 | this._animatedValueX,
271 | this._animatedValueY
272 | )
273 |
274 | this.swipeCard(onSwipeDirectionCallback)
275 | } else {
276 | this.resetTopCard()
277 | }
278 |
279 | if (!this.state.slideGesture) {
280 | this.props.onTapCard(this.state.firstCardIndex)
281 | }
282 |
283 | this.setState({
284 | labelType: LABEL_TYPES.NONE,
285 | slideGesture: false
286 | })
287 | }
288 |
289 | getOnSwipeDirectionCallback = (animatedValueX, animatedValueY) => {
290 | const {
291 | onSwipedLeft,
292 | onSwipedRight,
293 | onSwipedTop,
294 | onSwipedBottom
295 | } = this.props
296 |
297 | const {
298 | isSwipingLeft,
299 | isSwipingRight,
300 | isSwipingTop,
301 | isSwipingBottom
302 | } = this.getSwipeDirection(animatedValueX, animatedValueY)
303 |
304 | if (isSwipingRight) {
305 | return onSwipedRight
306 | }
307 |
308 | if (isSwipingLeft) {
309 | return onSwipedLeft
310 | }
311 |
312 | if (isSwipingTop) {
313 | return onSwipedTop
314 | }
315 |
316 | if (isSwipingBottom) {
317 | return onSwipedBottom
318 | }
319 | }
320 |
321 | mustDecrementCardIndex = (animatedValueX, animatedValueY) => {
322 | const {
323 | isSwipingLeft,
324 | isSwipingRight,
325 | isSwipingTop,
326 | isSwipingBottom
327 | } = this.getSwipeDirection(animatedValueX, animatedValueY)
328 |
329 | return (
330 | (isSwipingLeft && this.props.goBackToPreviousCardOnSwipeLeft) ||
331 | (isSwipingRight && this.props.goBackToPreviousCardOnSwipeRight) ||
332 | (isSwipingTop && this.props.goBackToPreviousCardOnSwipeTop) ||
333 | (isSwipingBottom && this.props.goBackToPreviousCardOnSwipeBottom)
334 | )
335 | }
336 |
337 | getSwipeDirection = (animatedValueX, animatedValueY) => {
338 | const isSwipingLeft = animatedValueX < -this.props.horizontalThreshold
339 | const isSwipingRight = animatedValueX > this.props.horizontalThreshold
340 | const isSwipingTop = animatedValueY < -this.props.verticalThreshold
341 | const isSwipingBottom = animatedValueY > this.props.verticalThreshold
342 |
343 | return { isSwipingLeft, isSwipingRight, isSwipingTop, isSwipingBottom }
344 | }
345 |
346 | resetTopCard = cb => {
347 | Animated.spring(this.state.pan, {
348 | toValue: 0,
349 | friction: this.props.topCardResetAnimationFriction,
350 | tension: this.props.topCardResetAnimationTension,
351 | useNativeDriver: true
352 | }).start(cb)
353 |
354 | this.state.pan.setOffset({
355 | x: 0,
356 | y: 0
357 | })
358 |
359 | this.props.onSwipedAborted()
360 | }
361 |
362 | swipeBack = cb => {
363 | const { swipeBackXYPositions, isSwipingBack } = this.state
364 | const { infinite } = this.props
365 | const canSwipeBack = !isSwipingBack && (swipeBackXYPositions.length > 0 || infinite)
366 | if (!canSwipeBack) {
367 | return
368 | }
369 | this.setState({isSwipingBack: !isSwipingBack, swipeBackXYPositions}, () => {
370 | this.animatePreviousCard(this.calculateNextPreviousCardPosition(), cb)
371 | })
372 | }
373 |
374 | swipeLeft = (mustDecrementCardIndex = false) => {
375 | this.swipeCard(
376 | this.props.onSwipedLeft,
377 | -this.props.horizontalThreshold,
378 | 0,
379 | mustDecrementCardIndex
380 | )
381 | }
382 |
383 | swipeRight = (mustDecrementCardIndex = false) => {
384 | this.swipeCard(
385 | this.props.onSwipedRight,
386 | this.props.horizontalThreshold,
387 | 0,
388 | mustDecrementCardIndex
389 | )
390 | }
391 |
392 | swipeTop = (mustDecrementCardIndex = false) => {
393 | this.swipeCard(
394 | this.props.onSwipedTop,
395 | 0,
396 | -this.props.verticalThreshold,
397 | mustDecrementCardIndex
398 | )
399 | }
400 |
401 | swipeBottom = (mustDecrementCardIndex = false) => {
402 | this.swipeCard(
403 | this.props.onSwipedBottom,
404 | 0,
405 | this.props.verticalThreshold,
406 | mustDecrementCardIndex
407 | )
408 | }
409 |
410 | swipeCard = (
411 | onSwiped,
412 | x = this._animatedValueX,
413 | y = this._animatedValueY,
414 | mustDecrementCardIndex = false
415 | ) => {
416 | this.setState({ panResponderLocked: true })
417 | this.animateStack()
418 | Animated.timing(this.state.pan, {
419 | toValue: {
420 | x: x * SWIPE_MULTIPLY_FACTOR,
421 | y: y * SWIPE_MULTIPLY_FACTOR
422 | },
423 | duration: this.props.swipeAnimationDuration,
424 | useNativeDriver: true
425 | }).start(() => {
426 | this.setSwipeBackCardXY(x, y, () => {
427 | mustDecrementCardIndex = mustDecrementCardIndex
428 | ? true
429 | : this.mustDecrementCardIndex(
430 | this._animatedValueX,
431 | this._animatedValueY
432 | )
433 |
434 | if (mustDecrementCardIndex) {
435 | this.decrementCardIndex(onSwiped)
436 | } else {
437 | this.incrementCardIndex(onSwiped)
438 | }
439 | })
440 | })
441 | }
442 |
443 | setSwipeBackCardXY = (x = -width, y = 0, cb) => {
444 | this.setState({swipeBackXYPositions: [...this.state.swipeBackXYPositions, {x, y}]}, cb)
445 | }
446 |
447 | animatePreviousCard = ({x, y}, cb) => {
448 | const { previousCardX, previousCardY } = this.state
449 | previousCardX.setValue(x * SWIPE_MULTIPLY_FACTOR)
450 | previousCardY.setValue(y * SWIPE_MULTIPLY_FACTOR)
451 | Animated.parallel([
452 | Animated.spring(this.state.previousCardX, {
453 | toValue: 0,
454 | friction: this.props.stackAnimationFriction,
455 | tension: this.props.stackAnimationTension,
456 | useNativeDriver: true
457 | }),
458 | Animated.spring(this.state.previousCardY, {
459 | toValue: 0,
460 | friction: this.props.stackAnimationFriction,
461 | tension: this.props.stackAnimationTension,
462 | useNativeDriver: true
463 | })
464 | ]).start(() => {
465 | this.setState({isSwipingBack: false})
466 | this.decrementCardIndex(cb)
467 | })
468 | }
469 |
470 | animateStack = () => {
471 | const { secondCardIndex, swipedAllCards } = this.state
472 | let { stackSize, infinite, showSecondCard, cards } = this.props
473 | let index = secondCardIndex
474 |
475 | while (stackSize-- > 1 && showSecondCard && !swipedAllCards) {
476 | if (this.state[`stackPosition${stackSize}`] && this.state[`stackScale${stackSize}`]) {
477 | const newSeparation = this.props.stackSeparation * (stackSize - 1)
478 | const newScale = (100 - this.props.stackScale * (stackSize - 1)) * 0.01
479 | Animated.parallel([
480 | Animated.spring(this.state[`stackPosition${stackSize}`], {
481 | toValue: newSeparation,
482 | friction: this.props.stackAnimationFriction,
483 | tension: this.props.stackAnimationTension,
484 | useNativeDriver: true
485 | }),
486 | Animated.spring(this.state[`stackScale${stackSize}`], {
487 | toValue: newScale,
488 | friction: this.props.stackAnimationFriction,
489 | tension: this.props.stackAnimationTension,
490 | useNativeDriver: true
491 | })
492 | ]).start()
493 | }
494 |
495 | if (index === cards.length - 1) {
496 | if (!infinite) break
497 | index = 0
498 | } else {
499 | index++
500 | }
501 | }
502 | }
503 |
504 | incrementCardIndex = onSwiped => {
505 | const { firstCardIndex } = this.state
506 | const { infinite } = this.props
507 | let newCardIndex = firstCardIndex + 1
508 | let swipedAllCards = false
509 |
510 | this.onSwipedCallbacks(onSwiped)
511 |
512 | const allSwipedCheck = () => newCardIndex === this.props.cards.length
513 |
514 | if (allSwipedCheck()) {
515 | if (!infinite) {
516 | this.props.onSwipedAll()
517 | // onSwipeAll may have added cards
518 | if (allSwipedCheck()) {
519 | swipedAllCards = true
520 | }
521 | } else {
522 | newCardIndex = 0;
523 | }
524 | }
525 |
526 | this.setCardIndex(newCardIndex, swipedAllCards)
527 | }
528 |
529 | decrementCardIndex = cb => {
530 | const { firstCardIndex } = this.state
531 | const lastCardIndex = this.props.cards.length - 1
532 | const previousCardIndex = firstCardIndex - 1
533 |
534 | const newCardIndex =
535 | firstCardIndex === 0 ? lastCardIndex : previousCardIndex
536 |
537 | this.onSwipedCallbacks(cb)
538 | this.setCardIndex(newCardIndex, false)
539 | }
540 |
541 | jumpToCardIndex = newCardIndex => {
542 | if (this.props.cards[newCardIndex]) {
543 | this.setCardIndex(newCardIndex, false)
544 | }
545 | }
546 | rebuildStackValues = () => {
547 | const stackPositionsAndScales = {}
548 | const { stackSize, stackSeparation, stackScale } = this.props
549 | for (let position = 0; position < stackSize; position++) {
550 | stackPositionsAndScales[`stackPosition${position}`] = new Animated.Value(stackSeparation * position)
551 | stackPositionsAndScales[`stackScale${position}`] = new Animated.Value((100 - stackScale * position) * 0.01)
552 | }
553 | return stackPositionsAndScales
554 | }
555 |
556 | onSwipedCallbacks = (swipeDirectionCallback) => {
557 | const previousCardIndex = this.state.firstCardIndex
558 | this.props.onSwiped(previousCardIndex, this.props.cards[previousCardIndex])
559 | this.setState(this.rebuildStackValues)
560 | if (swipeDirectionCallback) {
561 | swipeDirectionCallback(previousCardIndex, this.props.cards[previousCardIndex])
562 | }
563 | }
564 |
565 | setCardIndex = (newCardIndex, swipedAllCards) => {
566 | if (this._mounted) {
567 | this.setState(
568 | {
569 | ...calculateCardIndexes(newCardIndex, this.props.cards),
570 | swipedAllCards: swipedAllCards,
571 | panResponderLocked: false
572 | },
573 | this.resetPanAndScale
574 | )
575 | }
576 | }
577 |
578 | resetPanAndScale = () => {
579 | const {previousCardDefaultPositionX, previousCardDefaultPositionY} = this.props
580 | this.state.pan.setValue({ x: 0, y: 0 })
581 | this.state.pan.setOffset({ x: 0, y: 0})
582 | this._animatedValueX = 0
583 | this._animatedValueY = 0
584 | this.state.previousCardX.setValue(previousCardDefaultPositionX)
585 | this.state.previousCardY.setValue(previousCardDefaultPositionY)
586 | this.state.pan.x.addListener(value => this._animatedValueX = value.value)
587 | this.state.pan.y.addListener(value => this._animatedValueY = value.value)
588 | }
589 |
590 | calculateNextPreviousCardPosition = () => {
591 | const { swipeBackXYPositions } = this.state
592 | let { previousCardDefaultPositionX: x, previousCardDefaultPositionY: y } = this.props
593 | const swipeBackPosition = swipeBackXYPositions.splice(-1, 1)
594 | if (swipeBackPosition[0]) {
595 | x = swipeBackPosition[0].x
596 | y = swipeBackPosition[0].y
597 | }
598 | return { x, y }
599 | }
600 |
601 | calculateOverlayLabelStyle = () => {
602 | const dynamicStyle = this.props.overlayLabels[this.state.labelType].style
603 | let overlayLabelStyle = dynamicStyle ? dynamicStyle.label : {}
604 |
605 | if (this.state.labelType === LABEL_TYPES.NONE) {
606 | overlayLabelStyle = styles.hideOverlayLabel
607 | }
608 |
609 | return [this.props.overlayLabelStyle, overlayLabelStyle]
610 | }
611 |
612 | calculateOverlayLabelWrapperStyle = () => {
613 | const dynamicStyle = this.props.overlayLabels[this.state.labelType].style
614 | const dynamicWrapperStyle = dynamicStyle ? dynamicStyle.wrapper : {}
615 |
616 | const opacity = this.props.animateOverlayLabelsOpacity
617 | ? this.interpolateOverlayLabelsOpacity()
618 | : 1
619 | return [this.props.overlayLabelWrapperStyle, dynamicWrapperStyle, { opacity }]
620 | }
621 |
622 | calculateSwipableCardStyle = () => {
623 | const opacity = this.props.animateCardOpacity
624 | ? this.interpolateCardOpacity()
625 | : 1
626 | const rotation = this.interpolateRotation()
627 |
628 | return [
629 | styles.card,
630 | this.getCardStyle(),
631 | {
632 | zIndex: 1,
633 | opacity: opacity,
634 | transform: [
635 | { translateX: this.state.pan.x },
636 | { translateY: this.state.pan.y },
637 | { rotate: rotation }
638 | ]
639 | },
640 | this.props.cardStyle
641 | ]
642 | }
643 |
644 | calculateStackCardZoomStyle = (position) => [
645 | styles.card,
646 | this.getCardStyle(),
647 | {
648 | zIndex: position * -1,
649 | transform: [{ scale: this.state[`stackScale${position}`] }, { translateY: this.state[`stackPosition${position}`] }]
650 | },
651 | this.props.cardStyle
652 | ]
653 |
654 | calculateSwipeBackCardStyle = () => [
655 | styles.card,
656 | this.getCardStyle(),
657 | {
658 | zIndex: 4,
659 | transform: [
660 | { translateX: this.state.previousCardX },
661 | { translateY: this.state.previousCardY }
662 | ]
663 | },
664 | this.props.cardStyle
665 | ]
666 |
667 | interpolateCardOpacity = () => {
668 | const animatedValueX = Math.abs(this._animatedValueX)
669 | const animatedValueY = Math.abs(this._animatedValueY)
670 | let opacity
671 |
672 | if (animatedValueX > animatedValueY) {
673 | opacity = this.state.pan.x.interpolate({
674 | inputRange: this.props.inputCardOpacityRangeX,
675 | outputRange: this.props.outputCardOpacityRangeX
676 | })
677 | } else {
678 | opacity = this.state.pan.y.interpolate({
679 | inputRange: this.props.inputCardOpacityRangeY,
680 | outputRange: this.props.outputCardOpacityRangeY
681 | })
682 | }
683 |
684 | return opacity
685 | }
686 |
687 | interpolateOverlayLabelsOpacity = () => {
688 | const animatedValueX = Math.abs(this._animatedValueX)
689 | const animatedValueY = Math.abs(this._animatedValueY)
690 | let opacity
691 |
692 | if (animatedValueX > animatedValueY) {
693 | opacity = this.state.pan.x.interpolate({
694 | inputRange: this.props.inputOverlayLabelsOpacityRangeX,
695 | outputRange: this.props.outputOverlayLabelsOpacityRangeX
696 | })
697 | } else {
698 | opacity = this.state.pan.y.interpolate({
699 | inputRange: this.props.inputOverlayLabelsOpacityRangeY,
700 | outputRange: this.props.outputOverlayLabelsOpacityRangeY
701 | })
702 | }
703 |
704 | return opacity
705 | }
706 |
707 | interpolateRotation = () =>
708 | this.state.pan.x.interpolate({
709 | inputRange: this.props.inputRotationRange,
710 | outputRange: this.props.outputRotationRange
711 | })
712 |
713 | render = () => {
714 | const { pointerEvents, backgroundColor, marginTop, marginBottom, containerStyle, swipeBackCard, testID } = this.props
715 | return (
716 |
729 | {this.renderChildren()}
730 | {swipeBackCard ? this.renderSwipeBackCard() : null}
731 | {this.renderStack()}
732 |
733 | )
734 | }
735 |
736 | renderChildren = () => {
737 | const { childrenOnTop, children, stackSize, showSecondCard } = this.props
738 |
739 | let zIndex = (stackSize && showSecondCard)
740 | ? stackSize * -1
741 | : 1
742 |
743 | if (childrenOnTop) {
744 | zIndex = 5
745 | }
746 |
747 | return (
748 |
749 | {children}
750 |
751 | )
752 | }
753 |
754 | getCardKey = (cardContent, cardIndex) => {
755 | const { keyExtractor } = this.props
756 |
757 | if (keyExtractor) {
758 | return keyExtractor(cardContent)
759 | }
760 |
761 | return cardIndex
762 | }
763 |
764 | pushCardToStack = (renderedCards, index, position, key, firstCard) => {
765 | const { cards } = this.props
766 | const stackCardZoomStyle = this.calculateStackCardZoomStyle(position)
767 | const stackCard = this.props.renderCard(cards[index], index)
768 | const swipableCardStyle = this.calculateSwipableCardStyle()
769 | const renderOverlayLabel = this.renderOverlayLabel()
770 | renderedCards.push(
771 |
776 | {firstCard ? renderOverlayLabel : null}
777 | {stackCard}
778 |
779 | )
780 | }
781 |
782 | renderStack = () => {
783 | const { firstCardIndex, swipedAllCards } = this.state
784 | const { cards } = this.props
785 | const renderedCards = []
786 | let { stackSize, infinite, showSecondCard } = this.props
787 | let index = firstCardIndex
788 | let firstCard = true
789 | let cardPosition = 0
790 |
791 | while (stackSize-- > 0 && (firstCard || showSecondCard) && !swipedAllCards) {
792 | const key = this.getCardKey(cards[index], index)
793 | this.pushCardToStack(renderedCards, index, cardPosition, key, firstCard)
794 |
795 | firstCard = false
796 |
797 | if (index === cards.length - 1) {
798 | if (!infinite) break
799 | index = 0
800 | } else {
801 | index++
802 | }
803 | cardPosition++
804 | }
805 | return renderedCards
806 | }
807 |
808 | renderSwipeBackCard = () => {
809 | const { previousCardIndex } = this.state
810 | const { cards } = this.props
811 | const previousCardStyle = this.calculateSwipeBackCardStyle()
812 | const previousCard = this.props.renderCard(cards[previousCardIndex], previousCardIndex)
813 | const key = this.getCardKey(cards[previousCardIndex], previousCardIndex)
814 |
815 | return (
816 |
817 | {previousCard}
818 |
819 | )
820 | }
821 |
822 | renderOverlayLabel = () => {
823 | const {
824 | disableBottomSwipe,
825 | disableLeftSwipe,
826 | disableRightSwipe,
827 | disableTopSwipe,
828 | overlayLabels
829 | } = this.props
830 |
831 | const { labelType } = this.state
832 |
833 | const labelTypeNone = labelType === LABEL_TYPES.NONE
834 | const directionSwipeLabelDisabled =
835 | (labelType === LABEL_TYPES.BOTTOM && disableBottomSwipe) ||
836 | (labelType === LABEL_TYPES.LEFT && disableLeftSwipe) ||
837 | (labelType === LABEL_TYPES.RIGHT && disableRightSwipe) ||
838 | (labelType === LABEL_TYPES.TOP && disableTopSwipe)
839 |
840 | if (
841 | !overlayLabels ||
842 | !overlayLabels[labelType] ||
843 | labelTypeNone ||
844 | directionSwipeLabelDisabled
845 | ) {
846 | return null
847 | }
848 |
849 | return (
850 |
851 | {!overlayLabels[labelType].element &&
852 |
853 | {overlayLabels[labelType].title}
854 |
855 | }
856 |
857 | {overlayLabels[labelType].element &&
858 | overlayLabels[labelType].element
859 | }
860 |
861 | )
862 | }
863 | }
864 |
865 | Swiper.propTypes = {
866 | animateCardOpacity: PropTypes.bool,
867 | animateOverlayLabelsOpacity: PropTypes.bool,
868 | backgroundColor: PropTypes.string,
869 | cardHorizontalMargin: PropTypes.number,
870 | cardIndex: PropTypes.number,
871 | cardStyle: PropTypes.oneOfType([PropTypes.number, PropTypes.object]),
872 | cardVerticalMargin: PropTypes.number,
873 | cards: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired,
874 | containerStyle: PropTypes.object,
875 | children: PropTypes.any,
876 | childrenOnTop: PropTypes.bool,
877 | dragEnd: PropTypes.func,
878 | dragStart: PropTypes.func,
879 | disableBottomSwipe: PropTypes.bool,
880 | disableLeftSwipe: PropTypes.bool,
881 | disableRightSwipe: PropTypes.bool,
882 | disableTopSwipe: PropTypes.bool,
883 | goBackToPreviousCardOnSwipeBottom: PropTypes.bool,
884 | goBackToPreviousCardOnSwipeLeft: PropTypes.bool,
885 | goBackToPreviousCardOnSwipeRight: PropTypes.bool,
886 | goBackToPreviousCardOnSwipeTop: PropTypes.bool,
887 | horizontalSwipe: PropTypes.bool,
888 | horizontalThreshold: PropTypes.number,
889 | infinite: PropTypes.bool,
890 | inputCardOpacityRangeX: PropTypes.array,
891 | inputCardOpacityRangeY: PropTypes.array,
892 | inputOverlayLabelsOpacityRangeX: PropTypes.array,
893 | inputOverlayLabelsOpacityRangeY: PropTypes.array,
894 | inputCardOpacityRange: PropTypes.array,
895 | inputRotationRange: PropTypes.array,
896 | keyExtractor: PropTypes.func,
897 | marginBottom: PropTypes.number,
898 | marginTop: PropTypes.number,
899 | onSwiped: PropTypes.func,
900 | onSwipedAborted: PropTypes.func,
901 | onSwipedAll: PropTypes.func,
902 | onSwipedBottom: PropTypes.func,
903 | onSwipedLeft: PropTypes.func,
904 | onSwipedRight: PropTypes.func,
905 | onSwipedTop: PropTypes.func,
906 | onSwiping: PropTypes.func,
907 | onTapCard: PropTypes.func,
908 | onTapCardDeadZone: PropTypes.number,
909 | outputCardOpacityRangeX: PropTypes.array,
910 | outputCardOpacityRangeY: PropTypes.array,
911 | outputOverlayLabelsOpacityRangeX: PropTypes.array,
912 | outputOverlayLabelsOpacityRangeY: PropTypes.array,
913 | outputRotationRange: PropTypes.array,
914 | outputCardOpacityRange: PropTypes.array,
915 | overlayLabels: PropTypes.object,
916 | overlayLabelStyle: PropTypes.object,
917 | overlayLabelWrapperStyle: PropTypes.object,
918 | overlayOpacityHorizontalThreshold: PropTypes.number,
919 | overlayOpacityVerticalThreshold: PropTypes.number,
920 | pointerEvents: PropTypes.oneOf(['box-none', 'none', 'box-only', 'auto']),
921 | previousCardDefaultPositionX: PropTypes.number,
922 | previousCardDefaultPositionY: PropTypes.number,
923 | renderCard: PropTypes.func.isRequired,
924 | secondCardZoom: PropTypes.number,
925 | showSecondCard: PropTypes.bool,
926 | stackAnimationFriction: PropTypes.number,
927 | stackAnimationTension: PropTypes.number,
928 | stackScale: PropTypes.number,
929 | stackSeparation: PropTypes.number,
930 | stackSize: PropTypes.number,
931 | swipeAnimationDuration: PropTypes.number,
932 | swipeBackCard: PropTypes.bool,
933 | testID: PropTypes.string,
934 | topCardResetAnimationFriction: PropTypes.number,
935 | topCardResetAnimationTension: PropTypes.number,
936 | verticalSwipe: PropTypes.bool,
937 | verticalThreshold: PropTypes.number,
938 | zoomAnimationDuration: PropTypes.number,
939 | zoomFriction: PropTypes.number
940 | }
941 |
942 | Swiper.defaultProps = {
943 | animateCardOpacity: false,
944 | animateOverlayLabelsOpacity: false,
945 | backgroundColor: '#4FD0E9',
946 | cardHorizontalMargin: 20,
947 | cardIndex: 0,
948 | cardStyle: {},
949 | cardVerticalMargin: 60,
950 | childrenOnTop: false,
951 | containerStyle: {},
952 | disableBottomSwipe: false,
953 | disableLeftSwipe: false,
954 | disableRightSwipe: false,
955 | disableTopSwipe: false,
956 | horizontalSwipe: true,
957 | horizontalThreshold: width / 4,
958 | goBackToPreviousCardOnSwipeBottom: false,
959 | goBackToPreviousCardOnSwipeLeft: false,
960 | goBackToPreviousCardOnSwipeRight: false,
961 | goBackToPreviousCardOnSwipeTop: false,
962 | infinite: false,
963 | inputCardOpacityRangeX: [-width / 2, -width / 3, 0, width / 3, width / 2],
964 | inputCardOpacityRangeY: [-height / 2, -height / 3, 0, height / 3, height / 2],
965 | inputOverlayLabelsOpacityRangeX: [
966 | -width / 3,
967 | -width / 4,
968 | 0,
969 | width / 4,
970 | width / 3
971 | ],
972 | inputOverlayLabelsOpacityRangeY: [
973 | -height / 4,
974 | -height / 5,
975 | 0,
976 | height / 5,
977 | height / 4
978 | ],
979 | inputRotationRange: [-width / 2, 0, width / 2],
980 | keyExtractor: null,
981 | marginBottom: 0,
982 | marginTop: 0,
983 | onSwiped: cardIndex => { },
984 | onSwipedAborted: () => { },
985 | onSwipedAll: () => { },
986 | onSwipedBottom: cardIndex => { },
987 | onSwipedLeft: cardIndex => { },
988 | onSwipedRight: cardIndex => { },
989 | onSwipedTop: cardIndex => { },
990 | onSwiping: () => { },
991 | onTapCard: (cardIndex) => { },
992 | onTapCardDeadZone: 5,
993 | outputCardOpacityRangeX: [0.8, 1, 1, 1, 0.8],
994 | outputCardOpacityRangeY: [0.8, 1, 1, 1, 0.8],
995 | outputOverlayLabelsOpacityRangeX: [1, 0, 0, 0, 1],
996 | outputOverlayLabelsOpacityRangeY: [1, 0, 0, 0, 1],
997 | outputRotationRange: ['-10deg', '0deg', '10deg'],
998 | overlayLabels: null,
999 | overlayLabelStyle: {
1000 | fontSize: 45,
1001 | fontWeight: 'bold',
1002 | borderRadius: 10,
1003 | padding: 10,
1004 | overflow: 'hidden'
1005 | },
1006 | overlayLabelWrapperStyle: {
1007 | position: 'absolute',
1008 | backgroundColor: 'transparent',
1009 | zIndex: 2,
1010 | flex: 1,
1011 | width: '100%',
1012 | height: '100%'
1013 | },
1014 | overlayOpacityHorizontalThreshold: width / 4,
1015 | overlayOpacityVerticalThreshold: height / 5,
1016 | pointerEvents: 'auto',
1017 | previousCardDefaultPositionX: -width,
1018 | previousCardDefaultPositionY: -height,
1019 | secondCardZoom: 0.97,
1020 | showSecondCard: true,
1021 | stackAnimationFriction: 7,
1022 | stackAnimationTension: 40,
1023 | stackScale: 3,
1024 | stackSeparation: 10,
1025 | stackSize: 1,
1026 | swipeAnimationDuration: 350,
1027 | swipeBackCard: false,
1028 | topCardResetAnimationFriction: 7,
1029 | topCardResetAnimationTension: 40,
1030 | verticalSwipe: true,
1031 | verticalThreshold: height / 5,
1032 | zoomAnimationDuration: 100,
1033 | zoomFriction: 7
1034 | }
1035 |
1036 | export default Swiper
1037 |
--------------------------------------------------------------------------------
/example/ios/Exemple.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
12 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; };
13 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; };
14 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; };
15 | 00E356F31AD99517003FC87E /* ExempleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExempleTests.m */; };
16 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; };
17 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; };
18 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; };
19 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
20 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
21 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
22 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
23 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
24 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
25 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
26 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
27 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
28 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */; };
29 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; };
30 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; };
31 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; };
32 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; };
33 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; };
34 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; };
35 | 2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
36 | 2DCD954D1E0B4F2C00145EB5 /* ExempleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExempleTests.m */; };
37 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
38 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
39 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
40 | /* End PBXBuildFile section */
41 |
42 | /* Begin PBXContainerItemProxy section */
43 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = {
44 | isa = PBXContainerItemProxy;
45 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
46 | proxyType = 2;
47 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
48 | remoteInfo = RCTActionSheet;
49 | };
50 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = {
51 | isa = PBXContainerItemProxy;
52 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
53 | proxyType = 2;
54 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
55 | remoteInfo = RCTGeolocation;
56 | };
57 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = {
58 | isa = PBXContainerItemProxy;
59 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
60 | proxyType = 2;
61 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676;
62 | remoteInfo = RCTImage;
63 | };
64 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = {
65 | isa = PBXContainerItemProxy;
66 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
67 | proxyType = 2;
68 | remoteGlobalIDString = 58B511DB1A9E6C8500147676;
69 | remoteInfo = RCTNetwork;
70 | };
71 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = {
72 | isa = PBXContainerItemProxy;
73 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
74 | proxyType = 2;
75 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
76 | remoteInfo = RCTVibration;
77 | };
78 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
79 | isa = PBXContainerItemProxy;
80 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
81 | proxyType = 1;
82 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
83 | remoteInfo = Exemple;
84 | };
85 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
86 | isa = PBXContainerItemProxy;
87 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
88 | proxyType = 2;
89 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
90 | remoteInfo = RCTSettings;
91 | };
92 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = {
93 | isa = PBXContainerItemProxy;
94 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
95 | proxyType = 2;
96 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
97 | remoteInfo = RCTWebSocket;
98 | };
99 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = {
100 | isa = PBXContainerItemProxy;
101 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
102 | proxyType = 2;
103 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
104 | remoteInfo = React;
105 | };
106 | 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = {
107 | isa = PBXContainerItemProxy;
108 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
109 | proxyType = 1;
110 | remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7;
111 | remoteInfo = "Exemple-tvOS";
112 | };
113 | 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = {
114 | isa = PBXContainerItemProxy;
115 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
116 | proxyType = 2;
117 | remoteGlobalIDString = 2D2A283A1D9B042B00D4039D;
118 | remoteInfo = "RCTImage-tvOS";
119 | };
120 | 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = {
121 | isa = PBXContainerItemProxy;
122 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
123 | proxyType = 2;
124 | remoteGlobalIDString = 2D2A28471D9B043800D4039D;
125 | remoteInfo = "RCTLinking-tvOS";
126 | };
127 | 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
128 | isa = PBXContainerItemProxy;
129 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
130 | proxyType = 2;
131 | remoteGlobalIDString = 2D2A28541D9B044C00D4039D;
132 | remoteInfo = "RCTNetwork-tvOS";
133 | };
134 | 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
135 | isa = PBXContainerItemProxy;
136 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
137 | proxyType = 2;
138 | remoteGlobalIDString = 2D2A28611D9B046600D4039D;
139 | remoteInfo = "RCTSettings-tvOS";
140 | };
141 | 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = {
142 | isa = PBXContainerItemProxy;
143 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
144 | proxyType = 2;
145 | remoteGlobalIDString = 2D2A287B1D9B048500D4039D;
146 | remoteInfo = "RCTText-tvOS";
147 | };
148 | 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = {
149 | isa = PBXContainerItemProxy;
150 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
151 | proxyType = 2;
152 | remoteGlobalIDString = 2D2A28881D9B049200D4039D;
153 | remoteInfo = "RCTWebSocket-tvOS";
154 | };
155 | 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = {
156 | isa = PBXContainerItemProxy;
157 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
158 | proxyType = 2;
159 | remoteGlobalIDString = 2D2A28131D9B038B00D4039D;
160 | remoteInfo = "React-tvOS";
161 | };
162 | 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = {
163 | isa = PBXContainerItemProxy;
164 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
165 | proxyType = 2;
166 | remoteGlobalIDString = 3D3C059A1DE3340900C268FA;
167 | remoteInfo = yoga;
168 | };
169 | 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = {
170 | isa = PBXContainerItemProxy;
171 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
172 | proxyType = 2;
173 | remoteGlobalIDString = 3D3C06751DE3340C00C268FA;
174 | remoteInfo = "yoga-tvOS";
175 | };
176 | 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = {
177 | isa = PBXContainerItemProxy;
178 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
179 | proxyType = 2;
180 | remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4;
181 | remoteInfo = cxxreact;
182 | };
183 | 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
184 | isa = PBXContainerItemProxy;
185 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
186 | proxyType = 2;
187 | remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4;
188 | remoteInfo = "cxxreact-tvOS";
189 | };
190 | 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
191 | isa = PBXContainerItemProxy;
192 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
193 | proxyType = 2;
194 | remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4;
195 | remoteInfo = jschelpers;
196 | };
197 | 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = {
198 | isa = PBXContainerItemProxy;
199 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
200 | proxyType = 2;
201 | remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
202 | remoteInfo = "jschelpers-tvOS";
203 | };
204 | 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
205 | isa = PBXContainerItemProxy;
206 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
207 | proxyType = 2;
208 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
209 | remoteInfo = RCTAnimation;
210 | };
211 | 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
212 | isa = PBXContainerItemProxy;
213 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
214 | proxyType = 2;
215 | remoteGlobalIDString = 2D2A28201D9B03D100D4039D;
216 | remoteInfo = "RCTAnimation-tvOS";
217 | };
218 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
219 | isa = PBXContainerItemProxy;
220 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
221 | proxyType = 2;
222 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
223 | remoteInfo = RCTLinking;
224 | };
225 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = {
226 | isa = PBXContainerItemProxy;
227 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
228 | proxyType = 2;
229 | remoteGlobalIDString = 58B5119B1A9E6C1200147676;
230 | remoteInfo = RCTText;
231 | };
232 | ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = {
233 | isa = PBXContainerItemProxy;
234 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
235 | proxyType = 2;
236 | remoteGlobalIDString = 358F4ED71D1E81A9004DF814;
237 | remoteInfo = RCTBlob;
238 | };
239 | /* End PBXContainerItemProxy section */
240 |
241 | /* Begin PBXFileReference section */
242 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; };
243 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; };
244 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; };
245 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; };
246 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; };
247 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; };
248 | 00E356EE1AD99517003FC87E /* ExempleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExempleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
249 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
250 | 00E356F21AD99517003FC87E /* ExempleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExempleTests.m; sourceTree = ""; };
251 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; };
252 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; };
253 | 13B07F961A680F5B00A75B9A /* Exemple.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Exemple.app; sourceTree = BUILT_PRODUCTS_DIR; };
254 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Exemple/AppDelegate.h; sourceTree = ""; };
255 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Exemple/AppDelegate.m; sourceTree = ""; };
256 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
257 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Exemple/Images.xcassets; sourceTree = ""; };
258 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Exemple/Info.plist; sourceTree = ""; };
259 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Exemple/main.m; sourceTree = ""; };
260 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; };
261 | 2D02E47B1E0B4A5D006451C7 /* Exemple-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Exemple-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
262 | 2D02E4901E0B4A5D006451C7 /* Exemple-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Exemple-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
263 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; };
264 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; };
265 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; };
266 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = ""; };
267 | /* End PBXFileReference section */
268 |
269 | /* Begin PBXFrameworksBuildPhase section */
270 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
271 | isa = PBXFrameworksBuildPhase;
272 | buildActionMask = 2147483647;
273 | files = (
274 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */,
275 | );
276 | runOnlyForDeploymentPostprocessing = 0;
277 | };
278 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
279 | isa = PBXFrameworksBuildPhase;
280 | buildActionMask = 2147483647;
281 | files = (
282 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */,
283 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */,
284 | 146834051AC3E58100842450 /* libReact.a in Frameworks */,
285 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */,
286 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
287 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
288 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
289 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */,
290 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */,
291 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */,
292 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
293 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
294 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
295 | );
296 | runOnlyForDeploymentPostprocessing = 0;
297 | };
298 | 2D02E4781E0B4A5D006451C7 /* Frameworks */ = {
299 | isa = PBXFrameworksBuildPhase;
300 | buildActionMask = 2147483647;
301 | files = (
302 | 2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */,
303 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */,
304 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */,
305 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */,
306 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */,
307 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */,
308 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */,
309 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */,
310 | );
311 | runOnlyForDeploymentPostprocessing = 0;
312 | };
313 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = {
314 | isa = PBXFrameworksBuildPhase;
315 | buildActionMask = 2147483647;
316 | files = (
317 | );
318 | runOnlyForDeploymentPostprocessing = 0;
319 | };
320 | /* End PBXFrameworksBuildPhase section */
321 |
322 | /* Begin PBXGroup section */
323 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = {
324 | isa = PBXGroup;
325 | children = (
326 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */,
327 | );
328 | name = Products;
329 | sourceTree = "";
330 | };
331 | 00C302B61ABCB90400DB3ED1 /* Products */ = {
332 | isa = PBXGroup;
333 | children = (
334 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */,
335 | );
336 | name = Products;
337 | sourceTree = "";
338 | };
339 | 00C302BC1ABCB91800DB3ED1 /* Products */ = {
340 | isa = PBXGroup;
341 | children = (
342 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */,
343 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */,
344 | );
345 | name = Products;
346 | sourceTree = "";
347 | };
348 | 00C302D41ABCB9D200DB3ED1 /* Products */ = {
349 | isa = PBXGroup;
350 | children = (
351 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */,
352 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */,
353 | );
354 | name = Products;
355 | sourceTree = "";
356 | };
357 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = {
358 | isa = PBXGroup;
359 | children = (
360 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */,
361 | );
362 | name = Products;
363 | sourceTree = "";
364 | };
365 | 00E356EF1AD99517003FC87E /* ExempleTests */ = {
366 | isa = PBXGroup;
367 | children = (
368 | 00E356F21AD99517003FC87E /* ExempleTests.m */,
369 | 00E356F01AD99517003FC87E /* Supporting Files */,
370 | );
371 | path = ExempleTests;
372 | sourceTree = "";
373 | };
374 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
375 | isa = PBXGroup;
376 | children = (
377 | 00E356F11AD99517003FC87E /* Info.plist */,
378 | );
379 | name = "Supporting Files";
380 | sourceTree = "";
381 | };
382 | 139105B71AF99BAD00B5F7CC /* Products */ = {
383 | isa = PBXGroup;
384 | children = (
385 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */,
386 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */,
387 | );
388 | name = Products;
389 | sourceTree = "";
390 | };
391 | 139FDEE71B06529A00C62182 /* Products */ = {
392 | isa = PBXGroup;
393 | children = (
394 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
395 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */,
396 | );
397 | name = Products;
398 | sourceTree = "";
399 | };
400 | 13B07FAE1A68108700A75B9A /* Exemple */ = {
401 | isa = PBXGroup;
402 | children = (
403 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
404 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
405 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
406 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
407 | 13B07FB61A68108700A75B9A /* Info.plist */,
408 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
409 | 13B07FB71A68108700A75B9A /* main.m */,
410 | );
411 | name = Exemple;
412 | sourceTree = "";
413 | };
414 | 146834001AC3E56700842450 /* Products */ = {
415 | isa = PBXGroup;
416 | children = (
417 | 146834041AC3E56700842450 /* libReact.a */,
418 | 3DAD3EA31DF850E9000B6D8A /* libReact.a */,
419 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */,
420 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */,
421 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */,
422 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */,
423 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */,
424 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */,
425 | 3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */,
426 | );
427 | name = Products;
428 | sourceTree = "";
429 | };
430 | 5E91572E1DD0AC6500FF2AA8 /* Products */ = {
431 | isa = PBXGroup;
432 | children = (
433 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */,
434 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */,
435 | );
436 | name = Products;
437 | sourceTree = "";
438 | };
439 | 78C398B11ACF4ADC00677621 /* Products */ = {
440 | isa = PBXGroup;
441 | children = (
442 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */,
443 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */,
444 | );
445 | name = Products;
446 | sourceTree = "";
447 | };
448 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
449 | isa = PBXGroup;
450 | children = (
451 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */,
452 | 146833FF1AC3E56700842450 /* React.xcodeproj */,
453 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
454 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */,
455 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
456 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
457 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
458 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */,
459 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */,
460 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
461 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
462 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
463 | );
464 | name = Libraries;
465 | sourceTree = "";
466 | };
467 | 832341B11AAA6A8300B99B32 /* Products */ = {
468 | isa = PBXGroup;
469 | children = (
470 | 832341B51AAA6A8300B99B32 /* libRCTText.a */,
471 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */,
472 | );
473 | name = Products;
474 | sourceTree = "";
475 | };
476 | 83CBB9F61A601CBA00E9B192 = {
477 | isa = PBXGroup;
478 | children = (
479 | 13B07FAE1A68108700A75B9A /* Exemple */,
480 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
481 | 00E356EF1AD99517003FC87E /* ExempleTests */,
482 | 83CBBA001A601CBA00E9B192 /* Products */,
483 | );
484 | indentWidth = 2;
485 | sourceTree = "";
486 | tabWidth = 2;
487 | usesTabs = 0;
488 | };
489 | 83CBBA001A601CBA00E9B192 /* Products */ = {
490 | isa = PBXGroup;
491 | children = (
492 | 13B07F961A680F5B00A75B9A /* Exemple.app */,
493 | 00E356EE1AD99517003FC87E /* ExempleTests.xctest */,
494 | 2D02E47B1E0B4A5D006451C7 /* Exemple-tvOS.app */,
495 | 2D02E4901E0B4A5D006451C7 /* Exemple-tvOSTests.xctest */,
496 | );
497 | name = Products;
498 | sourceTree = "";
499 | };
500 | ADBDB9201DFEBF0600ED6528 /* Products */ = {
501 | isa = PBXGroup;
502 | children = (
503 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */,
504 | );
505 | name = Products;
506 | sourceTree = "";
507 | };
508 | /* End PBXGroup section */
509 |
510 | /* Begin PBXNativeTarget section */
511 | 00E356ED1AD99517003FC87E /* ExempleTests */ = {
512 | isa = PBXNativeTarget;
513 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ExempleTests" */;
514 | buildPhases = (
515 | 00E356EA1AD99517003FC87E /* Sources */,
516 | 00E356EB1AD99517003FC87E /* Frameworks */,
517 | 00E356EC1AD99517003FC87E /* Resources */,
518 | );
519 | buildRules = (
520 | );
521 | dependencies = (
522 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
523 | );
524 | name = ExempleTests;
525 | productName = ExempleTests;
526 | productReference = 00E356EE1AD99517003FC87E /* ExempleTests.xctest */;
527 | productType = "com.apple.product-type.bundle.unit-test";
528 | };
529 | 13B07F861A680F5B00A75B9A /* Exemple */ = {
530 | isa = PBXNativeTarget;
531 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Exemple" */;
532 | buildPhases = (
533 | 13B07F871A680F5B00A75B9A /* Sources */,
534 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
535 | 13B07F8E1A680F5B00A75B9A /* Resources */,
536 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
537 | );
538 | buildRules = (
539 | );
540 | dependencies = (
541 | );
542 | name = Exemple;
543 | productName = "Hello World";
544 | productReference = 13B07F961A680F5B00A75B9A /* Exemple.app */;
545 | productType = "com.apple.product-type.application";
546 | };
547 | 2D02E47A1E0B4A5D006451C7 /* Exemple-tvOS */ = {
548 | isa = PBXNativeTarget;
549 | buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "Exemple-tvOS" */;
550 | buildPhases = (
551 | 2D02E4771E0B4A5D006451C7 /* Sources */,
552 | 2D02E4781E0B4A5D006451C7 /* Frameworks */,
553 | 2D02E4791E0B4A5D006451C7 /* Resources */,
554 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */,
555 | );
556 | buildRules = (
557 | );
558 | dependencies = (
559 | );
560 | name = "Exemple-tvOS";
561 | productName = "Exemple-tvOS";
562 | productReference = 2D02E47B1E0B4A5D006451C7 /* Exemple-tvOS.app */;
563 | productType = "com.apple.product-type.application";
564 | };
565 | 2D02E48F1E0B4A5D006451C7 /* Exemple-tvOSTests */ = {
566 | isa = PBXNativeTarget;
567 | buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "Exemple-tvOSTests" */;
568 | buildPhases = (
569 | 2D02E48C1E0B4A5D006451C7 /* Sources */,
570 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */,
571 | 2D02E48E1E0B4A5D006451C7 /* Resources */,
572 | );
573 | buildRules = (
574 | );
575 | dependencies = (
576 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */,
577 | );
578 | name = "Exemple-tvOSTests";
579 | productName = "Exemple-tvOSTests";
580 | productReference = 2D02E4901E0B4A5D006451C7 /* Exemple-tvOSTests.xctest */;
581 | productType = "com.apple.product-type.bundle.unit-test";
582 | };
583 | /* End PBXNativeTarget section */
584 |
585 | /* Begin PBXProject section */
586 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
587 | isa = PBXProject;
588 | attributes = {
589 | LastUpgradeCheck = 0610;
590 | ORGANIZATIONNAME = Facebook;
591 | TargetAttributes = {
592 | 00E356ED1AD99517003FC87E = {
593 | CreatedOnToolsVersion = 6.2;
594 | TestTargetID = 13B07F861A680F5B00A75B9A;
595 | };
596 | 2D02E47A1E0B4A5D006451C7 = {
597 | CreatedOnToolsVersion = 8.2.1;
598 | ProvisioningStyle = Automatic;
599 | };
600 | 2D02E48F1E0B4A5D006451C7 = {
601 | CreatedOnToolsVersion = 8.2.1;
602 | ProvisioningStyle = Automatic;
603 | TestTargetID = 2D02E47A1E0B4A5D006451C7;
604 | };
605 | };
606 | };
607 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Exemple" */;
608 | compatibilityVersion = "Xcode 3.2";
609 | developmentRegion = English;
610 | hasScannedForEncodings = 0;
611 | knownRegions = (
612 | en,
613 | Base,
614 | );
615 | mainGroup = 83CBB9F61A601CBA00E9B192;
616 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
617 | projectDirPath = "";
618 | projectReferences = (
619 | {
620 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
621 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
622 | },
623 | {
624 | ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */;
625 | ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
626 | },
627 | {
628 | ProductGroup = ADBDB9201DFEBF0600ED6528 /* Products */;
629 | ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
630 | },
631 | {
632 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
633 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
634 | },
635 | {
636 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */;
637 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
638 | },
639 | {
640 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */;
641 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
642 | },
643 | {
644 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */;
645 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
646 | },
647 | {
648 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */;
649 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
650 | },
651 | {
652 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */;
653 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
654 | },
655 | {
656 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */;
657 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
658 | },
659 | {
660 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */;
661 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
662 | },
663 | {
664 | ProductGroup = 146834001AC3E56700842450 /* Products */;
665 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
666 | },
667 | );
668 | projectRoot = "";
669 | targets = (
670 | 13B07F861A680F5B00A75B9A /* Exemple */,
671 | 00E356ED1AD99517003FC87E /* ExempleTests */,
672 | 2D02E47A1E0B4A5D006451C7 /* Exemple-tvOS */,
673 | 2D02E48F1E0B4A5D006451C7 /* Exemple-tvOSTests */,
674 | );
675 | };
676 | /* End PBXProject section */
677 |
678 | /* Begin PBXReferenceProxy section */
679 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = {
680 | isa = PBXReferenceProxy;
681 | fileType = archive.ar;
682 | path = libRCTActionSheet.a;
683 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */;
684 | sourceTree = BUILT_PRODUCTS_DIR;
685 | };
686 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = {
687 | isa = PBXReferenceProxy;
688 | fileType = archive.ar;
689 | path = libRCTGeolocation.a;
690 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */;
691 | sourceTree = BUILT_PRODUCTS_DIR;
692 | };
693 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = {
694 | isa = PBXReferenceProxy;
695 | fileType = archive.ar;
696 | path = libRCTImage.a;
697 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */;
698 | sourceTree = BUILT_PRODUCTS_DIR;
699 | };
700 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = {
701 | isa = PBXReferenceProxy;
702 | fileType = archive.ar;
703 | path = libRCTNetwork.a;
704 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */;
705 | sourceTree = BUILT_PRODUCTS_DIR;
706 | };
707 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = {
708 | isa = PBXReferenceProxy;
709 | fileType = archive.ar;
710 | path = libRCTVibration.a;
711 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */;
712 | sourceTree = BUILT_PRODUCTS_DIR;
713 | };
714 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = {
715 | isa = PBXReferenceProxy;
716 | fileType = archive.ar;
717 | path = libRCTSettings.a;
718 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */;
719 | sourceTree = BUILT_PRODUCTS_DIR;
720 | };
721 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = {
722 | isa = PBXReferenceProxy;
723 | fileType = archive.ar;
724 | path = libRCTWebSocket.a;
725 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */;
726 | sourceTree = BUILT_PRODUCTS_DIR;
727 | };
728 | 146834041AC3E56700842450 /* libReact.a */ = {
729 | isa = PBXReferenceProxy;
730 | fileType = archive.ar;
731 | path = libReact.a;
732 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
733 | sourceTree = BUILT_PRODUCTS_DIR;
734 | };
735 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = {
736 | isa = PBXReferenceProxy;
737 | fileType = archive.ar;
738 | path = "libRCTImage-tvOS.a";
739 | remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */;
740 | sourceTree = BUILT_PRODUCTS_DIR;
741 | };
742 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = {
743 | isa = PBXReferenceProxy;
744 | fileType = archive.ar;
745 | path = "libRCTLinking-tvOS.a";
746 | remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */;
747 | sourceTree = BUILT_PRODUCTS_DIR;
748 | };
749 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = {
750 | isa = PBXReferenceProxy;
751 | fileType = archive.ar;
752 | path = "libRCTNetwork-tvOS.a";
753 | remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */;
754 | sourceTree = BUILT_PRODUCTS_DIR;
755 | };
756 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = {
757 | isa = PBXReferenceProxy;
758 | fileType = archive.ar;
759 | path = "libRCTSettings-tvOS.a";
760 | remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */;
761 | sourceTree = BUILT_PRODUCTS_DIR;
762 | };
763 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = {
764 | isa = PBXReferenceProxy;
765 | fileType = archive.ar;
766 | path = "libRCTText-tvOS.a";
767 | remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */;
768 | sourceTree = BUILT_PRODUCTS_DIR;
769 | };
770 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = {
771 | isa = PBXReferenceProxy;
772 | fileType = archive.ar;
773 | path = "libRCTWebSocket-tvOS.a";
774 | remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */;
775 | sourceTree = BUILT_PRODUCTS_DIR;
776 | };
777 | 3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */ = {
778 | isa = PBXReferenceProxy;
779 | fileType = archive.ar;
780 | path = "libReact-tvOS.a";
781 | remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */;
782 | sourceTree = BUILT_PRODUCTS_DIR;
783 | };
784 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = {
785 | isa = PBXReferenceProxy;
786 | fileType = archive.ar;
787 | path = libyoga.a;
788 | remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */;
789 | sourceTree = BUILT_PRODUCTS_DIR;
790 | };
791 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = {
792 | isa = PBXReferenceProxy;
793 | fileType = archive.ar;
794 | path = libyoga.a;
795 | remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */;
796 | sourceTree = BUILT_PRODUCTS_DIR;
797 | };
798 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = {
799 | isa = PBXReferenceProxy;
800 | fileType = archive.ar;
801 | path = libcxxreact.a;
802 | remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */;
803 | sourceTree = BUILT_PRODUCTS_DIR;
804 | };
805 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = {
806 | isa = PBXReferenceProxy;
807 | fileType = archive.ar;
808 | path = libcxxreact.a;
809 | remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */;
810 | sourceTree = BUILT_PRODUCTS_DIR;
811 | };
812 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = {
813 | isa = PBXReferenceProxy;
814 | fileType = archive.ar;
815 | path = libjschelpers.a;
816 | remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */;
817 | sourceTree = BUILT_PRODUCTS_DIR;
818 | };
819 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = {
820 | isa = PBXReferenceProxy;
821 | fileType = archive.ar;
822 | path = libjschelpers.a;
823 | remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */;
824 | sourceTree = BUILT_PRODUCTS_DIR;
825 | };
826 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
827 | isa = PBXReferenceProxy;
828 | fileType = archive.ar;
829 | path = libRCTAnimation.a;
830 | remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
831 | sourceTree = BUILT_PRODUCTS_DIR;
832 | };
833 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */ = {
834 | isa = PBXReferenceProxy;
835 | fileType = archive.ar;
836 | path = "libRCTAnimation-tvOS.a";
837 | remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
838 | sourceTree = BUILT_PRODUCTS_DIR;
839 | };
840 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
841 | isa = PBXReferenceProxy;
842 | fileType = archive.ar;
843 | path = libRCTLinking.a;
844 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */;
845 | sourceTree = BUILT_PRODUCTS_DIR;
846 | };
847 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = {
848 | isa = PBXReferenceProxy;
849 | fileType = archive.ar;
850 | path = libRCTText.a;
851 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
852 | sourceTree = BUILT_PRODUCTS_DIR;
853 | };
854 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = {
855 | isa = PBXReferenceProxy;
856 | fileType = archive.ar;
857 | path = libRCTBlob.a;
858 | remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */;
859 | sourceTree = BUILT_PRODUCTS_DIR;
860 | };
861 | /* End PBXReferenceProxy section */
862 |
863 | /* Begin PBXResourcesBuildPhase section */
864 | 00E356EC1AD99517003FC87E /* Resources */ = {
865 | isa = PBXResourcesBuildPhase;
866 | buildActionMask = 2147483647;
867 | files = (
868 | );
869 | runOnlyForDeploymentPostprocessing = 0;
870 | };
871 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
872 | isa = PBXResourcesBuildPhase;
873 | buildActionMask = 2147483647;
874 | files = (
875 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
876 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
877 | );
878 | runOnlyForDeploymentPostprocessing = 0;
879 | };
880 | 2D02E4791E0B4A5D006451C7 /* Resources */ = {
881 | isa = PBXResourcesBuildPhase;
882 | buildActionMask = 2147483647;
883 | files = (
884 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
885 | );
886 | runOnlyForDeploymentPostprocessing = 0;
887 | };
888 | 2D02E48E1E0B4A5D006451C7 /* Resources */ = {
889 | isa = PBXResourcesBuildPhase;
890 | buildActionMask = 2147483647;
891 | files = (
892 | );
893 | runOnlyForDeploymentPostprocessing = 0;
894 | };
895 | /* End PBXResourcesBuildPhase section */
896 |
897 | /* Begin PBXShellScriptBuildPhase section */
898 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
899 | isa = PBXShellScriptBuildPhase;
900 | buildActionMask = 2147483647;
901 | files = (
902 | );
903 | inputPaths = (
904 | );
905 | name = "Bundle React Native code and images";
906 | outputPaths = (
907 | );
908 | runOnlyForDeploymentPostprocessing = 0;
909 | shellPath = /bin/sh;
910 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
911 | };
912 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
913 | isa = PBXShellScriptBuildPhase;
914 | buildActionMask = 2147483647;
915 | files = (
916 | );
917 | inputPaths = (
918 | );
919 | name = "Bundle React Native Code And Images";
920 | outputPaths = (
921 | );
922 | runOnlyForDeploymentPostprocessing = 0;
923 | shellPath = /bin/sh;
924 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
925 | };
926 | /* End PBXShellScriptBuildPhase section */
927 |
928 | /* Begin PBXSourcesBuildPhase section */
929 | 00E356EA1AD99517003FC87E /* Sources */ = {
930 | isa = PBXSourcesBuildPhase;
931 | buildActionMask = 2147483647;
932 | files = (
933 | 00E356F31AD99517003FC87E /* ExempleTests.m in Sources */,
934 | );
935 | runOnlyForDeploymentPostprocessing = 0;
936 | };
937 | 13B07F871A680F5B00A75B9A /* Sources */ = {
938 | isa = PBXSourcesBuildPhase;
939 | buildActionMask = 2147483647;
940 | files = (
941 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
942 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
943 | );
944 | runOnlyForDeploymentPostprocessing = 0;
945 | };
946 | 2D02E4771E0B4A5D006451C7 /* Sources */ = {
947 | isa = PBXSourcesBuildPhase;
948 | buildActionMask = 2147483647;
949 | files = (
950 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */,
951 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */,
952 | );
953 | runOnlyForDeploymentPostprocessing = 0;
954 | };
955 | 2D02E48C1E0B4A5D006451C7 /* Sources */ = {
956 | isa = PBXSourcesBuildPhase;
957 | buildActionMask = 2147483647;
958 | files = (
959 | 2DCD954D1E0B4F2C00145EB5 /* ExempleTests.m in Sources */,
960 | );
961 | runOnlyForDeploymentPostprocessing = 0;
962 | };
963 | /* End PBXSourcesBuildPhase section */
964 |
965 | /* Begin PBXTargetDependency section */
966 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
967 | isa = PBXTargetDependency;
968 | target = 13B07F861A680F5B00A75B9A /* Exemple */;
969 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
970 | };
971 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = {
972 | isa = PBXTargetDependency;
973 | target = 2D02E47A1E0B4A5D006451C7 /* Exemple-tvOS */;
974 | targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */;
975 | };
976 | /* End PBXTargetDependency section */
977 |
978 | /* Begin PBXVariantGroup section */
979 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
980 | isa = PBXVariantGroup;
981 | children = (
982 | 13B07FB21A68108700A75B9A /* Base */,
983 | );
984 | name = LaunchScreen.xib;
985 | path = Exemple;
986 | sourceTree = "";
987 | };
988 | /* End PBXVariantGroup section */
989 |
990 | /* Begin XCBuildConfiguration section */
991 | 00E356F61AD99517003FC87E /* Debug */ = {
992 | isa = XCBuildConfiguration;
993 | buildSettings = {
994 | BUNDLE_LOADER = "$(TEST_HOST)";
995 | GCC_PREPROCESSOR_DEFINITIONS = (
996 | "DEBUG=1",
997 | "$(inherited)",
998 | );
999 | INFOPLIST_FILE = ExempleTests/Info.plist;
1000 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1001 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1002 | OTHER_LDFLAGS = (
1003 | "-ObjC",
1004 | "-lc++",
1005 | );
1006 | PRODUCT_NAME = "$(TARGET_NAME)";
1007 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Exemple.app/Exemple";
1008 | };
1009 | name = Debug;
1010 | };
1011 | 00E356F71AD99517003FC87E /* Release */ = {
1012 | isa = XCBuildConfiguration;
1013 | buildSettings = {
1014 | BUNDLE_LOADER = "$(TEST_HOST)";
1015 | COPY_PHASE_STRIP = NO;
1016 | INFOPLIST_FILE = ExempleTests/Info.plist;
1017 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1018 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1019 | OTHER_LDFLAGS = (
1020 | "-ObjC",
1021 | "-lc++",
1022 | );
1023 | PRODUCT_NAME = "$(TARGET_NAME)";
1024 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Exemple.app/Exemple";
1025 | };
1026 | name = Release;
1027 | };
1028 | 13B07F941A680F5B00A75B9A /* Debug */ = {
1029 | isa = XCBuildConfiguration;
1030 | buildSettings = {
1031 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1032 | CURRENT_PROJECT_VERSION = 1;
1033 | DEAD_CODE_STRIPPING = NO;
1034 | INFOPLIST_FILE = Exemple/Info.plist;
1035 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1036 | OTHER_LDFLAGS = (
1037 | "$(inherited)",
1038 | "-ObjC",
1039 | "-lc++",
1040 | );
1041 | PRODUCT_NAME = Exemple;
1042 | VERSIONING_SYSTEM = "apple-generic";
1043 | };
1044 | name = Debug;
1045 | };
1046 | 13B07F951A680F5B00A75B9A /* Release */ = {
1047 | isa = XCBuildConfiguration;
1048 | buildSettings = {
1049 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1050 | CURRENT_PROJECT_VERSION = 1;
1051 | INFOPLIST_FILE = Exemple/Info.plist;
1052 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1053 | OTHER_LDFLAGS = (
1054 | "$(inherited)",
1055 | "-ObjC",
1056 | "-lc++",
1057 | );
1058 | PRODUCT_NAME = Exemple;
1059 | VERSIONING_SYSTEM = "apple-generic";
1060 | };
1061 | name = Release;
1062 | };
1063 | 2D02E4971E0B4A5E006451C7 /* Debug */ = {
1064 | isa = XCBuildConfiguration;
1065 | buildSettings = {
1066 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
1067 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
1068 | CLANG_ANALYZER_NONNULL = YES;
1069 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1070 | CLANG_WARN_INFINITE_RECURSION = YES;
1071 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1072 | DEBUG_INFORMATION_FORMAT = dwarf;
1073 | ENABLE_TESTABILITY = YES;
1074 | GCC_NO_COMMON_BLOCKS = YES;
1075 | INFOPLIST_FILE = "Exemple-tvOS/Info.plist";
1076 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1077 | OTHER_LDFLAGS = (
1078 | "-ObjC",
1079 | "-lc++",
1080 | );
1081 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.Exemple-tvOS";
1082 | PRODUCT_NAME = "$(TARGET_NAME)";
1083 | SDKROOT = appletvos;
1084 | TARGETED_DEVICE_FAMILY = 3;
1085 | TVOS_DEPLOYMENT_TARGET = 9.2;
1086 | };
1087 | name = Debug;
1088 | };
1089 | 2D02E4981E0B4A5E006451C7 /* Release */ = {
1090 | isa = XCBuildConfiguration;
1091 | buildSettings = {
1092 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
1093 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
1094 | CLANG_ANALYZER_NONNULL = YES;
1095 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1096 | CLANG_WARN_INFINITE_RECURSION = YES;
1097 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1098 | COPY_PHASE_STRIP = NO;
1099 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1100 | GCC_NO_COMMON_BLOCKS = YES;
1101 | INFOPLIST_FILE = "Exemple-tvOS/Info.plist";
1102 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1103 | OTHER_LDFLAGS = (
1104 | "-ObjC",
1105 | "-lc++",
1106 | );
1107 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.Exemple-tvOS";
1108 | PRODUCT_NAME = "$(TARGET_NAME)";
1109 | SDKROOT = appletvos;
1110 | TARGETED_DEVICE_FAMILY = 3;
1111 | TVOS_DEPLOYMENT_TARGET = 9.2;
1112 | };
1113 | name = Release;
1114 | };
1115 | 2D02E4991E0B4A5E006451C7 /* Debug */ = {
1116 | isa = XCBuildConfiguration;
1117 | buildSettings = {
1118 | BUNDLE_LOADER = "$(TEST_HOST)";
1119 | CLANG_ANALYZER_NONNULL = YES;
1120 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1121 | CLANG_WARN_INFINITE_RECURSION = YES;
1122 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1123 | DEBUG_INFORMATION_FORMAT = dwarf;
1124 | ENABLE_TESTABILITY = YES;
1125 | GCC_NO_COMMON_BLOCKS = YES;
1126 | INFOPLIST_FILE = "Exemple-tvOSTests/Info.plist";
1127 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1128 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.Exemple-tvOSTests";
1129 | PRODUCT_NAME = "$(TARGET_NAME)";
1130 | SDKROOT = appletvos;
1131 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Exemple-tvOS.app/Exemple-tvOS";
1132 | TVOS_DEPLOYMENT_TARGET = 10.1;
1133 | };
1134 | name = Debug;
1135 | };
1136 | 2D02E49A1E0B4A5E006451C7 /* Release */ = {
1137 | isa = XCBuildConfiguration;
1138 | buildSettings = {
1139 | BUNDLE_LOADER = "$(TEST_HOST)";
1140 | CLANG_ANALYZER_NONNULL = YES;
1141 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
1142 | CLANG_WARN_INFINITE_RECURSION = YES;
1143 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
1144 | COPY_PHASE_STRIP = NO;
1145 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1146 | GCC_NO_COMMON_BLOCKS = YES;
1147 | INFOPLIST_FILE = "Exemple-tvOSTests/Info.plist";
1148 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1149 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.Exemple-tvOSTests";
1150 | PRODUCT_NAME = "$(TARGET_NAME)";
1151 | SDKROOT = appletvos;
1152 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Exemple-tvOS.app/Exemple-tvOS";
1153 | TVOS_DEPLOYMENT_TARGET = 10.1;
1154 | };
1155 | name = Release;
1156 | };
1157 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
1158 | isa = XCBuildConfiguration;
1159 | buildSettings = {
1160 | ALWAYS_SEARCH_USER_PATHS = NO;
1161 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
1162 | CLANG_CXX_LIBRARY = "libc++";
1163 | CLANG_ENABLE_MODULES = YES;
1164 | CLANG_ENABLE_OBJC_ARC = YES;
1165 | CLANG_WARN_BOOL_CONVERSION = YES;
1166 | CLANG_WARN_CONSTANT_CONVERSION = YES;
1167 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
1168 | CLANG_WARN_EMPTY_BODY = YES;
1169 | CLANG_WARN_ENUM_CONVERSION = YES;
1170 | CLANG_WARN_INT_CONVERSION = YES;
1171 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1172 | CLANG_WARN_UNREACHABLE_CODE = YES;
1173 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1174 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1175 | COPY_PHASE_STRIP = NO;
1176 | ENABLE_STRICT_OBJC_MSGSEND = YES;
1177 | GCC_C_LANGUAGE_STANDARD = gnu99;
1178 | GCC_DYNAMIC_NO_PIC = NO;
1179 | GCC_OPTIMIZATION_LEVEL = 0;
1180 | GCC_PREPROCESSOR_DEFINITIONS = (
1181 | "DEBUG=1",
1182 | "$(inherited)",
1183 | );
1184 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
1185 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
1186 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
1187 | GCC_WARN_UNDECLARED_SELECTOR = YES;
1188 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
1189 | GCC_WARN_UNUSED_FUNCTION = YES;
1190 | GCC_WARN_UNUSED_VARIABLE = YES;
1191 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1192 | MTL_ENABLE_DEBUG_INFO = YES;
1193 | ONLY_ACTIVE_ARCH = YES;
1194 | SDKROOT = iphoneos;
1195 | };
1196 | name = Debug;
1197 | };
1198 | 83CBBA211A601CBA00E9B192 /* Release */ = {
1199 | isa = XCBuildConfiguration;
1200 | buildSettings = {
1201 | ALWAYS_SEARCH_USER_PATHS = NO;
1202 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
1203 | CLANG_CXX_LIBRARY = "libc++";
1204 | CLANG_ENABLE_MODULES = YES;
1205 | CLANG_ENABLE_OBJC_ARC = YES;
1206 | CLANG_WARN_BOOL_CONVERSION = YES;
1207 | CLANG_WARN_CONSTANT_CONVERSION = YES;
1208 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
1209 | CLANG_WARN_EMPTY_BODY = YES;
1210 | CLANG_WARN_ENUM_CONVERSION = YES;
1211 | CLANG_WARN_INT_CONVERSION = YES;
1212 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1213 | CLANG_WARN_UNREACHABLE_CODE = YES;
1214 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
1215 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
1216 | COPY_PHASE_STRIP = YES;
1217 | ENABLE_NS_ASSERTIONS = NO;
1218 | ENABLE_STRICT_OBJC_MSGSEND = YES;
1219 | GCC_C_LANGUAGE_STANDARD = gnu99;
1220 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
1221 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
1222 | GCC_WARN_UNDECLARED_SELECTOR = YES;
1223 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
1224 | GCC_WARN_UNUSED_FUNCTION = YES;
1225 | GCC_WARN_UNUSED_VARIABLE = YES;
1226 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
1227 | MTL_ENABLE_DEBUG_INFO = NO;
1228 | SDKROOT = iphoneos;
1229 | VALIDATE_PRODUCT = YES;
1230 | };
1231 | name = Release;
1232 | };
1233 | /* End XCBuildConfiguration section */
1234 |
1235 | /* Begin XCConfigurationList section */
1236 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ExempleTests" */ = {
1237 | isa = XCConfigurationList;
1238 | buildConfigurations = (
1239 | 00E356F61AD99517003FC87E /* Debug */,
1240 | 00E356F71AD99517003FC87E /* Release */,
1241 | );
1242 | defaultConfigurationIsVisible = 0;
1243 | defaultConfigurationName = Release;
1244 | };
1245 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Exemple" */ = {
1246 | isa = XCConfigurationList;
1247 | buildConfigurations = (
1248 | 13B07F941A680F5B00A75B9A /* Debug */,
1249 | 13B07F951A680F5B00A75B9A /* Release */,
1250 | );
1251 | defaultConfigurationIsVisible = 0;
1252 | defaultConfigurationName = Release;
1253 | };
1254 | 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "Exemple-tvOS" */ = {
1255 | isa = XCConfigurationList;
1256 | buildConfigurations = (
1257 | 2D02E4971E0B4A5E006451C7 /* Debug */,
1258 | 2D02E4981E0B4A5E006451C7 /* Release */,
1259 | );
1260 | defaultConfigurationIsVisible = 0;
1261 | defaultConfigurationName = Release;
1262 | };
1263 | 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "Exemple-tvOSTests" */ = {
1264 | isa = XCConfigurationList;
1265 | buildConfigurations = (
1266 | 2D02E4991E0B4A5E006451C7 /* Debug */,
1267 | 2D02E49A1E0B4A5E006451C7 /* Release */,
1268 | );
1269 | defaultConfigurationIsVisible = 0;
1270 | defaultConfigurationName = Release;
1271 | };
1272 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Exemple" */ = {
1273 | isa = XCConfigurationList;
1274 | buildConfigurations = (
1275 | 83CBBA201A601CBA00E9B192 /* Debug */,
1276 | 83CBBA211A601CBA00E9B192 /* Release */,
1277 | );
1278 | defaultConfigurationIsVisible = 0;
1279 | defaultConfigurationName = Release;
1280 | };
1281 | /* End XCConfigurationList section */
1282 | };
1283 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
1284 | }
1285 |
--------------------------------------------------------------------------------