├── .watchmanconfig
├── .gitattributes
├── .babelrc
├── img
└── Tips.gif
├── 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
│ │ │ │ └── reactnativetips
│ │ │ │ ├── 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
├── __tests__
├── index.ios.js
└── index.android.js
├── package.json
├── ios
├── ReactNativeTips
│ ├── AppDelegate.h
│ ├── main.m
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── AppDelegate.m
│ ├── Info.plist
│ └── Base.lproj
│ │ └── LaunchScreen.xib
├── ReactNativeTipsTests
│ ├── Info.plist
│ └── ReactNativeTipsTests.m
└── ReactNativeTips.xcodeproj
│ ├── xcshareddata
│ └── xcschemes
│ │ └── ReactNativeTips.xcscheme
│ └── project.pbxproj
├── .gitignore
├── README.md
├── index.ios.js
├── index.android.js
├── .flowconfig
└── src
└── component
├── Alert.js
├── Button.js
├── Demo.js
├── Confirm.js
├── ToastSuccessAndError.js
├── Toast.js
└── Tips.js
/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react-native"]
3 | }
--------------------------------------------------------------------------------
/img/Tips.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BingKui/ReactNativeTips/HEAD/img/Tips.gif
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'ReactNativeTips'
2 |
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | ReactNativeTips
3 |
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BingKui/ReactNativeTips/HEAD/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BingKui/ReactNativeTips/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BingKui/ReactNativeTips/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BingKui/ReactNativeTips/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BingKui/ReactNativeTips/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/keystores/debug.keystore.properties:
--------------------------------------------------------------------------------
1 | key.store=debug.keystore
2 | key.alias=androiddebugkey
3 | key.store.password=android
4 | key.alias.password=android
5 |
--------------------------------------------------------------------------------
/android/keystores/BUCK:
--------------------------------------------------------------------------------
1 | keystore(
2 | name = 'debug',
3 | store = 'debug.keystore',
4 | properties = 'debug.keystore.properties',
5 | visibility = [
6 | 'PUBLIC',
7 | ],
8 | )
9 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
6 |
--------------------------------------------------------------------------------
/__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 |
--------------------------------------------------------------------------------
/__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 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/reactnativetips/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.reactnativetips;
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 "ReactNativeTips";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ReactNativeTips",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node node_modules/react-native/local-cli/cli.js start",
7 | "test": "jest"
8 | },
9 | "dependencies": {
10 | "react": "15.4.1",
11 | "react-native": "0.39.2"
12 | },
13 | "devDependencies": {
14 | "babel-jest": "17.0.2",
15 | "babel-preset-react-native": "1.9.0",
16 | "jest": "17.0.3",
17 | "react-test-renderer": "15.4.1"
18 | },
19 | "jest": {
20 | "preset": "react-native"
21 | }
22 | }
--------------------------------------------------------------------------------
/ios/ReactNativeTips/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 |
14 | @property (nonatomic, strong) UIWindow *window;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/ios/ReactNativeTips/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 |
--------------------------------------------------------------------------------
/.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 |
38 | # BUCK
39 | buck-out/
40 | \.buckd/
41 | android/app/libs
42 | *.keystore
43 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.3.1'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | mavenLocal()
18 | jcenter()
19 | maven {
20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
21 | url "$rootDir/../node_modules/react-native/android"
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/ios/ReactNativeTips/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 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ReactNativeTips
2 |
3 | 移动端各类Tips提示组件合集,提供toast,success,error,alert,confirm等。
4 |
5 | ###效果
6 |
7 | 
8 |
9 | ##Dev
10 |
11 | 1.下载项目到本地目录
12 |
13 | git clone https://github.com/BingKui/ReactNativeTips.git
14 |
15 | 2.安装所需依赖(默认机器已经安装nodejs以及react-native-cli)
16 |
17 | npm install
18 |
19 | 3.打开模拟器或者连接手机,运行项目
20 |
21 | react-native run-android
22 |
23 | 或者
24 |
25 | react-native run-ios
26 |
27 |
28 | ##说明
29 |
30 | 组件提供多种样式,目前类型(type)分为:success,wrong,help,info,warning五种,可根据自己需要添加其他。
31 |
32 | ##资源
33 |
34 | 图标:[Alibaba国际站图标库](http://www.iconfont.cn/plus/collections/detail?cid=31 "Alibaba国际站图标库")
35 |
36 | 参考资料:[ReactNative中文网](http://reactnative.cn/docs/0.39/getting-started.html#content "reactnative中文网")
37 |
38 | ##联系我
39 |
40 | 有什么疑问,或者在使用过程中有什么需要改进的,可以联系我。
41 |
42 | 邮箱:<178974662@qq.com>
--------------------------------------------------------------------------------
/ios/ReactNativeTipsTests/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 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useDeprecatedNdk=true
21 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/reactnativetips/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.reactnativetips;
2 |
3 | import android.app.Application;
4 | import android.util.Log;
5 |
6 | import com.facebook.react.ReactApplication;
7 | import com.facebook.react.ReactInstanceManager;
8 | import com.facebook.react.ReactNativeHost;
9 | import com.facebook.react.ReactPackage;
10 | import com.facebook.react.shell.MainReactPackage;
11 | import com.facebook.soloader.SoLoader;
12 |
13 | import java.util.Arrays;
14 | import java.util.List;
15 |
16 | public class MainApplication extends Application implements ReactApplication {
17 |
18 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
19 | @Override
20 | protected boolean getUseDeveloperSupport() {
21 | return BuildConfig.DEBUG;
22 | }
23 |
24 | @Override
25 | protected List getPackages() {
26 | return Arrays.asList(
27 | new MainReactPackage()
28 | );
29 | }
30 | };
31 |
32 | @Override
33 | public ReactNativeHost getReactNativeHost() {
34 | return mReactNativeHost;
35 | }
36 |
37 | @Override
38 | public void onCreate() {
39 | super.onCreate();
40 | SoLoader.init(this, /* native exopackage */ false);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/index.ios.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | * @flow
5 | */
6 |
7 | import React, {
8 | Component
9 | } from 'react';
10 | import {
11 | AppRegistry,
12 | StyleSheet,
13 | Text,
14 | View
15 | } from 'react-native';
16 |
17 | import Demo from './src/component/Demo';
18 |
19 | export default class ReactNativeTips extends Component {
20 | render() {
21 | return (
22 |
23 |
24 | Welcome to React Native!
25 |
26 |
27 | To get started, edit index.ios.js
28 |
29 |
30 | Press Cmd+R to reload,{'\n'}
31 | Cmd+D or shake for dev menu
32 |
33 |
34 | );
35 | }
36 | }
37 |
38 | const styles = StyleSheet.create({
39 | container: {
40 | flex: 1,
41 | justifyContent: 'center',
42 | alignItems: 'center',
43 | backgroundColor: '#F5FCFF',
44 | },
45 | welcome: {
46 | fontSize: 20,
47 | textAlign: 'center',
48 | margin: 10,
49 | },
50 | instructions: {
51 | textAlign: 'center',
52 | color: '#333333',
53 | marginBottom: 5,
54 | },
55 | });
56 |
57 | AppRegistry.registerComponent('ReactNativeTips', () => Demo);
--------------------------------------------------------------------------------
/index.android.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | * @flow
5 | */
6 |
7 | import React, {
8 | Component
9 | } from 'react';
10 | import {
11 | AppRegistry,
12 | StyleSheet,
13 | Text,
14 | View
15 | } from 'react-native';
16 |
17 | import Demo from './src/component/Demo';
18 |
19 | export default class ReactNativeTips extends Component {
20 | render() {
21 | return (
22 |
23 |
24 | Welcome to React Native!
25 |
26 |
27 | To get started, edit index.android.js
28 |
29 |
30 | Double tap R on your keyboard to reload,{'\n'}
31 | Shake or press menu button for dev menu
32 |
33 |
34 | );
35 | }
36 | }
37 |
38 | const styles = StyleSheet.create({
39 | container: {
40 | flex: 1,
41 | justifyContent: 'center',
42 | alignItems: 'center',
43 | backgroundColor: '#F5FCFF',
44 | },
45 | welcome: {
46 | fontSize: 20,
47 | textAlign: 'center',
48 | margin: 10,
49 | },
50 | instructions: {
51 | textAlign: 'center',
52 | color: '#333333',
53 | marginBottom: 5,
54 | },
55 | });
56 |
57 | AppRegistry.registerComponent('ReactNativeTips', () => Demo);
--------------------------------------------------------------------------------
/ios/ReactNativeTips/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 "RCTBundleURLProvider.h"
13 | #import "RCTRootView.h"
14 |
15 | @implementation AppDelegate
16 |
17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
18 | {
19 | NSURL *jsCodeLocation;
20 |
21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
22 |
23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
24 | moduleName:@"ReactNativeTips"
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 | module.system=haste
26 |
27 | experimental.strict_type_args=true
28 |
29 | munge_underscores=true
30 |
31 | module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
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=$FixMe
37 |
38 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-5]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
39 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-5]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
40 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
41 |
42 | unsafe.enable_getters_and_setters=true
43 |
44 | [version]
45 | ^0.35.0
46 |
--------------------------------------------------------------------------------
/android/app/BUCK:
--------------------------------------------------------------------------------
1 | import re
2 |
3 | # To learn about Buck see [Docs](https://buckbuild.com/).
4 | # To run your application with Buck:
5 | # - install Buck
6 | # - `npm start` - to start the packager
7 | # - `cd android`
8 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
9 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
10 | # - `buck install -r android/app` - compile, install and run application
11 | #
12 |
13 | lib_deps = []
14 | for jarfile in glob(['libs/*.jar']):
15 | name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
16 | lib_deps.append(':' + name)
17 | prebuilt_jar(
18 | name = name,
19 | binary_jar = jarfile,
20 | )
21 |
22 | for aarfile in glob(['libs/*.aar']):
23 | name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
24 | lib_deps.append(':' + name)
25 | android_prebuilt_aar(
26 | name = name,
27 | aar = aarfile,
28 | )
29 |
30 | android_library(
31 | name = 'all-libs',
32 | exported_deps = lib_deps
33 | )
34 |
35 | android_library(
36 | name = 'app-code',
37 | srcs = glob([
38 | 'src/main/java/**/*.java',
39 | ]),
40 | deps = [
41 | ':all-libs',
42 | ':build_config',
43 | ':res',
44 | ],
45 | )
46 |
47 | android_build_config(
48 | name = 'build_config',
49 | package = 'com.reactnativetips',
50 | )
51 |
52 | android_resource(
53 | name = 'res',
54 | res = 'src/main/res',
55 | package = 'com.reactnativetips',
56 | )
57 |
58 | android_binary(
59 | name = 'app',
60 | package_type = 'debug',
61 | manifest = 'src/main/AndroidManifest.xml',
62 | keystore = '//android/keystores:debug',
63 | deps = [
64 | ':app-code',
65 | ],
66 | )
67 |
--------------------------------------------------------------------------------
/ios/ReactNativeTips/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 |
--------------------------------------------------------------------------------
/ios/ReactNativeTipsTests/ReactNativeTipsTests.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 | #import
12 |
13 | #import "RCTLog.h"
14 | #import "RCTRootView.h"
15 |
16 | #define TIMEOUT_SECONDS 600
17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
18 |
19 | @interface ReactNativeTipsTests : XCTestCase
20 |
21 | @end
22 |
23 | @implementation ReactNativeTipsTests
24 |
25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
26 | {
27 | if (test(view)) {
28 | return YES;
29 | }
30 | for (UIView *subview in [view subviews]) {
31 | if ([self findSubviewInView:subview matching:test]) {
32 | return YES;
33 | }
34 | }
35 | return NO;
36 | }
37 |
38 | - (void)testRendersWelcomeScreen
39 | {
40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
42 | BOOL foundElement = NO;
43 |
44 | __block NSString *redboxError = nil;
45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
46 | if (level >= RCTLogLevelError) {
47 | redboxError = message;
48 | }
49 | });
50 |
51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
54 |
55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
57 | return YES;
58 | }
59 | return NO;
60 | }];
61 | }
62 |
63 | RCTSetLogFunction(RCTDefaultLogFunction);
64 |
65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
67 | }
68 |
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Disabling obfuscation is useful if you collect stack traces from production crashes
20 | # (unless you are using a system that supports de-obfuscate the stack traces).
21 | -dontobfuscate
22 |
23 | # React Native
24 |
25 | # Keep our interfaces so they can be used by other ProGuard rules.
26 | # See http://sourceforge.net/p/proguard/bugs/466/
27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
30 |
31 | # Do not strip any method/class that is annotated with @DoNotStrip
32 | -keep @com.facebook.proguard.annotations.DoNotStrip class *
33 | -keep @com.facebook.common.internal.DoNotStrip class *
34 | -keepclassmembers class * {
35 | @com.facebook.proguard.annotations.DoNotStrip *;
36 | @com.facebook.common.internal.DoNotStrip *;
37 | }
38 |
39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
40 | void set*(***);
41 | *** get*();
42 | }
43 |
44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; }
46 | -keepclassmembers,includedescriptorclasses class * { native ; }
47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; }
48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; }
49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; }
50 |
51 | -dontwarn com.facebook.react.**
52 |
53 | # okhttp
54 |
55 | -keepattributes Signature
56 | -keepattributes *Annotation*
57 | -keep class okhttp3.** { *; }
58 | -keep interface okhttp3.** { *; }
59 | -dontwarn okhttp3.**
60 |
61 | # okio
62 |
63 | -keep class sun.misc.Unsafe { *; }
64 | -dontwarn java.nio.file.*
65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
66 | -dontwarn okio.**
67 |
--------------------------------------------------------------------------------
/src/component/Alert.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 提示Alert组件
3 | * @author 康兵奎
4 | * @date 2016年12月13日
5 | */
6 | 'use strict';
7 |
8 | import React, {
9 | Component,
10 | PropTypes
11 | } from 'react';
12 |
13 | import {
14 | StyleSheet,
15 | View,
16 | Modal,
17 | Text,
18 | Dimensions,
19 | TouchableHighlight
20 | } from 'react-native';
21 |
22 | class Alert extends Component {
23 | constructor(props) {
24 | super(props);
25 | this.state = {
26 | flag: false,
27 | };
28 | }
29 | static defaultProps = {
30 | title: '标题',
31 | msg: '提示信息',
32 | callback: () => {},
33 | btnText: '确定'
34 | };
35 | static propTypes = {
36 | msg: PropTypes.string.isRequired, //提示信息
37 | title: PropTypes.string.isRequired,
38 | callback: PropTypes.func,
39 | btnText: PropTypes.string
40 | }
41 | open = () => {
42 | this.setState({
43 | flag: true
44 | });
45 | }
46 | _onPress = () => {
47 | this.setState({
48 | flag: false
49 | });
50 | this.props.callback();
51 | }
52 | render() {
53 | return (
54 | {}}>
58 |
59 |
60 |
61 | {this.props.title}
62 |
63 | {this.props.msg}
64 |
65 |
66 | {this.props.btnText}
67 |
68 |
69 |
70 |
71 |
72 | );
73 | }
74 | }
75 | let _width = Dimensions.get('window').width;
76 | const styles = StyleSheet.create({
77 | alertModal: {
78 | flex: 1,
79 | alignItems: 'center',
80 | justifyContent: 'center',
81 | flexDirection: 'column',
82 | backgroundColor: 'rgba(0,0,0,.45)'
83 | },
84 | alert: {
85 | width: _width * .7,
86 | backgroundColor: 'rgba(255,255,255,1)',
87 | flexDirection: 'column',
88 | alignItems: 'center',
89 | justifyContent: 'center',
90 | borderRadius: 5,
91 | overflow: 'hidden'
92 | },
93 | title: {
94 | flexDirection: 'row',
95 | alignItems: 'center',
96 | justifyContent: 'center',
97 | height: 40,
98 | borderBottomColor: '#eee',
99 | borderBottomWidth: .5
100 | },
101 | titleCon: {
102 | flex: 1,
103 | textAlign: 'center',
104 | fontSize: 25
105 | },
106 | text: {
107 | paddingTop: 10,
108 | paddingBottom: 10,
109 | marginTop: 5,
110 | marginBottom: 5,
111 | fontSize: 18
112 | },
113 | btn: {
114 | flexDirection: 'row',
115 | alignItems: 'center',
116 | justifyContent: 'center',
117 | height: 40,
118 | borderTopColor: '#eee',
119 | borderTopWidth: .5,
120 | overflow: 'hidden'
121 | },
122 | btnClick: {
123 | flex: 1,
124 | alignItems: 'center',
125 | justifyContent: 'center',
126 | overflow: 'hidden',
127 | borderBottomLeftRadius: 5,
128 | borderBottomRightRadius: 5
129 | },
130 | btnText: {
131 | flex: 1,
132 | textAlign: 'center',
133 | textAlignVertical: 'center',
134 | overflow: 'hidden',
135 | fontSize: 20,
136 | fontWeight: '700'
137 | }
138 | });
139 |
140 |
141 | export default Alert;
--------------------------------------------------------------------------------
/src/component/Button.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Button
3 | * @author kangbingkui
4 | * @description normal[45,100],big[55,140],samll[35,60]
5 | * line[**,width-20]
6 | */
7 | 'use strict';
8 |
9 | import React, {
10 | Component,
11 | PropTypes
12 | } from 'react';
13 |
14 | import {
15 | StyleSheet,
16 | TouchableOpacity,
17 | Text,
18 | Dimensions,
19 | } from 'react-native';
20 |
21 | const _width = Dimensions.get('window').width;
22 | const _height = Dimensions.get('window').height;
23 |
24 | class Button extends Component {
25 | height = 45;
26 | constructor(props) {
27 | super(props); //这一句不能省略,照抄即可
28 | this.state = {
29 | disabled: false,
30 | };
31 | }
32 | static propTypes = {
33 | type: PropTypes.oneOf(['normal', 'redius', 'line']),
34 | size: PropTypes.oneOf(['normal', 'big', 'small']),
35 | btnText: PropTypes.string.isRequired,
36 | bgcolor: PropTypes.string,
37 | onPress: PropTypes.func.isRequired,
38 | };
39 | static defaultProps = {
40 | type: 'normal',
41 | size: 'normal',
42 | btnText: 'OK',
43 | bgcolor: '#44abe5',
44 | onPress: () => {},
45 | }
46 | onClick = () => {
47 | const {
48 | onPress
49 | } = this.props;
50 | this.disable();
51 | onPress(this.enable);
52 | }
53 | _setSize = () => {
54 | const {
55 | size
56 | } = this.props;
57 | let _re = {};
58 | if (size === 'big') {
59 | _re = {
60 | height: 55,
61 | width: 140,
62 | };
63 | }
64 | if (size === 'small') {
65 | _re = {
66 | height: 35,
67 | width: 60,
68 | };
69 | }
70 | return _re;
71 | }
72 | _setFontSize = () => {
73 | const {
74 | size
75 | } = this.props;
76 | let _re = {};
77 | if (size === 'big') {
78 | _re = {
79 | fontSize: 26,
80 | };
81 | }
82 | if (size === 'small') {
83 | _re = {
84 | fontSize: 14,
85 | };
86 | }
87 | return _re;
88 | }
89 | _setType = () => {
90 | const {
91 | type,
92 | size
93 | } = this.props;
94 | let _re = {};
95 | if (type === 'redius') {
96 | _re = {
97 | borderRadius: (this.height - 10) / 2,
98 | };
99 | }
100 | if (type === 'line') {
101 | _re = {
102 | width: _width - 20,
103 | marginLeft: 10,
104 | marginRight: 10,
105 | };
106 | }
107 | return _re;
108 | }
109 | enable = () => {
110 | this.setState({
111 | disabled: false
112 | });
113 | }
114 | disable = () => {
115 | this.setState({
116 | disabled: true
117 | });
118 | }
119 | render() {
120 | const {
121 | btnText
122 | } = this.props;
123 | return (
124 |
128 | {btnText}
129 |
130 | );
131 | }
132 | }
133 |
134 | const styles = StyleSheet.create({
135 | btn: {
136 | height: 45,
137 | width: 100,
138 | borderRadius: 3,
139 | alignItems: 'center',
140 | justifyContent: 'center',
141 | margin: 5,
142 | alignSelf: 'flex-start'
143 | },
144 | btnText: {
145 | color: '#fff',
146 | textAlign: 'center',
147 | fontSize: 20
148 | },
149 | disabled: {
150 | backgroundColor: '#ccc'
151 | },
152 | disabledText: {
153 | color: '#eee'
154 | },
155 | });
156 |
157 |
158 | export default Button;
--------------------------------------------------------------------------------
/src/component/Demo.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | import React, {
4 | Component
5 | } from 'react';
6 |
7 | import {
8 | StyleSheet,
9 | View,
10 | Text,
11 | TouchableHighlight,
12 | TextInput,
13 | AlertIOS,
14 | } from 'react-native';
15 |
16 | import Toast from './Toast';
17 | import Button from './Button';
18 | import ToastSuccessAndError from './ToastSuccessAndError';
19 | import Tip from './Tips';
20 | import Alert from './Alert';
21 | import Confirm from './Confirm';
22 |
23 | class Demo extends Component {
24 | constructor(props) {
25 | super(props);
26 |
27 | this.state = {
28 | tipType: 'success',
29 | toastType: 'success'
30 | };
31 | }
32 | _successOnPress = (callback) => {
33 | this.refs.toast_su.success();
34 | this.timer = setTimeout(() => {
35 | callback();
36 | }, 2000);
37 | }
38 | _errorOnPress = (callback) => {
39 | this.refs.toast_su.error();
40 | this.timer = setTimeout(() => {
41 | callback();
42 | }, 2000);
43 | }
44 | _tipOnPress = (callback) => {
45 | this.refs.tip.changeType(this.state.tipType);
46 | this.refs.tip.open();
47 | this.timer = setTimeout(() => {
48 | callback();
49 | }, 2000);
50 | }
51 | _toastOnPress = (callback) => {
52 | this.refs.toast.changeType(this.state.toastType);
53 | this.refs.toast.open();
54 | this.timer = setTimeout(() => {
55 | callback();
56 | }, 2000);
57 | }
58 | _alertOnPress = (callback) => {
59 | // this.refs.alert.changeType(this.state.toastType);
60 | this.refs.alert.open();
61 | callback();
62 | }
63 | _confirmOnPress = (callback) => {
64 | this.refs.confirm.open();
65 | callback();
66 | }
67 | componentWillUnmount() {
68 | // 如果存在this.timer,则使用clearTimeout清空。
69 | // 如果你使用多个timer,那么用多个变量,或者用个数组来保存引用,然后逐个clear
70 | this.timer && clearTimeout(this.timer);
71 | }
72 | render() {
73 | return (
74 |
75 |
76 |
77 |
78 |
79 | {}} rightFunc={() => {}} btnLeftText='确定' btnRightText='取消' title='弹框' msg='这个是提示内容!'>
80 |
81 |
82 |
83 | 输入相应的类型,弹出提示,类型一共五种(success,wrong,help,info,warning),默认为:success
84 | this.setState({tipType})}
88 | />
89 |
90 | this.setState({toastType})}
94 | />
95 |
96 |
97 |
98 |
99 | );
100 | }
101 | }
102 |
103 | const styles = StyleSheet.create({
104 | notCon: {
105 | height: 200
106 | },
107 | tipinfo: {
108 | padding: 10,
109 | fontSize: 20
110 | }
111 | });
112 |
113 |
114 | export default Demo;
--------------------------------------------------------------------------------
/ios/ReactNativeTips/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 |
--------------------------------------------------------------------------------
/src/component/Confirm.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | import React, {
4 | Component,
5 | PropTypes
6 | } from 'react';
7 |
8 | import {
9 | StyleSheet,
10 | View,
11 | Modal,
12 | Dimensions,
13 | TouchableHighlight,
14 | Text
15 | } from 'react-native';
16 |
17 | class Confirm extends Component {
18 | constructor(props) {
19 | super(props);
20 |
21 | this.state = {
22 | flag: false
23 | };
24 | }
25 | static propTypes = {
26 | btnLeftText: PropTypes.string,
27 | btnRightText: PropTypes.string,
28 | leftFunc: PropTypes.func,
29 | rightFunc: PropTypes.func,
30 | title: PropTypes.string.isRequired,
31 | msg: PropTypes.string.isRequired
32 | };
33 | static defaultProps = {
34 | btnLeftText: '取消',
35 | btnRightText: '确定',
36 | leftFunc: () => {},
37 | rightFunc: () => {},
38 | title: 'Confirm',
39 | msg: '这个是提示信息!'
40 | }
41 | open = () => {
42 | this.setState({
43 | flag: true
44 | });
45 | }
46 | _onLeftPress = () => {
47 | this.props.leftFunc();
48 | this.setState({
49 | flag: false
50 | });
51 | }
52 | _onRightPress = () => {
53 | this.props.rightFunc();
54 | this.setState({
55 | flag: false
56 | });
57 | }
58 | render() {
59 | return (
60 | {}}>
64 |
65 |
66 |
67 | {this.props.title}
68 |
69 |
70 | {this.props.msg}
71 |
72 |
73 |
74 |
75 | {this.props.btnLeftText}
76 |
77 |
78 |
79 |
80 | {this.props.btnRightText}
81 |
82 |
83 |
84 |
85 |
86 |
87 | );
88 | }
89 | }
90 |
91 | let _width = Dimensions.get('window').width;
92 | const styles = StyleSheet.create({
93 | confirmModal: {
94 | flex: 1,
95 | alignItems: 'center',
96 | justifyContent: 'center',
97 | flexDirection: 'column',
98 | backgroundColor: 'rgba(0,0,0,.45)'
99 | },
100 | confirm: {
101 | width: _width * .7,
102 | backgroundColor: 'rgba(255,255,255,1)',
103 | flexDirection: 'column',
104 | alignItems: 'center',
105 | justifyContent: 'center',
106 | borderRadius: 5,
107 | overflow: 'hidden'
108 | },
109 | title: {
110 | flexDirection: 'row',
111 | alignItems: 'center',
112 | justifyContent: 'center',
113 | height: 45,
114 | borderBottomColor: '#eee',
115 | borderBottomWidth: .5
116 | },
117 | titleCon: {
118 | flex: 1,
119 | textAlign: 'center',
120 | fontSize: 25
121 | },
122 | content: {
123 | paddingTop: 10,
124 | paddingBottom: 10,
125 | marginTop: 5,
126 | marginBottom: 5,
127 | minHeight: 110,
128 | alignItems: 'center',
129 | justifyContent: 'center',
130 | },
131 | text: {
132 | fontSize: 18,
133 | },
134 | btn: {
135 | flexDirection: 'row',
136 | alignItems: 'center',
137 | justifyContent: 'center',
138 | height: 45,
139 | borderTopColor: '#eee',
140 | borderTopWidth: .5,
141 | overflow: 'hidden'
142 | },
143 | btnClick: {
144 | flex: 1,
145 | alignItems: 'center',
146 | justifyContent: 'center',
147 | flexDirection: 'row',
148 | overflow: 'hidden',
149 | borderBottomLeftRadius: 5,
150 | borderBottomRightRadius: 5,
151 | },
152 | btnText: {
153 | textAlign: 'center',
154 | textAlignVertical: 'center',
155 | overflow: 'hidden',
156 | fontSize: 20,
157 | fontWeight: '700',
158 | },
159 | btnView: {
160 | flex: 1,
161 | height: 45,
162 | alignItems: 'center',
163 | justifyContent: 'center',
164 | borderLeftColor: '#eee',
165 | borderLeftWidth: 1,
166 | },
167 | btnLeft: {
168 | borderBottomLeftRadius: 5,
169 | },
170 | btnRight: {
171 | borderLeftColor: '#eee',
172 | borderLeftWidth: .5,
173 | borderBottomRightRadius: 5,
174 | },
175 | });
176 |
177 |
178 | export default Confirm;
--------------------------------------------------------------------------------
/ios/ReactNativeTips.xcodeproj/xcshareddata/xcschemes/ReactNativeTips.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
75 |
77 |
83 |
84 |
85 |
86 |
87 |
88 |
94 |
96 |
102 |
103 |
104 |
105 |
107 |
108 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 |
3 | import com.android.build.OutputFile
4 |
5 | /**
6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7 | * and bundleReleaseJsAndAssets).
8 | * These basically call `react-native bundle` with the correct arguments during the Android build
9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10 | * bundle directly from the development server. Below you can see all the possible configurations
11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the
12 | * `apply from: "../../node_modules/react-native/react.gradle"` line.
13 | *
14 | * project.ext.react = [
15 | * // the name of the generated asset file containing your JS bundle
16 | * bundleAssetName: "index.android.bundle",
17 | *
18 | * // the entry file for bundle generation
19 | * entryFile: "index.android.js",
20 | *
21 | * // whether to bundle JS and assets in debug mode
22 | * bundleInDebug: false,
23 | *
24 | * // whether to bundle JS and assets in release mode
25 | * bundleInRelease: true,
26 | *
27 | * // whether to bundle JS and assets in another build variant (if configured).
28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
29 | * // The configuration property can be in the following formats
30 | * // 'bundleIn${productFlavor}${buildType}'
31 | * // 'bundleIn${buildType}'
32 | * // bundleInFreeDebug: true,
33 | * // bundleInPaidRelease: true,
34 | * // bundleInBeta: true,
35 | *
36 | * // the root of your project, i.e. where "package.json" lives
37 | * root: "../../",
38 | *
39 | * // where to put the JS bundle asset in debug mode
40 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
41 | *
42 | * // where to put the JS bundle asset in release mode
43 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
44 | *
45 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
46 | * // require('./image.png')), in debug mode
47 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
48 | *
49 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
50 | * // require('./image.png')), in release mode
51 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
52 | *
53 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
54 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
55 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
56 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
57 | * // for example, you might want to remove it from here.
58 | * inputExcludes: ["android/**", "ios/**"],
59 | *
60 | * // override which node gets called and with what additional arguments
61 | * nodeExecutableAndArgs: ["node"]
62 | *
63 | * // supply additional arguments to the packager
64 | * extraPackagerArgs: []
65 | * ]
66 | */
67 |
68 | apply from: "../../node_modules/react-native/react.gradle"
69 |
70 | /**
71 | * Set this to true to create two separate APKs instead of one:
72 | * - An APK that only works on ARM devices
73 | * - An APK that only works on x86 devices
74 | * The advantage is the size of the APK is reduced by about 4MB.
75 | * Upload all the APKs to the Play Store and people will download
76 | * the correct one based on the CPU architecture of their device.
77 | */
78 | def enableSeparateBuildPerCPUArchitecture = false
79 |
80 | /**
81 | * Run Proguard to shrink the Java bytecode in release builds.
82 | */
83 | def enableProguardInReleaseBuilds = false
84 |
85 | android {
86 | compileSdkVersion 23
87 | buildToolsVersion "23.0.1"
88 |
89 | defaultConfig {
90 | applicationId "com.reactnativetips"
91 | minSdkVersion 16
92 | targetSdkVersion 22
93 | versionCode 1
94 | versionName "1.0"
95 | ndk {
96 | abiFilters "armeabi-v7a", "x86"
97 | }
98 | }
99 | splits {
100 | abi {
101 | reset()
102 | enable enableSeparateBuildPerCPUArchitecture
103 | universalApk false // If true, also generate a universal APK
104 | include "armeabi-v7a", "x86"
105 | }
106 | }
107 | buildTypes {
108 | release {
109 | minifyEnabled enableProguardInReleaseBuilds
110 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
111 | }
112 | }
113 | // applicationVariants are e.g. debug, release
114 | applicationVariants.all { variant ->
115 | variant.outputs.each { output ->
116 | // For each separate APK per architecture, set a unique version code as described here:
117 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
118 | def versionCodes = ["armeabi-v7a":1, "x86":2]
119 | def abi = output.getFilter(OutputFile.ABI)
120 | if (abi != null) { // null for the universal-debug, universal-release variants
121 | output.versionCodeOverride =
122 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
123 | }
124 | }
125 | }
126 | }
127 |
128 | dependencies {
129 | compile fileTree(dir: "libs", include: ["*.jar"])
130 | compile "com.android.support:appcompat-v7:23.0.1"
131 | compile "com.facebook.react:react-native:+" // From node_modules
132 | }
133 |
134 | // Run this once to be able to run the application with BUCK
135 | // puts all compile dependencies into folder libs for BUCK to use
136 | task copyDownloadableDepsToLibs(type: Copy) {
137 | from configurations.compile
138 | into 'libs'
139 | }
140 |
--------------------------------------------------------------------------------
/src/component/ToastSuccessAndError.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | import React, {
4 | Component,
5 | PropTypes
6 | } from 'react';
7 |
8 | import {
9 | StyleSheet,
10 | View,
11 | Modal,
12 | Text,
13 | Image,
14 | Dimensions
15 | } from 'react-native';
16 |
17 | const _success = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAK3ElEQVR4Xu2d0bXcNBBAPRVAB4QKoANCB6ECSAWQDkIFkAoIFQAVBCog6YASQgXizMF72DzerqWRxtZ4rn/y8TSydEc3ttaSLQsHBCBwk4DABgIQuE0AQRgdELhDAEEYHhBAEMYABGwEuILYuBGVhACCJEk03bQRQBAbN6KSEECQJImmmzYCCGLjRlQSAgiSJNF000YAQWzciEpCAEGSJJpu2gggiI0bUUkIIEiSRNNNGwEEsXEjKgkBBEmSaLppI4AgNm5EJSGAIEkSTTdtBBDExo2oJAQQJEmi6aaNAILYuBGVhACCJEk03bQRQBAbN6KSEECQJImmmzYCCGLjRlQSAgiSJNF000YAQWzciEpCAEGSJJpu2gggiI0bUUkIIEiSRNNNGwEEsXEjKgkBBEmSaLppI4AgNm5EJSGAIEkSTTdtBBDExo2oJAQQJEmi6aaNAILYuBGVhACCJEk03bQRQBAbN6ICECilPFmW5dtlWT5fm/v7siyvROR9bfMRpJYU5UIRKKV8syzLT480WuX4UkTe1nQIQWooUSYUgTtyXPqhknxacyVBkFCpp7FbBCrkuFTxQkR+3KoPQbYI8fcwBEopOtd4syzLxxWN/kNEnm6VQ5AtQvw9BIFGObRPP4uIzlPuHgiyRYi/T0/AIIf26bmIvN7qHIJsEeLvUxMwylF1e6UdR5Cp00/j7hFYn3P8WTnnuFT1blmWpzW/YCEI4y8sgVKKTsR1Qn55CFjTlyY5EKQGKWWmI7CXHAgyXepp0BaBPeVAkK1s8PepCOwtB4JMlX4as0WglPLLsizPtspd/f1vnaOIyF8NMR8U5VcsKznidiV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AAAASUVORK5CYII=';
19 | const _iconArray = [_success, _error];
20 |
21 | class ToastSuccessAndError extends Component {
22 | constructor(props) {
23 | super(props);
24 | this.state = {
25 | type: 'success',
26 | flag: false,
27 | msg: ''
28 | };
29 | }
30 | static defaultProps = {
31 | successMsg: 'Success',
32 | errorMsg: 'Error',
33 | timeout: 2000
34 | };
35 | static propTypes = {
36 | successMsg: PropTypes.string, //提示信息
37 | errorMsg: PropTypes.string, //提示信息
38 | timeout: PropTypes.number //关闭时间,默认2000毫秒
39 | }
40 | _getIconUri = () => {
41 | let _type = this.state.type;
42 | const _arr = ['success', 'error'];
43 | return _iconArray[_arr.indexOf(_type)];
44 | }
45 | _timeout = () => {
46 | setTimeout(() => {
47 | this.setState({
48 | flag: false
49 | });
50 | }, this.props.timeout);
51 | }
52 | success = () => {
53 | this.setState({
54 | type: 'success',
55 | flag: true,
56 | msg: this.props.successMsg
57 | });
58 | this._timeout();
59 | }
60 | error = () => {
61 | this.setState({
62 | type: 'error',
63 | flag: true,
64 | msg: this.props.errorMsg
65 | });
66 | this._timeout();
67 | }
68 | render() {
69 | return (
70 | {}}
75 | >
76 |
77 |
78 |
82 | {this.state.msg}
83 |
84 |
85 |
86 | );
87 | }
88 | }
89 | let _width = Dimensions.get('window').width;
90 | let _height = Dimensions.get('window').height;
91 | const styles = StyleSheet.create({
92 | loadingView: {
93 | flex: 1,
94 | height: _height,
95 | width: _width,
96 | position: 'absolute',
97 | alignItems: 'center',
98 | justifyContent: 'center',
99 | },
100 | thumbnail: {
101 | width: 50,
102 | height: 50,
103 | marginTop: 20,
104 | marginLeft: 35,
105 | },
106 | loadItem: {
107 | width: 120,
108 | height: 120,
109 | backgroundColor: '#5c5c5c',
110 | borderRadius: 10,
111 | },
112 | loadText: {
113 | color: '#fff',
114 | fontSize: 20,
115 | width: 120,
116 | marginTop: 3,
117 | textAlign: 'center'
118 | }
119 | });
120 |
121 |
122 | export default ToastSuccessAndError;
--------------------------------------------------------------------------------
/src/component/Toast.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Toasrt.js
3 | * @description 提供各种toast类型提示
4 | * @author 康兵奎
5 | */
6 | 'use strict';
7 |
8 | import React, {
9 | Component,
10 | PropTypes
11 | } from 'react';
12 |
13 | import {
14 | StyleSheet,
15 | View,
16 | Dimensions,
17 | Text,
18 | Animated,
19 | Image,
20 | Modal,
21 | Easing
22 | } from 'react-native';
23 |
24 | //定义各种提示的图标,类型有success(成功)、warning(警告)、wrong(错误)、help(帮助信息)、info(提示信息)
25 | const _warning = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAEbklEQVR4Xu2a7XETMRCGdyuADggVQCqAVACpAKiAUAGkAqACoAJCBYQKSCog6QAqWOb1rDxr+XT6Wp3HcfSHDLZP2ude7ZfEdOCDD9x+ugdwr4ADJ7DTLSAiD5n57y7fwaIAYDARvSWiMyLC32F8JaJzZr5ZGsZiAETkKRF9J6KjhJFQwjtmBozFxiIARARG/47eesrIU2a+WIrAcAAq+59EBAWEcU5En7D/ReQ1/iaiB/ohlHDCzFdLQFgCwAciem+MeRPLXLfHpYFwycwnew9Apf/HGPKZmeEAt4aIvFQfET6DP4Ayho6hChARSP+5WnCLbTAX9kQEe/+F2QrHoyPDMAC6t7+Y15d1buovEAqDP7hg5tOREhgCQA2B9EOs/8HMkHh2tIDLPnTmC6MAIJa/0nn/qfSLkxwRgUN8ZrbC41EZozsAEcGex95vdmbqPBEGw1ZIOs+et4/fjgCAhCfE/GtmtvF/vV4RgUoeafa3FfNFJA6fyA2gDNfhCqB00ZFKfjFziBQbxokIwDzR/8QWQlRwLZ7cAEyku3Mx326TOQBQDxQVBgomKMNteAKwMR+O7yj1tkoVACtFBMkQKsgwoAK3NNkFwEQWNxvzKwEglMJg+AuMK2Y+9pJANwCN+ZBpKHOTkg6LrgGgKuiOLClgHgCsRItifi0AhWBzCzhClzS5C4BWcdVOqhEAtoJNk10qxl4ANubfMnOq2xOHt6IoEMu21teU+Ilm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hsA8D6yaeSXMYJ+19YkEMqM6SPD1wAw/oeLklpToFcckHiDscCTSTTd+JwJA/xm7xYG+ACoCw1dcLKHCrD7ZLtPuwMAdZK5NABCCkDTcPRMVMAz4AiAi2fApQHwDRXwgcGlATB4AW+JL9INXnwgdGmhsGf8EAr7zdAhU9I6DLY8xB6BEDvfWNtwvet2uPdeIN0OC80kwXY0HiN1S4jsAIBP/H4SkatcSix7hNRCJXYAwGe+Rikx0mF7JEW72YBMNmhI/PpzAR8Q9UqL9wTA1zoM9IfVUwcjR2do37MKZE69sgcj6elJcxb0sgFJ2m906jV3ODpZVLAVG3oAkNH9/OGoucOUBUWVVmsBcSVu2J8mFSjJoc9R1nv3Aom14JW+lxRNzRdITOTqmqtC6WLWPGcGkP0OYf5wIuzbXJGUr6/pdnCxZpGnvFNTJtctQjxlQbXv1hZKLlZe1k5g7+dLSmXTykuiNzJHzc/xeoCzCIC5R581Gg4UDIRVN0G2Xpj5esp7EApRXrFwigAwEFImrLqg0GDx1DJj5WOS4xDmloxVDICBkBZP82/YwaBd2TBzbacqs10FgIFACi29oLDZLa4lqc3cUlt1gaMaAAOBIgpA8BXZfBWBoKx+U0aYxCnizJXrc0ON2yvVY64CwEWMTAa1SG9x8QjeApAouqqemAHNnp0yV1gXa5g8SZA61+ZG9b9LLFqMBGs6mLnF5bsBgHgfON4Rzg0T7yOwWH6fuoi52S21kxjgV+Bq/kg8Tt34rME29yw3UGEcAVmxq5sbdDMAEjCQIOqBFP1FpjUAcFljUKcWlaRNAMgwI94iB5h4fT5lCbSO94qjurD/2ETSU8j/DysOGj3Jqj6HAAAAAElFTkSuQmCC';
30 | const _iconArray = [_success, _info, _help, _warning, _wrong];
31 | class Toast extends Component {
32 | constructor(props) {
33 | super(props);
34 | this.state = {
35 | opacity: new Animated.Value(0),
36 | flag: false,
37 | type: this.props.type
38 | };
39 | }
40 | static defaultProps = {
41 | type: 'info',
42 | msg: '提示信息',
43 | timeout: 2000
44 | };
45 | static propTypes = {
46 | type: PropTypes.oneOf(['success', 'info', 'help', 'warning', 'wrong']).isRequired, //类型
47 | msg: PropTypes.string.isRequired, //提示信息
48 | timeout: PropTypes.number //关闭时间,默认2000毫秒
49 | }
50 | componentWillUnmount() {
51 | this.timer && clearTimeout(this.timer);
52 | }
53 | changeType = (_type) => {
54 | this.setState({
55 | type: _type ? _type : 'success'
56 | });
57 | }
58 | open = () => {
59 | this.setState({
60 | flag: true
61 | });
62 | setTimeout(() => {
63 | this.setState({
64 | flag: false
65 | });
66 | }, this.props.timeout);
67 | }
68 | getIconUri = () => {
69 | const {
70 | type
71 | } = this.state;
72 | const _arr = ['success', 'info', 'help', 'warning', 'wrong'];
73 | return _iconArray[_arr.indexOf(type)];
74 | }
75 | render() {
76 | return (
77 | {}}
82 | >
83 |
84 |
85 |
89 | {this.props.msg}
90 |
91 |
92 |
93 | );
94 | }
95 | }
96 | const _width = Dimensions.get('window').width;
97 | const styles = StyleSheet.create({
98 | taostModal: {
99 | flex: 1,
100 | alignItems: 'center',
101 | justifyContent: 'flex-end',
102 | flexDirection: 'column',
103 | },
104 | toast: {
105 | height: 45,
106 | backgroundColor: 'rgba(70,70,70,.7)',
107 | flexDirection: 'row',
108 | alignItems: 'center',
109 | justifyContent: 'center',
110 | padding: 5,
111 | borderRadius: 5,
112 | marginBottom: 45,
113 | },
114 | thumbnail: {
115 | width: 26,
116 | height: 26,
117 | marginRight: 10,
118 | marginLeft: 10,
119 | },
120 | text: {
121 | padding: 3,
122 | fontSize: 16,
123 | color: '#fff'
124 | }
125 | });
126 |
127 |
128 | export default Toast;
--------------------------------------------------------------------------------
/src/component/Tips.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 提供各种类型提示
3 | */
4 | 'use strict';
5 |
6 | import React, {
7 | Component,
8 | PropTypes
9 | } from 'react';
10 |
11 | import {
12 | StyleSheet,
13 | View,
14 | Animated,
15 | Easing,
16 | Text,
17 | Dimensions,
18 | Image,
19 | Modal,
20 | } from 'react-native';
21 |
22 | const _width = Dimensions.get('window').width;
23 | //定义各种提示的图标,类型有success(成功)、warning(警告)、wrong(错误)、help(帮助信息)、info(提示信息)
24 | const _warning = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAE9klEQVR4Xu2aTVITQRTH3xsNVcCk1CoJS+OO4MJwAuEE6gmEEwgnUE5gPIF4AvAE4gnAhYQdYUmwCqyMpEpwntUzmdDTmcn056iBbCfT0+/X/35f3Qg3/Ic33H64BXCrgBtO4K9uATqr38cHnfO/uQalAmAGX1zNvA4J1hHgPmf41p1KuDn94LBTNozSAATdJ02gcBsQ61lGEsA5Qrjh1w63yoRQCoD+2UL96tLbE1Y900706OXsw/ZOWRCcA2Cy/3k58xkAmolRRLDpT1202P4PugurBNhCwHvseawEXPFr3/bLgOAcQO9k8S0ivLk2JlwTZc62B0G4m0AAoF2/1l757wEw6f++9I6uDaH3fq29nmXYz++NFxTi9vAZ0oY/1265huBUAUG38RkAlyMjiI5np/rNcWGvd7K4gwjPk61wtxIuuY4MzgCwvQ3gfUhWUMa5MX8RXE53hv6AaKc6337pUgVOAMSGzBwlXp8IPlXnD17IGKIDTmbcvP84ARB0G1sA+CqWMv24W6GmipR73QZziM+SreBXLh67yhitA+idLiwjeSzsxT8NZxbnDbjPRYVc52my+tH0TAcQ3w+6i3tczP/q1w6G8Z//b6wSeATgbWTFfDF8EoYr1bnDXdvztQpAdtK8SgjoS7XWjiOF8Au6iywZejqIIp3Zqf6S7a1gDcBoupsf8+UBPGkCEFPUgAFsVucP3tpUgTUAfMxnjs+v9Ot5qyULgBkadBstAHx9bTQu2UyTrQAQs7iimK8CIKolfk3vA+KjAYR9v3awZEsFxgAGE9xLytxxezqZtAoA9o6NyJIHzBgAL1HZmK8KYLAVuNwCzm2lyUYAoiaHhpPSASCmybYqRkMAXMwnOvbn25ndHlF+OgDYGKq+RsZPaAMIThvrQPhuGKIUEhVdAJE/sJwmawEQix0A+ujX2qsyxEWnJuM0+XEz0mSlb4tz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Ep0HaZkQOD4NfS3etC1UmAkiJ7EoH/KW6Am6lUTGKlGT6IHR1IxoCbmuY16NQdHLQtqkwrGYkQKACqy3xQcNZSssqBVplVfQLwUN+qfKBkoJdmv8XrvPUGiL3htvyvFH3clSNQ+UhKIQtvN9OnnFOA1NDZ5RNgfpzlJ6sVUbOT5NckCF302OeSbLmlyySzEIRvq+m23RMkWmZddF7Dv/rtTZauZl8zNZ+Jh9DheCnB2AuAsNj/Tir+iTiAIvSpBxt6YS4Rieg8rzq66HE4rABwIYQ5urwKFCJtnvRKzvqyTw8v/aTNXawAcCGHyNCe8d6gnZUNj2U7H8F4nAJy1WC1QsLYCwRlcxbXr1Bqr1HoWcHQGwIHAoimKRFjJlQPBur5RGeHk/EupaqVA68mV7XSesxcAW4uRoWZWiVWruNiF8QaWsrD8tfPCHNB8s3+ENtUq1QpUW6x1Geb/7mLRTkuwywCvVHH5w7AmeO1qgm2NcF2zpbZwxZP8uakQMy/PG1ylNogB/h62OX+2nK2p4rMLttW+rEAt6hJHsUNGAyAAg4mXFA+eYlHI1G/7z0acxBRjjp5JGgWACjMIhC2dpxyznP64whLKM+uLeaPk4gJTdjvKSTdh/x8lyHh9zR+GwQAAAABJRU5ErkJggg==';
29 | const _iconArray = [_success, _info, _help, _warning, _wrong];
30 |
31 | class Tips extends Component {
32 | constructor(props) {
33 | super(props);
34 | this.state = {
35 | top: new Animated.Value(-45),
36 | flag: false,
37 | type: this.props.type
38 | };
39 | }
40 | static defaultProps = {
41 | type: 'info',
42 | msg: '提示信息',
43 | timeout: 2000
44 | };
45 | static propTypes = {
46 | type: PropTypes.oneOf(['success', 'info', 'help', 'warning', 'wrong']).isRequired, //类型
47 | msg: PropTypes.string.isRequired, //提示信息
48 | timeout: PropTypes.number //关闭时间,默认2000毫秒
49 | }
50 | componentDidUpdate() {
51 | let _animate = Animated.sequence([
52 | Animated.timing(this.state.top, {
53 | toValue: 0, // 目标值
54 | duration: 400, // 动画时间
55 | easing: Easing.linear // 缓动函数
56 | }),
57 | Animated.delay(this.props.timeout),
58 | Animated.timing(this.state.top, {
59 | toValue: -45, // 目标值
60 | duration: 400, // 动画时间
61 | easing: Easing.linear // 缓动函数
62 | })
63 | ]);
64 | if (this.state.flag) {
65 | _animate.start();
66 | this.timer = setTimeout(() => {
67 | this.setState({
68 | flag: false
69 | });
70 | }, this.props.timeout + 800);
71 | }
72 | }
73 | componentWillUnmount() {
74 | this.timer && clearTimeout(this.timer);
75 | }
76 | getIconUri = () => {
77 | const {
78 | type
79 | } = this.state;
80 | const _arr = ['success', 'info', 'help', 'warning', 'wrong'];
81 | return _iconArray[_arr.indexOf(type)];
82 | }
83 | changeType = (_type) => {
84 | this.setState({
85 | type: _type ? _type : 'success'
86 | });
87 | }
88 | open = () => {
89 | this.setState({
90 | flag: true
91 | });
92 | }
93 | render() {
94 | return (
95 |
96 |
100 | {this.props.msg}
101 |
102 | );
103 | }
104 | }
105 |
106 | const styles = StyleSheet.create({
107 | tip: {
108 | flex: 1,
109 | position: 'absolute',
110 | height: 45,
111 | width: _width,
112 | backgroundColor: 'rgb(255,253,235)',
113 | alignItems: 'center',
114 | justifyContent: 'center',
115 | flexDirection: 'row',
116 | overflow: 'hidden',
117 | zIndex: 9999
118 | },
119 | thumbnail: {
120 | width: 26,
121 | height: 26,
122 | marginRight: 10,
123 | },
124 | text: {
125 | width: _width - 60,
126 | fontSize: 16
127 | }
128 | });
129 |
130 |
131 | export default Tips;
--------------------------------------------------------------------------------
/ios/ReactNativeTips.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 /* ReactNativeTipsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ReactNativeTipsTests.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 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
26 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
27 | /* End PBXBuildFile section */
28 |
29 | /* Begin PBXContainerItemProxy section */
30 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = {
31 | isa = PBXContainerItemProxy;
32 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
33 | proxyType = 2;
34 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
35 | remoteInfo = RCTActionSheet;
36 | };
37 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = {
38 | isa = PBXContainerItemProxy;
39 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
40 | proxyType = 2;
41 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
42 | remoteInfo = RCTGeolocation;
43 | };
44 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = {
45 | isa = PBXContainerItemProxy;
46 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
47 | proxyType = 2;
48 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676;
49 | remoteInfo = RCTImage;
50 | };
51 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = {
52 | isa = PBXContainerItemProxy;
53 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
54 | proxyType = 2;
55 | remoteGlobalIDString = 58B511DB1A9E6C8500147676;
56 | remoteInfo = RCTNetwork;
57 | };
58 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = {
59 | isa = PBXContainerItemProxy;
60 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
61 | proxyType = 2;
62 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7;
63 | remoteInfo = RCTVibration;
64 | };
65 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
66 | isa = PBXContainerItemProxy;
67 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
68 | proxyType = 1;
69 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
70 | remoteInfo = ReactNativeTips;
71 | };
72 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = {
73 | isa = PBXContainerItemProxy;
74 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
75 | proxyType = 2;
76 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
77 | remoteInfo = RCTSettings;
78 | };
79 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = {
80 | isa = PBXContainerItemProxy;
81 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
82 | proxyType = 2;
83 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A;
84 | remoteInfo = RCTWebSocket;
85 | };
86 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = {
87 | isa = PBXContainerItemProxy;
88 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */;
89 | proxyType = 2;
90 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
91 | remoteInfo = React;
92 | };
93 | 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
94 | isa = PBXContainerItemProxy;
95 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
96 | proxyType = 2;
97 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
98 | remoteInfo = RCTAnimation;
99 | };
100 | 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = {
101 | isa = PBXContainerItemProxy;
102 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
103 | proxyType = 2;
104 | remoteGlobalIDString = 2D2A28201D9B03D100D4039D;
105 | remoteInfo = "RCTAnimation-tvOS";
106 | };
107 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = {
108 | isa = PBXContainerItemProxy;
109 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
110 | proxyType = 2;
111 | remoteGlobalIDString = 134814201AA4EA6300B7C361;
112 | remoteInfo = RCTLinking;
113 | };
114 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = {
115 | isa = PBXContainerItemProxy;
116 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
117 | proxyType = 2;
118 | remoteGlobalIDString = 58B5119B1A9E6C1200147676;
119 | remoteInfo = RCTText;
120 | };
121 | /* End PBXContainerItemProxy section */
122 |
123 | /* Begin PBXFileReference section */
124 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; };
125 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; };
126 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; };
127 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; };
128 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; };
129 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; };
130 | 00E356EE1AD99517003FC87E /* ReactNativeTipsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ReactNativeTipsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
131 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
132 | 00E356F21AD99517003FC87E /* ReactNativeTipsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ReactNativeTipsTests.m; sourceTree = ""; };
133 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; };
134 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; };
135 | 13B07F961A680F5B00A75B9A /* ReactNativeTips.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ReactNativeTips.app; sourceTree = BUILT_PRODUCTS_DIR; };
136 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ReactNativeTips/AppDelegate.h; sourceTree = ""; };
137 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = ReactNativeTips/AppDelegate.m; sourceTree = ""; };
138 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
139 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ReactNativeTips/Images.xcassets; sourceTree = ""; };
140 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ReactNativeTips/Info.plist; sourceTree = ""; };
141 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ReactNativeTips/main.m; sourceTree = ""; };
142 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; };
143 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; };
144 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; };
145 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; };
146 | /* End PBXFileReference section */
147 |
148 | /* Begin PBXFrameworksBuildPhase section */
149 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
150 | isa = PBXFrameworksBuildPhase;
151 | buildActionMask = 2147483647;
152 | files = (
153 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */,
154 | );
155 | runOnlyForDeploymentPostprocessing = 0;
156 | };
157 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
158 | isa = PBXFrameworksBuildPhase;
159 | buildActionMask = 2147483647;
160 | files = (
161 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */,
162 | 146834051AC3E58100842450 /* libReact.a in Frameworks */,
163 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */,
164 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */,
165 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */,
166 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */,
167 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */,
168 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */,
169 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
170 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
171 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
172 | );
173 | runOnlyForDeploymentPostprocessing = 0;
174 | };
175 | /* End PBXFrameworksBuildPhase section */
176 |
177 | /* Begin PBXGroup section */
178 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = {
179 | isa = PBXGroup;
180 | children = (
181 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */,
182 | );
183 | name = Products;
184 | sourceTree = "";
185 | };
186 | 00C302B61ABCB90400DB3ED1 /* Products */ = {
187 | isa = PBXGroup;
188 | children = (
189 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */,
190 | );
191 | name = Products;
192 | sourceTree = "";
193 | };
194 | 00C302BC1ABCB91800DB3ED1 /* Products */ = {
195 | isa = PBXGroup;
196 | children = (
197 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */,
198 | );
199 | name = Products;
200 | sourceTree = "";
201 | };
202 | 00C302D41ABCB9D200DB3ED1 /* Products */ = {
203 | isa = PBXGroup;
204 | children = (
205 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */,
206 | );
207 | name = Products;
208 | sourceTree = "";
209 | };
210 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = {
211 | isa = PBXGroup;
212 | children = (
213 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */,
214 | );
215 | name = Products;
216 | sourceTree = "";
217 | };
218 | 00E356EF1AD99517003FC87E /* ReactNativeTipsTests */ = {
219 | isa = PBXGroup;
220 | children = (
221 | 00E356F21AD99517003FC87E /* ReactNativeTipsTests.m */,
222 | 00E356F01AD99517003FC87E /* Supporting Files */,
223 | );
224 | path = ReactNativeTipsTests;
225 | sourceTree = "";
226 | };
227 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
228 | isa = PBXGroup;
229 | children = (
230 | 00E356F11AD99517003FC87E /* Info.plist */,
231 | );
232 | name = "Supporting Files";
233 | sourceTree = "";
234 | };
235 | 139105B71AF99BAD00B5F7CC /* Products */ = {
236 | isa = PBXGroup;
237 | children = (
238 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */,
239 | );
240 | name = Products;
241 | sourceTree = "";
242 | };
243 | 139FDEE71B06529A00C62182 /* Products */ = {
244 | isa = PBXGroup;
245 | children = (
246 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
247 | );
248 | name = Products;
249 | sourceTree = "";
250 | };
251 | 13B07FAE1A68108700A75B9A /* ReactNativeTips */ = {
252 | isa = PBXGroup;
253 | children = (
254 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
255 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
256 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
257 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
258 | 13B07FB61A68108700A75B9A /* Info.plist */,
259 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
260 | 13B07FB71A68108700A75B9A /* main.m */,
261 | );
262 | name = ReactNativeTips;
263 | sourceTree = "";
264 | };
265 | 146834001AC3E56700842450 /* Products */ = {
266 | isa = PBXGroup;
267 | children = (
268 | 146834041AC3E56700842450 /* libReact.a */,
269 | );
270 | name = Products;
271 | sourceTree = "";
272 | };
273 | 5E91572E1DD0AC6500FF2AA8 /* Products */ = {
274 | isa = PBXGroup;
275 | children = (
276 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */,
277 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */,
278 | );
279 | name = Products;
280 | sourceTree = "";
281 | };
282 | 78C398B11ACF4ADC00677621 /* Products */ = {
283 | isa = PBXGroup;
284 | children = (
285 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */,
286 | );
287 | name = Products;
288 | sourceTree = "";
289 | };
290 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
291 | isa = PBXGroup;
292 | children = (
293 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */,
294 | 146833FF1AC3E56700842450 /* React.xcodeproj */,
295 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */,
296 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */,
297 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */,
298 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */,
299 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */,
300 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */,
301 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
302 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
303 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
304 | );
305 | name = Libraries;
306 | sourceTree = "";
307 | };
308 | 832341B11AAA6A8300B99B32 /* Products */ = {
309 | isa = PBXGroup;
310 | children = (
311 | 832341B51AAA6A8300B99B32 /* libRCTText.a */,
312 | );
313 | name = Products;
314 | sourceTree = "";
315 | };
316 | 83CBB9F61A601CBA00E9B192 = {
317 | isa = PBXGroup;
318 | children = (
319 | 13B07FAE1A68108700A75B9A /* ReactNativeTips */,
320 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
321 | 00E356EF1AD99517003FC87E /* ReactNativeTipsTests */,
322 | 83CBBA001A601CBA00E9B192 /* Products */,
323 | );
324 | indentWidth = 2;
325 | sourceTree = "";
326 | tabWidth = 2;
327 | };
328 | 83CBBA001A601CBA00E9B192 /* Products */ = {
329 | isa = PBXGroup;
330 | children = (
331 | 13B07F961A680F5B00A75B9A /* ReactNativeTips.app */,
332 | 00E356EE1AD99517003FC87E /* ReactNativeTipsTests.xctest */,
333 | );
334 | name = Products;
335 | sourceTree = "";
336 | };
337 | /* End PBXGroup section */
338 |
339 | /* Begin PBXNativeTarget section */
340 | 00E356ED1AD99517003FC87E /* ReactNativeTipsTests */ = {
341 | isa = PBXNativeTarget;
342 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ReactNativeTipsTests" */;
343 | buildPhases = (
344 | 00E356EA1AD99517003FC87E /* Sources */,
345 | 00E356EB1AD99517003FC87E /* Frameworks */,
346 | 00E356EC1AD99517003FC87E /* Resources */,
347 | );
348 | buildRules = (
349 | );
350 | dependencies = (
351 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
352 | );
353 | name = ReactNativeTipsTests;
354 | productName = ReactNativeTipsTests;
355 | productReference = 00E356EE1AD99517003FC87E /* ReactNativeTipsTests.xctest */;
356 | productType = "com.apple.product-type.bundle.unit-test";
357 | };
358 | 13B07F861A680F5B00A75B9A /* ReactNativeTips */ = {
359 | isa = PBXNativeTarget;
360 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativeTips" */;
361 | buildPhases = (
362 | 13B07F871A680F5B00A75B9A /* Sources */,
363 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
364 | 13B07F8E1A680F5B00A75B9A /* Resources */,
365 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
366 | );
367 | buildRules = (
368 | );
369 | dependencies = (
370 | );
371 | name = ReactNativeTips;
372 | productName = "Hello World";
373 | productReference = 13B07F961A680F5B00A75B9A /* ReactNativeTips.app */;
374 | productType = "com.apple.product-type.application";
375 | };
376 | /* End PBXNativeTarget section */
377 |
378 | /* Begin PBXProject section */
379 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
380 | isa = PBXProject;
381 | attributes = {
382 | LastUpgradeCheck = 0610;
383 | ORGANIZATIONNAME = Facebook;
384 | TargetAttributes = {
385 | 00E356ED1AD99517003FC87E = {
386 | CreatedOnToolsVersion = 6.2;
387 | TestTargetID = 13B07F861A680F5B00A75B9A;
388 | };
389 | };
390 | };
391 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ReactNativeTips" */;
392 | compatibilityVersion = "Xcode 3.2";
393 | developmentRegion = English;
394 | hasScannedForEncodings = 0;
395 | knownRegions = (
396 | en,
397 | Base,
398 | );
399 | mainGroup = 83CBB9F61A601CBA00E9B192;
400 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
401 | projectDirPath = "";
402 | projectReferences = (
403 | {
404 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */;
405 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */;
406 | },
407 | {
408 | ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */;
409 | ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */;
410 | },
411 | {
412 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */;
413 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */;
414 | },
415 | {
416 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */;
417 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
418 | },
419 | {
420 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */;
421 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */;
422 | },
423 | {
424 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */;
425 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */;
426 | },
427 | {
428 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */;
429 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */;
430 | },
431 | {
432 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */;
433 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */;
434 | },
435 | {
436 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */;
437 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */;
438 | },
439 | {
440 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */;
441 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
442 | },
443 | {
444 | ProductGroup = 146834001AC3E56700842450 /* Products */;
445 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
446 | },
447 | );
448 | projectRoot = "";
449 | targets = (
450 | 13B07F861A680F5B00A75B9A /* ReactNativeTips */,
451 | 00E356ED1AD99517003FC87E /* ReactNativeTipsTests */,
452 | );
453 | };
454 | /* End PBXProject section */
455 |
456 | /* Begin PBXReferenceProxy section */
457 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = {
458 | isa = PBXReferenceProxy;
459 | fileType = archive.ar;
460 | path = libRCTActionSheet.a;
461 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */;
462 | sourceTree = BUILT_PRODUCTS_DIR;
463 | };
464 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = {
465 | isa = PBXReferenceProxy;
466 | fileType = archive.ar;
467 | path = libRCTGeolocation.a;
468 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */;
469 | sourceTree = BUILT_PRODUCTS_DIR;
470 | };
471 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = {
472 | isa = PBXReferenceProxy;
473 | fileType = archive.ar;
474 | path = libRCTImage.a;
475 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */;
476 | sourceTree = BUILT_PRODUCTS_DIR;
477 | };
478 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = {
479 | isa = PBXReferenceProxy;
480 | fileType = archive.ar;
481 | path = libRCTNetwork.a;
482 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */;
483 | sourceTree = BUILT_PRODUCTS_DIR;
484 | };
485 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = {
486 | isa = PBXReferenceProxy;
487 | fileType = archive.ar;
488 | path = libRCTVibration.a;
489 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */;
490 | sourceTree = BUILT_PRODUCTS_DIR;
491 | };
492 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = {
493 | isa = PBXReferenceProxy;
494 | fileType = archive.ar;
495 | path = libRCTSettings.a;
496 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */;
497 | sourceTree = BUILT_PRODUCTS_DIR;
498 | };
499 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = {
500 | isa = PBXReferenceProxy;
501 | fileType = archive.ar;
502 | path = libRCTWebSocket.a;
503 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */;
504 | sourceTree = BUILT_PRODUCTS_DIR;
505 | };
506 | 146834041AC3E56700842450 /* libReact.a */ = {
507 | isa = PBXReferenceProxy;
508 | fileType = archive.ar;
509 | path = libReact.a;
510 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
511 | sourceTree = BUILT_PRODUCTS_DIR;
512 | };
513 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
514 | isa = PBXReferenceProxy;
515 | fileType = archive.ar;
516 | path = libRCTAnimation.a;
517 | remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
518 | sourceTree = BUILT_PRODUCTS_DIR;
519 | };
520 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */ = {
521 | isa = PBXReferenceProxy;
522 | fileType = archive.ar;
523 | path = "libRCTAnimation-tvOS.a";
524 | remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
525 | sourceTree = BUILT_PRODUCTS_DIR;
526 | };
527 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = {
528 | isa = PBXReferenceProxy;
529 | fileType = archive.ar;
530 | path = libRCTLinking.a;
531 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */;
532 | sourceTree = BUILT_PRODUCTS_DIR;
533 | };
534 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = {
535 | isa = PBXReferenceProxy;
536 | fileType = archive.ar;
537 | path = libRCTText.a;
538 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */;
539 | sourceTree = BUILT_PRODUCTS_DIR;
540 | };
541 | /* End PBXReferenceProxy section */
542 |
543 | /* Begin PBXResourcesBuildPhase section */
544 | 00E356EC1AD99517003FC87E /* Resources */ = {
545 | isa = PBXResourcesBuildPhase;
546 | buildActionMask = 2147483647;
547 | files = (
548 | );
549 | runOnlyForDeploymentPostprocessing = 0;
550 | };
551 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
552 | isa = PBXResourcesBuildPhase;
553 | buildActionMask = 2147483647;
554 | files = (
555 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
556 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
557 | );
558 | runOnlyForDeploymentPostprocessing = 0;
559 | };
560 | /* End PBXResourcesBuildPhase section */
561 |
562 | /* Begin PBXShellScriptBuildPhase section */
563 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
564 | isa = PBXShellScriptBuildPhase;
565 | buildActionMask = 2147483647;
566 | files = (
567 | );
568 | inputPaths = (
569 | );
570 | name = "Bundle React Native code and images";
571 | outputPaths = (
572 | );
573 | runOnlyForDeploymentPostprocessing = 0;
574 | shellPath = /bin/sh;
575 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
576 | };
577 | /* End PBXShellScriptBuildPhase section */
578 |
579 | /* Begin PBXSourcesBuildPhase section */
580 | 00E356EA1AD99517003FC87E /* Sources */ = {
581 | isa = PBXSourcesBuildPhase;
582 | buildActionMask = 2147483647;
583 | files = (
584 | 00E356F31AD99517003FC87E /* ReactNativeTipsTests.m in Sources */,
585 | );
586 | runOnlyForDeploymentPostprocessing = 0;
587 | };
588 | 13B07F871A680F5B00A75B9A /* Sources */ = {
589 | isa = PBXSourcesBuildPhase;
590 | buildActionMask = 2147483647;
591 | files = (
592 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
593 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
594 | );
595 | runOnlyForDeploymentPostprocessing = 0;
596 | };
597 | /* End PBXSourcesBuildPhase section */
598 |
599 | /* Begin PBXTargetDependency section */
600 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
601 | isa = PBXTargetDependency;
602 | target = 13B07F861A680F5B00A75B9A /* ReactNativeTips */;
603 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
604 | };
605 | /* End PBXTargetDependency section */
606 |
607 | /* Begin PBXVariantGroup section */
608 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
609 | isa = PBXVariantGroup;
610 | children = (
611 | 13B07FB21A68108700A75B9A /* Base */,
612 | );
613 | name = LaunchScreen.xib;
614 | path = ReactNativeTips;
615 | sourceTree = "";
616 | };
617 | /* End PBXVariantGroup section */
618 |
619 | /* Begin XCBuildConfiguration section */
620 | 00E356F61AD99517003FC87E /* Debug */ = {
621 | isa = XCBuildConfiguration;
622 | buildSettings = {
623 | BUNDLE_LOADER = "$(TEST_HOST)";
624 | GCC_PREPROCESSOR_DEFINITIONS = (
625 | "DEBUG=1",
626 | "$(inherited)",
627 | );
628 | INFOPLIST_FILE = ReactNativeTipsTests/Info.plist;
629 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
630 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
631 | PRODUCT_NAME = "$(TARGET_NAME)";
632 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactNativeTips.app/ReactNativeTips";
633 | };
634 | name = Debug;
635 | };
636 | 00E356F71AD99517003FC87E /* Release */ = {
637 | isa = XCBuildConfiguration;
638 | buildSettings = {
639 | BUNDLE_LOADER = "$(TEST_HOST)";
640 | COPY_PHASE_STRIP = NO;
641 | INFOPLIST_FILE = ReactNativeTipsTests/Info.plist;
642 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
643 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
644 | PRODUCT_NAME = "$(TARGET_NAME)";
645 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactNativeTips.app/ReactNativeTips";
646 | };
647 | name = Release;
648 | };
649 | 13B07F941A680F5B00A75B9A /* Debug */ = {
650 | isa = XCBuildConfiguration;
651 | buildSettings = {
652 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
653 | CURRENT_PROJECT_VERSION = 1;
654 | DEAD_CODE_STRIPPING = NO;
655 | INFOPLIST_FILE = ReactNativeTips/Info.plist;
656 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
657 | OTHER_LDFLAGS = (
658 | "$(inherited)",
659 | "-ObjC",
660 | "-lc++",
661 | );
662 | PRODUCT_NAME = ReactNativeTips;
663 | VERSIONING_SYSTEM = "apple-generic";
664 | };
665 | name = Debug;
666 | };
667 | 13B07F951A680F5B00A75B9A /* Release */ = {
668 | isa = XCBuildConfiguration;
669 | buildSettings = {
670 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
671 | CURRENT_PROJECT_VERSION = 1;
672 | INFOPLIST_FILE = ReactNativeTips/Info.plist;
673 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
674 | OTHER_LDFLAGS = (
675 | "$(inherited)",
676 | "-ObjC",
677 | "-lc++",
678 | );
679 | PRODUCT_NAME = ReactNativeTips;
680 | VERSIONING_SYSTEM = "apple-generic";
681 | };
682 | name = Release;
683 | };
684 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
685 | isa = XCBuildConfiguration;
686 | buildSettings = {
687 | ALWAYS_SEARCH_USER_PATHS = NO;
688 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
689 | CLANG_CXX_LIBRARY = "libc++";
690 | CLANG_ENABLE_MODULES = YES;
691 | CLANG_ENABLE_OBJC_ARC = YES;
692 | CLANG_WARN_BOOL_CONVERSION = YES;
693 | CLANG_WARN_CONSTANT_CONVERSION = YES;
694 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
695 | CLANG_WARN_EMPTY_BODY = YES;
696 | CLANG_WARN_ENUM_CONVERSION = YES;
697 | CLANG_WARN_INT_CONVERSION = YES;
698 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
699 | CLANG_WARN_UNREACHABLE_CODE = YES;
700 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
701 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
702 | COPY_PHASE_STRIP = NO;
703 | ENABLE_STRICT_OBJC_MSGSEND = YES;
704 | GCC_C_LANGUAGE_STANDARD = gnu99;
705 | GCC_DYNAMIC_NO_PIC = NO;
706 | GCC_OPTIMIZATION_LEVEL = 0;
707 | GCC_PREPROCESSOR_DEFINITIONS = (
708 | "DEBUG=1",
709 | "$(inherited)",
710 | );
711 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
712 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
713 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
714 | GCC_WARN_UNDECLARED_SELECTOR = YES;
715 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
716 | GCC_WARN_UNUSED_FUNCTION = YES;
717 | GCC_WARN_UNUSED_VARIABLE = YES;
718 | HEADER_SEARCH_PATHS = (
719 | "$(inherited)",
720 | "$(SRCROOT)/../node_modules/react-native/React/**",
721 | "$(SRCROOT)/../node_modules/react-native/ReactCommon/**",
722 | );
723 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
724 | MTL_ENABLE_DEBUG_INFO = YES;
725 | ONLY_ACTIVE_ARCH = YES;
726 | SDKROOT = iphoneos;
727 | };
728 | name = Debug;
729 | };
730 | 83CBBA211A601CBA00E9B192 /* Release */ = {
731 | isa = XCBuildConfiguration;
732 | buildSettings = {
733 | ALWAYS_SEARCH_USER_PATHS = NO;
734 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
735 | CLANG_CXX_LIBRARY = "libc++";
736 | CLANG_ENABLE_MODULES = YES;
737 | CLANG_ENABLE_OBJC_ARC = YES;
738 | CLANG_WARN_BOOL_CONVERSION = YES;
739 | CLANG_WARN_CONSTANT_CONVERSION = YES;
740 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
741 | CLANG_WARN_EMPTY_BODY = YES;
742 | CLANG_WARN_ENUM_CONVERSION = YES;
743 | CLANG_WARN_INT_CONVERSION = YES;
744 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
745 | CLANG_WARN_UNREACHABLE_CODE = YES;
746 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
747 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
748 | COPY_PHASE_STRIP = YES;
749 | ENABLE_NS_ASSERTIONS = NO;
750 | ENABLE_STRICT_OBJC_MSGSEND = YES;
751 | GCC_C_LANGUAGE_STANDARD = gnu99;
752 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
753 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
754 | GCC_WARN_UNDECLARED_SELECTOR = YES;
755 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
756 | GCC_WARN_UNUSED_FUNCTION = YES;
757 | GCC_WARN_UNUSED_VARIABLE = YES;
758 | HEADER_SEARCH_PATHS = (
759 | "$(inherited)",
760 | "$(SRCROOT)/../node_modules/react-native/React/**",
761 | "$(SRCROOT)/../node_modules/react-native/ReactCommon/**",
762 | );
763 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
764 | MTL_ENABLE_DEBUG_INFO = NO;
765 | SDKROOT = iphoneos;
766 | VALIDATE_PRODUCT = YES;
767 | };
768 | name = Release;
769 | };
770 | /* End XCBuildConfiguration section */
771 |
772 | /* Begin XCConfigurationList section */
773 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ReactNativeTipsTests" */ = {
774 | isa = XCConfigurationList;
775 | buildConfigurations = (
776 | 00E356F61AD99517003FC87E /* Debug */,
777 | 00E356F71AD99517003FC87E /* Release */,
778 | );
779 | defaultConfigurationIsVisible = 0;
780 | defaultConfigurationName = Release;
781 | };
782 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativeTips" */ = {
783 | isa = XCConfigurationList;
784 | buildConfigurations = (
785 | 13B07F941A680F5B00A75B9A /* Debug */,
786 | 13B07F951A680F5B00A75B9A /* Release */,
787 | );
788 | defaultConfigurationIsVisible = 0;
789 | defaultConfigurationName = Release;
790 | };
791 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ReactNativeTips" */ = {
792 | isa = XCConfigurationList;
793 | buildConfigurations = (
794 | 83CBBA201A601CBA00E9B192 /* Debug */,
795 | 83CBBA211A601CBA00E9B192 /* Release */,
796 | );
797 | defaultConfigurationIsVisible = 0;
798 | defaultConfigurationName = Release;
799 | };
800 | /* End XCConfigurationList section */
801 | };
802 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
803 | }
804 |
--------------------------------------------------------------------------------