├── .babelrc ├── .buckconfig ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .watchmanconfig ├── App.js ├── LICENSE ├── README.md ├── android ├── app │ ├── BUCK │ ├── build.gradle │ ├── proguard-rules.pro │ ├── release │ │ ├── app-release.apk │ │ └── output.json │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ ├── fonts │ │ │ ├── Entypo.ttf │ │ │ ├── EvilIcons.ttf │ │ │ ├── Feather.ttf │ │ │ ├── FontAwesome.ttf │ │ │ ├── Foundation.ttf │ │ │ ├── Ionicons.ttf │ │ │ ├── MaterialCommunityIcons.ttf │ │ │ ├── MaterialIcons.ttf │ │ │ ├── Octicons.ttf │ │ │ ├── SimpleLineIcons.ttf │ │ │ └── Zocial.ttf │ │ ├── index.android.bundle │ │ └── index.android.bundle.meta │ │ ├── java │ │ └── com │ │ │ └── myapp │ │ │ ├── MainActivity.java │ │ │ └── MainApplication.java │ │ └── res │ │ ├── drawable-hdpi │ │ └── node_modules_reactnavigation_src_views_assets_backicon.png │ │ ├── drawable-mdpi │ │ ├── app_imgs_home_page_header_icon.png │ │ ├── app_imgs_ic_tab_strip_icon_category.png │ │ ├── app_imgs_ic_tab_strip_icon_category_selected.png │ │ ├── app_imgs_ic_tab_strip_icon_feed.png │ │ ├── app_imgs_ic_tab_strip_icon_feed_selected.png │ │ ├── app_imgs_ic_tab_strip_icon_profile.png │ │ ├── app_imgs_ic_tab_strip_icon_profile_selected.png │ │ ├── node_modules_reactnavigation_src_views_assets_backicon.png │ │ └── node_modules_reactnavigation_src_views_assets_backiconmask.png │ │ ├── drawable-xhdpi │ │ └── node_modules_reactnavigation_src_views_assets_backicon.png │ │ ├── drawable-xxhdpi │ │ └── node_modules_reactnavigation_src_views_assets_backicon.png │ │ ├── drawable-xxxhdpi │ │ └── node_modules_reactnavigation_src_views_assets_backicon.png │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── raw │ │ └── node_modules_nativeecharts_src_components_echarts_tpl.html │ │ └── values │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── keystores │ ├── BUCK │ └── debug.keystore.properties └── settings.gradle ├── app-release.apk ├── app.json ├── index.js ├── ios ├── myapp-tvOS │ └── Info.plist ├── myapp-tvOSTests │ └── Info.plist ├── myapp.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── myapp-tvOS.xcscheme │ │ └── myapp.xcscheme ├── myapp │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Info.plist │ └── main.m └── myappTests │ ├── Info.plist │ └── myappTests.m ├── package-lock.json ├── package.json ├── router.js ├── src ├── common │ ├── Head.js │ └── swiper.js ├── home │ └── home.js ├── imgs │ ├── airplane.svg │ ├── avatar.png │ ├── brightness-contrast.svg │ ├── bubble.svg │ ├── connection.svg │ ├── home2.svg │ ├── home_page_header_cover.jpg │ ├── home_page_header_icon.png │ ├── ic_action_favorites_grey.png │ ├── ic_action_favorites_without_padding.png │ ├── ic_action_offline_without_padding.png │ ├── ic_action_play.png │ ├── ic_action_reply_grey.png │ ├── ic_action_reply_nopadding.png │ ├── ic_action_share_without_padding.png │ ├── ic_image.png │ ├── ic_image_selected.png │ ├── ic_me.png │ ├── ic_me_selected.png │ ├── ic_menu_more.png │ ├── ic_news.png │ ├── ic_news_selected.png │ ├── ic_tab_strip_icon_category.png │ ├── ic_tab_strip_icon_category_selected.png │ ├── ic_tab_strip_icon_feed.png │ ├── ic_tab_strip_icon_feed_selected.png │ ├── ic_tab_strip_icon_follow.png │ ├── ic_tab_strip_icon_follow_selected.png │ ├── ic_tab_strip_icon_profile.png │ ├── ic_tab_strip_icon_profile_selected.png │ ├── ic_video.png │ ├── ic_video_selected.png │ └── mobile.svg ├── login │ └── Login.js ├── me │ ├── CardList │ │ └── cardList.js │ ├── CheckBox │ │ └── CheckBox.js │ ├── DialogSelected │ │ └── DialogSelected.js │ ├── Echarts │ │ └── Echarts.js │ ├── FABS │ │ └── FABS.js │ ├── FooterTab │ │ └── FooterTab.js │ ├── Form │ │ └── form.js │ ├── Icons │ │ └── Icons.js │ ├── ListDivider │ │ └── ListDivider.js │ ├── ListIcon │ │ └── ListIcon.js │ ├── Modal │ │ └── Modal.js │ ├── Search │ │ └── Search.js │ ├── Spinner │ │ └── Spinner.js │ ├── Swipeable │ │ └── Swipeable.js │ └── me.js ├── page │ ├── loadmore │ │ └── loadmore.js │ └── page.js ├── slider.js └── store │ ├── actions │ ├── actionTypes │ │ └── index.js │ ├── counter │ │ └── index.js │ └── news │ │ └── index.js │ ├── reducers │ ├── counter │ │ └── index.js │ ├── index.js │ └── news │ │ └── index.js │ └── store.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"] 3 | } 4 | -------------------------------------------------------------------------------- /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | 16 | ; Ignore polyfills 17 | .*/Libraries/polyfills/.* 18 | 19 | ; Ignore metro 20 | .*/node_modules/metro/.* 21 | 22 | [include] 23 | 24 | [libs] 25 | node_modules/react-native/Libraries/react-native/react-native-interface.js 26 | node_modules/react-native/flow/ 27 | node_modules/react-native/flow-github/ 28 | 29 | [options] 30 | emoji=true 31 | 32 | module.system=haste 33 | 34 | munge_underscores=true 35 | 36 | 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' 37 | 38 | module.file_ext=.js 39 | module.file_ext=.jsx 40 | module.file_ext=.json 41 | module.file_ext=.native.js 42 | 43 | suppress_type=$FlowIssue 44 | suppress_type=$FlowFixMe 45 | suppress_type=$FlowFixMeProps 46 | suppress_type=$FlowFixMeState 47 | 48 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 49 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 50 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 51 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 52 | 53 | [version] 54 | ^0.65.0 55 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /App.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from 'react'; 8 | import { 9 | Platform, 10 | StyleSheet, 11 | Text, 12 | Image, 13 | View, 14 | } from 'react-native'; 15 | import { Provider } from 'react-redux'; 16 | import initStore from './src/store/store'; 17 | import router from './router' 18 | const instructions = Platform.select({ 19 | ios: 'Press Cmd+R to reload,\n' + 20 | 'Cmd+D or shake for dev menu', 21 | android: 'Double tap R on your keyboard to reload,\n' + 22 | 'Shake or press menu button for dev menu', 23 | }); 24 | const store = initStore(); 25 | // console.log('++++++++++++++') 26 | // console.log(store.getState()) 27 | type Props = {}; 28 | const Navigator = router.Navigator; 29 | export default class App extends Component { 30 | render() { 31 | return ( 32 | 33 | 34 | 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 QIQI 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-redux-demo 2 | The project integrates the react-redux state management on the react-native-app base project. 3 | If you learn about react-native, please move first https://github.com/cryingbat/react-native-app   4 | This will definitely have a basic understanding of react-native. Looking back on this, it's a lot of work. 5 | # On the whole: 6 | React-navigation integrates redux state management. I'm sure you won't have any trouble with redux after you've seen this example。 7 | and then : 8 | ``` 9 | Project running-first please: 10 | # git clone https://github.com/cryingbat/react-redux-demo 11 | # npm i or yarn install the Related。 12 | and then run in your android of virtual machine or in your android 。 13 | Execute the command: 14 | # react-native run-android 15 | ``` 16 | # Note (this project is not compatible with ios) 17 | 18 | # screenshot 19 | first:The app will have a full screen rotation of three images,
20 | ![](https://github.com/cryingbat/react-native-app/raw/master/screenshorts/4.jpg) 21 | ![](https://github.com/cryingbat/react-native-app/raw/master/screenshorts/5.jpg) 22 | ![](https://github.com/cryingbat/react-native-app/raw/master/screenshorts/3.jpg) 23 | ![](https://github.com/cryingbat/react-native-app/raw/master/screenshorts/2.jpg) 24 | ![](https://github.com/cryingbat/react-native-app/raw/master/screenshorts/0.jpg)
25 | Click on the login store session to enter the home page
26 | The homepage has three main sections: front page + news + mine
27 | The list of news items I put on the front page supports loading more and drop-down refresh functions.
28 | Click on the news to enter the news page.。
29 | The news page has a sliding TAB that supports multi-tab horizontal scrolling. The details are not in place.
30 | My page is a collection of UI components.
31 | 32 | # For beginners, get a quick command of the react-native usage and navigation switch. It has a very big effect. I hope you can study together and make progress together. 33 | 34 | -------------------------------------------------------------------------------- /android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | lib_deps = [] 12 | 13 | for jarfile in glob(['libs/*.jar']): 14 | name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')] 15 | lib_deps.append(':' + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | 21 | for aarfile in glob(['libs/*.aar']): 22 | name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')] 23 | lib_deps.append(':' + name) 24 | android_prebuilt_aar( 25 | name = name, 26 | aar = aarfile, 27 | ) 28 | 29 | android_library( 30 | name = "all-libs", 31 | exported_deps = lib_deps, 32 | ) 33 | 34 | android_library( 35 | name = "app-code", 36 | srcs = glob([ 37 | "src/main/java/**/*.java", 38 | ]), 39 | deps = [ 40 | ":all-libs", 41 | ":build_config", 42 | ":res", 43 | ], 44 | ) 45 | 46 | android_build_config( 47 | name = "build_config", 48 | package = "com.myapp", 49 | ) 50 | 51 | android_resource( 52 | name = "res", 53 | package = "com.myapp", 54 | res = "src/main/res", 55 | ) 56 | 57 | android_binary( 58 | name = "app", 59 | keystore = "//android/keystores:debug", 60 | manifest = "src/main/AndroidManifest.xml", 61 | package_type = "debug", 62 | deps = [ 63 | ":app-code", 64 | ], 65 | ) 66 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation 19 | * entryFile: "index.android.js", 20 | * 21 | * // whether to bundle JS and assets in debug mode 22 | * bundleInDebug: false, 23 | * 24 | * // whether to bundle JS and assets in release mode 25 | * bundleInRelease: true, 26 | * 27 | * // whether to bundle JS and assets in another build variant (if configured). 28 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 29 | * // The configuration property can be in the following formats 30 | * // 'bundleIn${productFlavor}${buildType}' 31 | * // 'bundleIn${buildType}' 32 | * // bundleInFreeDebug: true, 33 | * // bundleInPaidRelease: true, 34 | * // bundleInBeta: true, 35 | * 36 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 37 | * // for example: to disable dev mode in the staging build type (if configured) 38 | * devDisabledInStaging: true, 39 | * // The configuration property can be in the following formats 40 | * // 'devDisabledIn${productFlavor}${buildType}' 41 | * // 'devDisabledIn${buildType}' 42 | * 43 | * // the root of your project, i.e. where "package.json" lives 44 | * root: "../../", 45 | * 46 | * // where to put the JS bundle asset in debug mode 47 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 48 | * 49 | * // where to put the JS bundle asset in release mode 50 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 51 | * 52 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 53 | * // require('./image.png')), in debug mode 54 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 55 | * 56 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 57 | * // require('./image.png')), in release mode 58 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 59 | * 60 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 61 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 62 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 63 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 64 | * // for example, you might want to remove it from here. 65 | * inputExcludes: ["android/**", "ios/**"], 66 | * 67 | * // override which node gets called and with what additional arguments 68 | * nodeExecutableAndArgs: ["node"], 69 | * 70 | * // supply additional arguments to the packager 71 | * extraPackagerArgs: [] 72 | * ] 73 | */ 74 | 75 | project.ext.react = [ 76 | entryFile: "index.js" 77 | ] 78 | 79 | apply from: "../../node_modules/react-native/react.gradle" 80 | 81 | project.ext.vectoricons = [ 82 | iconFontNames: [ 'MaterialIcons.ttf', 'EvilIcons.ttf', 'Ionicons.ttf' ] // Name of the font files you want to copy 83 | ] 84 | 85 | apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" 86 | 87 | /** 88 | * Set this to true to create two separate APKs instead of one: 89 | * - An APK that only works on ARM devices 90 | * - An APK that only works on x86 devices 91 | * The advantage is the size of the APK is reduced by about 4MB. 92 | * Upload all the APKs to the Play Store and people will download 93 | * the correct one based on the CPU architecture of their device. 94 | */ 95 | def enableSeparateBuildPerCPUArchitecture = false 96 | 97 | /** 98 | * Run Proguard to shrink the Java bytecode in release builds. 99 | */ 100 | def enableProguardInReleaseBuilds = false 101 | 102 | android { 103 | compileSdkVersion 23 104 | buildToolsVersion '27.0.3' 105 | 106 | defaultConfig { 107 | applicationId "com.myapp" 108 | minSdkVersion 16 109 | targetSdkVersion 22 110 | versionCode 2 111 | versionName "1.1" 112 | ndk { 113 | abiFilters "armeabi-v7a", "x86" 114 | } 115 | } 116 | 117 | splits { 118 | abi { 119 | reset() 120 | enable enableSeparateBuildPerCPUArchitecture 121 | universalApk false // If true, also generate a universal APK 122 | include "armeabi-v7a", "x86" 123 | } 124 | } 125 | buildTypes { 126 | release { 127 | minifyEnabled enableProguardInReleaseBuilds 128 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 129 | } 130 | } 131 | // applicationVariants are e.g. debug, release 132 | applicationVariants.all { variant -> 133 | variant.outputs.each { output -> 134 | // For each separate APK per architecture, set a unique version code as described here: 135 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 136 | def versionCodes = ["armeabi-v7a":1, "x86":2] 137 | def abi = output.getFilter(OutputFile.ABI) 138 | if (abi != null) { // null for the universal-debug, universal-release variants 139 | output.versionCodeOverride = 140 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 141 | } 142 | } 143 | } 144 | } 145 | 146 | dependencies { 147 | compile fileTree(dir: "libs", include: ["*.jar"]) 148 | compile "com.android.support:appcompat-v7:23.0.1" 149 | compile "com.facebook.react:react-native:+" // From node_modules 150 | compile project(':react-native-vector-icons') 151 | } 152 | 153 | // Run this once to be able to run the application with BUCK 154 | // puts all compile dependencies into folder libs for BUCK to use 155 | task copyDownloadableDepsToLibs(type: Copy) { 156 | from configurations.compile 157 | into 'libs' 158 | } 159 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Disabling obfuscation is useful if you collect stack traces from production crashes 20 | # (unless you are using a system that supports de-obfuscate the stack traces). 21 | -dontobfuscate 22 | 23 | # React Native 24 | 25 | # Keep our interfaces so they can be used by other ProGuard rules. 26 | # See http://sourceforge.net/p/proguard/bugs/466/ 27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip 30 | 31 | # Do not strip any method/class that is annotated with @DoNotStrip 32 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 33 | -keep @com.facebook.common.internal.DoNotStrip class * 34 | -keepclassmembers class * { 35 | @com.facebook.proguard.annotations.DoNotStrip *; 36 | @com.facebook.common.internal.DoNotStrip *; 37 | } 38 | 39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 40 | void set*(***); 41 | *** get*(); 42 | } 43 | 44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 46 | -keepclassmembers,includedescriptorclasses class * { native ; } 47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } 49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } 50 | 51 | -dontwarn com.facebook.react.** 52 | 53 | # TextLayoutBuilder uses a non-public Android constructor within StaticLayout. 54 | # See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details. 55 | -dontwarn android.text.StaticLayout 56 | 57 | # okhttp 58 | 59 | -keepattributes Signature 60 | -keepattributes *Annotation* 61 | -keep class okhttp3.** { *; } 62 | -keep interface okhttp3.** { *; } 63 | -dontwarn okhttp3.** 64 | 65 | # okio 66 | 67 | -keep class sun.misc.Unsafe { *; } 68 | -dontwarn java.nio.file.* 69 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 70 | -dontwarn okio.** 71 | -------------------------------------------------------------------------------- /android/app/release/app-release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/release/app-release.apk -------------------------------------------------------------------------------- /android/app/release/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":2,"versionName":"1.1","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 13 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/assets/fonts/Entypo.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/EvilIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/assets/fonts/EvilIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Feather.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/assets/fonts/Feather.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/assets/fonts/FontAwesome.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Foundation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/assets/fonts/Foundation.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/assets/fonts/Ionicons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/MaterialIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/assets/fonts/MaterialIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Octicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/assets/fonts/Octicons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/SimpleLineIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/assets/fonts/SimpleLineIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Zocial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/assets/fonts/Zocial.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/index.android.bundle.meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/assets/index.android.bundle.meta -------------------------------------------------------------------------------- /android/app/src/main/java/com/myapp/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.myapp; 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 "myapp"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/myapp/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.myapp; 2 | 3 | import android.app.Application; 4 | import com.oblador.vectoricons.VectorIconsPackage; 5 | import com.facebook.react.ReactApplication; 6 | import com.facebook.react.ReactNativeHost; 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.shell.MainReactPackage; 9 | import com.facebook.soloader.SoLoader; 10 | 11 | import java.util.Arrays; 12 | import java.util.List; 13 | 14 | public class MainApplication extends Application implements ReactApplication { 15 | 16 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 17 | @Override 18 | public boolean getUseDeveloperSupport() { 19 | return BuildConfig.DEBUG; 20 | } 21 | 22 | @Override 23 | protected List getPackages() { 24 | return Arrays.asList( 25 | new MainReactPackage() 26 | , new VectorIconsPackage() 27 | ); 28 | } 29 | 30 | @Override 31 | protected String getJSMainModuleName() { 32 | return "index"; 33 | } 34 | }; 35 | 36 | @Override 37 | public ReactNativeHost getReactNativeHost() { 38 | return mReactNativeHost; 39 | } 40 | 41 | @Override 42 | public void onCreate() { 43 | super.onCreate(); 44 | SoLoader.init(this, /* native exopackage */ false); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/node_modules_reactnavigation_src_views_assets_backicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/drawable-hdpi/node_modules_reactnavigation_src_views_assets_backicon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/app_imgs_home_page_header_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/drawable-mdpi/app_imgs_home_page_header_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/app_imgs_ic_tab_strip_icon_category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/drawable-mdpi/app_imgs_ic_tab_strip_icon_category.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/app_imgs_ic_tab_strip_icon_category_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/drawable-mdpi/app_imgs_ic_tab_strip_icon_category_selected.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/app_imgs_ic_tab_strip_icon_feed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/drawable-mdpi/app_imgs_ic_tab_strip_icon_feed.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/app_imgs_ic_tab_strip_icon_feed_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/drawable-mdpi/app_imgs_ic_tab_strip_icon_feed_selected.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/app_imgs_ic_tab_strip_icon_profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/drawable-mdpi/app_imgs_ic_tab_strip_icon_profile.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/app_imgs_ic_tab_strip_icon_profile_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/drawable-mdpi/app_imgs_ic_tab_strip_icon_profile_selected.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/node_modules_reactnavigation_src_views_assets_backicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/drawable-mdpi/node_modules_reactnavigation_src_views_assets_backicon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/node_modules_reactnavigation_src_views_assets_backiconmask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/drawable-mdpi/node_modules_reactnavigation_src_views_assets_backiconmask.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/node_modules_reactnavigation_src_views_assets_backicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/drawable-xhdpi/node_modules_reactnavigation_src_views_assets_backicon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/node_modules_reactnavigation_src_views_assets_backicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/drawable-xxhdpi/node_modules_reactnavigation_src_views_assets_backicon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/node_modules_reactnavigation_src_views_assets_backicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/drawable-xxxhdpi/node_modules_reactnavigation_src_views_assets_backicon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | myapp 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | google() 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.1.0' 10 | 11 | // NOTE: Do not place your application dependencies here; they belong 12 | // in the individual module build.gradle files 13 | } 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | mavenLocal() 19 | jcenter() 20 | maven { 21 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 22 | url "$rootDir/../node_modules/react-native/android" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Mar 29 10:55:04 CST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 7 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = "debug", 3 | properties = "debug.keystore.properties", 4 | store = "debug.keystore", 5 | visibility = [ 6 | "PUBLIC", 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /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/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'myapp' 2 | 3 | include ':app' 4 | 5 | include ':react-native-vector-icons' 6 | project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') -------------------------------------------------------------------------------- /app-release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/app-release.apk -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "myapp", 3 | "displayName": "myapp" 4 | } -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | import App from './App'; 3 | 4 | AppRegistry.registerComponent('myapp', () => App); 5 | -------------------------------------------------------------------------------- /ios/myapp-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | NSLocationWhenInUseUsageDescription 40 | 41 | NSAppTransportSecurity 42 | 43 | 44 | NSExceptionDomains 45 | 46 | localhost 47 | 48 | NSExceptionAllowsInsecureHTTPLoads 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /ios/myapp-tvOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/myapp.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 /* myappTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* myappTests.m */; }; 16 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 17 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 18 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 19 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 20 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 21 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 22 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 23 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 24 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 25 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 26 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 27 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 28 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 29 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; }; 30 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; }; 31 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; }; 32 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; }; 33 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; }; 34 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; }; 35 | 2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; }; 36 | 2DCD954D1E0B4F2C00145EB5 /* myappTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* myappTests.m */; }; 37 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 38 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 39 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; }; 40 | /* End PBXBuildFile section */ 41 | 42 | /* Begin PBXContainerItemProxy section */ 43 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { 44 | isa = PBXContainerItemProxy; 45 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 46 | proxyType = 2; 47 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 48 | remoteInfo = RCTActionSheet; 49 | }; 50 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { 51 | isa = PBXContainerItemProxy; 52 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 53 | proxyType = 2; 54 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 55 | remoteInfo = RCTGeolocation; 56 | }; 57 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { 58 | isa = PBXContainerItemProxy; 59 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 60 | proxyType = 2; 61 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 62 | remoteInfo = RCTImage; 63 | }; 64 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { 65 | isa = PBXContainerItemProxy; 66 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 67 | proxyType = 2; 68 | remoteGlobalIDString = 58B511DB1A9E6C8500147676; 69 | remoteInfo = RCTNetwork; 70 | }; 71 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { 72 | isa = PBXContainerItemProxy; 73 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 74 | proxyType = 2; 75 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 76 | remoteInfo = RCTVibration; 77 | }; 78 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 79 | isa = PBXContainerItemProxy; 80 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 81 | proxyType = 1; 82 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 83 | remoteInfo = myapp; 84 | }; 85 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { 86 | isa = PBXContainerItemProxy; 87 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 88 | proxyType = 2; 89 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 90 | remoteInfo = RCTSettings; 91 | }; 92 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { 93 | isa = PBXContainerItemProxy; 94 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 95 | proxyType = 2; 96 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A; 97 | remoteInfo = RCTWebSocket; 98 | }; 99 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { 100 | isa = PBXContainerItemProxy; 101 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 102 | proxyType = 2; 103 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; 104 | remoteInfo = React; 105 | }; 106 | 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { 107 | isa = PBXContainerItemProxy; 108 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 109 | proxyType = 1; 110 | remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; 111 | remoteInfo = "myapp-tvOS"; 112 | }; 113 | 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { 114 | isa = PBXContainerItemProxy; 115 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 116 | proxyType = 2; 117 | remoteGlobalIDString = ADD01A681E09402E00F6D226; 118 | remoteInfo = "RCTBlob-tvOS"; 119 | }; 120 | 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { 121 | isa = PBXContainerItemProxy; 122 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 123 | proxyType = 2; 124 | remoteGlobalIDString = 3DBE0D001F3B181A0099AA32; 125 | remoteInfo = fishhook; 126 | }; 127 | 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */ = { 128 | isa = PBXContainerItemProxy; 129 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 130 | proxyType = 2; 131 | remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32; 132 | remoteInfo = "fishhook-tvOS"; 133 | }; 134 | 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = { 135 | isa = PBXContainerItemProxy; 136 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 137 | proxyType = 2; 138 | remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; 139 | remoteInfo = "RCTImage-tvOS"; 140 | }; 141 | 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = { 142 | isa = PBXContainerItemProxy; 143 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 144 | proxyType = 2; 145 | remoteGlobalIDString = 2D2A28471D9B043800D4039D; 146 | remoteInfo = "RCTLinking-tvOS"; 147 | }; 148 | 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 149 | isa = PBXContainerItemProxy; 150 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 151 | proxyType = 2; 152 | remoteGlobalIDString = 2D2A28541D9B044C00D4039D; 153 | remoteInfo = "RCTNetwork-tvOS"; 154 | }; 155 | 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 156 | isa = PBXContainerItemProxy; 157 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 158 | proxyType = 2; 159 | remoteGlobalIDString = 2D2A28611D9B046600D4039D; 160 | remoteInfo = "RCTSettings-tvOS"; 161 | }; 162 | 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = { 163 | isa = PBXContainerItemProxy; 164 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 165 | proxyType = 2; 166 | remoteGlobalIDString = 2D2A287B1D9B048500D4039D; 167 | remoteInfo = "RCTText-tvOS"; 168 | }; 169 | 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = { 170 | isa = PBXContainerItemProxy; 171 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 172 | proxyType = 2; 173 | remoteGlobalIDString = 2D2A28881D9B049200D4039D; 174 | remoteInfo = "RCTWebSocket-tvOS"; 175 | }; 176 | 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = { 177 | isa = PBXContainerItemProxy; 178 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 179 | proxyType = 2; 180 | remoteGlobalIDString = 2D2A28131D9B038B00D4039D; 181 | remoteInfo = "React-tvOS"; 182 | }; 183 | 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = { 184 | isa = PBXContainerItemProxy; 185 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 186 | proxyType = 2; 187 | remoteGlobalIDString = 3D3C059A1DE3340900C268FA; 188 | remoteInfo = yoga; 189 | }; 190 | 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = { 191 | isa = PBXContainerItemProxy; 192 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 193 | proxyType = 2; 194 | remoteGlobalIDString = 3D3C06751DE3340C00C268FA; 195 | remoteInfo = "yoga-tvOS"; 196 | }; 197 | 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = { 198 | isa = PBXContainerItemProxy; 199 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 200 | proxyType = 2; 201 | remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; 202 | remoteInfo = cxxreact; 203 | }; 204 | 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 205 | isa = PBXContainerItemProxy; 206 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 207 | proxyType = 2; 208 | remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; 209 | remoteInfo = "cxxreact-tvOS"; 210 | }; 211 | 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 212 | isa = PBXContainerItemProxy; 213 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 214 | proxyType = 2; 215 | remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4; 216 | remoteInfo = jschelpers; 217 | }; 218 | 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 219 | isa = PBXContainerItemProxy; 220 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 221 | proxyType = 2; 222 | remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; 223 | remoteInfo = "jschelpers-tvOS"; 224 | }; 225 | 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { 226 | isa = PBXContainerItemProxy; 227 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 228 | proxyType = 2; 229 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 230 | remoteInfo = RCTAnimation; 231 | }; 232 | 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { 233 | isa = PBXContainerItemProxy; 234 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 235 | proxyType = 2; 236 | remoteGlobalIDString = 2D2A28201D9B03D100D4039D; 237 | remoteInfo = "RCTAnimation-tvOS"; 238 | }; 239 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 240 | isa = PBXContainerItemProxy; 241 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 242 | proxyType = 2; 243 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 244 | remoteInfo = RCTLinking; 245 | }; 246 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 247 | isa = PBXContainerItemProxy; 248 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 249 | proxyType = 2; 250 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 251 | remoteInfo = RCTText; 252 | }; 253 | ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = { 254 | isa = PBXContainerItemProxy; 255 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 256 | proxyType = 2; 257 | remoteGlobalIDString = 358F4ED71D1E81A9004DF814; 258 | remoteInfo = RCTBlob; 259 | }; 260 | /* End PBXContainerItemProxy section */ 261 | 262 | /* Begin PBXFileReference section */ 263 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 264 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 265 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; 266 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; 267 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; 268 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 269 | 00E356EE1AD99517003FC87E /* myappTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = myappTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 270 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 271 | 00E356F21AD99517003FC87E /* myappTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = myappTests.m; sourceTree = ""; }; 272 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; 273 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 274 | 13B07F961A680F5B00A75B9A /* myapp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = myapp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 275 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = myapp/AppDelegate.h; sourceTree = ""; }; 276 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = myapp/AppDelegate.m; sourceTree = ""; }; 277 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 278 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = myapp/Images.xcassets; sourceTree = ""; }; 279 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = myapp/Info.plist; sourceTree = ""; }; 280 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = myapp/main.m; sourceTree = ""; }; 281 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 282 | 2D02E47B1E0B4A5D006451C7 /* myapp-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "myapp-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 283 | 2D02E4901E0B4A5D006451C7 /* myapp-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "myapp-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 284 | 2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; }; 285 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; 286 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 287 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 288 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = ""; }; 289 | /* End PBXFileReference section */ 290 | 291 | /* Begin PBXFrameworksBuildPhase section */ 292 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 293 | isa = PBXFrameworksBuildPhase; 294 | buildActionMask = 2147483647; 295 | files = ( 296 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */, 297 | ); 298 | runOnlyForDeploymentPostprocessing = 0; 299 | }; 300 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 301 | isa = PBXFrameworksBuildPhase; 302 | buildActionMask = 2147483647; 303 | files = ( 304 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */, 305 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 306 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 307 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 308 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 309 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 310 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 311 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 312 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 313 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 314 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 315 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 316 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 317 | ); 318 | runOnlyForDeploymentPostprocessing = 0; 319 | }; 320 | 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { 321 | isa = PBXFrameworksBuildPhase; 322 | buildActionMask = 2147483647; 323 | files = ( 324 | 2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */, 325 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */, 326 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */, 327 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */, 328 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */, 329 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */, 330 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */, 331 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */, 332 | ); 333 | runOnlyForDeploymentPostprocessing = 0; 334 | }; 335 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { 336 | isa = PBXFrameworksBuildPhase; 337 | buildActionMask = 2147483647; 338 | files = ( 339 | ); 340 | runOnlyForDeploymentPostprocessing = 0; 341 | }; 342 | /* End PBXFrameworksBuildPhase section */ 343 | 344 | /* Begin PBXGroup section */ 345 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 346 | isa = PBXGroup; 347 | children = ( 348 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 349 | ); 350 | name = Products; 351 | sourceTree = ""; 352 | }; 353 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 354 | isa = PBXGroup; 355 | children = ( 356 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 357 | ); 358 | name = Products; 359 | sourceTree = ""; 360 | }; 361 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 362 | isa = PBXGroup; 363 | children = ( 364 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 365 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */, 366 | ); 367 | name = Products; 368 | sourceTree = ""; 369 | }; 370 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 371 | isa = PBXGroup; 372 | children = ( 373 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 374 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */, 375 | ); 376 | name = Products; 377 | sourceTree = ""; 378 | }; 379 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 380 | isa = PBXGroup; 381 | children = ( 382 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 383 | ); 384 | name = Products; 385 | sourceTree = ""; 386 | }; 387 | 00E356EF1AD99517003FC87E /* myappTests */ = { 388 | isa = PBXGroup; 389 | children = ( 390 | 00E356F21AD99517003FC87E /* myappTests.m */, 391 | 00E356F01AD99517003FC87E /* Supporting Files */, 392 | ); 393 | path = myappTests; 394 | sourceTree = ""; 395 | }; 396 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 397 | isa = PBXGroup; 398 | children = ( 399 | 00E356F11AD99517003FC87E /* Info.plist */, 400 | ); 401 | name = "Supporting Files"; 402 | sourceTree = ""; 403 | }; 404 | 139105B71AF99BAD00B5F7CC /* Products */ = { 405 | isa = PBXGroup; 406 | children = ( 407 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 408 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */, 409 | ); 410 | name = Products; 411 | sourceTree = ""; 412 | }; 413 | 139FDEE71B06529A00C62182 /* Products */ = { 414 | isa = PBXGroup; 415 | children = ( 416 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 417 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */, 418 | 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */, 419 | 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */, 420 | ); 421 | name = Products; 422 | sourceTree = ""; 423 | }; 424 | 13B07FAE1A68108700A75B9A /* myapp */ = { 425 | isa = PBXGroup; 426 | children = ( 427 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 428 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 429 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 430 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 431 | 13B07FB61A68108700A75B9A /* Info.plist */, 432 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 433 | 13B07FB71A68108700A75B9A /* main.m */, 434 | ); 435 | name = myapp; 436 | sourceTree = ""; 437 | }; 438 | 146834001AC3E56700842450 /* Products */ = { 439 | isa = PBXGroup; 440 | children = ( 441 | 146834041AC3E56700842450 /* libReact.a */, 442 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */, 443 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */, 444 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */, 445 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */, 446 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */, 447 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */, 448 | 3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */, 449 | ); 450 | name = Products; 451 | sourceTree = ""; 452 | }; 453 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 454 | isa = PBXGroup; 455 | children = ( 456 | 2D16E6891FA4F8E400B85C8A /* libReact.a */, 457 | ); 458 | name = Frameworks; 459 | sourceTree = ""; 460 | }; 461 | 5E91572E1DD0AC6500FF2AA8 /* Products */ = { 462 | isa = PBXGroup; 463 | children = ( 464 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */, 465 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */, 466 | ); 467 | name = Products; 468 | sourceTree = ""; 469 | }; 470 | 78C398B11ACF4ADC00677621 /* Products */ = { 471 | isa = PBXGroup; 472 | children = ( 473 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 474 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */, 475 | ); 476 | name = Products; 477 | sourceTree = ""; 478 | }; 479 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 480 | isa = PBXGroup; 481 | children = ( 482 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, 483 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 484 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 485 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */, 486 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 487 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 488 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 489 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 490 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 491 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 492 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 493 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 494 | ); 495 | name = Libraries; 496 | sourceTree = ""; 497 | }; 498 | 832341B11AAA6A8300B99B32 /* Products */ = { 499 | isa = PBXGroup; 500 | children = ( 501 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 502 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */, 503 | ); 504 | name = Products; 505 | sourceTree = ""; 506 | }; 507 | 83CBB9F61A601CBA00E9B192 = { 508 | isa = PBXGroup; 509 | children = ( 510 | 13B07FAE1A68108700A75B9A /* myapp */, 511 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 512 | 00E356EF1AD99517003FC87E /* myappTests */, 513 | 83CBBA001A601CBA00E9B192 /* Products */, 514 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 515 | ); 516 | indentWidth = 2; 517 | sourceTree = ""; 518 | tabWidth = 2; 519 | usesTabs = 0; 520 | }; 521 | 83CBBA001A601CBA00E9B192 /* Products */ = { 522 | isa = PBXGroup; 523 | children = ( 524 | 13B07F961A680F5B00A75B9A /* myapp.app */, 525 | 00E356EE1AD99517003FC87E /* myappTests.xctest */, 526 | 2D02E47B1E0B4A5D006451C7 /* myapp-tvOS.app */, 527 | 2D02E4901E0B4A5D006451C7 /* myapp-tvOSTests.xctest */, 528 | ); 529 | name = Products; 530 | sourceTree = ""; 531 | }; 532 | ADBDB9201DFEBF0600ED6528 /* Products */ = { 533 | isa = PBXGroup; 534 | children = ( 535 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */, 536 | 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */, 537 | ); 538 | name = Products; 539 | sourceTree = ""; 540 | }; 541 | /* End PBXGroup section */ 542 | 543 | /* Begin PBXNativeTarget section */ 544 | 00E356ED1AD99517003FC87E /* myappTests */ = { 545 | isa = PBXNativeTarget; 546 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "myappTests" */; 547 | buildPhases = ( 548 | 00E356EA1AD99517003FC87E /* Sources */, 549 | 00E356EB1AD99517003FC87E /* Frameworks */, 550 | 00E356EC1AD99517003FC87E /* Resources */, 551 | ); 552 | buildRules = ( 553 | ); 554 | dependencies = ( 555 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 556 | ); 557 | name = myappTests; 558 | productName = myappTests; 559 | productReference = 00E356EE1AD99517003FC87E /* myappTests.xctest */; 560 | productType = "com.apple.product-type.bundle.unit-test"; 561 | }; 562 | 13B07F861A680F5B00A75B9A /* myapp */ = { 563 | isa = PBXNativeTarget; 564 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "myapp" */; 565 | buildPhases = ( 566 | 13B07F871A680F5B00A75B9A /* Sources */, 567 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 568 | 13B07F8E1A680F5B00A75B9A /* Resources */, 569 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 570 | ); 571 | buildRules = ( 572 | ); 573 | dependencies = ( 574 | ); 575 | name = myapp; 576 | productName = "Hello World"; 577 | productReference = 13B07F961A680F5B00A75B9A /* myapp.app */; 578 | productType = "com.apple.product-type.application"; 579 | }; 580 | 2D02E47A1E0B4A5D006451C7 /* myapp-tvOS */ = { 581 | isa = PBXNativeTarget; 582 | buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "myapp-tvOS" */; 583 | buildPhases = ( 584 | 2D02E4771E0B4A5D006451C7 /* Sources */, 585 | 2D02E4781E0B4A5D006451C7 /* Frameworks */, 586 | 2D02E4791E0B4A5D006451C7 /* Resources */, 587 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, 588 | ); 589 | buildRules = ( 590 | ); 591 | dependencies = ( 592 | ); 593 | name = "myapp-tvOS"; 594 | productName = "myapp-tvOS"; 595 | productReference = 2D02E47B1E0B4A5D006451C7 /* myapp-tvOS.app */; 596 | productType = "com.apple.product-type.application"; 597 | }; 598 | 2D02E48F1E0B4A5D006451C7 /* myapp-tvOSTests */ = { 599 | isa = PBXNativeTarget; 600 | buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "myapp-tvOSTests" */; 601 | buildPhases = ( 602 | 2D02E48C1E0B4A5D006451C7 /* Sources */, 603 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */, 604 | 2D02E48E1E0B4A5D006451C7 /* Resources */, 605 | ); 606 | buildRules = ( 607 | ); 608 | dependencies = ( 609 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, 610 | ); 611 | name = "myapp-tvOSTests"; 612 | productName = "myapp-tvOSTests"; 613 | productReference = 2D02E4901E0B4A5D006451C7 /* myapp-tvOSTests.xctest */; 614 | productType = "com.apple.product-type.bundle.unit-test"; 615 | }; 616 | /* End PBXNativeTarget section */ 617 | 618 | /* Begin PBXProject section */ 619 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 620 | isa = PBXProject; 621 | attributes = { 622 | LastUpgradeCheck = 0610; 623 | ORGANIZATIONNAME = Facebook; 624 | TargetAttributes = { 625 | 00E356ED1AD99517003FC87E = { 626 | CreatedOnToolsVersion = 6.2; 627 | TestTargetID = 13B07F861A680F5B00A75B9A; 628 | }; 629 | 2D02E47A1E0B4A5D006451C7 = { 630 | CreatedOnToolsVersion = 8.2.1; 631 | ProvisioningStyle = Automatic; 632 | }; 633 | 2D02E48F1E0B4A5D006451C7 = { 634 | CreatedOnToolsVersion = 8.2.1; 635 | ProvisioningStyle = Automatic; 636 | TestTargetID = 2D02E47A1E0B4A5D006451C7; 637 | }; 638 | }; 639 | }; 640 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "myapp" */; 641 | compatibilityVersion = "Xcode 3.2"; 642 | developmentRegion = English; 643 | hasScannedForEncodings = 0; 644 | knownRegions = ( 645 | en, 646 | Base, 647 | ); 648 | mainGroup = 83CBB9F61A601CBA00E9B192; 649 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 650 | projectDirPath = ""; 651 | projectReferences = ( 652 | { 653 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 654 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 655 | }, 656 | { 657 | ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */; 658 | ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 659 | }, 660 | { 661 | ProductGroup = ADBDB9201DFEBF0600ED6528 /* Products */; 662 | ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 663 | }, 664 | { 665 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 666 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 667 | }, 668 | { 669 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 670 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 671 | }, 672 | { 673 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 674 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 675 | }, 676 | { 677 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 678 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 679 | }, 680 | { 681 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 682 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 683 | }, 684 | { 685 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 686 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 687 | }, 688 | { 689 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 690 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 691 | }, 692 | { 693 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 694 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 695 | }, 696 | { 697 | ProductGroup = 146834001AC3E56700842450 /* Products */; 698 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 699 | }, 700 | ); 701 | projectRoot = ""; 702 | targets = ( 703 | 13B07F861A680F5B00A75B9A /* myapp */, 704 | 00E356ED1AD99517003FC87E /* myappTests */, 705 | 2D02E47A1E0B4A5D006451C7 /* myapp-tvOS */, 706 | 2D02E48F1E0B4A5D006451C7 /* myapp-tvOSTests */, 707 | ); 708 | }; 709 | /* End PBXProject section */ 710 | 711 | /* Begin PBXReferenceProxy section */ 712 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 713 | isa = PBXReferenceProxy; 714 | fileType = archive.ar; 715 | path = libRCTActionSheet.a; 716 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 717 | sourceTree = BUILT_PRODUCTS_DIR; 718 | }; 719 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 720 | isa = PBXReferenceProxy; 721 | fileType = archive.ar; 722 | path = libRCTGeolocation.a; 723 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 724 | sourceTree = BUILT_PRODUCTS_DIR; 725 | }; 726 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 727 | isa = PBXReferenceProxy; 728 | fileType = archive.ar; 729 | path = libRCTImage.a; 730 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 731 | sourceTree = BUILT_PRODUCTS_DIR; 732 | }; 733 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 734 | isa = PBXReferenceProxy; 735 | fileType = archive.ar; 736 | path = libRCTNetwork.a; 737 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 738 | sourceTree = BUILT_PRODUCTS_DIR; 739 | }; 740 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 741 | isa = PBXReferenceProxy; 742 | fileType = archive.ar; 743 | path = libRCTVibration.a; 744 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 745 | sourceTree = BUILT_PRODUCTS_DIR; 746 | }; 747 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 748 | isa = PBXReferenceProxy; 749 | fileType = archive.ar; 750 | path = libRCTSettings.a; 751 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 752 | sourceTree = BUILT_PRODUCTS_DIR; 753 | }; 754 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 755 | isa = PBXReferenceProxy; 756 | fileType = archive.ar; 757 | path = libRCTWebSocket.a; 758 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 759 | sourceTree = BUILT_PRODUCTS_DIR; 760 | }; 761 | 146834041AC3E56700842450 /* libReact.a */ = { 762 | isa = PBXReferenceProxy; 763 | fileType = archive.ar; 764 | path = libReact.a; 765 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 766 | sourceTree = BUILT_PRODUCTS_DIR; 767 | }; 768 | 2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */ = { 769 | isa = PBXReferenceProxy; 770 | fileType = archive.ar; 771 | path = "libRCTBlob-tvOS.a"; 772 | remoteRef = 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */; 773 | sourceTree = BUILT_PRODUCTS_DIR; 774 | }; 775 | 2D16E6841FA4F8DC00B85C8A /* libfishhook.a */ = { 776 | isa = PBXReferenceProxy; 777 | fileType = archive.ar; 778 | path = libfishhook.a; 779 | remoteRef = 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */; 780 | sourceTree = BUILT_PRODUCTS_DIR; 781 | }; 782 | 2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */ = { 783 | isa = PBXReferenceProxy; 784 | fileType = archive.ar; 785 | path = "libfishhook-tvOS.a"; 786 | remoteRef = 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */; 787 | sourceTree = BUILT_PRODUCTS_DIR; 788 | }; 789 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = { 790 | isa = PBXReferenceProxy; 791 | fileType = archive.ar; 792 | path = "libRCTImage-tvOS.a"; 793 | remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */; 794 | sourceTree = BUILT_PRODUCTS_DIR; 795 | }; 796 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = { 797 | isa = PBXReferenceProxy; 798 | fileType = archive.ar; 799 | path = "libRCTLinking-tvOS.a"; 800 | remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */; 801 | sourceTree = BUILT_PRODUCTS_DIR; 802 | }; 803 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = { 804 | isa = PBXReferenceProxy; 805 | fileType = archive.ar; 806 | path = "libRCTNetwork-tvOS.a"; 807 | remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */; 808 | sourceTree = BUILT_PRODUCTS_DIR; 809 | }; 810 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = { 811 | isa = PBXReferenceProxy; 812 | fileType = archive.ar; 813 | path = "libRCTSettings-tvOS.a"; 814 | remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */; 815 | sourceTree = BUILT_PRODUCTS_DIR; 816 | }; 817 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = { 818 | isa = PBXReferenceProxy; 819 | fileType = archive.ar; 820 | path = "libRCTText-tvOS.a"; 821 | remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */; 822 | sourceTree = BUILT_PRODUCTS_DIR; 823 | }; 824 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = { 825 | isa = PBXReferenceProxy; 826 | fileType = archive.ar; 827 | path = "libRCTWebSocket-tvOS.a"; 828 | remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */; 829 | sourceTree = BUILT_PRODUCTS_DIR; 830 | }; 831 | 3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */ = { 832 | isa = PBXReferenceProxy; 833 | fileType = archive.ar; 834 | path = "libReact-tvOS.a"; 835 | remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */; 836 | sourceTree = BUILT_PRODUCTS_DIR; 837 | }; 838 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = { 839 | isa = PBXReferenceProxy; 840 | fileType = archive.ar; 841 | path = libyoga.a; 842 | remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */; 843 | sourceTree = BUILT_PRODUCTS_DIR; 844 | }; 845 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = { 846 | isa = PBXReferenceProxy; 847 | fileType = archive.ar; 848 | path = libyoga.a; 849 | remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */; 850 | sourceTree = BUILT_PRODUCTS_DIR; 851 | }; 852 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = { 853 | isa = PBXReferenceProxy; 854 | fileType = archive.ar; 855 | path = libcxxreact.a; 856 | remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */; 857 | sourceTree = BUILT_PRODUCTS_DIR; 858 | }; 859 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = { 860 | isa = PBXReferenceProxy; 861 | fileType = archive.ar; 862 | path = libcxxreact.a; 863 | remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */; 864 | sourceTree = BUILT_PRODUCTS_DIR; 865 | }; 866 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = { 867 | isa = PBXReferenceProxy; 868 | fileType = archive.ar; 869 | path = libjschelpers.a; 870 | remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */; 871 | sourceTree = BUILT_PRODUCTS_DIR; 872 | }; 873 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = { 874 | isa = PBXReferenceProxy; 875 | fileType = archive.ar; 876 | path = libjschelpers.a; 877 | remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */; 878 | sourceTree = BUILT_PRODUCTS_DIR; 879 | }; 880 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { 881 | isa = PBXReferenceProxy; 882 | fileType = archive.ar; 883 | path = libRCTAnimation.a; 884 | remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */; 885 | sourceTree = BUILT_PRODUCTS_DIR; 886 | }; 887 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { 888 | isa = PBXReferenceProxy; 889 | fileType = archive.ar; 890 | path = libRCTAnimation.a; 891 | remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */; 892 | sourceTree = BUILT_PRODUCTS_DIR; 893 | }; 894 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 895 | isa = PBXReferenceProxy; 896 | fileType = archive.ar; 897 | path = libRCTLinking.a; 898 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 899 | sourceTree = BUILT_PRODUCTS_DIR; 900 | }; 901 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 902 | isa = PBXReferenceProxy; 903 | fileType = archive.ar; 904 | path = libRCTText.a; 905 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 906 | sourceTree = BUILT_PRODUCTS_DIR; 907 | }; 908 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = { 909 | isa = PBXReferenceProxy; 910 | fileType = archive.ar; 911 | path = libRCTBlob.a; 912 | remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */; 913 | sourceTree = BUILT_PRODUCTS_DIR; 914 | }; 915 | /* End PBXReferenceProxy section */ 916 | 917 | /* Begin PBXResourcesBuildPhase section */ 918 | 00E356EC1AD99517003FC87E /* Resources */ = { 919 | isa = PBXResourcesBuildPhase; 920 | buildActionMask = 2147483647; 921 | files = ( 922 | ); 923 | runOnlyForDeploymentPostprocessing = 0; 924 | }; 925 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 926 | isa = PBXResourcesBuildPhase; 927 | buildActionMask = 2147483647; 928 | files = ( 929 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 930 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 931 | ); 932 | runOnlyForDeploymentPostprocessing = 0; 933 | }; 934 | 2D02E4791E0B4A5D006451C7 /* Resources */ = { 935 | isa = PBXResourcesBuildPhase; 936 | buildActionMask = 2147483647; 937 | files = ( 938 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, 939 | ); 940 | runOnlyForDeploymentPostprocessing = 0; 941 | }; 942 | 2D02E48E1E0B4A5D006451C7 /* Resources */ = { 943 | isa = PBXResourcesBuildPhase; 944 | buildActionMask = 2147483647; 945 | files = ( 946 | ); 947 | runOnlyForDeploymentPostprocessing = 0; 948 | }; 949 | /* End PBXResourcesBuildPhase section */ 950 | 951 | /* Begin PBXShellScriptBuildPhase section */ 952 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 953 | isa = PBXShellScriptBuildPhase; 954 | buildActionMask = 2147483647; 955 | files = ( 956 | ); 957 | inputPaths = ( 958 | ); 959 | name = "Bundle React Native code and images"; 960 | outputPaths = ( 961 | ); 962 | runOnlyForDeploymentPostprocessing = 0; 963 | shellPath = /bin/sh; 964 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 965 | }; 966 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { 967 | isa = PBXShellScriptBuildPhase; 968 | buildActionMask = 2147483647; 969 | files = ( 970 | ); 971 | inputPaths = ( 972 | ); 973 | name = "Bundle React Native Code And Images"; 974 | outputPaths = ( 975 | ); 976 | runOnlyForDeploymentPostprocessing = 0; 977 | shellPath = /bin/sh; 978 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 979 | }; 980 | /* End PBXShellScriptBuildPhase section */ 981 | 982 | /* Begin PBXSourcesBuildPhase section */ 983 | 00E356EA1AD99517003FC87E /* Sources */ = { 984 | isa = PBXSourcesBuildPhase; 985 | buildActionMask = 2147483647; 986 | files = ( 987 | 00E356F31AD99517003FC87E /* myappTests.m in Sources */, 988 | ); 989 | runOnlyForDeploymentPostprocessing = 0; 990 | }; 991 | 13B07F871A680F5B00A75B9A /* Sources */ = { 992 | isa = PBXSourcesBuildPhase; 993 | buildActionMask = 2147483647; 994 | files = ( 995 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 996 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 997 | ); 998 | runOnlyForDeploymentPostprocessing = 0; 999 | }; 1000 | 2D02E4771E0B4A5D006451C7 /* Sources */ = { 1001 | isa = PBXSourcesBuildPhase; 1002 | buildActionMask = 2147483647; 1003 | files = ( 1004 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, 1005 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, 1006 | ); 1007 | runOnlyForDeploymentPostprocessing = 0; 1008 | }; 1009 | 2D02E48C1E0B4A5D006451C7 /* Sources */ = { 1010 | isa = PBXSourcesBuildPhase; 1011 | buildActionMask = 2147483647; 1012 | files = ( 1013 | 2DCD954D1E0B4F2C00145EB5 /* myappTests.m in Sources */, 1014 | ); 1015 | runOnlyForDeploymentPostprocessing = 0; 1016 | }; 1017 | /* End PBXSourcesBuildPhase section */ 1018 | 1019 | /* Begin PBXTargetDependency section */ 1020 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 1021 | isa = PBXTargetDependency; 1022 | target = 13B07F861A680F5B00A75B9A /* myapp */; 1023 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 1024 | }; 1025 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { 1026 | isa = PBXTargetDependency; 1027 | target = 2D02E47A1E0B4A5D006451C7 /* myapp-tvOS */; 1028 | targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; 1029 | }; 1030 | /* End PBXTargetDependency section */ 1031 | 1032 | /* Begin PBXVariantGroup section */ 1033 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 1034 | isa = PBXVariantGroup; 1035 | children = ( 1036 | 13B07FB21A68108700A75B9A /* Base */, 1037 | ); 1038 | name = LaunchScreen.xib; 1039 | path = myapp; 1040 | sourceTree = ""; 1041 | }; 1042 | /* End PBXVariantGroup section */ 1043 | 1044 | /* Begin XCBuildConfiguration section */ 1045 | 00E356F61AD99517003FC87E /* Debug */ = { 1046 | isa = XCBuildConfiguration; 1047 | buildSettings = { 1048 | BUNDLE_LOADER = "$(TEST_HOST)"; 1049 | GCC_PREPROCESSOR_DEFINITIONS = ( 1050 | "DEBUG=1", 1051 | "$(inherited)", 1052 | ); 1053 | INFOPLIST_FILE = myappTests/Info.plist; 1054 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1055 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1056 | OTHER_LDFLAGS = ( 1057 | "-ObjC", 1058 | "-lc++", 1059 | ); 1060 | PRODUCT_NAME = "$(TARGET_NAME)"; 1061 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/myapp.app/myapp"; 1062 | }; 1063 | name = Debug; 1064 | }; 1065 | 00E356F71AD99517003FC87E /* Release */ = { 1066 | isa = XCBuildConfiguration; 1067 | buildSettings = { 1068 | BUNDLE_LOADER = "$(TEST_HOST)"; 1069 | COPY_PHASE_STRIP = NO; 1070 | INFOPLIST_FILE = myappTests/Info.plist; 1071 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1072 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1073 | OTHER_LDFLAGS = ( 1074 | "-ObjC", 1075 | "-lc++", 1076 | ); 1077 | PRODUCT_NAME = "$(TARGET_NAME)"; 1078 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/myapp.app/myapp"; 1079 | }; 1080 | name = Release; 1081 | }; 1082 | 13B07F941A680F5B00A75B9A /* Debug */ = { 1083 | isa = XCBuildConfiguration; 1084 | buildSettings = { 1085 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1086 | CURRENT_PROJECT_VERSION = 1; 1087 | DEAD_CODE_STRIPPING = NO; 1088 | INFOPLIST_FILE = myapp/Info.plist; 1089 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1090 | OTHER_LDFLAGS = ( 1091 | "$(inherited)", 1092 | "-ObjC", 1093 | "-lc++", 1094 | ); 1095 | PRODUCT_NAME = myapp; 1096 | VERSIONING_SYSTEM = "apple-generic"; 1097 | }; 1098 | name = Debug; 1099 | }; 1100 | 13B07F951A680F5B00A75B9A /* Release */ = { 1101 | isa = XCBuildConfiguration; 1102 | buildSettings = { 1103 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1104 | CURRENT_PROJECT_VERSION = 1; 1105 | INFOPLIST_FILE = myapp/Info.plist; 1106 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1107 | OTHER_LDFLAGS = ( 1108 | "$(inherited)", 1109 | "-ObjC", 1110 | "-lc++", 1111 | ); 1112 | PRODUCT_NAME = myapp; 1113 | VERSIONING_SYSTEM = "apple-generic"; 1114 | }; 1115 | name = Release; 1116 | }; 1117 | 2D02E4971E0B4A5E006451C7 /* Debug */ = { 1118 | isa = XCBuildConfiguration; 1119 | buildSettings = { 1120 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 1121 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 1122 | CLANG_ANALYZER_NONNULL = YES; 1123 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1124 | CLANG_WARN_INFINITE_RECURSION = YES; 1125 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1126 | DEBUG_INFORMATION_FORMAT = dwarf; 1127 | ENABLE_TESTABILITY = YES; 1128 | GCC_NO_COMMON_BLOCKS = YES; 1129 | INFOPLIST_FILE = "myapp-tvOS/Info.plist"; 1130 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1131 | OTHER_LDFLAGS = ( 1132 | "-ObjC", 1133 | "-lc++", 1134 | ); 1135 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.myapp-tvOS"; 1136 | PRODUCT_NAME = "$(TARGET_NAME)"; 1137 | SDKROOT = appletvos; 1138 | TARGETED_DEVICE_FAMILY = 3; 1139 | TVOS_DEPLOYMENT_TARGET = 9.2; 1140 | }; 1141 | name = Debug; 1142 | }; 1143 | 2D02E4981E0B4A5E006451C7 /* Release */ = { 1144 | isa = XCBuildConfiguration; 1145 | buildSettings = { 1146 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 1147 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 1148 | CLANG_ANALYZER_NONNULL = YES; 1149 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1150 | CLANG_WARN_INFINITE_RECURSION = YES; 1151 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1152 | COPY_PHASE_STRIP = NO; 1153 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1154 | GCC_NO_COMMON_BLOCKS = YES; 1155 | INFOPLIST_FILE = "myapp-tvOS/Info.plist"; 1156 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1157 | OTHER_LDFLAGS = ( 1158 | "-ObjC", 1159 | "-lc++", 1160 | ); 1161 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.myapp-tvOS"; 1162 | PRODUCT_NAME = "$(TARGET_NAME)"; 1163 | SDKROOT = appletvos; 1164 | TARGETED_DEVICE_FAMILY = 3; 1165 | TVOS_DEPLOYMENT_TARGET = 9.2; 1166 | }; 1167 | name = Release; 1168 | }; 1169 | 2D02E4991E0B4A5E006451C7 /* Debug */ = { 1170 | isa = XCBuildConfiguration; 1171 | buildSettings = { 1172 | BUNDLE_LOADER = "$(TEST_HOST)"; 1173 | CLANG_ANALYZER_NONNULL = YES; 1174 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1175 | CLANG_WARN_INFINITE_RECURSION = YES; 1176 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1177 | DEBUG_INFORMATION_FORMAT = dwarf; 1178 | ENABLE_TESTABILITY = YES; 1179 | GCC_NO_COMMON_BLOCKS = YES; 1180 | INFOPLIST_FILE = "myapp-tvOSTests/Info.plist"; 1181 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1182 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.myapp-tvOSTests"; 1183 | PRODUCT_NAME = "$(TARGET_NAME)"; 1184 | SDKROOT = appletvos; 1185 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/myapp-tvOS.app/myapp-tvOS"; 1186 | TVOS_DEPLOYMENT_TARGET = 10.1; 1187 | }; 1188 | name = Debug; 1189 | }; 1190 | 2D02E49A1E0B4A5E006451C7 /* Release */ = { 1191 | isa = XCBuildConfiguration; 1192 | buildSettings = { 1193 | BUNDLE_LOADER = "$(TEST_HOST)"; 1194 | CLANG_ANALYZER_NONNULL = YES; 1195 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1196 | CLANG_WARN_INFINITE_RECURSION = YES; 1197 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1198 | COPY_PHASE_STRIP = NO; 1199 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1200 | GCC_NO_COMMON_BLOCKS = YES; 1201 | INFOPLIST_FILE = "myapp-tvOSTests/Info.plist"; 1202 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1203 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.myapp-tvOSTests"; 1204 | PRODUCT_NAME = "$(TARGET_NAME)"; 1205 | SDKROOT = appletvos; 1206 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/myapp-tvOS.app/myapp-tvOS"; 1207 | TVOS_DEPLOYMENT_TARGET = 10.1; 1208 | }; 1209 | name = Release; 1210 | }; 1211 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 1212 | isa = XCBuildConfiguration; 1213 | buildSettings = { 1214 | ALWAYS_SEARCH_USER_PATHS = NO; 1215 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 1216 | CLANG_CXX_LIBRARY = "libc++"; 1217 | CLANG_ENABLE_MODULES = YES; 1218 | CLANG_ENABLE_OBJC_ARC = YES; 1219 | CLANG_WARN_BOOL_CONVERSION = YES; 1220 | CLANG_WARN_CONSTANT_CONVERSION = YES; 1221 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1222 | CLANG_WARN_EMPTY_BODY = YES; 1223 | CLANG_WARN_ENUM_CONVERSION = YES; 1224 | CLANG_WARN_INT_CONVERSION = YES; 1225 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1226 | CLANG_WARN_UNREACHABLE_CODE = YES; 1227 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1228 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1229 | COPY_PHASE_STRIP = NO; 1230 | ENABLE_STRICT_OBJC_MSGSEND = YES; 1231 | GCC_C_LANGUAGE_STANDARD = gnu99; 1232 | GCC_DYNAMIC_NO_PIC = NO; 1233 | GCC_OPTIMIZATION_LEVEL = 0; 1234 | GCC_PREPROCESSOR_DEFINITIONS = ( 1235 | "DEBUG=1", 1236 | "$(inherited)", 1237 | ); 1238 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 1239 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1240 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1241 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1242 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1243 | GCC_WARN_UNUSED_FUNCTION = YES; 1244 | GCC_WARN_UNUSED_VARIABLE = YES; 1245 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1246 | MTL_ENABLE_DEBUG_INFO = YES; 1247 | ONLY_ACTIVE_ARCH = YES; 1248 | SDKROOT = iphoneos; 1249 | }; 1250 | name = Debug; 1251 | }; 1252 | 83CBBA211A601CBA00E9B192 /* Release */ = { 1253 | isa = XCBuildConfiguration; 1254 | buildSettings = { 1255 | ALWAYS_SEARCH_USER_PATHS = NO; 1256 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 1257 | CLANG_CXX_LIBRARY = "libc++"; 1258 | CLANG_ENABLE_MODULES = YES; 1259 | CLANG_ENABLE_OBJC_ARC = YES; 1260 | CLANG_WARN_BOOL_CONVERSION = YES; 1261 | CLANG_WARN_CONSTANT_CONVERSION = YES; 1262 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1263 | CLANG_WARN_EMPTY_BODY = YES; 1264 | CLANG_WARN_ENUM_CONVERSION = YES; 1265 | CLANG_WARN_INT_CONVERSION = YES; 1266 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1267 | CLANG_WARN_UNREACHABLE_CODE = YES; 1268 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1269 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1270 | COPY_PHASE_STRIP = YES; 1271 | ENABLE_NS_ASSERTIONS = NO; 1272 | ENABLE_STRICT_OBJC_MSGSEND = YES; 1273 | GCC_C_LANGUAGE_STANDARD = gnu99; 1274 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1275 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1276 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1277 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1278 | GCC_WARN_UNUSED_FUNCTION = YES; 1279 | GCC_WARN_UNUSED_VARIABLE = YES; 1280 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1281 | MTL_ENABLE_DEBUG_INFO = NO; 1282 | SDKROOT = iphoneos; 1283 | VALIDATE_PRODUCT = YES; 1284 | }; 1285 | name = Release; 1286 | }; 1287 | /* End XCBuildConfiguration section */ 1288 | 1289 | /* Begin XCConfigurationList section */ 1290 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "myappTests" */ = { 1291 | isa = XCConfigurationList; 1292 | buildConfigurations = ( 1293 | 00E356F61AD99517003FC87E /* Debug */, 1294 | 00E356F71AD99517003FC87E /* Release */, 1295 | ); 1296 | defaultConfigurationIsVisible = 0; 1297 | defaultConfigurationName = Release; 1298 | }; 1299 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "myapp" */ = { 1300 | isa = XCConfigurationList; 1301 | buildConfigurations = ( 1302 | 13B07F941A680F5B00A75B9A /* Debug */, 1303 | 13B07F951A680F5B00A75B9A /* Release */, 1304 | ); 1305 | defaultConfigurationIsVisible = 0; 1306 | defaultConfigurationName = Release; 1307 | }; 1308 | 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "myapp-tvOS" */ = { 1309 | isa = XCConfigurationList; 1310 | buildConfigurations = ( 1311 | 2D02E4971E0B4A5E006451C7 /* Debug */, 1312 | 2D02E4981E0B4A5E006451C7 /* Release */, 1313 | ); 1314 | defaultConfigurationIsVisible = 0; 1315 | defaultConfigurationName = Release; 1316 | }; 1317 | 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "myapp-tvOSTests" */ = { 1318 | isa = XCConfigurationList; 1319 | buildConfigurations = ( 1320 | 2D02E4991E0B4A5E006451C7 /* Debug */, 1321 | 2D02E49A1E0B4A5E006451C7 /* Release */, 1322 | ); 1323 | defaultConfigurationIsVisible = 0; 1324 | defaultConfigurationName = Release; 1325 | }; 1326 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "myapp" */ = { 1327 | isa = XCConfigurationList; 1328 | buildConfigurations = ( 1329 | 83CBBA201A601CBA00E9B192 /* Debug */, 1330 | 83CBBA211A601CBA00E9B192 /* Release */, 1331 | ); 1332 | defaultConfigurationIsVisible = 0; 1333 | defaultConfigurationName = Release; 1334 | }; 1335 | /* End XCConfigurationList section */ 1336 | }; 1337 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 1338 | } 1339 | -------------------------------------------------------------------------------- /ios/myapp.xcodeproj/xcshareddata/xcschemes/myapp-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /ios/myapp.xcodeproj/xcshareddata/xcschemes/myapp.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /ios/myapp/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/myapp/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "AppDelegate.h" 11 | 12 | #import 13 | #import 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | NSURL *jsCodeLocation; 20 | 21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 22 | 23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 24 | moduleName:@"myapp" 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 | -------------------------------------------------------------------------------- /ios/myapp/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /ios/myapp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /ios/myapp/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/myapp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | myapp 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UIViewControllerBasedStatusBarAppearance 40 | 41 | NSLocationWhenInUseUsageDescription 42 | 43 | NSAppTransportSecurity 44 | 45 | 46 | NSExceptionDomains 47 | 48 | localhost 49 | 50 | NSExceptionAllowsInsecureHTTPLoads 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /ios/myapp/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ios/myappTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/myappTests/myappTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import 14 | #import 15 | 16 | #define TIMEOUT_SECONDS 600 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface myappTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation myappTests 24 | 25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 26 | { 27 | if (test(view)) { 28 | return YES; 29 | } 30 | for (UIView *subview in [view subviews]) { 31 | if ([self findSubviewInView:subview matching:test]) { 32 | return YES; 33 | } 34 | } 35 | return NO; 36 | } 37 | 38 | - (void)testRendersWelcomeScreen 39 | { 40 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 42 | BOOL foundElement = NO; 43 | 44 | __block NSString *redboxError = nil; 45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 46 | if (level >= RCTLogLevelError) { 47 | redboxError = message; 48 | } 49 | }); 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | RCTSetLogFunction(RCTDefaultLogFunction); 64 | 65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 67 | } 68 | 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "myapp", 3 | "version": "0.0.1", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@babel/code-frame": { 8 | "version": "7.0.0-beta.44", 9 | "resolved": "http://registry.npm.taobao.org/@babel/code-frame/download/@babel/code-frame-7.0.0-beta.44.tgz", 10 | "integrity": "sha1-KgJkM2jegJFhYr5whlyXd08629k=", 11 | "requires": { 12 | "@babel/highlight": "7.0.0-beta.44" 13 | } 14 | }, 15 | "@babel/generator": { 16 | "version": "7.0.0-beta.44", 17 | "resolved": "http://registry.npm.taobao.org/@babel/generator/download/@babel/generator-7.0.0-beta.44.tgz", 18 | "integrity": "sha1-x+Z7m1KEr89pswm1DX038+UDPUI=", 19 | "requires": { 20 | "@babel/types": "7.0.0-beta.44", 21 | "jsesc": "2.5.1", 22 | "lodash": "4.17.5", 23 | "source-map": "0.5.7", 24 | "trim-right": "1.0.1" 25 | } 26 | }, 27 | "@babel/helper-function-name": { 28 | "version": "7.0.0-beta.44", 29 | "resolved": "http://registry.npm.taobao.org/@babel/helper-function-name/download/@babel/helper-function-name-7.0.0-beta.44.tgz", 30 | "integrity": "sha1-4YVSqq4iMRAKbkheA4VLw1MtRN0=", 31 | "requires": { 32 | "@babel/helper-get-function-arity": "7.0.0-beta.44", 33 | "@babel/template": "7.0.0-beta.44", 34 | "@babel/types": "7.0.0-beta.44" 35 | } 36 | }, 37 | "@babel/helper-get-function-arity": { 38 | "version": "7.0.0-beta.44", 39 | "resolved": "http://registry.npm.taobao.org/@babel/helper-get-function-arity/download/@babel/helper-get-function-arity-7.0.0-beta.44.tgz", 40 | "integrity": "sha1-0Dym3SufewseazLFbHKDYUDbOhU=", 41 | "requires": { 42 | "@babel/types": "7.0.0-beta.44" 43 | } 44 | }, 45 | "@babel/helper-split-export-declaration": { 46 | "version": "7.0.0-beta.44", 47 | "resolved": "http://registry.npm.taobao.org/@babel/helper-split-export-declaration/download/@babel/helper-split-export-declaration-7.0.0-beta.44.tgz", 48 | "integrity": "sha1-wLNRc14PvLOCLIrY205YOwXr2dw=", 49 | "requires": { 50 | "@babel/types": "7.0.0-beta.44" 51 | } 52 | }, 53 | "@babel/highlight": { 54 | "version": "7.0.0-beta.44", 55 | "resolved": "http://registry.npm.taobao.org/@babel/highlight/download/@babel/highlight-7.0.0-beta.44.tgz", 56 | "integrity": "sha1-GMlM5UORaoBVPtzc9oGJCyAHR9U=", 57 | "requires": { 58 | "chalk": "2.3.2", 59 | "esutils": "2.0.2", 60 | "js-tokens": "3.0.2" 61 | } 62 | }, 63 | "@babel/template": { 64 | "version": "7.0.0-beta.44", 65 | "resolved": "http://registry.npm.taobao.org/@babel/template/download/@babel/template-7.0.0-beta.44.tgz", 66 | "integrity": "sha1-+IMvT9zuXVm/UV5ZX8UQbFKbOU8=", 67 | "requires": { 68 | "@babel/code-frame": "7.0.0-beta.44", 69 | "@babel/types": "7.0.0-beta.44", 70 | "babylon": "7.0.0-beta.44", 71 | "lodash": "4.17.5" 72 | } 73 | }, 74 | "@babel/traverse": { 75 | "version": "7.0.0-beta.44", 76 | "resolved": "http://registry.npm.taobao.org/@babel/traverse/download/@babel/traverse-7.0.0-beta.44.tgz", 77 | "integrity": "sha1-qXCixFR3rRgBfi5GWgYG/u4NKWY=", 78 | "requires": { 79 | "@babel/code-frame": "7.0.0-beta.44", 80 | "@babel/generator": "7.0.0-beta.44", 81 | "@babel/helper-function-name": "7.0.0-beta.44", 82 | "@babel/helper-split-export-declaration": "7.0.0-beta.44", 83 | "@babel/types": "7.0.0-beta.44", 84 | "babylon": "7.0.0-beta.44", 85 | "debug": "3.1.0", 86 | "globals": "11.4.0", 87 | "invariant": "2.2.4", 88 | "lodash": "4.17.5" 89 | } 90 | }, 91 | "@babel/types": { 92 | "version": "7.0.0-beta.44", 93 | "resolved": "http://registry.npm.taobao.org/@babel/types/download/@babel/types-7.0.0-beta.44.tgz", 94 | "integrity": "sha1-axsWRZH3fewKA0KsqZXy0Eazp1c=", 95 | "requires": { 96 | "esutils": "2.0.2", 97 | "lodash": "4.17.5", 98 | "to-fast-properties": "2.0.0" 99 | } 100 | }, 101 | "ansi-styles": { 102 | "version": "3.2.1", 103 | "resolved": "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", 104 | "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", 105 | "requires": { 106 | "color-convert": "1.9.1" 107 | } 108 | }, 109 | "babel-eslint": { 110 | "version": "8.2.2", 111 | "resolved": "http://registry.npm.taobao.org/babel-eslint/download/babel-eslint-8.2.2.tgz", 112 | "integrity": "sha1-EQInM1TG8LKbTqKKZfl9EiKWtos=", 113 | "requires": { 114 | "@babel/code-frame": "7.0.0-beta.44", 115 | "@babel/traverse": "7.0.0-beta.44", 116 | "@babel/types": "7.0.0-beta.44", 117 | "babylon": "7.0.0-beta.44", 118 | "eslint-scope": "3.7.1", 119 | "eslint-visitor-keys": "1.0.0" 120 | } 121 | }, 122 | "babylon": { 123 | "version": "7.0.0-beta.44", 124 | "resolved": "http://registry.npm.taobao.org/babylon/download/babylon-7.0.0-beta.44.tgz", 125 | "integrity": "sha1-iRWeFebjDFCW4i1zjYwK+KDoyh0=" 126 | }, 127 | "chalk": { 128 | "version": "2.3.2", 129 | "resolved": "http://registry.npm.taobao.org/chalk/download/chalk-2.3.2.tgz", 130 | "integrity": "sha1-JQ3JawdJG/1gHmSNZt319gx6XGU=", 131 | "requires": { 132 | "ansi-styles": "3.2.1", 133 | "escape-string-regexp": "1.0.5", 134 | "supports-color": "5.3.0" 135 | } 136 | }, 137 | "color-convert": { 138 | "version": "1.9.1", 139 | "resolved": "http://registry.npm.taobao.org/color-convert/download/color-convert-1.9.1.tgz", 140 | "integrity": "sha1-wSYRB66y8pTr/+ye2eytUppgl+0=", 141 | "requires": { 142 | "color-name": "1.1.3" 143 | } 144 | }, 145 | "color-name": { 146 | "version": "1.1.3", 147 | "resolved": "http://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz", 148 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" 149 | }, 150 | "debug": { 151 | "version": "3.1.0", 152 | "resolved": "http://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz", 153 | "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=", 154 | "requires": { 155 | "ms": "2.0.0" 156 | } 157 | }, 158 | "escape-string-regexp": { 159 | "version": "1.0.5", 160 | "resolved": "http://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz", 161 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" 162 | }, 163 | "eslint-scope": { 164 | "version": "3.7.1", 165 | "resolved": "http://registry.npm.taobao.org/eslint-scope/download/eslint-scope-3.7.1.tgz", 166 | "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", 167 | "requires": { 168 | "esrecurse": "4.2.1", 169 | "estraverse": "4.2.0" 170 | } 171 | }, 172 | "eslint-visitor-keys": { 173 | "version": "1.0.0", 174 | "resolved": "http://registry.npm.taobao.org/eslint-visitor-keys/download/eslint-visitor-keys-1.0.0.tgz", 175 | "integrity": "sha1-PzGA+y4pEBdxastMnW1bXDSmqB0=" 176 | }, 177 | "esrecurse": { 178 | "version": "4.2.1", 179 | "resolved": "http://registry.npm.taobao.org/esrecurse/download/esrecurse-4.2.1.tgz", 180 | "integrity": "sha1-AHo7n9vCs7uH5IeeoZyS/b05Qs8=", 181 | "requires": { 182 | "estraverse": "4.2.0" 183 | } 184 | }, 185 | "estraverse": { 186 | "version": "4.2.0", 187 | "resolved": "http://registry.npm.taobao.org/estraverse/download/estraverse-4.2.0.tgz", 188 | "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" 189 | }, 190 | "esutils": { 191 | "version": "2.0.2", 192 | "resolved": "http://registry.npm.taobao.org/esutils/download/esutils-2.0.2.tgz", 193 | "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" 194 | }, 195 | "globals": { 196 | "version": "11.4.0", 197 | "resolved": "http://registry.npm.taobao.org/globals/download/globals-11.4.0.tgz", 198 | "integrity": "sha1-uFx5M0lWHBYHajwTVJI4onlF8bw=" 199 | }, 200 | "has-flag": { 201 | "version": "3.0.0", 202 | "resolved": "http://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz", 203 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" 204 | }, 205 | "invariant": { 206 | "version": "2.2.4", 207 | "resolved": "http://registry.npm.taobao.org/invariant/download/invariant-2.2.4.tgz", 208 | "integrity": "sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=", 209 | "requires": { 210 | "loose-envify": "1.3.1" 211 | } 212 | }, 213 | "js-tokens": { 214 | "version": "3.0.2", 215 | "resolved": "http://registry.npm.taobao.org/js-tokens/download/js-tokens-3.0.2.tgz", 216 | "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" 217 | }, 218 | "jsesc": { 219 | "version": "2.5.1", 220 | "resolved": "http://registry.npm.taobao.org/jsesc/download/jsesc-2.5.1.tgz", 221 | "integrity": "sha1-5CGiqOINawgZ3yiQj3glJrlt0f4=" 222 | }, 223 | "lodash": { 224 | "version": "4.17.5", 225 | "resolved": "http://registry.npm.taobao.org/lodash/download/lodash-4.17.5.tgz", 226 | "integrity": "sha1-maktZcAnLevoyWtgV7yPv6O+1RE=" 227 | }, 228 | "loose-envify": { 229 | "version": "1.3.1", 230 | "resolved": "http://registry.npm.taobao.org/loose-envify/download/loose-envify-1.3.1.tgz", 231 | "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", 232 | "requires": { 233 | "js-tokens": "3.0.2" 234 | } 235 | }, 236 | "ms": { 237 | "version": "2.0.0", 238 | "resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz", 239 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 240 | }, 241 | "react-native-actionsheet": { 242 | "version": "2.4.0", 243 | "resolved": "http://registry.npm.taobao.org/react-native-actionsheet/download/react-native-actionsheet-2.4.0.tgz", 244 | "integrity": "sha1-MlptpNPuv5ZS5pD1HO67VGSRWCo=", 245 | "requires": { 246 | "babel-eslint": "8.2.2" 247 | } 248 | }, 249 | "source-map": { 250 | "version": "0.5.7", 251 | "resolved": "http://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz", 252 | "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" 253 | }, 254 | "supports-color": { 255 | "version": "5.3.0", 256 | "resolved": "http://registry.npm.taobao.org/supports-color/download/supports-color-5.3.0.tgz", 257 | "integrity": "sha1-WySsFduA+pJ89SJ6SjP9PEx2dsA=", 258 | "requires": { 259 | "has-flag": "3.0.0" 260 | } 261 | }, 262 | "to-fast-properties": { 263 | "version": "2.0.0", 264 | "resolved": "http://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-2.0.0.tgz", 265 | "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" 266 | }, 267 | "trim-right": { 268 | "version": "1.0.1", 269 | "resolved": "http://registry.npm.taobao.org/trim-right/download/trim-right-1.0.1.tgz", 270 | "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" 271 | } 272 | } 273 | } 274 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "myapp", 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 | "md5": "^2.2.1", 11 | "native-base": "^2.4.1", 12 | "native-echarts": "^0.4.0", 13 | "react": "16.3.0-alpha.1", 14 | "react-lazyload": "^2.3.0", 15 | "react-native": "0.54.3", 16 | "react-native-actionsheet": "^2.4.0", 17 | "react-native-modal": "^5.4.0", 18 | "react-native-swiper": "^1.5.13", 19 | "react-native-vector-icons": "^4.5.0", 20 | "react-navigation": "^1.5.8", 21 | "react-redux": "^5.0.7", 22 | "redux": "^3.7.2", 23 | "redux-actions": "^2.3.0", 24 | "redux-promise": "^0.5.3", 25 | "redux-thunk": "^2.2.0" 26 | }, 27 | "devDependencies": { 28 | "babel-jest": "22.4.3", 29 | "babel-preset-react-native": "4.0.0", 30 | "jest": "22.4.3", 31 | "react-test-renderer": "16.3.0-alpha.1" 32 | }, 33 | "jest": { 34 | "preset": "react-native" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /router.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Image } from 'react-native'; 3 | // 路由导航 4 | import {StackNavigator, TabBarTop, TabNavigator} from "react-navigation"; 5 | import Head from './src/common/Head' 6 | import Swiper from './src/common/swiper' 7 | 8 | import Slider from './src/slider' 9 | import Login from './src/login/Login' 10 | import Home from "./src/home/home"; 11 | 12 | import Page from "./src/page/page"; 13 | import Loadmore from './src/page/loadmore/loadmore' 14 | 15 | import Me from "./src/me/me"; 16 | import CardList from './src/me/CardList/cardList' 17 | import CheckBox from './src/me/CheckBox/CheckBox' 18 | import FABS from './src/me/FABS/FABS' 19 | import FooterTab from './src/me/FooterTab/FooterTab' 20 | import Icons from './src/me/Icons/Icons' 21 | import ListDivider from './src/me/ListDivider/ListDivider' 22 | import ListIcon from './src/me/ListIcon/ListIcon' 23 | import Search from './src/me/Search/Search' 24 | import Spinner from './src/me/Spinner/Spinner' 25 | import Swipeable from './src/me/Swipeable/Swipeable' 26 | import Echarts from './src/me/Echarts/Echarts' 27 | import Modal from './src/me/Modal/Modal' 28 | import Form from './src/me/Form/form' 29 | import DialogSelected from './src/me/DialogSelected/DialogSelected' 30 | const TabRouteConfigs = { // 表示各个页面路由配置,让导航器知道需要导航的路由对应的页面 31 | Home: { // 路由名称 32 | screen: Home, // 对应的路由页面 33 | navigationOptions: ({navigation}) => ({ 34 | // tabBarLabel: '首页', 35 | title: '首页', 36 | tabBarIcon: ({ focused, tintColor }) => ( 37 | 41 | ) 42 | }), 43 | }, 44 | News: { 45 | screen: Page, 46 | navigationOptions:({ navigation }) => ({ // 指定路由页面的配置选项 47 | // tabBarLabel: '新闻', // 表示tab的标题 48 | title: '新闻', // 可用作头部标题 headerTitle ,或者Tab标题 tabBarLabel 49 | tabBarIcon: ({ focused, tintColor }) => ( 50 | 54 | ) 55 | }), 56 | } 57 | , 58 | My: { 59 | screen: Me, 60 | navigationOptions: { 61 | // tabBarLabel: '我的', 62 | title: '我的', 63 | tabBarIcon: ({ focused, tintColor }) => ( 64 | 68 | ), 69 | }, 70 | }, 71 | }; 72 | const TabNavigatorConfigs = { 73 | initialRouteName: 'Home', // 初始显示的Tab对应的页面路由名称 74 | tabBarComponent: TabBarTop, // Tab选项卡组件,有 TabBarBottom 和 TabBarTop 两个值,在iOS中默认为 TabBarBottom ,在Android中默认为 TabBarTop 。 75 | tabBarPosition: 'bottom', // 设置选项卡的位置,在顶部或是底部,有'top'与'bottom'可选 76 | lazy: true, // 是否懒加载页面 77 | tabBarOptions: { 78 | showIcon: true, 79 | iconStyle: { //图标样式 80 | width:20, 81 | height: 22, 82 | }, 83 | style: { 84 | backgroundColor: '#3555ff', 85 | height: 58, //tab高度 86 | }, 87 | labelStyle: { 88 | fontSize: 12, // 文字大小 89 | }, 90 | indicatorStyle: { 91 | height: 0 // 如TabBar下面显示有一条线,可以设高度为0后隐藏 92 | }, 93 | }, // 在属性TabBarBottom与TabBarTop中有所不同 94 | showIcon: true 95 | }; 96 | const Tab = TabNavigator(TabRouteConfigs, TabNavigatorConfigs); 97 | const StackRouteConfigs = { 98 | Slider: { 99 | screen: Slider, 100 | }, 101 | Tab: { 102 | screen: Tab, 103 | }, 104 | Login: { 105 | screen: Login 106 | }, 107 | Swiper: { 108 | screen: Swiper, 109 | }, 110 | CardList: { 111 | screen: CardList, 112 | }, 113 | CheckBox: { 114 | screen: CheckBox, 115 | }, 116 | FABS: { 117 | screen: FABS, 118 | }, 119 | FooterTab: { 120 | screen: FooterTab, 121 | }, 122 | Icons: { 123 | screen: Icons, 124 | }, 125 | ListDivider: { 126 | screen: ListDivider, 127 | }, 128 | ListIcon: { 129 | screen: ListIcon, 130 | }, 131 | Search: { 132 | screen: Search, 133 | }, 134 | Spinner: { 135 | screen: Spinner, 136 | }, 137 | Swipeable: { 138 | screen: Swipeable, 139 | }, 140 | Echarts: { 141 | screen: Echarts, 142 | }, 143 | Loadmore: { 144 | screen: Loadmore, 145 | }, 146 | Modal: { 147 | screen: Modal, 148 | }, 149 | DialogSelected: { 150 | screen: DialogSelected, 151 | }, 152 | Form: { 153 | screen: Form, 154 | }, 155 | Head: { 156 | screen: Head, 157 | } 158 | }; 159 | const StackNavigatorConfigs = { // 表示导航器的配置,包括导航器的初始页面、各个页面之间导航的动画、页面的配置选项等等 160 | initialRouteName: 'Slider', 161 | navigationOptions: { 162 | header: null, //隐藏导航栏 163 | // title: 'My First React Native App!', 164 | // headerStyle: {backgroundColor: '#5da8ff'}, // 设置导航头部样式 165 | // headerTitleStyle: {color: '#333333'}, // 设置导航头部标题样式 166 | cardStack: { 167 | gesturesEnabled: true 168 | }, 169 | }, 170 | headMode: 'screen' 171 | }; 172 | // StackNavigator 导航组件,用来实现各个界面跳转 173 | const Navigator = StackNavigator(StackRouteConfigs, StackNavigatorConfigs); 174 | export default { Navigator }; -------------------------------------------------------------------------------- /src/common/Head.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Header, Left, Body, Right, Button, Icon, Title } from 'native-base'; 3 | export default class Head extends Component { 4 | passMenthod = () =>{ 5 | this.props.pushDetails() 6 | } 7 | render() { 8 | return ( 9 |
10 | 11 | 16 | 17 | 18 | {this.props.title} 19 | 20 | 21 | 24 | 25 |
26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/common/swiper.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Image } from 'react-native'; 3 | import { Container, Header, View, DeckSwiper, Card, CardItem, Thumbnail, Text, Left, Body, Icon } from 'native-base'; 4 | import Head from './Head' 5 | const cards = [ 6 | { 7 | text: 'Card One', 8 | name: 'One', 9 | image: require('../imgs/home_page_header_icon.png'), 10 | }, 11 | { 12 | text: 'Card Two', 13 | name: 'Two', 14 | image: require('../imgs/home_page_header_icon.png'), 15 | }, 16 | { 17 | text: 'Card Three', 18 | name: 'Three', 19 | image: require('../imgs/home_page_header_icon.png'), 20 | }, 21 | ]; 22 | export default class Swiper extends Component { 23 | componentDidMount() { 24 | // alert(this.props.navigation.state.params.id); 25 | } 26 | render() { 27 | return ( 28 | 29 | 30 | {this.props.navigation.goBack();}}/> 31 | 34 | 35 | 36 | 37 | 38 | 39 | {item.text}/我是第{this.props.navigation.state.params.id+'1'}条数据的详情页面 40 | NativeBase 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | {item.name} 50 | 51 | 52 | } 53 | /> 54 | 55 | 56 | ); 57 | } 58 | } -------------------------------------------------------------------------------- /src/home/home.js: -------------------------------------------------------------------------------- 1 | import React, { 2 | Component, 3 | } from 'react'; 4 | import Head from '../common/Head' 5 | import { Container, Header, Content, List, ListItem, Left, Body, Right, Thumbnail, Spinner } from 'native-base'; 6 | import { 7 | Image, 8 | StyleSheet, 9 | Text, 10 | View, 11 | ListView, 12 | RefreshControl 13 | } from 'react-native'; 14 | import { connect } from "react-redux"; 15 | 16 | const styles = StyleSheet.create({ 17 | container: { 18 | flex: 1, 19 | marginBottom: 20, 20 | flexDirection: 'row', 21 | justifyContent: 'center', 22 | alignItems: 'center', 23 | }, 24 | rightContainer: { 25 | flex: 1, 26 | }, 27 | titl: { 28 | justifyContent: 'center', 29 | textAlignVertical: 'center', 30 | fontSize: 18, 31 | color: '#fff', 32 | }, 33 | title: { 34 | fontSize: 15, 35 | marginBottom: 8, 36 | textAlign: 'left', 37 | }, 38 | item: { 39 | 40 | }, 41 | year: { 42 | textAlign: 'center', 43 | }, 44 | thumbnail: { 45 | width: 80, 46 | height: 81, 47 | }, 48 | listView: { 49 | paddingTop: 20, 50 | marginBottom: 60, 51 | backgroundColor: '#F5FCFF', 52 | }, 53 | footer: { 54 | height: 40, 55 | alignItems: 'center', 56 | flexDirection: 'row', 57 | justifyContent: 'center', 58 | }, 59 | text: { 60 | textAlignVertical: 'center', 61 | color: '#333', 62 | }, 63 | }); 64 | 65 | 66 | const page = 1; 67 | const total =10; 68 | const REQUEST_URL = `https://route.showapi.com/181-1?showapi_appid=30603&showapi_sign=98960666afeb4992ae91971d13494090&page=${page}&num=20`; 69 | const opts = { 70 | method: 'GET', 71 | } 72 | var tempArray = []; 73 | class home extends Component 74 | { 75 | constructor(props) { 76 | super(props); 77 | this.state = { 78 | dataSource: new ListView.DataSource({ 79 | rowHasChanged: (row1, row2) => row1 !== row2, 80 | }), 81 | loaded: false, 82 | isRefreshing: false, 83 | noPage: 0, 84 | 85 | }; 86 | } 87 | componentDidMount(){ 88 | this.fetchData(); 89 | } 90 | 91 | fetchData() { 92 | fetch(REQUEST_URL, opts) 93 | .then((response) => response.json()) 94 | .then((responseData) => { 95 | tempArray= responseData.showapi_res_body.newslist; 96 | this.setState({ 97 | dataSource: this.state.dataSource.cloneWithRows(responseData.showapi_res_body.newslist), 98 | loaded: true, 99 | }); 100 | }).catch((err)=>{ 101 | alert(err); 102 | }) 103 | .done(); 104 | } 105 | render() { 106 | if (!this.state.loaded) { 107 | return this.renderLoadingView(); 108 | } 109 | return ( 110 | 111 |
112 | 首页 113 |
114 | 125 | } 126 | dataSource={this.state.dataSource} 127 | renderRow={this.renderMovie.bind(this)} 128 | renderFooter={this._rendFooter.bind(this)} 129 | onEndReached={this._EndReached.bind(this)} 130 | onEndReachedThreshold={20} 131 | style={styles.listView} 132 | /> 133 |
134 | ); 135 | } 136 | _onRefresh() { 137 | if(page>total){ 138 | alert('没有更多数据啦!') 139 | }else{ 140 | if(this.state.loaded){ 141 | ++page; 142 | fetch(`https://route.showapi.com/181-1?showapi_appid=30603&showapi_sign=98960666afeb4992ae91971d13494090&page=${page}&num=20`, opts) 143 | .then((response) => response.json()) 144 | .then((responseData) => { 145 | tempArray = responseData.showapi_res_body.newslist.concat(tempArray); 146 | this.setState({ 147 | dataSource: this.state.dataSource.cloneWithRows(tempArray), 148 | loaded: true, 149 | }); 150 | }).catch((err)=>{ 151 | alert(err); 152 | }) 153 | .done(); 154 | } 155 | } 156 | } 157 | _EndReached() { 158 | if(page>total){ 159 | this.setState({ 160 | noPage : 1, 161 | }) 162 | }else{ 163 | if(this.state.loaded){ 164 | page ++; 165 | fetch(`https://route.showapi.com/181-1?showapi_appid=30603&showapi_sign=98960666afeb4992ae91971d13494090&page=${page}&num=20`, opts) 166 | .then((response) => response.json()) 167 | .then((responseData) => { 168 | tempArray = tempArray.concat(responseData.showapi_res_body.newslist); 169 | setTimeout(() => { 170 | this.setState({ 171 | dataSource: this.state.dataSource.cloneWithRows(tempArray), 172 | loaded: true, 173 | }); 174 | }, 2000) 175 | 176 | }).catch((err)=>{ 177 | alert(err); 178 | }) 179 | .done(); 180 | } 181 | 182 | } 183 | } 184 | _rendFooter() { 185 | if(this.state.noPage !== 1){ 186 | return ( 187 | 188 | ) 189 | } 190 | 191 | if(this.state.noPage === 1){ 192 | return ( 193 | 没有更多数据啦! 194 | ) 195 | } 196 | 197 | } 198 | renderLoadingView() 199 | { 200 | return ( 201 | 202 | 203 | ); 204 | } 205 | 206 | renderMovie(item,sectionId, index) { 207 | 208 | return ( 209 | { 214 | const { navigate } =this.props.navigation; 215 | navigate('Swiper',{id:index}); 216 | } 217 | } 218 | > 219 | 220 | 221 | 222 | 223 | {item.description} 224 | {item.title} 225 | 226 | 227 | {item.ctime} 228 | 229 | 230 | ); 231 | } 232 | }; 233 | const mapStateToProps = (state) => { 234 | console.log(state) 235 | return { 236 | value: state.news 237 | } 238 | } 239 | 240 | export default connect( 241 | mapStateToProps 242 | )(home) 243 | -------------------------------------------------------------------------------- /src/imgs/airplane.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | airplane 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/imgs/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/avatar.png -------------------------------------------------------------------------------- /src/imgs/brightness-contrast.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | brightness-contrast 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/imgs/bubble.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | bubble 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/imgs/connection.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | connection 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/imgs/home2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | home2 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/imgs/home_page_header_cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/home_page_header_cover.jpg -------------------------------------------------------------------------------- /src/imgs/home_page_header_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/home_page_header_icon.png -------------------------------------------------------------------------------- /src/imgs/ic_action_favorites_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_action_favorites_grey.png -------------------------------------------------------------------------------- /src/imgs/ic_action_favorites_without_padding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_action_favorites_without_padding.png -------------------------------------------------------------------------------- /src/imgs/ic_action_offline_without_padding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_action_offline_without_padding.png -------------------------------------------------------------------------------- /src/imgs/ic_action_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_action_play.png -------------------------------------------------------------------------------- /src/imgs/ic_action_reply_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_action_reply_grey.png -------------------------------------------------------------------------------- /src/imgs/ic_action_reply_nopadding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_action_reply_nopadding.png -------------------------------------------------------------------------------- /src/imgs/ic_action_share_without_padding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_action_share_without_padding.png -------------------------------------------------------------------------------- /src/imgs/ic_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_image.png -------------------------------------------------------------------------------- /src/imgs/ic_image_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_image_selected.png -------------------------------------------------------------------------------- /src/imgs/ic_me.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_me.png -------------------------------------------------------------------------------- /src/imgs/ic_me_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_me_selected.png -------------------------------------------------------------------------------- /src/imgs/ic_menu_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_menu_more.png -------------------------------------------------------------------------------- /src/imgs/ic_news.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_news.png -------------------------------------------------------------------------------- /src/imgs/ic_news_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_news_selected.png -------------------------------------------------------------------------------- /src/imgs/ic_tab_strip_icon_category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_tab_strip_icon_category.png -------------------------------------------------------------------------------- /src/imgs/ic_tab_strip_icon_category_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_tab_strip_icon_category_selected.png -------------------------------------------------------------------------------- /src/imgs/ic_tab_strip_icon_feed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_tab_strip_icon_feed.png -------------------------------------------------------------------------------- /src/imgs/ic_tab_strip_icon_feed_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_tab_strip_icon_feed_selected.png -------------------------------------------------------------------------------- /src/imgs/ic_tab_strip_icon_follow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_tab_strip_icon_follow.png -------------------------------------------------------------------------------- /src/imgs/ic_tab_strip_icon_follow_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_tab_strip_icon_follow_selected.png -------------------------------------------------------------------------------- /src/imgs/ic_tab_strip_icon_profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_tab_strip_icon_profile.png -------------------------------------------------------------------------------- /src/imgs/ic_tab_strip_icon_profile_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_tab_strip_icon_profile_selected.png -------------------------------------------------------------------------------- /src/imgs/ic_video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_video.png -------------------------------------------------------------------------------- /src/imgs/ic_video_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cryingbat/react-redux-demo/8bb0a8312c4fe042330a10087640e462533e18b7/src/imgs/ic_video_selected.png -------------------------------------------------------------------------------- /src/imgs/mobile.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | mobile 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/login/Login.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { AsyncStorage, TextInput,StyleSheet } from 'react-native'; 3 | import { Container, Header,Text, Content, Button, Form, Item, Label } from 'native-base'; 4 | import md5 from 'md5'; 5 | import { connect } from 'react-redux'; 6 | // import { changeText } from '../store/shop/action' 7 | const AsyncStorageKey = "AS_"; 8 | const zm = 'AQZWSXCDERFVBGTYHNMJUIKLOPqazxswedcvfrtgbnhyujmkliop'; 9 | const text = md5(Math.round(Math.random()*zm.length)); 10 | export default class Login extends Component { 11 | constructor(props) { 12 | super(props); 13 | this.state={ 14 | username: 'dhq', 15 | password: '123456', 16 | } 17 | } 18 | static navigationOptions = { 19 | header: (navigation, defaultHeader) => { 20 | visible: false 21 | }, 22 | }; 23 | toHome() { 24 | if(this.state.username === 'dhq' && this.state.password === '123456'){ 25 | AsyncStorage.setItem(AsyncStorageKey,text,()=>{ 26 | this.props.navigation.navigate('Tab'); 27 | }); 28 | } 29 | } 30 | changeUser(text) { 31 | this.setState({ 32 | username: text, 33 | }) 34 | } 35 | changePass(text) { 36 | this.setState({ 37 | password: text, 38 | }) 39 | } 40 | render() { 41 | return ( 42 | 43 |
44 | Login 45 |
46 | 47 | this.changeUser(text)} 52 | /> 53 | this.changePass(text) } 59 | /> 60 | 67 | 68 |
69 | ); 70 | } 71 | } 72 | const styles = StyleSheet.create({ 73 | in: { 74 | paddingLeft: 10 75 | } 76 | }) 77 | // const mapStateToProps = (state) => { 78 | // return { 79 | // value: state.text, 80 | // } 81 | // }; 82 | // const mapDispatchToProps = (dispatch) => { 83 | // return { 84 | // onchange: () => dispatch(changeText('ok')) 85 | // } 86 | // }; 87 | // export default connect(mapStateToProps,mapDispatchToProps)(Login) 88 | -------------------------------------------------------------------------------- /src/me/CardList/cardList.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Container, Content, Card, CardItem, Text, Icon, Right } from 'native-base'; 3 | import Head from '../../common/Head' 4 | export default class CardListExample extends Component { 5 | render() { 6 | return ( 7 | 8 | {this.props.navigation.goBack();} 10 | }/> 11 | 12 | 13 | 14 | 15 | Google Plus 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | ); 24 | } 25 | } -------------------------------------------------------------------------------- /src/me/CheckBox/CheckBox.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Container, Header, Content, ListItem, CheckBox, Text, Body } from 'native-base'; 3 | import Head from '../../common/Head' 4 | export default class CheckBoxExample extends Component { 5 | render() { 6 | return ( 7 | 8 | {this.props.navigation.goBack();} }/> 9 | 10 | 11 | 12 | 13 | Daily Stand Up 14 | 15 | 16 | 17 | 18 | 19 | Discussion with Client 20 | 21 | 22 | 23 | 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/me/DialogSelected/DialogSelected.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import { View, Text } from 'react-native' 3 | import { ActionSheetCustom as ActionSheet } from 'react-native-actionsheet' 4 | import Head from '../../common/Head' 5 | export default class dialogSelected extends Component { 6 | showActionSheet () { 7 | this.ActionSheet.show() 8 | } 9 | render() { 10 | return ( 11 | 12 | {this.props.navigation.goBack();}}/> 13 | 点我选择水果 16 | this.ActionSheet = o} 18 | title={'请选择喜欢的水果?'} 19 | options={['苹果', '香蕉', '删除']} 20 | cancelButtonIndex={2} 21 | destructiveButtonIndex={1} 22 | onPress={(index) => { alert(index) }} 23 | /> 24 | 25 | ) 26 | } 27 | } -------------------------------------------------------------------------------- /src/me/Echarts/Echarts.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | Text, 4 | View, 5 | Dimensions 6 | } from 'react-native'; 7 | import Echarts from 'native-echarts'; 8 | const {width, height} = Dimensions.get('window'); 9 | import Head from '../../common/Head' 10 | export default class Echart extends Component { 11 | render() { 12 | const option = { 13 | title : { 14 | text: '某站点用户访问来源', 15 | subtext: '纯属虚构', 16 | x:'center' 17 | }, 18 | tooltip : { 19 | trigger: 'item', 20 | formatter: "{a}
{b} : {c} ({d}%)" 21 | }, 22 | legend: { 23 | orient: 'vertical', 24 | left: 'left', 25 | data: ['直接访问','邮件营销','联盟广告','视频广告','搜索引擎'] 26 | }, 27 | series : [ 28 | { 29 | name: '访问来源', 30 | type: 'pie', 31 | radius : '55%', 32 | center: ['50%', '60%'], 33 | data:[ 34 | {value:335, name:'直接访问'}, 35 | {value:310, name:'邮件营销'}, 36 | {value:234, name:'联盟广告'}, 37 | {value:135, name:'视频广告'}, 38 | {value:1548, name:'搜索引擎'} 39 | ], 40 | itemStyle: { 41 | emphasis: { 42 | shadowBlur: 10, 43 | shadowOffsetX: 0, 44 | shadowColor: 'rgba(0, 0, 0, 0.5)' 45 | } 46 | } 47 | } 48 | ] 49 | }; 50 | return ( 51 | 52 | {this.props.navigation.goBack();}}/> 53 | 54 | 55 | ); 56 | } 57 | } -------------------------------------------------------------------------------- /src/me/FABS/FABS.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Container, Header, View, Button, Icon, Fab } from 'native-base'; 3 | import Head from '../../common/Head' 4 | export default class FABExample extends Component { 5 | constructor(props) { 6 | super(props); 7 | this.state = { 8 | active: 'true' 9 | }; 10 | } 11 | render() { 12 | return ( 13 | 14 | {this.props.navigation.goBack();}}/> 15 | 16 | this.setState({ active: !this.state.active })}> 23 | 24 | 27 | 30 | 33 | 34 | 35 | 36 | ); 37 | } 38 | } -------------------------------------------------------------------------------- /src/me/FooterTab/FooterTab.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Container, Header, Content, Footer, FooterTab, Button, Icon, Text } from 'native-base'; 3 | import Head from '../../common/Head' 4 | export default class FooterTabsIconTextExample extends Component { 5 | render() { 6 | return ( 7 | 8 | {this.props.navigation.goBack();}}/> 9 | 10 |
11 | 12 | 16 | 20 | 24 | 28 | 29 |
30 |
31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/me/Form/form.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Container, Header, Content, Footer, FooterTab, Button, Icon, Text } from 'native-base'; 3 | import Head from '../../common/Head' 4 | export default class FooterTabsIconTextExample extends Component { 5 | render() { 6 | return ( 7 | 8 | {this.props.navigation.goBack();}}/> 9 | 10 |
11 | 12 | 16 | 20 | 24 | 28 | 29 |
30 |
31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/me/Icons/Icons.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Container, Content, Icon } from 'native-base'; 3 | import Head from '../../common/Head' 4 | export default class IconExample extends Component { 5 | render() { 6 | return ( 7 | 8 | {this.props.navigation.goBack();}}/> 9 | 10 | 11 | 12 | 13 | 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/me/ListDivider/ListDivider.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Container, Header, Content, List, ListItem, Text } from 'native-base'; 3 | import Head from '../../common/Head' 4 | export default class ListDividerExample extends Component { 5 | render() { 6 | return ( 7 | 8 | {this.props.navigation.goBack();}}/> 9 | 10 | 11 | 12 | A 13 | 14 | 15 | Aaron Bennet 16 | 17 | 18 | Ali Connors 19 | 20 | 21 | B 22 | 23 | 24 | Bradley Horowitz 25 | 26 | 27 | 28 | 29 | ); 30 | } 31 | } -------------------------------------------------------------------------------- /src/me/ListIcon/ListIcon.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Container, Header, Content, List, ListItem, Text, Icon, Left, Body, Right, Switch } from 'native-base'; 3 | import Head from '../../common/Head' 4 | export default class ListIconExample extends Component { 5 | render() { 6 | return ( 7 | 8 | {this.props.navigation.goBack();}}/> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | Airplane Mode 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | Wi-Fi 28 | 29 | 30 | GeekyAnts 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | Bluetooth 40 | 41 | 42 | On 43 | 44 | 45 | 46 | 47 | 48 | 49 | ); 50 | } 51 | } -------------------------------------------------------------------------------- /src/me/Modal/Modal.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | import { Text, TouchableOpacity, View } from "react-native"; 3 | import Modal from "react-native-modal"; 4 | import Head from '../../common/Head' 5 | export default class ModalTester extends Component { 6 | state = { 7 | isModalVisible: false 8 | }; 9 | 10 | _toggleModal = () => 11 | this.setState({ isModalVisible: !this.state.isModalVisible }); 12 | 13 | render() { 14 | return ( 15 | 16 | {this.props.navigation.goBack();}}/> 17 | 18 | Show Modal 19 | 20 | 21 | 22 | 23 | Hello!我是modal 24 | 25 | 点我关闭modal 26 | 27 | 28 | 29 | 30 | ); 31 | } 32 | } -------------------------------------------------------------------------------- /src/me/Search/Search.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Container, Header, Item, Input, Icon, Button, Text } from 'native-base'; 3 | import Head from '../../common/Head' 4 | export default class SearchBarExample extends Component { 5 | render() { 6 | return ( 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 17 |
18 |
19 | ); 20 | } 21 | } -------------------------------------------------------------------------------- /src/me/Spinner/Spinner.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Container, Header, Content, Spinner } from 'native-base'; 3 | import Head from '../../common/Head' 4 | export default class SpinnerExample extends Component { 5 | render() { 6 | return ( 7 | 8 | {this.props.navigation.goBack();}}/> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | ); 17 | } 18 | } -------------------------------------------------------------------------------- /src/me/Swipeable/Swipeable.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { ListView } from 'react-native'; 3 | import Head from '../../common/Head' 4 | import { Container, Header, Content, Button, Icon, List, ListItem, Text } from 'native-base'; 5 | const datas = [ 6 | 'Simon Mignolet', 7 | 'Nathaniel Clyne', 8 | 'Dejan Lovren', 9 | 'Mama Sakho', 10 | 'Alberto Moreno', 11 | 'Emre Can', 12 | 'Joe Allen', 13 | 'Phil Coutinho', 14 | ]; 15 | export default class SwipeableListExample extends Component { 16 | constructor(props) { 17 | super(props); 18 | this.ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 }); 19 | this.state = { 20 | basic: true, 21 | listViewData: datas, 22 | }; 23 | } 24 | deleteRow(secId, rowId, rowMap) { 25 | rowMap[`${secId}${rowId}`].props.closeRow(); 26 | const newData = [...this.state.listViewData]; 27 | newData.splice(rowId, 1); 28 | this.setState({ listViewData: newData }); 29 | } 30 | render() { 31 | const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 }); 32 | return ( 33 | 34 | {this.props.navigation.goBack();} }/> 35 | 36 | 39 | 40 | {data} 41 | } 42 | renderLeftHiddenRow={data => 43 | } 46 | renderRightHiddenRow={(data, secId, rowId, rowMap) => 47 | } 50 | leftOpenValue={75} 51 | rightOpenValue={-75} 52 | /> 53 | 54 | 55 | ); 56 | } 57 | } -------------------------------------------------------------------------------- /src/me/me.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Image, StyleSheet, AsyncStorage } from 'react-native' 3 | import { Container, Header, Content, List, ListItem, Text, Left, Body, Right } from 'native-base'; 4 | import Icon from 'react-native-vector-icons/FontAwesome'; 5 | const AsyncStorageKey = "AS_"; 6 | export default class Me extends Component { 7 | static navigationOptions = { 8 | header: (navigation, defaultHeader) => { 9 | left: null 10 | }, 11 | }; 12 | render() { 13 | return ( 14 | 15 |
16 | 我的 17 |
18 | 19 | 20 | { 23 | 24 | const { navigate } =this.props.navigation; 25 | navigate('Form'); 26 | } 27 | } 28 | > 29 | 30 | 31 | 32 | 33 | form 34 | 35 | 36 | 37 | 38 | 39 | { 42 | const { navigate } =this.props.navigation; 43 | navigate('CardList'); 44 | } 45 | } 46 | > 47 | 48 | 49 | 50 | 51 | CardList 52 | 53 | 54 | 55 | 56 | 57 | { 60 | const { navigate } =this.props.navigation; 61 | navigate('CheckBox'); 62 | } 63 | } 64 | > 65 | 66 | 67 | 68 | 69 | CheckBox 70 | 71 | 72 | 73 | 74 | 75 | { 78 | const { navigate } =this.props.navigation; 79 | navigate('FABS'); 80 | } 81 | } 82 | > 83 | 84 | 85 | 86 | 87 | FABS 88 | 89 | 90 | 91 | 92 | 93 | { 96 | const { navigate } =this.props.navigation; 97 | navigate('FooterTab'); 98 | } 99 | } 100 | > 101 | 102 | 103 | 104 | 105 | FooterTab 106 | 107 | 108 | 109 | 110 | 111 | { 114 | const { navigate } =this.props.navigation; 115 | navigate('Icons'); 116 | } 117 | } 118 | > 119 | 120 | 121 | 122 | 123 | Icons 124 | 125 | 126 | 127 | 128 | 129 | { 132 | const { navigate } =this.props.navigation; 133 | navigate('ListDivider'); 134 | } 135 | } 136 | > 137 | 138 | 139 | 140 | 141 | ListDivider 142 | 143 | 144 | 145 | 146 | 147 | { 150 | const { navigate } =this.props.navigation; 151 | navigate('ListIcon'); 152 | } 153 | } 154 | > 155 | 156 | 157 | 158 | 159 | ListIcon 160 | 161 | 162 | 163 | 164 | 165 | { 168 | const { navigate } =this.props.navigation; 169 | navigate('Search'); 170 | } 171 | } 172 | > 173 | 174 | 175 | 176 | 177 | Search 178 | 179 | 180 | 181 | 182 | 183 | { 186 | const { navigate } =this.props.navigation; 187 | navigate('Spinner'); 188 | } 189 | } 190 | > 191 | 192 | 193 | 194 | 195 | Spinner 196 | 197 | 198 | 199 | 200 | 201 | { 204 | const { navigate } =this.props.navigation; 205 | navigate('Swipeable'); 206 | } 207 | } 208 | > 209 | 210 | 211 | 212 | 213 | Swipeable 214 | 215 | 216 | 217 | 218 | 219 | { 222 | const { navigate } =this.props.navigation; 223 | navigate('Echarts'); 224 | } 225 | } 226 | > 227 | 228 | 229 | 230 | 231 | Echarts 232 | 233 | 234 | 235 | 236 | 237 | { 240 | const { navigate } =this.props.navigation; 241 | navigate('Loadmore'); 242 | } 243 | } 244 | > 245 | 246 | 247 | 248 | 249 | loadmore 250 | 251 | 252 | 253 | 254 | 255 | { 258 | const { navigate } =this.props.navigation; 259 | navigate('Modal'); 260 | } 261 | } 262 | > 263 | 264 | 265 | 266 | 267 | modal 268 | 269 | 270 | 271 | 272 | 273 | { 276 | 277 | const { navigate } =this.props.navigation; 278 | navigate('DialogSelected'); 279 | } 280 | } 281 | > 282 | 283 | 284 | 285 | 286 | DialogSelected 287 | 288 | 289 | 290 | 291 | 292 | { 295 | AsyncStorage.removeItem(AsyncStorageKey, 296 | (err) => { 297 | if(!err){ 298 | const { navigate } =this.props.navigation; 299 | navigate('Login'); 300 | }else{ 301 | alert('退出失败!'); 302 | } 303 | }) 304 | 305 | } 306 | } 307 | > 308 | 309 | 310 | 311 | 312 | logout 313 | 314 | 315 | 316 | 317 |
318 | ); 319 | } 320 | } 321 | 322 | const styles = StyleSheet.create({ 323 | title: { 324 | justifyContent: 'center', 325 | textAlignVertical: 'center', 326 | fontSize: 18, 327 | color: '#fff', 328 | } 329 | }) -------------------------------------------------------------------------------- /src/page/loadmore/loadmore.js: -------------------------------------------------------------------------------- 1 | 2 | import React, { Component } from 'react'; 3 | import { Platform } from 'react-native'; 4 | import { 5 | StyleSheet, 6 | View, 7 | ActivityIndicator, 8 | Dimensions, 9 | BackHandler, 10 | TouchableOpacity 11 | } from 'react-native'; 12 | const {width, height} = Dimensions.get('window'); 13 | import { Container, Header, Content, List, ListItem, Left, Body, Right, Thumbnail, Text, Spinner } from 'native-base'; 14 | export default class Home extends Component { 15 | constructor(props) { 16 | super(props); 17 | //android的物理返回建的监听 18 | // BackHandler.addEventListener('hardwareBackPress', function() { 19 | // alert('ninansakdn'); 20 | // }); 21 | this.state={ 22 | dataResouse:[], 23 | loadmoreText: '加载更多...', 24 | page: 1, 25 | isloading: false, 26 | }; 27 | } 28 | static navigationOptions = { 29 | header: (navigation, defaultHeader) => { 30 | left: null 31 | }, 32 | }; 33 | 34 | // componentWillMount(){ 35 | // if (Platform.OS === 'android') { 36 | // BackAndroid.addEventListener('hardwareBackPress', this._onBackAndroid); 37 | // } 38 | // } 39 | componentWillUnmount() { 40 | // if (Platform.OS === 'android') { 41 | // BackAndroid.removeEventListener('hardwareBackPress', this._onBackAndroid); 42 | // } 43 | 44 | } 45 | // onBackAndroid = () => { 46 | // const { navigator } = this.props; 47 | // const routers = navigator.getCurrentRoutes(); 48 | // console.log('当前路由长度:'+routers.length); 49 | // if (routers.length > 1) { 50 | // navigator.pop(); 51 | // return true;//接管默认行为 52 | // } 53 | // return false;//默认行为 54 | 55 | // }; 56 | _loadmore() { 57 | const url = `https://route.showapi.com/181-1?showapi_appid=30603&showapi_sign=98960666afeb4992ae91971d13494090&page=${++this.state.page}&num=20` 58 | const opts = { 59 | method: 'GET', 60 | } 61 | fetch(url,opts).then((response)=> { 62 | // return response.text(); 63 | return response.json(); 64 | }).then((res)=> { 65 | // alert(res.showapi_res_body.newslist) 66 | this.setState({ 67 | isloading: true, 68 | dataResouse:this.state.dataResouse.concat(res.showapi_res_body.newslist) 69 | }) 70 | }).catch((err)=> { 71 | alert(err); 72 | }).done(); 73 | } 74 | componentWillMount() { 75 | const url = `https://route.showapi.com/181-1?showapi_appid=30603&showapi_sign=98960666afeb4992ae91971d13494090&page=${this.state.page}&num=20` 76 | const opts = { 77 | method: 'GET', 78 | } 79 | fetch(url,opts).then((response)=> { 80 | return response.json(); 81 | }).then((res)=> { 82 | this.setState({ 83 | isloading: true, 84 | dataResouse:res.showapi_res_body.newslist 85 | }) 86 | }).catch((err)=> { 87 | alert(err); 88 | }).done(); 89 | } 90 | renderLoadingView() 91 | { 92 | return ( 93 | 94 | 95 | ); 96 | } 97 | render() { 98 | const dataResouse = this.state.dataResouse; 99 | let loadmoreText = this.state.loadmoreText; 100 | if(!this.state.isloading){ 101 | return this.renderLoadingView(); 102 | }else{ 103 | return ( 104 | 105 |
106 | 首页 107 |
108 | 109 | 110 | {dataResouse.map((item,i) => { 111 | return ( 112 | { 117 | const { navigate } =this.props.navigation; 118 | navigate('Swiper',{id:i}); 119 | } 120 | }> 121 | 122 | 123 | 124 | 125 | {item.description} 126 | {item.title} 127 | 128 | 129 | {item.ctime} 130 | 131 | 132 | ) 133 | })} 134 | 135 | 138 | {loadmoreText} 139 | 140 | 141 |
142 | ); 143 | } 144 | 145 | } 146 | } 147 | const styles=StyleSheet.create({ 148 | container:{ 149 | flex: 1, 150 | flexDirection: 'row', 151 | justifyContent: 'center', 152 | alignItems: 'center', 153 | backgroundColor: '#F5FCFF', 154 | }, 155 | title: { 156 | justifyContent: 'center', 157 | textAlignVertical: 'center', 158 | fontSize: 18, 159 | color: '#fff', 160 | }, 161 | content:{ 162 | width:width, 163 | height:height, 164 | backgroundColor:'yellow', 165 | justifyContent:'center', 166 | alignItems:'center' 167 | }, 168 | cell:{ 169 | width:width, 170 | height:40, 171 | alignItems:'center', 172 | justifyContent:'center', 173 | borderBottomColor:'#ececec', 174 | borderBottomWidth:1 175 | } 176 | }) -------------------------------------------------------------------------------- /src/page/page.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Image, View, StyleSheet} from 'react-native'; 3 | import { Container, Header, Tab, Tabs,ScrollableTab,Text } from 'native-base'; 4 | import { increase , decrease, } from '../store/actions/counter'; 5 | import { getnews } from '../store/actions/news'; 6 | import { connect } from 'react-redux'; 7 | class Card extends Component { 8 | constructor(props) { 9 | super(props); 10 | } 11 | render() { 12 | const { onincrease,ondecrease, value, news, ongetnews} = this.props; 13 | return ( 14 | 15 |
16 | 新闻 17 |
18 | }> 19 | 20 | {value} 21 | 增加 22 | 减少 23 | 24 | 25 | {value} 26 | 27 | 28 | { 29 | news.map((item,index)=> { 30 | return ( 31 | {item.num} 32 | {item.title} 33 | {item.time} 34 | ) 35 | }) 36 | } 37 | 获取新闻 38 | 39 | 40 | 内容4 41 | 42 | 43 | 内容5 44 | 45 | 46 |
); 47 | } 48 | } 49 | const styles = StyleSheet.create({ 50 | container: { 51 | flex: 1, 52 | flexDirection: 'row', 53 | justifyContent: 'center', 54 | alignItems: 'center', 55 | backgroundColor: '#F5FCFF', 56 | }, 57 | title: { 58 | justifyContent: 'center', 59 | textAlignVertical: 'center', 60 | fontSize: 18, 61 | color: '#fff', 62 | } 63 | }); 64 | const mapStateToProps = (state) => { 65 | console.log(state.newsReducers) 66 | return { 67 | value: state.countReducers.num, 68 | news: state.newsReducers 69 | } 70 | }; 71 | const mapDispatchToProps = (dispatch) => { 72 | return { 73 | ondecrease: () => dispatch(decrease(1)), 74 | onincrease: () => dispatch(increase(1)), 75 | ongetnews: () => dispatch(getnews()), 76 | } 77 | }; 78 | export default connect(mapStateToProps,mapDispatchToProps)(Card) -------------------------------------------------------------------------------- /src/slider.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { 3 | StyleSheet, 4 | Text, 5 | Image, 6 | View, 7 | AsyncStorage, 8 | TouchableOpacity 9 | } from 'react-native'; 10 | import Tab from './home/home' 11 | import Swiper from 'react-native-swiper'; 12 | 13 | var styles = StyleSheet.create({ 14 | wrapper: { 15 | }, 16 | slide1: { 17 | flex: 1, 18 | justifyContent: 'center', 19 | alignItems: 'center', 20 | backgroundColor: '#9DD6EB', 21 | }, 22 | slide2: { 23 | flex: 1, 24 | justifyContent: 'center', 25 | alignItems: 'center', 26 | backgroundColor: '#97CAE5', 27 | }, 28 | slide3: { 29 | flex: 1, 30 | justifyContent: 'center', 31 | alignItems: 'center', 32 | backgroundColor: '#92BBD9', 33 | }, 34 | text: { 35 | color: '#fff', 36 | fontSize: 30, 37 | fontWeight: 'bold', 38 | }, 39 | btn: { 40 | borderWidth: 1, 41 | borderColor: "#a1a24a", 42 | padding: 10, 43 | paddingLeft: 20, 44 | paddingRight: 20, 45 | marginTop: 50, 46 | borderRadius: 5, 47 | alignItems: 'flex-end', 48 | backgroundColor: '#a1a24a', 49 | color: "#fff" 50 | } 51 | }) 52 | const AsyncStorageKey = "AS_"; 53 | export default class Slider extends Component{ 54 | constructor(props) { 55 | super(props); 56 | } 57 | ComponentDidMount() { 58 | AsyncStorage.getItem(AsyncStorageKey, (err, text) => { 59 | if(text === null){ 60 | console.log('没存呢!'); 61 | }else{ 62 | alert(text); 63 | this.props.navigation.navigate('Tab'); 64 | // this.props.navigation.navigate('Tab'); 65 | } 66 | }) 67 | } 68 | toLogin () { 69 | this.props.navigation.navigate('Login'); 70 | } 71 | 72 | static navigationOptions = { 73 | header: (navigation, defaultHeader) => { 74 | visible: false 75 | }, 76 | }; 77 | renderSlider() { 78 | return ( 79 | 80 | ) 81 | } 82 | render () { 83 | return ( 84 | 89 | 90 | Hello Swiper 91 | 92 | 93 | Beautiful 94 | 95 | 96 | 99 | 100 | 马上体验 101 | 102 | 103 | 104 | 105 | 106 | ) 107 | } 108 | } -------------------------------------------------------------------------------- /src/store/actions/actionTypes/index.js: -------------------------------------------------------------------------------- 1 | //counter 2 | export const INCREASE_NUM = 'INCREASE_NUM'; 3 | export const DECREASE_NUM = 'DECREASE_NUM'; 4 | //news 5 | export const SET_NEWS = 'SET_NEWS'; 6 | -------------------------------------------------------------------------------- /src/store/actions/counter/index.js: -------------------------------------------------------------------------------- 1 | import *as types from '../actionTypes/index'; 2 | export const increase = (num) => { 3 | return { 4 | type: types.INCREASE_NUM, 5 | num 6 | } 7 | } 8 | export const decrease = (num) => { 9 | return { 10 | type: types.DECREASE_NUM, 11 | num 12 | } 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/store/actions/news/index.js: -------------------------------------------------------------------------------- 1 | import *as types from '../actionTypes/index'; 2 | export const getnews = () => { 3 | return { 4 | type: types.SET_NEWS, 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/store/reducers/counter/index.js: -------------------------------------------------------------------------------- 1 | import *as types from '../../actions/actionTypes/index'; 2 | 3 | const initState ={ 4 | num: 2, 5 | news: [], 6 | } 7 | 8 | const mainReducer = (state = initState, action) => { 9 | // 判断 action 类型 10 | switch (action.type) { 11 | case types.INCREASE_NUM: 12 | if(state.num>=5){ 13 | return Object.assign({},state,{num: 5}); 14 | }else{ 15 | return Object.assign({},state,{num: state.num+action.num}); 16 | } 17 | case types.DECREASE_NUM: 18 | if(state.num<=0){ 19 | return Object.assign({},state,{num: 0}); 20 | }else{ 21 | return Object.assign({},state,{num: state.num-action.num}); 22 | } 23 | default: 24 | return state 25 | } 26 | }; 27 | 28 | export default mainReducer; -------------------------------------------------------------------------------- /src/store/reducers/index.js: -------------------------------------------------------------------------------- 1 | // import { combineReducers } from 'redux'; 2 | 3 | // import counter from './counter'; 4 | 5 | // export default combineReducers({ 6 | // counter 7 | // }); 8 | // } -------------------------------------------------------------------------------- /src/store/reducers/news/index.js: -------------------------------------------------------------------------------- 1 | import {increase, decrease} from '../../actions/news/index'; 2 | import *as types from '../../actions/actionTypes/index'; 3 | 4 | const newsReducer = (state = [], action) => { 5 | // 判断 action 类型 6 | switch (action.type) { 7 | case types.SET_NEWS: 8 | return state.concat([{num: 5,title: '上山打老虎',time: '2014-15-12'},{num: 6,title: '上山打老虎',time: '2014-15-12'}]); 9 | default: 10 | return state 11 | } 12 | }; 13 | 14 | export default newsReducer; -------------------------------------------------------------------------------- /src/store/store.js: -------------------------------------------------------------------------------- 1 | import { createStore,combineReducers, applyMiddleware } from 'redux'; 2 | import thunkMiddleware from 'redux-thunk'; 3 | import countReducers from './reducers/counter/index'; 4 | import newsReducers from './reducers/news/index'; 5 | 6 | export default () => { 7 | const store = createStore(combineReducers({ 8 | countReducers, 9 | newsReducers 10 | }),applyMiddleware(thunkMiddleware)); 11 | return store; 12 | } --------------------------------------------------------------------------------