├── .babelrc ├── .buckconfig ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .prettierrc ├── .vscode └── launch.json ├── .watchmanconfig ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md ├── LICENSE ├── README.md ├── __tests__ └── App.js ├── android ├── app │ ├── BUCK │ ├── build.gradle │ ├── proguard-rules.pro │ └── 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 │ │ ├── java │ │ └── com │ │ │ └── awesomeproject │ │ │ ├── MainActivity.java │ │ │ ├── MainApplication.java │ │ │ ├── ToastModule.java │ │ │ └── ToastReactPackage.java │ │ └── res │ │ ├── drawable-hdpi │ │ └── launch_screen.png │ │ ├── drawable-ldpi │ │ └── launch_screen.png │ │ ├── drawable-mdpi │ │ └── launch_screen.png │ │ ├── drawable-xhdpi │ │ └── launch_screen.png │ │ ├── drawable-xxhdpi │ │ └── launch_screen.png │ │ ├── drawable-xxxhdpi │ │ └── launch_screen.png │ │ ├── layout │ │ └── launch_screen.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ ├── colors.xml │ │ ├── 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.json ├── assets ├── change-redux.gif ├── home.png ├── new_image.jpg ├── new_info.jpg ├── new_list.jpg ├── new_login.jpg ├── redux.gif ├── tab-navigator.png └── todo.png ├── index.js ├── ios ├── AwesomeProject-tvOS │ └── Info.plist ├── AwesomeProject-tvOSTests │ └── Info.plist ├── AwesomeProject.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── AwesomeProject-tvOS.xcscheme │ │ └── AwesomeProject.xcscheme ├── AwesomeProject │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-40@2x.png │ │ │ ├── Icon-40@3x.png │ │ │ ├── Icon-60@2x.png │ │ │ ├── Icon-60@3x.png │ │ │ ├── Icon-Small.png │ │ │ ├── Icon-Small@2x.png │ │ │ ├── Icon-Small@3x.png │ │ │ ├── Icon.png │ │ │ ├── Icon@2x.png │ │ │ ├── NotificationIcon@2x.png │ │ │ ├── NotificationIcon@3x.png │ │ │ └── ios-marketing-1.png │ │ ├── Contents.json │ │ └── LaunchImage.launchimage │ │ │ ├── Contents.json │ │ │ ├── Default-568h@2x-1.png │ │ │ ├── Default-568h@2x.png │ │ │ ├── Default-667h@2x.png │ │ │ ├── Default-Landscape-2436h@3x.png │ │ │ ├── Default-Landscape-736h@3x.png │ │ │ ├── Default-Portrait-2436h@3x.png │ │ │ ├── Default-Portrait-736h@3x.png │ │ │ ├── Default.png │ │ │ ├── Default@2x-1.png │ │ │ └── Default@2x.png │ ├── Info.plist │ ├── main.m │ └── zh-Hans.lproj │ │ └── LaunchScreen.strings └── AwesomeProjectTests │ ├── AwesomeProjectTests.m │ └── Info.plist ├── package-lock.json ├── package.json ├── renovate.json ├── src ├── components │ ├── AddTodo.js │ ├── FilterLink.js │ ├── Footer.js │ ├── ModalScreen.js │ ├── SliderEntry.js │ ├── Todo.js │ ├── TodoList.js │ ├── VisibleTodoList.js │ └── WebView.js ├── equipment │ ├── ColorUtils.js │ ├── ComponentUtil.js │ ├── TextParagraph.js │ ├── ToastUtil.js │ ├── animations.js │ └── static.js ├── icons │ ├── sad.png │ ├── sad@2x.png │ ├── sad@3x.png │ ├── smile.png │ ├── smile@2x.png │ └── smile@3x.png ├── image │ ├── modal_bg.jpg │ └── twitter.png ├── index.js ├── modules │ ├── Button.js │ ├── MaskedView.js │ ├── PopupDialog.js │ ├── Toast.android.js │ └── Toast.ios.js ├── navigators │ ├── AppWithNavigation.js │ └── index.js ├── page │ ├── DialogModules │ │ ├── Login.js │ │ ├── Update.js │ │ └── ViewTest.js │ ├── ECMAScript2016 │ │ └── index.js │ ├── Immutable │ │ └── List.js │ ├── Login │ │ └── index.js │ ├── Root.js │ ├── home │ │ ├── containers │ │ │ ├── Carousel.js │ │ │ ├── Counter.js │ │ │ └── TodoList.js │ │ └── index.js │ ├── main │ │ └── index.js │ └── setview │ │ └── index.js ├── redux │ ├── actions │ │ ├── counter.js │ │ ├── dialogType.js │ │ ├── loginActions.js │ │ ├── loginType.js │ │ ├── themeType.js │ │ └── todo.js │ ├── reducers │ │ ├── counter.js │ │ ├── dialog.js │ │ ├── index.js │ │ ├── login.js │ │ ├── nav.js │ │ ├── schedule.js │ │ ├── theme.js │ │ ├── todos.js │ │ └── visibilityFilter.js │ └── util │ │ └── index.js ├── styles │ ├── SliderEntry.style.js │ └── index.style.js ├── theme │ ├── dark.js │ └── default.js └── utils │ └── images.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"], 3 | "plugins": ["transform-decorators-legacy"] 4 | } 5 | -------------------------------------------------------------------------------- /.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.67.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 | 55 | # Bundle artifact 56 | *.jsbundle 57 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "tabWidth": 4, 4 | "parser": "babylon", 5 | "trailingComma": "none", 6 | "jsxBracketSameLine": true, 7 | "semi": true, 8 | "singleQuote": true, 9 | "overrides": [ 10 | { 11 | "files": ["*.json", ".eslintrc", ".tslintrc", ".prettierrc", ".tern-project"], 12 | "options": { 13 | "parser": "json", 14 | "tabWidth": 2 15 | } 16 | }, 17 | { 18 | "files": "*.{css,sass,scss,less}", 19 | "options": { 20 | "parser": "postcss", 21 | "tabWidth": 4 22 | } 23 | }, 24 | { 25 | "files": "*.ts", 26 | "options": { 27 | "parser": "typescript" 28 | } 29 | } 30 | ] 31 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // 使用 IntelliSense 了解相关属性。 3 | // 悬停以查看现有属性的描述。 4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "启动程序", 11 | "program": "${workspaceFolder}/start" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at smallrui-mister@outlook.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | 3 | # yarn lockfile v1 4 | 5 | rm ./node_modules/react-native/local-cli/core/**fixtures**/files/package.json 6 | 7 | https://github.com/canyavall/reactcv/blob/f718721a606aca9376165d0712b31f7d066dce73/React%20Lesson%203/intro_redux_middleware.md 素材 8 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## note 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Trust 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 | ### 功能集合 2 | 3 | * [x] 热更新 code-push 4 | * [x] carousel 5 | * [x] redux 案例 6 | * [x] mobx 案例 7 | * [x] react-navigation 案例 8 | * [x] Android 硬更新 9 | * [x] iOS 硬更新 10 | * [x] native 混合 11 | 12 | ### 项目架构 13 | 14 | * [x] react-native, 15 | * [x] react-navigation, 16 | * [x] redux, 17 | * [x] mobx, 18 | * [x] react-native-vector-icons 19 | * [x] react-native-splash-screen 20 | * [x] react-native-code-push 21 | ... 22 | 23 | ### 自动化工具 24 | 25 | * [x] prettier 26 | 27 | #### 案例效果图 28 | 29 |
30 | screenshot 31 | screenshot 32 | screenshot 33 | screenshot 34 |
35 | 36 | ### 快捷地址: 37 | 38 | > [immutable doc][immutable] 39 | 40 | > [immutable blog][immutable-blog] 41 | 42 | > [react-navigation doc][react-navigation] 43 | 44 | > [React Native Express ][react-native-express] 45 | 46 | > [react-navigation-redux-helpers doc][react-navigation-redux-helpers] 47 | 48 | > [react-navigation-redux error][new-nav-redux] 49 | 50 | 51 | 52 | ### 介绍 Redux 中间件(Middleware) 53 | 54 | 还记得 Redux 的 GIF 嘛 55 | 56 | 57 | 58 | 我们需要稍微改变一下 59 | 60 | 61 | 62 | 正如你所看到的,这里还有一个概念:Middleware 63 | 64 | #### 什么是 Middleware 65 | 66 | 从[文档][middleware]中看到: 67 | 68 | ``` 69 | It provides a third-party extension point between dispatching an action, and the moment it reaches the reducer 70 | ``` 71 | 72 | 简而言之,这是一个函数,在 Action 到达 Reducer 之前,将使用 Action 调用该函数。 73 | 74 | 在这个功能中,你可以让 Action 继续前进,你可以阻止它继续前进,或者你可以改变它,并把它发送给下一个。 75 | 76 | [new-nav-redux]: http://blog.csdn.net/qq_33323251/article/details/79430398 77 | [immutable-blog]: https://github.com/camsong/blog/issues/3 78 | [middleware]: http://redux.js.org/docs/advanced/Middleware.html 79 | [immutable]: https://facebook.github.io/immutable-js/docs/#/ 80 | [react-navigation]: https://reactnavigation.org/docs/getting-started.html 81 | [react-native-express]: http://www.reactnativeexpress.com/ 82 | [react-navigation-redux-helpers]: https://github.com/react-navigation/react-navigation-redux-helpers 83 | -------------------------------------------------------------------------------- /__tests__/App.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import App from '../App'; 4 | 5 | // Note: test renderer must be required after react-native. 6 | import renderer from 'react-test-renderer'; 7 | 8 | it('renders correctly', () => { 9 | const tree = renderer.create(); 10 | }); 11 | -------------------------------------------------------------------------------- /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.awesomeproject", 49 | ) 50 | 51 | android_resource( 52 | name = "res", 53 | package = "com.awesomeproject", 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 | apply from: "../../node_modules/react-native-code-push/android/codepush.gradle" 81 | /** 82 | * Set this to true to create two separate APKs instead of one: 83 | * - An APK that only works on ARM devices 84 | * - An APK that only works on x86 devices 85 | * The advantage is the size of the APK is reduced by about 4MB. 86 | * Upload all the APKs to the Play Store and people will download 87 | * the correct one based on the CPU architecture of their device. 88 | */ 89 | def enableSeparateBuildPerCPUArchitecture = false 90 | 91 | /** 92 | * Run Proguard to shrink the Java bytecode in release builds. 93 | */ 94 | def enableProguardInReleaseBuilds = false 95 | 96 | android { 97 | compileSdkVersion 23 98 | buildToolsVersion "23.0.1" 99 | 100 | 101 | defaultConfig { 102 | applicationId "com.awesomeproject" 103 | minSdkVersion 16 104 | targetSdkVersion 22 105 | versionCode 1 106 | versionName "1.0.0" 107 | ndk { 108 | abiFilters "armeabi-v7a", "x86" 109 | } 110 | renderscriptTargetApi 19 111 | renderscriptSupportModeEnabled true 112 | } 113 | signingConfigs { 114 | release { 115 | storeFile file(MYAPP_RELEASE_STORE_FILE) 116 | storePassword MYAPP_RELEASE_STORE_PASSWORD 117 | keyAlias MYAPP_RELEASE_KEY_ALIAS 118 | keyPassword MYAPP_RELEASE_KEY_PASSWORD 119 | } 120 | } 121 | splits { 122 | abi { 123 | reset() 124 | enable enableSeparateBuildPerCPUArchitecture 125 | universalApk false // If true, also generate a universal APK 126 | include "armeabi-v7a", "x86" 127 | } 128 | } 129 | buildTypes { 130 | release { 131 | minifyEnabled enableProguardInReleaseBuilds 132 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 133 | signingConfig signingConfigs.release 134 | } 135 | } 136 | // applicationVariants are e.g. debug, release 137 | applicationVariants.all { variant -> 138 | variant.outputs.each { output -> 139 | // For each separate APK per architecture, set a unique version code as described here: 140 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 141 | def versionCodes = ["armeabi-v7a":1, "x86":2] 142 | def abi = output.getFilter(OutputFile.ABI) 143 | if (abi != null) { // null for the universal-debug, universal-release variants 144 | output.versionCodeOverride = 145 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 146 | } 147 | } 148 | } 149 | } 150 | 151 | dependencies { 152 | compile project(':react-native-syan-image-picker') 153 | compile project(':react-native-splash-screen') 154 | compile project(':react-native-blur') 155 | compile project(':react-native-linear-gradient') 156 | compile project(':react-native-code-push') 157 | compile project(':react-native-vector-icons') 158 | compile fileTree(dir: "libs", include: ["*.jar"]) 159 | compile "com.android.support:appcompat-v7:23.0.1" 160 | compile "com.facebook.react:react-native:+" // From node_modules 161 | } 162 | 163 | // Run this once to be able to run the application with BUCK 164 | // puts all compile dependencies into folder libs for BUCK to use 165 | task copyDownloadableDepsToLibs(type: Copy) { 166 | from configurations.compile 167 | into 'libs' 168 | } 169 | -------------------------------------------------------------------------------- /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/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 17 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | ; 31 | -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/assets/fonts/Entypo.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/EvilIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/assets/fonts/EvilIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Feather.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/assets/fonts/Feather.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/FontAwesome.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/assets/fonts/FontAwesome.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Foundation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/assets/fonts/Foundation.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/assets/fonts/Ionicons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/MaterialIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/assets/fonts/MaterialIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Octicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/assets/fonts/Octicons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/SimpleLineIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/assets/fonts/SimpleLineIcons.ttf -------------------------------------------------------------------------------- /android/app/src/main/assets/fonts/Zocial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/assets/fonts/Zocial.ttf -------------------------------------------------------------------------------- /android/app/src/main/java/com/awesomeproject/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.awesomeproject; 2 | 3 | import android.os.Bundle; 4 | import com.facebook.react.ReactActivity; 5 | import org.devio.rn.splashscreen.SplashScreen; 6 | 7 | 8 | public class MainActivity extends ReactActivity { 9 | 10 | /** 11 | * Returns the name of the main component registered from JavaScript. 12 | * This is used to schedule rendering of the component. 13 | */ 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | SplashScreen.show(this, true); 17 | super.onCreate(savedInstanceState); 18 | } 19 | @Override 20 | protected String getMainComponentName() { 21 | return "AwesomeProject"; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/awesomeproject/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.awesomeproject; 2 | 3 | import android.app.Application; 4 | 5 | import com.facebook.react.ReactApplication; 6 | import com.reactlibrary.RNSyanImagePickerPackage; 7 | import org.devio.rn.splashscreen.SplashScreenReactPackage; 8 | import com.cmcewen.blurview.BlurViewPackage; 9 | import com.BV.LinearGradient.LinearGradientPackage; 10 | import com.microsoft.codepush.react.CodePush; 11 | import com.oblador.vectoricons.VectorIconsPackage; 12 | import com.facebook.react.ReactNativeHost; 13 | import com.facebook.react.ReactPackage; 14 | import com.facebook.react.shell.MainReactPackage; 15 | import com.facebook.soloader.SoLoader; 16 | 17 | import java.util.Arrays; 18 | import java.util.List; 19 | 20 | public class MainApplication extends Application implements ReactApplication { 21 | 22 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 23 | 24 | @Override 25 | protected String getJSBundleFile() { 26 | return CodePush.getJSBundleFile(); 27 | } 28 | 29 | @Override 30 | public boolean getUseDeveloperSupport() { 31 | return BuildConfig.DEBUG; 32 | } 33 | 34 | @Override 35 | protected List getPackages() { 36 | return Arrays.asList( 37 | new MainReactPackage(), 38 | new RNSyanImagePickerPackage(), 39 | new SplashScreenReactPackage(), 40 | new BlurViewPackage(), 41 | new LinearGradientPackage(), 42 | new CodePush("FblmCRWTrhBTK4pHOxDzOfdqQvs04ksvOXqog", getApplicationContext(), BuildConfig.DEBUG, "http://180.76.138.89:3000"), 43 | new VectorIconsPackage(), 44 | new ToastReactPackage() 45 | ); 46 | } 47 | 48 | @Override 49 | protected String getJSMainModuleName() { 50 | return "index"; 51 | } 52 | }; 53 | 54 | @Override 55 | public ReactNativeHost getReactNativeHost() { 56 | return mReactNativeHost; 57 | } 58 | 59 | @Override 60 | public void onCreate() { 61 | super.onCreate(); 62 | SoLoader.init(this, /* native exopackage */ false); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/awesomeproject/ToastModule.java: -------------------------------------------------------------------------------- 1 | package com.awesomeproject; 2 | 3 | import android.widget.Toast; 4 | 5 | import com.facebook.react.bridge.NativeModule; 6 | import com.facebook.react.bridge.ReactApplicationContext; 7 | import com.facebook.react.bridge.ReactContext; 8 | import com.facebook.react.bridge.ReactContextBaseJavaModule; 9 | import com.facebook.react.bridge.ReactMethod; 10 | 11 | import java.util.Map; 12 | import java.util.HashMap; 13 | 14 | public class ToastModule extends ReactContextBaseJavaModule { 15 | 16 | private static final String DURATION_SHORT_KEY = "SHORT"; 17 | private static final String DURATION_LONG_KEY = "LONG"; 18 | 19 | public ToastModule(ReactApplicationContext reactContext) { 20 | super(reactContext); 21 | } 22 | 23 | @Override 24 | public String getName() { 25 | return "ToastRoot"; 26 | } 27 | 28 | @Override 29 | public Map getConstants() { 30 | final Map constants = new HashMap<>(); 31 | constants.put(DURATION_SHORT_KEY, Toast.LENGTH_SHORT); 32 | constants.put(DURATION_LONG_KEY, Toast.LENGTH_LONG); 33 | return constants; 34 | } 35 | 36 | @ReactMethod 37 | public void show(String message, int duration) { 38 | Toast.makeText(getReactApplicationContext(), message, duration).show(); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/awesomeproject/ToastReactPackage.java: -------------------------------------------------------------------------------- 1 | package com.awesomeproject; 2 | 3 | /** 4 | * Created by smallrui on 2018/4/13. 5 | */ 6 | 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.bridge.JavaScriptModule; 9 | import com.facebook.react.bridge.NativeModule; 10 | import com.facebook.react.bridge.ReactApplicationContext; 11 | import com.facebook.react.uimanager.ViewManager; 12 | 13 | import java.util.ArrayList; 14 | import java.util.Collections; 15 | import java.util.List; 16 | 17 | public class ToastReactPackage implements ReactPackage { 18 | 19 | //@Override 20 | public List> createJSModules() { 21 | return Collections.emptyList(); 22 | } 23 | 24 | @Override 25 | public List createViewManagers(ReactApplicationContext reactContext) { 26 | return Collections.emptyList(); 27 | } 28 | 29 | @Override 30 | public List createNativeModules( 31 | ReactApplicationContext reactContext) { 32 | List modules = new ArrayList<>(); 33 | 34 | modules.add(new ToastModule(reactContext)); 35 | 36 | return modules; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/launch_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/res/drawable-hdpi/launch_screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-ldpi/launch_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/res/drawable-ldpi/launch_screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/launch_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/res/drawable-mdpi/launch_screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/launch_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/res/drawable-xhdpi/launch_screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/launch_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/res/drawable-xxhdpi/launch_screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/launch_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/res/drawable-xxxhdpi/launch_screen.png -------------------------------------------------------------------------------- /android/app/src/main/res/layout/launch_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #000000 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Trust 4 | ; 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.2.3' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | mavenLocal() 18 | jcenter() 19 | maven { 20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 21 | url "$rootDir/../node_modules/react-native/android" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /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 | 22 | MYAPP_RELEASE_STORE_FILE=my-release-key.keystore 23 | MYAPP_RELEASE_KEY_ALIAS=my-key-alias 24 | MYAPP_RELEASE_STORE_PASSWORD=123456 25 | MYAPP_RELEASE_KEY_PASSWORD=123456 26 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 6 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/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 = 'AwesomeProject' 2 | include ':react-native-syan-image-picker' 3 | project(':react-native-syan-image-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-syan-image-picker/android') 4 | include ':react-native-splash-screen' 5 | project(':react-native-splash-screen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-splash-screen/android') 6 | include ':react-native-blur' 7 | project(':react-native-blur').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-blur/android') 8 | include ':react-native-linear-gradient' 9 | project(':react-native-linear-gradient').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-linear-gradient/android') 10 | include ':react-native-code-push' 11 | project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app') 12 | include ':react-native-vector-icons' 13 | project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') 14 | 15 | include ':app' 16 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AwesomeProject", 3 | "displayName": "AwesomeProject" 4 | } 5 | -------------------------------------------------------------------------------- /assets/change-redux.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/assets/change-redux.gif -------------------------------------------------------------------------------- /assets/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/assets/home.png -------------------------------------------------------------------------------- /assets/new_image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/assets/new_image.jpg -------------------------------------------------------------------------------- /assets/new_info.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/assets/new_info.jpg -------------------------------------------------------------------------------- /assets/new_list.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/assets/new_list.jpg -------------------------------------------------------------------------------- /assets/new_login.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/assets/new_login.jpg -------------------------------------------------------------------------------- /assets/redux.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/assets/redux.gif -------------------------------------------------------------------------------- /assets/tab-navigator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/assets/tab-navigator.png -------------------------------------------------------------------------------- /assets/todo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/assets/todo.png -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import './src'; 2 | -------------------------------------------------------------------------------- /ios/AwesomeProject-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 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 | NSAppTransportSecurity 26 | 27 | NSExceptionDomains 28 | 29 | localhost 30 | 31 | NSExceptionAllowsInsecureHTTPLoads 32 | 33 | 34 | 35 | 36 | NSLocationWhenInUseUsageDescription 37 | 38 | UILaunchStoryboardName 39 | LaunchScreen 40 | UIRequiredDeviceCapabilities 41 | 42 | armv7 43 | 44 | UISupportedInterfaceOrientations 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UIViewControllerBasedStatusBarAppearance 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /ios/AwesomeProject-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/AwesomeProject.xcodeproj/xcshareddata/xcschemes/AwesomeProject-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/AwesomeProject.xcodeproj/xcshareddata/xcschemes/AwesomeProject.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/AwesomeProject/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | @interface AppDelegate : UIResponder 11 | 12 | @property (nonatomic, strong) UIWindow *window; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /ios/AwesomeProject/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import "AppDelegate.h" 9 | #import "SplashScreen.h" 10 | #import 11 | 12 | #import 13 | #import 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | NSURL *jsCodeLocation; 20 | /*for(NSString* family in [UIFont familyNames]) 21 | { 22 | NSLog(@"%@", family); 23 | for(NSString* name in [UIFont fontNamesForFamilyName: family]){ 24 | NSLog(@" %@", name); 25 | } 26 | }*/ 27 | 28 | #ifdef DEBUG 29 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 30 | #else 31 | jsCodeLocation = [CodePush bundleURL]; 32 | #endif 33 | 34 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 35 | moduleName:@"AwesomeProject" 36 | initialProperties:nil 37 | launchOptions:launchOptions]; 38 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 39 | 40 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 41 | UIViewController *rootViewController = [UIViewController new]; 42 | rootViewController.view = rootView; 43 | self.window.rootViewController = rootViewController; 44 | [self.window makeKeyAndVisible]; 45 | 46 | [SplashScreen show]; 47 | return YES; 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /ios/AwesomeProject/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "size": "20x20", 5 | "idiom": "iphone", 6 | "filename": "NotificationIcon@2x.png", 7 | "scale": "2x" 8 | }, 9 | { 10 | "size": "20x20", 11 | "idiom": "iphone", 12 | "filename": "NotificationIcon@3x.png", 13 | "scale": "3x" 14 | }, 15 | { 16 | "size": "29x29", 17 | "idiom": "iphone", 18 | "filename": "Icon-Small.png", 19 | "scale": "1x" 20 | }, 21 | { 22 | "size": "29x29", 23 | "idiom": "iphone", 24 | "filename": "Icon-Small@2x.png", 25 | "scale": "2x" 26 | }, 27 | { 28 | "size": "29x29", 29 | "idiom": "iphone", 30 | "filename": "Icon-Small@3x.png", 31 | "scale": "3x" 32 | }, 33 | { 34 | "size": "40x40", 35 | "idiom": "iphone", 36 | "filename": "Icon-40@2x.png", 37 | "scale": "2x" 38 | }, 39 | { 40 | "size": "40x40", 41 | "idiom": "iphone", 42 | "filename": "Icon-40@3x.png", 43 | "scale": "3x" 44 | }, 45 | { 46 | "size": "57x57", 47 | "idiom": "iphone", 48 | "filename": "Icon.png", 49 | "scale": "1x" 50 | }, 51 | { 52 | "size": "57x57", 53 | "idiom": "iphone", 54 | "filename": "Icon@2x.png", 55 | "scale": "2x" 56 | }, 57 | { 58 | "size": "60x60", 59 | "idiom": "iphone", 60 | "filename": "Icon-60@2x.png", 61 | "scale": "2x" 62 | }, 63 | { 64 | "size": "60x60", 65 | "idiom": "iphone", 66 | "filename": "Icon-60@3x.png", 67 | "scale": "3x" 68 | }, 69 | { 70 | "size": "1024x1024", 71 | "idiom": "ios-marketing", 72 | "filename": "ios-marketing-1.png", 73 | "scale": "1x" 74 | } 75 | ], 76 | "info": { 77 | "version": 1, 78 | "author": "xcode" 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon-Small.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/Icon@2x.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/NotificationIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/NotificationIcon@2x.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/NotificationIcon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/NotificationIcon@3x.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/ios-marketing-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/AppIcon.appiconset/ios-marketing-1.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "version": 1, 4 | "author": "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "extent": "full-screen", 5 | "idiom": "iphone", 6 | "subtype": "2436h", 7 | "filename": "Default-Portrait-2436h@3x.png", 8 | "minimum-system-version": "11.0", 9 | "orientation": "portrait", 10 | "scale": "3x" 11 | }, 12 | { 13 | "extent": "full-screen", 14 | "idiom": "iphone", 15 | "subtype": "2436h", 16 | "filename": "Default-Landscape-2436h@3x.png", 17 | "minimum-system-version": "11.0", 18 | "orientation": "landscape", 19 | "scale": "3x" 20 | }, 21 | { 22 | "extent": "full-screen", 23 | "idiom": "iphone", 24 | "subtype": "736h", 25 | "filename": "Default-Portrait-736h@3x.png", 26 | "minimum-system-version": "8.0", 27 | "orientation": "portrait", 28 | "scale": "3x" 29 | }, 30 | { 31 | "extent": "full-screen", 32 | "idiom": "iphone", 33 | "subtype": "736h", 34 | "filename": "Default-Landscape-736h@3x.png", 35 | "minimum-system-version": "8.0", 36 | "orientation": "landscape", 37 | "scale": "3x" 38 | }, 39 | { 40 | "extent": "full-screen", 41 | "idiom": "iphone", 42 | "subtype": "667h", 43 | "filename": "Default-667h@2x.png", 44 | "minimum-system-version": "8.0", 45 | "orientation": "portrait", 46 | "scale": "2x" 47 | }, 48 | { 49 | "orientation": "portrait", 50 | "idiom": "iphone", 51 | "filename": "Default@2x-1.png", 52 | "extent": "full-screen", 53 | "minimum-system-version": "7.0", 54 | "scale": "2x" 55 | }, 56 | { 57 | "extent": "full-screen", 58 | "idiom": "iphone", 59 | "subtype": "retina4", 60 | "filename": "Default-568h@2x.png", 61 | "minimum-system-version": "7.0", 62 | "orientation": "portrait", 63 | "scale": "2x" 64 | }, 65 | { 66 | "orientation": "portrait", 67 | "idiom": "iphone", 68 | "filename": "Default.png", 69 | "extent": "full-screen", 70 | "scale": "1x" 71 | }, 72 | { 73 | "orientation": "portrait", 74 | "idiom": "iphone", 75 | "filename": "Default@2x.png", 76 | "extent": "full-screen", 77 | "scale": "2x" 78 | }, 79 | { 80 | "orientation": "portrait", 81 | "idiom": "iphone", 82 | "filename": "Default-568h@2x-1.png", 83 | "extent": "full-screen", 84 | "subtype": "retina4", 85 | "scale": "2x" 86 | } 87 | ], 88 | "info": { 89 | "version": 1, 90 | "author": "xcode" 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default-568h@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default-568h@2x-1.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default-667h@2x.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default-Landscape-2436h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default-Landscape-2436h@3x.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default-Landscape-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default-Landscape-736h@3x.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default-Portrait-2436h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default-Portrait-2436h@3x.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default-Portrait-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default-Portrait-736h@3x.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default@2x-1.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrustDec/react-native-component-redux/29ddf743f8313a7033a85974e189e4689222b024/ios/AwesomeProject/Images.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /ios/AwesomeProject/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Trust 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0.7 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | CodePushDeploymentKey 26 | $(CODEPUSH_KEY) 27 | CodePushServerURL 28 | http://180.76.138.89:3000 29 | LSRequiresIPhoneOS 30 | 31 | NSAppTransportSecurity 32 | 33 | NSAllowsArbitraryLoads 34 | 35 | NSExceptionDomains 36 | 37 | localhost 38 | 39 | NSExceptionAllowsInsecureHTTPLoads 40 | 41 | 42 | 43 | 44 | NSCameraUsageDescription 45 | 是否允许此App使用你的相机进行拍照? 46 | NSLocationAlwaysAndWhenInUseUsageDescription 47 | 我们需要通过您的地理位置信息获取您周边的相关数据 48 | NSLocationWhenInUseUsageDescription 49 | 50 | NSPhotoLibraryAddUsageDescription 51 | 请允许访问相册以选取照片 52 | NSPhotoLibraryUsageDescription 53 | 请允许访问相册以选取照片 54 | UIAppFonts 55 | 56 | Entypo.ttf 57 | EvilIcons.ttf 58 | Feather.ttf 59 | FontAwesome.ttf 60 | Foundation.ttf 61 | Ionicons.ttf 62 | MaterialCommunityIcons.ttf 63 | MaterialIcons.ttf 64 | Octicons.ttf 65 | SimpleLineIcons.ttf 66 | Zocial.ttf 67 | Michroma.ttf 68 | 69 | UIRequiredDeviceCapabilities 70 | 71 | armv7 72 | 73 | UIStatusBarStyle 74 | UIStatusBarStyleLightContent 75 | UISupportedInterfaceOrientations 76 | 77 | UIInterfaceOrientationPortrait 78 | UIInterfaceOrientationLandscapeLeft 79 | UIInterfaceOrientationLandscapeRight 80 | 81 | UIViewControllerBasedStatusBarAppearance 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /ios/AwesomeProject/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ios/AwesomeProject/zh-Hans.lproj/LaunchScreen.strings: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ios/AwesomeProjectTests/AwesomeProjectTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | #define TIMEOUT_SECONDS 600 15 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 16 | 17 | @interface AwesomeProjectTests : XCTestCase 18 | 19 | @end 20 | 21 | @implementation AwesomeProjectTests 22 | 23 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 24 | { 25 | if (test(view)) { 26 | return YES; 27 | } 28 | for (UIView *subview in [view subviews]) { 29 | if ([self findSubviewInView:subview matching:test]) { 30 | return YES; 31 | } 32 | } 33 | return NO; 34 | } 35 | 36 | - (void)testRendersWelcomeScreen 37 | { 38 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 39 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 40 | BOOL foundElement = NO; 41 | 42 | __block NSString *redboxError = nil; 43 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 44 | if (level >= RCTLogLevelError) { 45 | redboxError = message; 46 | } 47 | }); 48 | 49 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 50 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 51 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 52 | 53 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 54 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 55 | return YES; 56 | } 57 | return NO; 58 | }]; 59 | } 60 | 61 | RCTSetLogFunction(RCTDefaultLogFunction); 62 | 63 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 64 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 65 | } 66 | 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /ios/AwesomeProjectTests/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 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AwesomeProject", 3 | "version": "1.0.1", 4 | "private": true, 5 | "scripts": { 6 | "start": "node node_modules/react-native/local-cli/cli.js start", 7 | "test": "jest", 8 | "format": "prettier --write '**/*.{js,css,md,json}'" 9 | }, 10 | "dependencies": { 11 | "core-js": "^2.5.5", 12 | "immutable": "^3.8.2", 13 | "mobx": "^4.2.0", 14 | "mobx-react": "^5.0.0", 15 | "react": "16.3.1", 16 | "react-native": "0.55.3", 17 | "react-native-blur": "^3.2.2", 18 | "react-native-code-push": "^5.3.2", 19 | "react-native-linear-gradient": "^2.4.0", 20 | "react-native-modalbox": "^1.4.2", 21 | "react-native-popup-dialog": "^0.11.46", 22 | "react-native-snap-carousel": "^3.7.0", 23 | "react-native-splash-screen": "^3.0.6", 24 | "react-native-syan-image-picker": "^0.1.6", 25 | "react-native-vector-icons": "^4.6.0", 26 | "react-navigation": "^1.5.11", 27 | "react-navigation-redux-helpers": "^1.0.5", 28 | "react-redux": "^5.0.7", 29 | "redux": "^3.7.2", 30 | "redux-logger": "^3.0.6", 31 | "redux-saga": "^0.16.0", 32 | "redux-thunk": "^2.2.0", 33 | "teaset": "^0.5.6" 34 | }, 35 | "devDependencies": { 36 | "babel-jest": "24.8.0", 37 | "babel-plugin-transform-decorators-legacy": "^1.3.4", 38 | "babel-preset-react-native": "4.0.0", 39 | "babel-preset-react-native-stage-0": "^1.0.1", 40 | "jest": "24.8.0", 41 | "prettier": "^1.12.1", 42 | "react-test-renderer": "16.2.0" 43 | }, 44 | "jest": { 45 | "preset": "react-native" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ], 5 | "automerge": true 6 | } 7 | -------------------------------------------------------------------------------- /src/components/AddTodo.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { connect } from 'react-redux'; 3 | import { View, TextInput, StyleSheet, Text } from 'react-native'; 4 | import { addTodo } from '../redux/actions/todo'; 5 | import Button from '../modules/Button'; 6 | 7 | class AddTodo extends Component { 8 | state = { 9 | text: '' 10 | }; 11 | onChangeName = text => { 12 | this.setState({ text }); 13 | }; 14 | onAddTodo = () => { 15 | const { dispatch, todoText } = this.props; 16 | const text = this.input._lastNativeText; 17 | if (text && todoText !== text) { 18 | dispatch(addTodo(this.input._lastNativeText)); 19 | this.input.clear(); 20 | return; 21 | } 22 | alert('不能为空'); 23 | }; 24 | render() { 25 | return ( 26 | 27 | (this.input = ref)} 29 | placeholder="请输入待办事件" 30 | autoCapitalize="none" 31 | autoCorrect={false} 32 | style={styles.input} 33 | multiline={false} 34 | clearButtonMode="while-editing" 35 | underlineColorAndroid="transparent" 36 | placeholderTextColor="#aaa" 37 | textAlignVertical="center" 38 | underlineColorAndroid="transparent" 39 | /> 40 | 41 |