├── .babelrc ├── .buckconfig ├── .editorconfig ├── .eslintrc.js ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .prettierrc ├── .solidarity ├── .travis.yml ├── .watchmanconfig ├── LICENSE ├── README.md ├── __mocks__ └── redux-mock-store.js ├── android ├── app │ ├── BUCK │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── graphqlexample │ │ │ ├── MainActivity.java │ │ │ └── MainApplication.java │ │ └── res │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ └── 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.json ├── db.js ├── demo.gif ├── enzyme.js ├── index.js ├── ios ├── GraphqlExample-tvOS │ └── Info.plist ├── GraphqlExample-tvOSTests │ └── Info.plist ├── GraphqlExample.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── GraphqlExample-tvOS.xcscheme │ │ └── GraphqlExample.xcscheme ├── GraphqlExample │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── Info.plist │ └── main.m └── GraphqlExampleTests │ ├── GraphqlExampleTests.m │ └── Info.plist ├── package.json ├── src ├── App.js ├── apolloClient.js ├── components │ ├── Thumbnail │ │ ├── __snapshots__ │ │ │ └── test.js.snap │ │ ├── index.js │ │ ├── styles.js │ │ └── test.js │ ├── index.js │ └── package.json ├── createStore.js ├── entities │ ├── Post.js │ ├── User.js │ ├── index.js │ └── package.json ├── environment │ ├── index.js │ └── package.json ├── images │ ├── index.js │ ├── package.json │ └── placeholderUser │ │ └── user.png ├── query │ ├── getAllPopular.query.js │ ├── getUser.query.js │ ├── index.js │ └── package.json ├── screens │ ├── home │ │ ├── __snapshots__ │ │ │ └── reducer.test.js.snap │ │ ├── constants.js │ │ ├── index.js │ │ ├── reducer.js │ │ ├── reducer.test.js │ │ └── screens │ │ │ └── HomeMainScreen │ │ │ ├── actions.js │ │ │ ├── actions.testOLD.js │ │ │ ├── components │ │ │ ├── Description │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── test.js.snap │ │ │ │ ├── index.js │ │ │ │ ├── styles.js │ │ │ │ └── test.js │ │ │ ├── UserProfile │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── test.js.snap │ │ │ │ ├── index.js │ │ │ │ ├── styles.js │ │ │ │ └── test.js │ │ │ └── index.js │ │ │ ├── index.js │ │ │ ├── selectors.js │ │ │ ├── selectors.test.js │ │ │ └── styles.js │ └── index.js └── themes │ ├── colors.js │ ├── fonts.js │ ├── index.js │ ├── layout.js │ └── package.json └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"], 3 | "env": { 4 | "production": { 5 | "plugins": ["transform-remove-console"] 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | root = true 4 | 5 | [*] 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = false 9 | insert_final_newline = true 10 | indent_style = space 11 | 12 | [{*.yml,*.json,*.scss,*.js}] 13 | indent_style = space 14 | indent_size = 2 15 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | 'airbnb', 4 | 'plugin:flowtype/recommended', 5 | 'plugin:react/recommended', 6 | 'prettier', 7 | 'prettier/flowtype', 8 | 'prettier/react', 9 | ], 10 | plugins: ['flowtype', 'react', 'prettier', 'react-native'], 11 | parserOptions: { 12 | ecmaVersion: 2016, 13 | sourceType: 'module', 14 | ecmaFeatures: { 15 | jsx: true, 16 | }, 17 | }, 18 | env: { 19 | es6: true, 20 | node: true, 21 | }, 22 | rules: { 23 | 'comma-dangle': 0, 24 | 'consistent-return': 1, 25 | 'global-require': 0, 26 | 'import/extensions': [2, 'never'], 27 | 'import/no-extraneous-dependencies': ['error', { packageDir: './' }], 28 | 'import/no-unresolved': [2, { ignore: ['@'] }], 29 | 'import/prefer-default-export': 'off', 30 | 'import/no-named-as-default-member': 'off', 31 | 'no-case-declarations': 1, 32 | 'no-confusing-arrow': 0, 33 | 'no-console': 0, 34 | 'no-param-reassign': 0, 35 | 'no-return-assign': 1, 36 | 'no-shadow': 1, 37 | 'no-underscore-dangle': 0, 38 | 'no-use-before-define': 0, 39 | 'padded-blocks': 0, 40 | 'quote-props': 1, 41 | quotes: ['error', 'single'], 42 | 'react-native/no-unused-styles': 1, 43 | 'react-native/split-platform-components': 1, 44 | 'react/jsx-filename-extension': 0, 45 | 'react/no-array-index-key': 0, 46 | 'react/forbid-prop-types': [0, { forbid: ['any', 'array'] }], 47 | 'react/jsx-no-bind': 1, 48 | 'react/no-multi-comp': 1, 49 | 'react/prefer-stateless-function': 1, 50 | 'react/display-name': 0, 51 | 'react/prefer-stateless-function': 'off', 52 | }, 53 | settings: { 54 | 'import/resolver': { 55 | reactnative: {}, 56 | }, 57 | }, 58 | globals: { 59 | it: false, 60 | describe: false, 61 | expect: false, 62 | }, 63 | }; 64 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | 16 | ; Ignore polyfills 17 | .*/Libraries/polyfills/.* 18 | 19 | [include] 20 | 21 | [libs] 22 | node_modules/react-native/Libraries/react-native/react-native-interface.js 23 | node_modules/react-native/flow/ 24 | 25 | [options] 26 | emoji=true 27 | 28 | module.system=haste 29 | 30 | munge_underscores=true 31 | 32 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 33 | 34 | suppress_type=$FlowIssue 35 | suppress_type=$FlowFixMe 36 | suppress_type=$FlowFixMeProps 37 | suppress_type=$FlowFixMeState 38 | suppress_type=$FixMe 39 | 40 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 41 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 42 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 43 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 44 | 45 | unsafe.enable_getters_and_setters=true 46 | 47 | [version] 48 | ^0.56.0 49 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true 3 | } 4 | -------------------------------------------------------------------------------- /.solidarity: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/solidaritySchema", 3 | "requirements": { 4 | "Node": [ 5 | { 6 | "rule": "cli", 7 | "binary": "node", 8 | "semver": "8.9.1" 9 | } 10 | ], 11 | "Watchman": [ 12 | { 13 | "rule": "cli", 14 | "binary": "watchman", 15 | "error": "Please install watchman on this machine. Refer to the official Watchman installation instructions for additional help.", 16 | "platform": [ 17 | "darwin", 18 | "linux" 19 | ] 20 | } 21 | ], 22 | "React Native": [ 23 | { 24 | "rule": "cli", 25 | "binary": "react-native", 26 | "semver": "0.50.3", 27 | "line": 2 28 | } 29 | ], 30 | "Package JSON": [ 31 | { 32 | "rule": "file", 33 | "location": "./package.json" 34 | } 35 | ], 36 | "NPM": [ 37 | { 38 | "rule": "cli", 39 | "binary": "npm", 40 | "semver": "5.5.1" 41 | } 42 | ], 43 | "Yarn": [ 44 | { 45 | "rule": "cli", 46 | "binary": "yarn", 47 | "version": "--version", 48 | "semver": "1.3.2" 49 | } 50 | ], 51 | "Android": [ 52 | { 53 | "rule": "env", 54 | "variable": "ANDROID_HOME", 55 | "error": "The ANDROID_HOME environment variable must be set to your local SDK. Refer to getting started docs for help." 56 | } 57 | ], 58 | "Xcode": [ 59 | { 60 | "rule": "cli", 61 | "binary": "xcodebuild", 62 | "semver": "9.1", 63 | "platform": "darwin" 64 | }, 65 | { 66 | "rule": "cli", 67 | "binary": "xcrun", 68 | "semver": "35", 69 | "platform": "darwin" 70 | } 71 | ] 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "8" 4 | notifications: 5 | email: 6 | on_success: never 7 | on_failure: always 8 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React native graphql example with redux and apollo 2 | 3 | ![platforms](https://img.shields.io/badge/platforms-Android%20|%20iOS-brightgreen.svg) 4 | ![Travis](https://travis-ci.org/gusgard/react-native-graphql-example.svg?branch=master) 5 | ![license](https://img.shields.io/npm/l/react-native-swiper-flatlist.svg) 6 | 7 | # Installation 8 | 9 | ## Setup 10 | 11 | Run `yarn install` 12 | 13 | ## Start 14 | 15 | Run `yarn start` and `yarn api` 16 | 17 | ## Simulator 18 | 19 | For an Android device `yarn android` 20 | 21 | For an iOS device `yarn ios` 22 | 23 | ![Demo](./demo.gif) 24 | 25 | ## Author 26 | 27 | Gustavo Gard 28 | -------------------------------------------------------------------------------- /__mocks__/redux-mock-store.js: -------------------------------------------------------------------------------- 1 | import configureMockStore from 'redux-mock-store' 2 | import thunk from 'redux-thunk' 3 | 4 | const middlewares = [thunk] 5 | const mockStore = configureMockStore(middlewares) 6 | 7 | export default mockStore 8 | -------------------------------------------------------------------------------- /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.graphqlexample", 49 | ) 50 | 51 | android_resource( 52 | name = "res", 53 | package = "com.graphqlexample", 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 | /** 82 | * Set this to true to create two separate APKs instead of one: 83 | * - An APK that only works on ARM devices 84 | * - An APK that only works on x86 devices 85 | * The advantage is the size of the APK is reduced by about 4MB. 86 | * Upload all the APKs to the Play Store and people will download 87 | * the correct one based on the CPU architecture of their device. 88 | */ 89 | def enableSeparateBuildPerCPUArchitecture = false 90 | 91 | /** 92 | * Run Proguard to shrink the Java bytecode in release builds. 93 | */ 94 | def enableProguardInReleaseBuilds = false 95 | 96 | android { 97 | compileSdkVersion 23 98 | buildToolsVersion "23.0.1" 99 | 100 | defaultConfig { 101 | applicationId "com.graphqlexample" 102 | minSdkVersion 16 103 | targetSdkVersion 22 104 | versionCode 1 105 | versionName "1.0" 106 | ndk { 107 | abiFilters "armeabi-v7a", "x86" 108 | } 109 | } 110 | splits { 111 | abi { 112 | reset() 113 | enable enableSeparateBuildPerCPUArchitecture 114 | universalApk false // If true, also generate a universal APK 115 | include "armeabi-v7a", "x86" 116 | } 117 | } 118 | buildTypes { 119 | release { 120 | minifyEnabled enableProguardInReleaseBuilds 121 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 122 | } 123 | } 124 | // applicationVariants are e.g. debug, release 125 | applicationVariants.all { variant -> 126 | variant.outputs.each { output -> 127 | // For each separate APK per architecture, set a unique version code as described here: 128 | // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits 129 | def versionCodes = ["armeabi-v7a":1, "x86":2] 130 | def abi = output.getFilter(OutputFile.ABI) 131 | if (abi != null) { // null for the universal-debug, universal-release variants 132 | output.versionCodeOverride = 133 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 134 | } 135 | } 136 | } 137 | } 138 | 139 | dependencies { 140 | compile fileTree(dir: "libs", include: ["*.jar"]) 141 | compile "com.android.support:appcompat-v7:23.0.1" 142 | compile "com.facebook.react:react-native:+" // From node_modules 143 | } 144 | 145 | // Run this once to be able to run the application with BUCK 146 | // puts all compile dependencies into folder libs for BUCK to use 147 | task copyDownloadableDepsToLibs(type: Copy) { 148 | from configurations.compile 149 | into 'libs' 150 | } 151 | -------------------------------------------------------------------------------- /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 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 19 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/graphqlexample/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.graphqlexample; 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 "GraphqlExample"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/graphqlexample/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.graphqlexample; 2 | 3 | import android.app.Application; 4 | 5 | import com.facebook.react.ReactApplication; 6 | import com.facebook.react.ReactNativeHost; 7 | import com.facebook.react.ReactPackage; 8 | import com.facebook.react.shell.MainReactPackage; 9 | import com.facebook.soloader.SoLoader; 10 | 11 | import java.util.Arrays; 12 | import java.util.List; 13 | 14 | public class MainApplication extends Application implements ReactApplication { 15 | 16 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 17 | @Override 18 | public boolean getUseDeveloperSupport() { 19 | return BuildConfig.DEBUG; 20 | } 21 | 22 | @Override 23 | protected List getPackages() { 24 | return Arrays.asList( 25 | new MainReactPackage() 26 | ); 27 | } 28 | 29 | @Override 30 | protected String getJSMainModuleName() { 31 | return "index"; 32 | } 33 | }; 34 | 35 | @Override 36 | public ReactNativeHost getReactNativeHost() { 37 | return mReactNativeHost; 38 | } 39 | 40 | @Override 41 | public void onCreate() { 42 | super.onCreate(); 43 | SoLoader.init(this, /* native exopackage */ false); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gusgard/react-native-graphql-example/366369d38fd7f9111087106aac02f3512d4fbce8/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gusgard/react-native-graphql-example/366369d38fd7f9111087106aac02f3512d4fbce8/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gusgard/react-native-graphql-example/366369d38fd7f9111087106aac02f3512d4fbce8/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gusgard/react-native-graphql-example/366369d38fd7f9111087106aac02f3512d4fbce8/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | GraphqlExample 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 | } 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 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gusgard/react-native-graphql-example/366369d38fd7f9111087106aac02f3512d4fbce8/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-2.14.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 = 'GraphqlExample' 2 | 3 | include ':app' 4 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "GraphqlExample", 3 | "displayName": "GraphqlExample" 4 | } -------------------------------------------------------------------------------- /db.js: -------------------------------------------------------------------------------- 1 | const Faker = require('faker'); 2 | 3 | const newImage = { 4 | 0: Faker.image.business, 5 | 1: Faker.image.cats, 6 | 2: Faker.image.city, 7 | 3: Faker.image.food, 8 | 4: Faker.image.nightlife, 9 | 5: Faker.image.fashion, 10 | 6: Faker.image.people, 11 | 7: Faker.image.nature, 12 | 8: Faker.image.animals, 13 | 9: Faker.image.imageUrl 14 | }; 15 | const getNewImage = index => 16 | newImage[index % (Object.keys(newImage).length - 1)](); 17 | 18 | const user = { 19 | description: Faker.lorem.paragraphs(), 20 | id: 1234, 21 | name: Faker.name.findName(), 22 | thumbnail: Faker.image.avatar() 23 | }; 24 | 25 | const photo = index => ({ 26 | id: Faker.random.uuid(), 27 | thumbnail: getNewImage(index), 28 | user_id: user.id 29 | }); 30 | 31 | const popular = index => ({ 32 | id: Faker.random.uuid(), 33 | thumbnail: getNewImage(index) 34 | }); 35 | 36 | const MAX_PHOTOS = Math.round(Math.random() * 5) + 3; 37 | const profiles = Array.from(Array(MAX_PHOTOS)).map((_, index) => photo(index)); 38 | 39 | const MAX_POPULAR = Math.round(Math.random() * 50) + 15; 40 | const populars = Array.from(Array(MAX_POPULAR)).map((_, index) => 41 | popular(index) 42 | ); 43 | 44 | module.exports = { 45 | profiles, 46 | populars, 47 | users: [user] 48 | }; 49 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gusgard/react-native-graphql-example/366369d38fd7f9111087106aac02f3512d4fbce8/demo.gif -------------------------------------------------------------------------------- /enzyme.js: -------------------------------------------------------------------------------- 1 | import { configure } from 'enzyme'; 2 | import Adapter from 'enzyme-adapter-react-16'; 3 | 4 | configure({ adapter: new Adapter() }); 5 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | import App from './src/App'; 3 | 4 | AppRegistry.registerComponent('GraphqlExample', () => App); 5 | -------------------------------------------------------------------------------- /ios/GraphqlExample-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/GraphqlExample-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/GraphqlExample.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 /* GraphqlExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* GraphqlExampleTests.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 | 2D02E4C91E0B4AEC006451C7 /* libReact-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */; }; 36 | 2DCD954D1E0B4F2C00145EB5 /* GraphqlExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* GraphqlExampleTests.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 = GraphqlExample; 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 = "GraphqlExample-tvOS"; 112 | }; 113 | 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = { 114 | isa = PBXContainerItemProxy; 115 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 116 | proxyType = 2; 117 | remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; 118 | remoteInfo = "RCTImage-tvOS"; 119 | }; 120 | 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */ = { 121 | isa = PBXContainerItemProxy; 122 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 123 | proxyType = 2; 124 | remoteGlobalIDString = 2D2A28471D9B043800D4039D; 125 | remoteInfo = "RCTLinking-tvOS"; 126 | }; 127 | 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 128 | isa = PBXContainerItemProxy; 129 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 130 | proxyType = 2; 131 | remoteGlobalIDString = 2D2A28541D9B044C00D4039D; 132 | remoteInfo = "RCTNetwork-tvOS"; 133 | }; 134 | 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 135 | isa = PBXContainerItemProxy; 136 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 137 | proxyType = 2; 138 | remoteGlobalIDString = 2D2A28611D9B046600D4039D; 139 | remoteInfo = "RCTSettings-tvOS"; 140 | }; 141 | 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */ = { 142 | isa = PBXContainerItemProxy; 143 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 144 | proxyType = 2; 145 | remoteGlobalIDString = 2D2A287B1D9B048500D4039D; 146 | remoteInfo = "RCTText-tvOS"; 147 | }; 148 | 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */ = { 149 | isa = PBXContainerItemProxy; 150 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 151 | proxyType = 2; 152 | remoteGlobalIDString = 2D2A28881D9B049200D4039D; 153 | remoteInfo = "RCTWebSocket-tvOS"; 154 | }; 155 | 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */ = { 156 | isa = PBXContainerItemProxy; 157 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 158 | proxyType = 2; 159 | remoteGlobalIDString = 2D2A28131D9B038B00D4039D; 160 | remoteInfo = "React-tvOS"; 161 | }; 162 | 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */ = { 163 | isa = PBXContainerItemProxy; 164 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 165 | proxyType = 2; 166 | remoteGlobalIDString = 3D3C059A1DE3340900C268FA; 167 | remoteInfo = yoga; 168 | }; 169 | 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */ = { 170 | isa = PBXContainerItemProxy; 171 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 172 | proxyType = 2; 173 | remoteGlobalIDString = 3D3C06751DE3340C00C268FA; 174 | remoteInfo = "yoga-tvOS"; 175 | }; 176 | 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */ = { 177 | isa = PBXContainerItemProxy; 178 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 179 | proxyType = 2; 180 | remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; 181 | remoteInfo = cxxreact; 182 | }; 183 | 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 184 | isa = PBXContainerItemProxy; 185 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 186 | proxyType = 2; 187 | remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; 188 | remoteInfo = "cxxreact-tvOS"; 189 | }; 190 | 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 191 | isa = PBXContainerItemProxy; 192 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 193 | proxyType = 2; 194 | remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4; 195 | remoteInfo = jschelpers; 196 | }; 197 | 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */ = { 198 | isa = PBXContainerItemProxy; 199 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 200 | proxyType = 2; 201 | remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; 202 | remoteInfo = "jschelpers-tvOS"; 203 | }; 204 | 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { 205 | isa = PBXContainerItemProxy; 206 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 207 | proxyType = 2; 208 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 209 | remoteInfo = RCTAnimation; 210 | }; 211 | 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */ = { 212 | isa = PBXContainerItemProxy; 213 | containerPortal = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 214 | proxyType = 2; 215 | remoteGlobalIDString = 2D2A28201D9B03D100D4039D; 216 | remoteInfo = "RCTAnimation-tvOS"; 217 | }; 218 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 219 | isa = PBXContainerItemProxy; 220 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 221 | proxyType = 2; 222 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 223 | remoteInfo = RCTLinking; 224 | }; 225 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 226 | isa = PBXContainerItemProxy; 227 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 228 | proxyType = 2; 229 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 230 | remoteInfo = RCTText; 231 | }; 232 | ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */ = { 233 | isa = PBXContainerItemProxy; 234 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 235 | proxyType = 2; 236 | remoteGlobalIDString = 358F4ED71D1E81A9004DF814; 237 | remoteInfo = RCTBlob; 238 | }; 239 | EC0DF30D1FC4B2D800D3E469 /* PBXContainerItemProxy */ = { 240 | isa = PBXContainerItemProxy; 241 | containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 242 | proxyType = 2; 243 | remoteGlobalIDString = ADD01A681E09402E00F6D226; 244 | remoteInfo = "RCTBlob-tvOS"; 245 | }; 246 | EC0DF31F1FC4B2D800D3E469 /* PBXContainerItemProxy */ = { 247 | isa = PBXContainerItemProxy; 248 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 249 | proxyType = 2; 250 | remoteGlobalIDString = 3DBE0D001F3B181A0099AA32; 251 | remoteInfo = fishhook; 252 | }; 253 | EC0DF3211FC4B2D800D3E469 /* PBXContainerItemProxy */ = { 254 | isa = PBXContainerItemProxy; 255 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 256 | proxyType = 2; 257 | remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32; 258 | remoteInfo = "fishhook-tvOS"; 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 /* GraphqlExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GraphqlExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 270 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 271 | 00E356F21AD99517003FC87E /* GraphqlExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GraphqlExampleTests.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 /* GraphqlExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GraphqlExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 275 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = GraphqlExample/AppDelegate.h; sourceTree = ""; }; 276 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = GraphqlExample/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 = GraphqlExample/Images.xcassets; sourceTree = ""; }; 279 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = GraphqlExample/Info.plist; sourceTree = ""; }; 280 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = GraphqlExample/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 /* GraphqlExample-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "GraphqlExample-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 283 | 2D02E4901E0B4A5D006451C7 /* GraphqlExample-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "GraphqlExample-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 284 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; 285 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 286 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 287 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = ""; }; 288 | /* End PBXFileReference section */ 289 | 290 | /* Begin PBXFrameworksBuildPhase section */ 291 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 292 | isa = PBXFrameworksBuildPhase; 293 | buildActionMask = 2147483647; 294 | files = ( 295 | 140ED2AC1D01E1AD002B40FF /* libReact.a in Frameworks */, 296 | ); 297 | runOnlyForDeploymentPostprocessing = 0; 298 | }; 299 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 300 | isa = PBXFrameworksBuildPhase; 301 | buildActionMask = 2147483647; 302 | files = ( 303 | ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */, 304 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 305 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 306 | 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */, 307 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 308 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 309 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 310 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 311 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 312 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 313 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 314 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 315 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 316 | ); 317 | runOnlyForDeploymentPostprocessing = 0; 318 | }; 319 | 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { 320 | isa = PBXFrameworksBuildPhase; 321 | buildActionMask = 2147483647; 322 | files = ( 323 | 2D02E4C91E0B4AEC006451C7 /* libReact-tvOS.a in Frameworks */, 324 | 2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */, 325 | 2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */, 326 | 2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */, 327 | 2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */, 328 | 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */, 329 | 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */, 330 | 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */, 331 | ); 332 | runOnlyForDeploymentPostprocessing = 0; 333 | }; 334 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { 335 | isa = PBXFrameworksBuildPhase; 336 | buildActionMask = 2147483647; 337 | files = ( 338 | ); 339 | runOnlyForDeploymentPostprocessing = 0; 340 | }; 341 | /* End PBXFrameworksBuildPhase section */ 342 | 343 | /* Begin PBXGroup section */ 344 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 345 | isa = PBXGroup; 346 | children = ( 347 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 348 | ); 349 | name = Products; 350 | sourceTree = ""; 351 | }; 352 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 353 | isa = PBXGroup; 354 | children = ( 355 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 356 | ); 357 | name = Products; 358 | sourceTree = ""; 359 | }; 360 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 361 | isa = PBXGroup; 362 | children = ( 363 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 364 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */, 365 | ); 366 | name = Products; 367 | sourceTree = ""; 368 | }; 369 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 370 | isa = PBXGroup; 371 | children = ( 372 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 373 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */, 374 | ); 375 | name = Products; 376 | sourceTree = ""; 377 | }; 378 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 379 | isa = PBXGroup; 380 | children = ( 381 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 382 | ); 383 | name = Products; 384 | sourceTree = ""; 385 | }; 386 | 00E356EF1AD99517003FC87E /* GraphqlExampleTests */ = { 387 | isa = PBXGroup; 388 | children = ( 389 | 00E356F21AD99517003FC87E /* GraphqlExampleTests.m */, 390 | 00E356F01AD99517003FC87E /* Supporting Files */, 391 | ); 392 | path = GraphqlExampleTests; 393 | sourceTree = ""; 394 | }; 395 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 396 | isa = PBXGroup; 397 | children = ( 398 | 00E356F11AD99517003FC87E /* Info.plist */, 399 | ); 400 | name = "Supporting Files"; 401 | sourceTree = ""; 402 | }; 403 | 139105B71AF99BAD00B5F7CC /* Products */ = { 404 | isa = PBXGroup; 405 | children = ( 406 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 407 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */, 408 | ); 409 | name = Products; 410 | sourceTree = ""; 411 | }; 412 | 139FDEE71B06529A00C62182 /* Products */ = { 413 | isa = PBXGroup; 414 | children = ( 415 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 416 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */, 417 | EC0DF3201FC4B2D800D3E469 /* libfishhook.a */, 418 | EC0DF3221FC4B2D800D3E469 /* libfishhook-tvOS.a */, 419 | ); 420 | name = Products; 421 | sourceTree = ""; 422 | }; 423 | 13B07FAE1A68108700A75B9A /* GraphqlExample */ = { 424 | isa = PBXGroup; 425 | children = ( 426 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 427 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 428 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 429 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 430 | 13B07FB61A68108700A75B9A /* Info.plist */, 431 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 432 | 13B07FB71A68108700A75B9A /* main.m */, 433 | ); 434 | name = GraphqlExample; 435 | sourceTree = ""; 436 | }; 437 | 146834001AC3E56700842450 /* Products */ = { 438 | isa = PBXGroup; 439 | children = ( 440 | 146834041AC3E56700842450 /* libReact.a */, 441 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */, 442 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */, 443 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */, 444 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */, 445 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */, 446 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */, 447 | 3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */, 448 | ); 449 | name = Products; 450 | sourceTree = ""; 451 | }; 452 | 5E91572E1DD0AC6500FF2AA8 /* Products */ = { 453 | isa = PBXGroup; 454 | children = ( 455 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */, 456 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */, 457 | ); 458 | name = Products; 459 | sourceTree = ""; 460 | }; 461 | 78C398B11ACF4ADC00677621 /* Products */ = { 462 | isa = PBXGroup; 463 | children = ( 464 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 465 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */, 466 | ); 467 | name = Products; 468 | sourceTree = ""; 469 | }; 470 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 471 | isa = PBXGroup; 472 | children = ( 473 | 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */, 474 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 475 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 476 | ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */, 477 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 478 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 479 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 480 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 481 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 482 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 483 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 484 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 485 | ); 486 | name = Libraries; 487 | sourceTree = ""; 488 | }; 489 | 832341B11AAA6A8300B99B32 /* Products */ = { 490 | isa = PBXGroup; 491 | children = ( 492 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 493 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */, 494 | ); 495 | name = Products; 496 | sourceTree = ""; 497 | }; 498 | 83CBB9F61A601CBA00E9B192 = { 499 | isa = PBXGroup; 500 | children = ( 501 | 13B07FAE1A68108700A75B9A /* GraphqlExample */, 502 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 503 | 00E356EF1AD99517003FC87E /* GraphqlExampleTests */, 504 | 83CBBA001A601CBA00E9B192 /* Products */, 505 | ); 506 | indentWidth = 2; 507 | sourceTree = ""; 508 | tabWidth = 2; 509 | usesTabs = 0; 510 | }; 511 | 83CBBA001A601CBA00E9B192 /* Products */ = { 512 | isa = PBXGroup; 513 | children = ( 514 | 13B07F961A680F5B00A75B9A /* GraphqlExample.app */, 515 | 00E356EE1AD99517003FC87E /* GraphqlExampleTests.xctest */, 516 | 2D02E47B1E0B4A5D006451C7 /* GraphqlExample-tvOS.app */, 517 | 2D02E4901E0B4A5D006451C7 /* GraphqlExample-tvOSTests.xctest */, 518 | ); 519 | name = Products; 520 | sourceTree = ""; 521 | }; 522 | ADBDB9201DFEBF0600ED6528 /* Products */ = { 523 | isa = PBXGroup; 524 | children = ( 525 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */, 526 | EC0DF30E1FC4B2D800D3E469 /* libRCTBlob-tvOS.a */, 527 | ); 528 | name = Products; 529 | sourceTree = ""; 530 | }; 531 | /* End PBXGroup section */ 532 | 533 | /* Begin PBXNativeTarget section */ 534 | 00E356ED1AD99517003FC87E /* GraphqlExampleTests */ = { 535 | isa = PBXNativeTarget; 536 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "GraphqlExampleTests" */; 537 | buildPhases = ( 538 | 00E356EA1AD99517003FC87E /* Sources */, 539 | 00E356EB1AD99517003FC87E /* Frameworks */, 540 | 00E356EC1AD99517003FC87E /* Resources */, 541 | ); 542 | buildRules = ( 543 | ); 544 | dependencies = ( 545 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 546 | ); 547 | name = GraphqlExampleTests; 548 | productName = GraphqlExampleTests; 549 | productReference = 00E356EE1AD99517003FC87E /* GraphqlExampleTests.xctest */; 550 | productType = "com.apple.product-type.bundle.unit-test"; 551 | }; 552 | 13B07F861A680F5B00A75B9A /* GraphqlExample */ = { 553 | isa = PBXNativeTarget; 554 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "GraphqlExample" */; 555 | buildPhases = ( 556 | 13B07F871A680F5B00A75B9A /* Sources */, 557 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 558 | 13B07F8E1A680F5B00A75B9A /* Resources */, 559 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 560 | ); 561 | buildRules = ( 562 | ); 563 | dependencies = ( 564 | ); 565 | name = GraphqlExample; 566 | productName = "Hello World"; 567 | productReference = 13B07F961A680F5B00A75B9A /* GraphqlExample.app */; 568 | productType = "com.apple.product-type.application"; 569 | }; 570 | 2D02E47A1E0B4A5D006451C7 /* GraphqlExample-tvOS */ = { 571 | isa = PBXNativeTarget; 572 | buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "GraphqlExample-tvOS" */; 573 | buildPhases = ( 574 | 2D02E4771E0B4A5D006451C7 /* Sources */, 575 | 2D02E4781E0B4A5D006451C7 /* Frameworks */, 576 | 2D02E4791E0B4A5D006451C7 /* Resources */, 577 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, 578 | ); 579 | buildRules = ( 580 | ); 581 | dependencies = ( 582 | ); 583 | name = "GraphqlExample-tvOS"; 584 | productName = "GraphqlExample-tvOS"; 585 | productReference = 2D02E47B1E0B4A5D006451C7 /* GraphqlExample-tvOS.app */; 586 | productType = "com.apple.product-type.application"; 587 | }; 588 | 2D02E48F1E0B4A5D006451C7 /* GraphqlExample-tvOSTests */ = { 589 | isa = PBXNativeTarget; 590 | buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "GraphqlExample-tvOSTests" */; 591 | buildPhases = ( 592 | 2D02E48C1E0B4A5D006451C7 /* Sources */, 593 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */, 594 | 2D02E48E1E0B4A5D006451C7 /* Resources */, 595 | ); 596 | buildRules = ( 597 | ); 598 | dependencies = ( 599 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, 600 | ); 601 | name = "GraphqlExample-tvOSTests"; 602 | productName = "GraphqlExample-tvOSTests"; 603 | productReference = 2D02E4901E0B4A5D006451C7 /* GraphqlExample-tvOSTests.xctest */; 604 | productType = "com.apple.product-type.bundle.unit-test"; 605 | }; 606 | /* End PBXNativeTarget section */ 607 | 608 | /* Begin PBXProject section */ 609 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 610 | isa = PBXProject; 611 | attributes = { 612 | LastUpgradeCheck = 0610; 613 | ORGANIZATIONNAME = Facebook; 614 | TargetAttributes = { 615 | 00E356ED1AD99517003FC87E = { 616 | CreatedOnToolsVersion = 6.2; 617 | DevelopmentTeam = Z4QMLBL3L8; 618 | ProvisioningStyle = Manual; 619 | TestTargetID = 13B07F861A680F5B00A75B9A; 620 | }; 621 | 13B07F861A680F5B00A75B9A = { 622 | DevelopmentTeam = Z4QMLBL3L8; 623 | ProvisioningStyle = Manual; 624 | }; 625 | 2D02E47A1E0B4A5D006451C7 = { 626 | CreatedOnToolsVersion = 8.2.1; 627 | ProvisioningStyle = Automatic; 628 | }; 629 | 2D02E48F1E0B4A5D006451C7 = { 630 | CreatedOnToolsVersion = 8.2.1; 631 | ProvisioningStyle = Automatic; 632 | TestTargetID = 2D02E47A1E0B4A5D006451C7; 633 | }; 634 | }; 635 | }; 636 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "GraphqlExample" */; 637 | compatibilityVersion = "Xcode 3.2"; 638 | developmentRegion = English; 639 | hasScannedForEncodings = 0; 640 | knownRegions = ( 641 | en, 642 | Base, 643 | ); 644 | mainGroup = 83CBB9F61A601CBA00E9B192; 645 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 646 | projectDirPath = ""; 647 | projectReferences = ( 648 | { 649 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 650 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 651 | }, 652 | { 653 | ProductGroup = 5E91572E1DD0AC6500FF2AA8 /* Products */; 654 | ProjectRef = 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */; 655 | }, 656 | { 657 | ProductGroup = ADBDB9201DFEBF0600ED6528 /* Products */; 658 | ProjectRef = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */; 659 | }, 660 | { 661 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 662 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 663 | }, 664 | { 665 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 666 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 667 | }, 668 | { 669 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 670 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 671 | }, 672 | { 673 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 674 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 675 | }, 676 | { 677 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 678 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 679 | }, 680 | { 681 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 682 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 683 | }, 684 | { 685 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 686 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 687 | }, 688 | { 689 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 690 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 691 | }, 692 | { 693 | ProductGroup = 146834001AC3E56700842450 /* Products */; 694 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 695 | }, 696 | ); 697 | projectRoot = ""; 698 | targets = ( 699 | 13B07F861A680F5B00A75B9A /* GraphqlExample */, 700 | 00E356ED1AD99517003FC87E /* GraphqlExampleTests */, 701 | 2D02E47A1E0B4A5D006451C7 /* GraphqlExample-tvOS */, 702 | 2D02E48F1E0B4A5D006451C7 /* GraphqlExample-tvOSTests */, 703 | ); 704 | }; 705 | /* End PBXProject section */ 706 | 707 | /* Begin PBXReferenceProxy section */ 708 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 709 | isa = PBXReferenceProxy; 710 | fileType = archive.ar; 711 | path = libRCTActionSheet.a; 712 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 713 | sourceTree = BUILT_PRODUCTS_DIR; 714 | }; 715 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 716 | isa = PBXReferenceProxy; 717 | fileType = archive.ar; 718 | path = libRCTGeolocation.a; 719 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 720 | sourceTree = BUILT_PRODUCTS_DIR; 721 | }; 722 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 723 | isa = PBXReferenceProxy; 724 | fileType = archive.ar; 725 | path = libRCTImage.a; 726 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 727 | sourceTree = BUILT_PRODUCTS_DIR; 728 | }; 729 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 730 | isa = PBXReferenceProxy; 731 | fileType = archive.ar; 732 | path = libRCTNetwork.a; 733 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 734 | sourceTree = BUILT_PRODUCTS_DIR; 735 | }; 736 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 737 | isa = PBXReferenceProxy; 738 | fileType = archive.ar; 739 | path = libRCTVibration.a; 740 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 741 | sourceTree = BUILT_PRODUCTS_DIR; 742 | }; 743 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 744 | isa = PBXReferenceProxy; 745 | fileType = archive.ar; 746 | path = libRCTSettings.a; 747 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 748 | sourceTree = BUILT_PRODUCTS_DIR; 749 | }; 750 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 751 | isa = PBXReferenceProxy; 752 | fileType = archive.ar; 753 | path = libRCTWebSocket.a; 754 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 755 | sourceTree = BUILT_PRODUCTS_DIR; 756 | }; 757 | 146834041AC3E56700842450 /* libReact.a */ = { 758 | isa = PBXReferenceProxy; 759 | fileType = archive.ar; 760 | path = libReact.a; 761 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 762 | sourceTree = BUILT_PRODUCTS_DIR; 763 | }; 764 | 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = { 765 | isa = PBXReferenceProxy; 766 | fileType = archive.ar; 767 | path = "libRCTImage-tvOS.a"; 768 | remoteRef = 3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */; 769 | sourceTree = BUILT_PRODUCTS_DIR; 770 | }; 771 | 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */ = { 772 | isa = PBXReferenceProxy; 773 | fileType = archive.ar; 774 | path = "libRCTLinking-tvOS.a"; 775 | remoteRef = 3DAD3E871DF850E9000B6D8A /* PBXContainerItemProxy */; 776 | sourceTree = BUILT_PRODUCTS_DIR; 777 | }; 778 | 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */ = { 779 | isa = PBXReferenceProxy; 780 | fileType = archive.ar; 781 | path = "libRCTNetwork-tvOS.a"; 782 | remoteRef = 3DAD3E8B1DF850E9000B6D8A /* PBXContainerItemProxy */; 783 | sourceTree = BUILT_PRODUCTS_DIR; 784 | }; 785 | 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */ = { 786 | isa = PBXReferenceProxy; 787 | fileType = archive.ar; 788 | path = "libRCTSettings-tvOS.a"; 789 | remoteRef = 3DAD3E8F1DF850E9000B6D8A /* PBXContainerItemProxy */; 790 | sourceTree = BUILT_PRODUCTS_DIR; 791 | }; 792 | 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */ = { 793 | isa = PBXReferenceProxy; 794 | fileType = archive.ar; 795 | path = "libRCTText-tvOS.a"; 796 | remoteRef = 3DAD3E931DF850E9000B6D8A /* PBXContainerItemProxy */; 797 | sourceTree = BUILT_PRODUCTS_DIR; 798 | }; 799 | 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */ = { 800 | isa = PBXReferenceProxy; 801 | fileType = archive.ar; 802 | path = "libRCTWebSocket-tvOS.a"; 803 | remoteRef = 3DAD3E981DF850E9000B6D8A /* PBXContainerItemProxy */; 804 | sourceTree = BUILT_PRODUCTS_DIR; 805 | }; 806 | 3DAD3EA31DF850E9000B6D8A /* libReact-tvOS.a */ = { 807 | isa = PBXReferenceProxy; 808 | fileType = archive.ar; 809 | path = "libReact-tvOS.a"; 810 | remoteRef = 3DAD3EA21DF850E9000B6D8A /* PBXContainerItemProxy */; 811 | sourceTree = BUILT_PRODUCTS_DIR; 812 | }; 813 | 3DAD3EA51DF850E9000B6D8A /* libyoga.a */ = { 814 | isa = PBXReferenceProxy; 815 | fileType = archive.ar; 816 | path = libyoga.a; 817 | remoteRef = 3DAD3EA41DF850E9000B6D8A /* PBXContainerItemProxy */; 818 | sourceTree = BUILT_PRODUCTS_DIR; 819 | }; 820 | 3DAD3EA71DF850E9000B6D8A /* libyoga.a */ = { 821 | isa = PBXReferenceProxy; 822 | fileType = archive.ar; 823 | path = libyoga.a; 824 | remoteRef = 3DAD3EA61DF850E9000B6D8A /* PBXContainerItemProxy */; 825 | sourceTree = BUILT_PRODUCTS_DIR; 826 | }; 827 | 3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */ = { 828 | isa = PBXReferenceProxy; 829 | fileType = archive.ar; 830 | path = libcxxreact.a; 831 | remoteRef = 3DAD3EA81DF850E9000B6D8A /* PBXContainerItemProxy */; 832 | sourceTree = BUILT_PRODUCTS_DIR; 833 | }; 834 | 3DAD3EAB1DF850E9000B6D8A /* libcxxreact.a */ = { 835 | isa = PBXReferenceProxy; 836 | fileType = archive.ar; 837 | path = libcxxreact.a; 838 | remoteRef = 3DAD3EAA1DF850E9000B6D8A /* PBXContainerItemProxy */; 839 | sourceTree = BUILT_PRODUCTS_DIR; 840 | }; 841 | 3DAD3EAD1DF850E9000B6D8A /* libjschelpers.a */ = { 842 | isa = PBXReferenceProxy; 843 | fileType = archive.ar; 844 | path = libjschelpers.a; 845 | remoteRef = 3DAD3EAC1DF850E9000B6D8A /* PBXContainerItemProxy */; 846 | sourceTree = BUILT_PRODUCTS_DIR; 847 | }; 848 | 3DAD3EAF1DF850E9000B6D8A /* libjschelpers.a */ = { 849 | isa = PBXReferenceProxy; 850 | fileType = archive.ar; 851 | path = libjschelpers.a; 852 | remoteRef = 3DAD3EAE1DF850E9000B6D8A /* PBXContainerItemProxy */; 853 | sourceTree = BUILT_PRODUCTS_DIR; 854 | }; 855 | 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { 856 | isa = PBXReferenceProxy; 857 | fileType = archive.ar; 858 | path = libRCTAnimation.a; 859 | remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */; 860 | sourceTree = BUILT_PRODUCTS_DIR; 861 | }; 862 | 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */ = { 863 | isa = PBXReferenceProxy; 864 | fileType = archive.ar; 865 | path = libRCTAnimation.a; 866 | remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */; 867 | sourceTree = BUILT_PRODUCTS_DIR; 868 | }; 869 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 870 | isa = PBXReferenceProxy; 871 | fileType = archive.ar; 872 | path = libRCTLinking.a; 873 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 874 | sourceTree = BUILT_PRODUCTS_DIR; 875 | }; 876 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 877 | isa = PBXReferenceProxy; 878 | fileType = archive.ar; 879 | path = libRCTText.a; 880 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 881 | sourceTree = BUILT_PRODUCTS_DIR; 882 | }; 883 | ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */ = { 884 | isa = PBXReferenceProxy; 885 | fileType = archive.ar; 886 | path = libRCTBlob.a; 887 | remoteRef = ADBDB9261DFEBF0700ED6528 /* PBXContainerItemProxy */; 888 | sourceTree = BUILT_PRODUCTS_DIR; 889 | }; 890 | EC0DF30E1FC4B2D800D3E469 /* libRCTBlob-tvOS.a */ = { 891 | isa = PBXReferenceProxy; 892 | fileType = archive.ar; 893 | path = "libRCTBlob-tvOS.a"; 894 | remoteRef = EC0DF30D1FC4B2D800D3E469 /* PBXContainerItemProxy */; 895 | sourceTree = BUILT_PRODUCTS_DIR; 896 | }; 897 | EC0DF3201FC4B2D800D3E469 /* libfishhook.a */ = { 898 | isa = PBXReferenceProxy; 899 | fileType = archive.ar; 900 | path = libfishhook.a; 901 | remoteRef = EC0DF31F1FC4B2D800D3E469 /* PBXContainerItemProxy */; 902 | sourceTree = BUILT_PRODUCTS_DIR; 903 | }; 904 | EC0DF3221FC4B2D800D3E469 /* libfishhook-tvOS.a */ = { 905 | isa = PBXReferenceProxy; 906 | fileType = archive.ar; 907 | path = "libfishhook-tvOS.a"; 908 | remoteRef = EC0DF3211FC4B2D800D3E469 /* PBXContainerItemProxy */; 909 | sourceTree = BUILT_PRODUCTS_DIR; 910 | }; 911 | /* End PBXReferenceProxy section */ 912 | 913 | /* Begin PBXResourcesBuildPhase section */ 914 | 00E356EC1AD99517003FC87E /* Resources */ = { 915 | isa = PBXResourcesBuildPhase; 916 | buildActionMask = 2147483647; 917 | files = ( 918 | ); 919 | runOnlyForDeploymentPostprocessing = 0; 920 | }; 921 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 922 | isa = PBXResourcesBuildPhase; 923 | buildActionMask = 2147483647; 924 | files = ( 925 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 926 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 927 | ); 928 | runOnlyForDeploymentPostprocessing = 0; 929 | }; 930 | 2D02E4791E0B4A5D006451C7 /* Resources */ = { 931 | isa = PBXResourcesBuildPhase; 932 | buildActionMask = 2147483647; 933 | files = ( 934 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */, 935 | ); 936 | runOnlyForDeploymentPostprocessing = 0; 937 | }; 938 | 2D02E48E1E0B4A5D006451C7 /* Resources */ = { 939 | isa = PBXResourcesBuildPhase; 940 | buildActionMask = 2147483647; 941 | files = ( 942 | ); 943 | runOnlyForDeploymentPostprocessing = 0; 944 | }; 945 | /* End PBXResourcesBuildPhase section */ 946 | 947 | /* Begin PBXShellScriptBuildPhase section */ 948 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 949 | isa = PBXShellScriptBuildPhase; 950 | buildActionMask = 2147483647; 951 | files = ( 952 | ); 953 | inputPaths = ( 954 | ); 955 | name = "Bundle React Native code and images"; 956 | outputPaths = ( 957 | ); 958 | runOnlyForDeploymentPostprocessing = 0; 959 | shellPath = /bin/sh; 960 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 961 | }; 962 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { 963 | isa = PBXShellScriptBuildPhase; 964 | buildActionMask = 2147483647; 965 | files = ( 966 | ); 967 | inputPaths = ( 968 | ); 969 | name = "Bundle React Native Code And Images"; 970 | outputPaths = ( 971 | ); 972 | runOnlyForDeploymentPostprocessing = 0; 973 | shellPath = /bin/sh; 974 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 975 | }; 976 | /* End PBXShellScriptBuildPhase section */ 977 | 978 | /* Begin PBXSourcesBuildPhase section */ 979 | 00E356EA1AD99517003FC87E /* Sources */ = { 980 | isa = PBXSourcesBuildPhase; 981 | buildActionMask = 2147483647; 982 | files = ( 983 | 00E356F31AD99517003FC87E /* GraphqlExampleTests.m in Sources */, 984 | ); 985 | runOnlyForDeploymentPostprocessing = 0; 986 | }; 987 | 13B07F871A680F5B00A75B9A /* Sources */ = { 988 | isa = PBXSourcesBuildPhase; 989 | buildActionMask = 2147483647; 990 | files = ( 991 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 992 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 993 | ); 994 | runOnlyForDeploymentPostprocessing = 0; 995 | }; 996 | 2D02E4771E0B4A5D006451C7 /* Sources */ = { 997 | isa = PBXSourcesBuildPhase; 998 | buildActionMask = 2147483647; 999 | files = ( 1000 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, 1001 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */, 1002 | ); 1003 | runOnlyForDeploymentPostprocessing = 0; 1004 | }; 1005 | 2D02E48C1E0B4A5D006451C7 /* Sources */ = { 1006 | isa = PBXSourcesBuildPhase; 1007 | buildActionMask = 2147483647; 1008 | files = ( 1009 | 2DCD954D1E0B4F2C00145EB5 /* GraphqlExampleTests.m in Sources */, 1010 | ); 1011 | runOnlyForDeploymentPostprocessing = 0; 1012 | }; 1013 | /* End PBXSourcesBuildPhase section */ 1014 | 1015 | /* Begin PBXTargetDependency section */ 1016 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 1017 | isa = PBXTargetDependency; 1018 | target = 13B07F861A680F5B00A75B9A /* GraphqlExample */; 1019 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 1020 | }; 1021 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { 1022 | isa = PBXTargetDependency; 1023 | target = 2D02E47A1E0B4A5D006451C7 /* GraphqlExample-tvOS */; 1024 | targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; 1025 | }; 1026 | /* End PBXTargetDependency section */ 1027 | 1028 | /* Begin PBXVariantGroup section */ 1029 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 1030 | isa = PBXVariantGroup; 1031 | children = ( 1032 | 13B07FB21A68108700A75B9A /* Base */, 1033 | ); 1034 | name = LaunchScreen.xib; 1035 | path = GraphqlExample; 1036 | sourceTree = ""; 1037 | }; 1038 | /* End PBXVariantGroup section */ 1039 | 1040 | /* Begin XCBuildConfiguration section */ 1041 | 00E356F61AD99517003FC87E /* Debug */ = { 1042 | isa = XCBuildConfiguration; 1043 | buildSettings = { 1044 | BUNDLE_LOADER = "$(TEST_HOST)"; 1045 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1046 | CODE_SIGN_STYLE = Manual; 1047 | DEVELOPMENT_TEAM = Z4QMLBL3L8; 1048 | GCC_PREPROCESSOR_DEFINITIONS = ( 1049 | "DEBUG=1", 1050 | "$(inherited)", 1051 | ); 1052 | INFOPLIST_FILE = GraphqlExampleTests/Info.plist; 1053 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1054 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1055 | OTHER_LDFLAGS = ( 1056 | "-ObjC", 1057 | "-lc++", 1058 | ); 1059 | PRODUCT_NAME = "$(TARGET_NAME)"; 1060 | PROVISIONING_PROFILE_SPECIFIER = ""; 1061 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GraphqlExample.app/GraphqlExample"; 1062 | }; 1063 | name = Debug; 1064 | }; 1065 | 00E356F71AD99517003FC87E /* Release */ = { 1066 | isa = XCBuildConfiguration; 1067 | buildSettings = { 1068 | BUNDLE_LOADER = "$(TEST_HOST)"; 1069 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; 1070 | CODE_SIGN_STYLE = Manual; 1071 | COPY_PHASE_STRIP = NO; 1072 | DEVELOPMENT_TEAM = Z4QMLBL3L8; 1073 | INFOPLIST_FILE = GraphqlExampleTests/Info.plist; 1074 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1075 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1076 | OTHER_LDFLAGS = ( 1077 | "-ObjC", 1078 | "-lc++", 1079 | ); 1080 | PRODUCT_NAME = "$(TARGET_NAME)"; 1081 | PROVISIONING_PROFILE_SPECIFIER = ""; 1082 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GraphqlExample.app/GraphqlExample"; 1083 | }; 1084 | name = Release; 1085 | }; 1086 | 13B07F941A680F5B00A75B9A /* Debug */ = { 1087 | isa = XCBuildConfiguration; 1088 | buildSettings = { 1089 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1090 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1091 | CODE_SIGN_STYLE = Manual; 1092 | CURRENT_PROJECT_VERSION = 1; 1093 | DEAD_CODE_STRIPPING = NO; 1094 | DEVELOPMENT_TEAM = Z4QMLBL3L8; 1095 | INFOPLIST_FILE = GraphqlExample/Info.plist; 1096 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1097 | OTHER_LDFLAGS = ( 1098 | "$(inherited)", 1099 | "-ObjC", 1100 | "-lc++", 1101 | ); 1102 | PRODUCT_NAME = GraphqlExample; 1103 | PROVISIONING_PROFILE = "07eb1c13-0843-46af-b8e8-b2d73af8eda6"; 1104 | PROVISIONING_PROFILE_SPECIFIER = "Wildcard Dev"; 1105 | VERSIONING_SYSTEM = "apple-generic"; 1106 | }; 1107 | name = Debug; 1108 | }; 1109 | 13B07F951A680F5B00A75B9A /* Release */ = { 1110 | isa = XCBuildConfiguration; 1111 | buildSettings = { 1112 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 1113 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; 1114 | CODE_SIGN_STYLE = Manual; 1115 | CURRENT_PROJECT_VERSION = 1; 1116 | DEVELOPMENT_TEAM = Z4QMLBL3L8; 1117 | INFOPLIST_FILE = GraphqlExample/Info.plist; 1118 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1119 | OTHER_LDFLAGS = ( 1120 | "$(inherited)", 1121 | "-ObjC", 1122 | "-lc++", 1123 | ); 1124 | PRODUCT_NAME = GraphqlExample; 1125 | PROVISIONING_PROFILE = "9c155f04-70f7-4687-afce-88b66c56cefd"; 1126 | PROVISIONING_PROFILE_SPECIFIER = "Wildcard Dist"; 1127 | VERSIONING_SYSTEM = "apple-generic"; 1128 | }; 1129 | name = Release; 1130 | }; 1131 | 2D02E4971E0B4A5E006451C7 /* Debug */ = { 1132 | isa = XCBuildConfiguration; 1133 | buildSettings = { 1134 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 1135 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 1136 | CLANG_ANALYZER_NONNULL = YES; 1137 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1138 | CLANG_WARN_INFINITE_RECURSION = YES; 1139 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1140 | DEBUG_INFORMATION_FORMAT = dwarf; 1141 | ENABLE_TESTABILITY = YES; 1142 | GCC_NO_COMMON_BLOCKS = YES; 1143 | INFOPLIST_FILE = "GraphqlExample-tvOS/Info.plist"; 1144 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1145 | OTHER_LDFLAGS = ( 1146 | "-ObjC", 1147 | "-lc++", 1148 | ); 1149 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.GraphqlExample-tvOS"; 1150 | PRODUCT_NAME = "$(TARGET_NAME)"; 1151 | SDKROOT = appletvos; 1152 | TARGETED_DEVICE_FAMILY = 3; 1153 | TVOS_DEPLOYMENT_TARGET = 9.2; 1154 | }; 1155 | name = Debug; 1156 | }; 1157 | 2D02E4981E0B4A5E006451C7 /* Release */ = { 1158 | isa = XCBuildConfiguration; 1159 | buildSettings = { 1160 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; 1161 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 1162 | CLANG_ANALYZER_NONNULL = YES; 1163 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1164 | CLANG_WARN_INFINITE_RECURSION = YES; 1165 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1166 | COPY_PHASE_STRIP = NO; 1167 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1168 | GCC_NO_COMMON_BLOCKS = YES; 1169 | INFOPLIST_FILE = "GraphqlExample-tvOS/Info.plist"; 1170 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 1171 | OTHER_LDFLAGS = ( 1172 | "-ObjC", 1173 | "-lc++", 1174 | ); 1175 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.GraphqlExample-tvOS"; 1176 | PRODUCT_NAME = "$(TARGET_NAME)"; 1177 | SDKROOT = appletvos; 1178 | TARGETED_DEVICE_FAMILY = 3; 1179 | TVOS_DEPLOYMENT_TARGET = 9.2; 1180 | }; 1181 | name = Release; 1182 | }; 1183 | 2D02E4991E0B4A5E006451C7 /* Debug */ = { 1184 | isa = XCBuildConfiguration; 1185 | buildSettings = { 1186 | BUNDLE_LOADER = "$(TEST_HOST)"; 1187 | CLANG_ANALYZER_NONNULL = YES; 1188 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1189 | CLANG_WARN_INFINITE_RECURSION = YES; 1190 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1191 | DEBUG_INFORMATION_FORMAT = dwarf; 1192 | ENABLE_TESTABILITY = YES; 1193 | GCC_NO_COMMON_BLOCKS = YES; 1194 | INFOPLIST_FILE = "GraphqlExample-tvOSTests/Info.plist"; 1195 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1196 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.GraphqlExample-tvOSTests"; 1197 | PRODUCT_NAME = "$(TARGET_NAME)"; 1198 | SDKROOT = appletvos; 1199 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GraphqlExample-tvOS.app/GraphqlExample-tvOS"; 1200 | TVOS_DEPLOYMENT_TARGET = 10.1; 1201 | }; 1202 | name = Debug; 1203 | }; 1204 | 2D02E49A1E0B4A5E006451C7 /* Release */ = { 1205 | isa = XCBuildConfiguration; 1206 | buildSettings = { 1207 | BUNDLE_LOADER = "$(TEST_HOST)"; 1208 | CLANG_ANALYZER_NONNULL = YES; 1209 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 1210 | CLANG_WARN_INFINITE_RECURSION = YES; 1211 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 1212 | COPY_PHASE_STRIP = NO; 1213 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 1214 | GCC_NO_COMMON_BLOCKS = YES; 1215 | INFOPLIST_FILE = "GraphqlExample-tvOSTests/Info.plist"; 1216 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 1217 | PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.GraphqlExample-tvOSTests"; 1218 | PRODUCT_NAME = "$(TARGET_NAME)"; 1219 | SDKROOT = appletvos; 1220 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GraphqlExample-tvOS.app/GraphqlExample-tvOS"; 1221 | TVOS_DEPLOYMENT_TARGET = 10.1; 1222 | }; 1223 | name = Release; 1224 | }; 1225 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 1226 | isa = XCBuildConfiguration; 1227 | buildSettings = { 1228 | ALWAYS_SEARCH_USER_PATHS = NO; 1229 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 1230 | CLANG_CXX_LIBRARY = "libc++"; 1231 | CLANG_ENABLE_MODULES = YES; 1232 | CLANG_ENABLE_OBJC_ARC = YES; 1233 | CLANG_WARN_BOOL_CONVERSION = YES; 1234 | CLANG_WARN_CONSTANT_CONVERSION = YES; 1235 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1236 | CLANG_WARN_EMPTY_BODY = YES; 1237 | CLANG_WARN_ENUM_CONVERSION = YES; 1238 | CLANG_WARN_INT_CONVERSION = YES; 1239 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1240 | CLANG_WARN_UNREACHABLE_CODE = YES; 1241 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1242 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1243 | COPY_PHASE_STRIP = NO; 1244 | ENABLE_STRICT_OBJC_MSGSEND = YES; 1245 | GCC_C_LANGUAGE_STANDARD = gnu99; 1246 | GCC_DYNAMIC_NO_PIC = NO; 1247 | GCC_OPTIMIZATION_LEVEL = 0; 1248 | GCC_PREPROCESSOR_DEFINITIONS = ( 1249 | "DEBUG=1", 1250 | "$(inherited)", 1251 | ); 1252 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 1253 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1254 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1255 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1256 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1257 | GCC_WARN_UNUSED_FUNCTION = YES; 1258 | GCC_WARN_UNUSED_VARIABLE = YES; 1259 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1260 | MTL_ENABLE_DEBUG_INFO = YES; 1261 | ONLY_ACTIVE_ARCH = YES; 1262 | SDKROOT = iphoneos; 1263 | }; 1264 | name = Debug; 1265 | }; 1266 | 83CBBA211A601CBA00E9B192 /* Release */ = { 1267 | isa = XCBuildConfiguration; 1268 | buildSettings = { 1269 | ALWAYS_SEARCH_USER_PATHS = NO; 1270 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 1271 | CLANG_CXX_LIBRARY = "libc++"; 1272 | CLANG_ENABLE_MODULES = YES; 1273 | CLANG_ENABLE_OBJC_ARC = YES; 1274 | CLANG_WARN_BOOL_CONVERSION = YES; 1275 | CLANG_WARN_CONSTANT_CONVERSION = YES; 1276 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 1277 | CLANG_WARN_EMPTY_BODY = YES; 1278 | CLANG_WARN_ENUM_CONVERSION = YES; 1279 | CLANG_WARN_INT_CONVERSION = YES; 1280 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 1281 | CLANG_WARN_UNREACHABLE_CODE = YES; 1282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 1283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 1284 | COPY_PHASE_STRIP = YES; 1285 | ENABLE_NS_ASSERTIONS = NO; 1286 | ENABLE_STRICT_OBJC_MSGSEND = YES; 1287 | GCC_C_LANGUAGE_STANDARD = gnu99; 1288 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 1289 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 1290 | GCC_WARN_UNDECLARED_SELECTOR = YES; 1291 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 1292 | GCC_WARN_UNUSED_FUNCTION = YES; 1293 | GCC_WARN_UNUSED_VARIABLE = YES; 1294 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 1295 | MTL_ENABLE_DEBUG_INFO = NO; 1296 | SDKROOT = iphoneos; 1297 | VALIDATE_PRODUCT = YES; 1298 | }; 1299 | name = Release; 1300 | }; 1301 | /* End XCBuildConfiguration section */ 1302 | 1303 | /* Begin XCConfigurationList section */ 1304 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "GraphqlExampleTests" */ = { 1305 | isa = XCConfigurationList; 1306 | buildConfigurations = ( 1307 | 00E356F61AD99517003FC87E /* Debug */, 1308 | 00E356F71AD99517003FC87E /* Release */, 1309 | ); 1310 | defaultConfigurationIsVisible = 0; 1311 | defaultConfigurationName = Release; 1312 | }; 1313 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "GraphqlExample" */ = { 1314 | isa = XCConfigurationList; 1315 | buildConfigurations = ( 1316 | 13B07F941A680F5B00A75B9A /* Debug */, 1317 | 13B07F951A680F5B00A75B9A /* Release */, 1318 | ); 1319 | defaultConfigurationIsVisible = 0; 1320 | defaultConfigurationName = Release; 1321 | }; 1322 | 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "GraphqlExample-tvOS" */ = { 1323 | isa = XCConfigurationList; 1324 | buildConfigurations = ( 1325 | 2D02E4971E0B4A5E006451C7 /* Debug */, 1326 | 2D02E4981E0B4A5E006451C7 /* Release */, 1327 | ); 1328 | defaultConfigurationIsVisible = 0; 1329 | defaultConfigurationName = Release; 1330 | }; 1331 | 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "GraphqlExample-tvOSTests" */ = { 1332 | isa = XCConfigurationList; 1333 | buildConfigurations = ( 1334 | 2D02E4991E0B4A5E006451C7 /* Debug */, 1335 | 2D02E49A1E0B4A5E006451C7 /* Release */, 1336 | ); 1337 | defaultConfigurationIsVisible = 0; 1338 | defaultConfigurationName = Release; 1339 | }; 1340 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "GraphqlExample" */ = { 1341 | isa = XCConfigurationList; 1342 | buildConfigurations = ( 1343 | 83CBBA201A601CBA00E9B192 /* Debug */, 1344 | 83CBBA211A601CBA00E9B192 /* Release */, 1345 | ); 1346 | defaultConfigurationIsVisible = 0; 1347 | defaultConfigurationName = Release; 1348 | }; 1349 | /* End XCConfigurationList section */ 1350 | }; 1351 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 1352 | } 1353 | -------------------------------------------------------------------------------- /ios/GraphqlExample.xcodeproj/xcshareddata/xcschemes/GraphqlExample-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/GraphqlExample.xcodeproj/xcshareddata/xcschemes/GraphqlExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 62 | 68 | 69 | 70 | 71 | 72 | 78 | 79 | 80 | 81 | 82 | 83 | 94 | 96 | 102 | 103 | 104 | 105 | 106 | 107 | 113 | 115 | 121 | 122 | 123 | 124 | 126 | 127 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /ios/GraphqlExample/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/GraphqlExample/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:@"GraphqlExample" 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/GraphqlExample/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/GraphqlExample/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/GraphqlExample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/GraphqlExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | GraphqlExample 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 | NSAllowsArbitraryLoads 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /ios/GraphqlExample/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/GraphqlExampleTests/GraphqlExampleTests.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 GraphqlExampleTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation GraphqlExampleTests 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 | -------------------------------------------------------------------------------- /ios/GraphqlExampleTests/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": "GraphqlExample", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android && adb reverse tcp:8081 tcp:8081", 7 | "ios": "react-native run-ios", 8 | "lint": "eslint index.js src __mocks__", 9 | "lint-fix": "eslint index.js src __mocks__ --fix", 10 | "postinstall": "rndebugger-open", 11 | "api": "json-graphql-server db.js", 12 | "start": "concurrently 'npm run api' 'npm run start-rn'", 13 | "start-rn": "node node_modules/react-native/local-cli/cli.js start", 14 | "test": "jest", 15 | "check-env": "yarn solidarity", 16 | "test-watch": "jest --watch" 17 | }, 18 | "dependencies": { 19 | "apollo-client": "^2.0.2", 20 | "apollo-client-preset": "^1.0.2", 21 | "faker": "^4.1.0", 22 | "graphql": "^0.11.7", 23 | "graphql-tag": "^2.5.0", 24 | "immutability-helper": "^2.4.0", 25 | "json-graphql-server": "^1.0.1", 26 | "prop-types": "^15.6.0", 27 | "react": "16.0.0", 28 | "react-apollo": "1.4.15", 29 | "react-native": "0.50.3", 30 | "react-native-debugger-open": "^0.3.15", 31 | "react-native-grid-list": "^1.0.5", 32 | "react-native-swiper-flatlist": "^1.0.1", 33 | "react-redux": "^5.0.6", 34 | "redux": "^3.7.2", 35 | "redux-actions": "^2.2.1", 36 | "redux-devtools-extension": "^2.13.2", 37 | "redux-persist": "^4.10.1", 38 | "redux-thunk": "^2.2.0", 39 | "reselect": "^3.0.1" 40 | }, 41 | "devDependencies": { 42 | "babel-eslint": "^7.2.1", 43 | "babel-jest": "21.2.0", 44 | "babel-plugin-transform-remove-console": "^6.8.5", 45 | "babel-preset-react-native": "4.0.0", 46 | "concurrently": "^3.5.1", 47 | "enzyme": "^3.1.0", 48 | "enzyme-adapter-react-16": "^1.0.2", 49 | "enzyme-to-json": "^3.1.4", 50 | "eslint": "^4.9.0", 51 | "eslint-config-airbnb": "^15.0.1", 52 | "eslint-config-prettier": "^2.1.1", 53 | "eslint-import-resolver-reactnative": "^1.0.2", 54 | "eslint-plugin-flowtype": "^2.33.0", 55 | "eslint-plugin-import": "^2.2.0", 56 | "eslint-plugin-jsx-a11y": "^5.0.3", 57 | "eslint-plugin-prettier": "^2.1.1", 58 | "eslint-plugin-react": "^7.0.1", 59 | "eslint-plugin-react-native": "^3.1.0", 60 | "jest": "21.2.1", 61 | "pre-commit": "^1.2.2", 62 | "prettier": "^1.3.1", 63 | "prettier-eslint": "^8.2.1", 64 | "react-dom": "^16.0.0", 65 | "redux-mock-store": "^1.3.0", 66 | "solidarity": "^1.0.0", 67 | "solidarity-react-native": "^1.0.0" 68 | }, 69 | "jest": { 70 | "preset": "react-native", 71 | "setupTestFrameworkScriptFile": "./enzyme.js", 72 | "snapshotSerializers": [ 73 | "./node_modules/enzyme-to-json/serializer" 74 | ] 75 | }, 76 | "pre-commit": { 77 | "run": "lint" 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { ApolloProvider } from 'react-apollo'; 3 | 4 | import { HomeMainScreen } from 'GraphqlExample/src/screens'; 5 | 6 | import client from './apolloClient'; 7 | import createStore from './createStore'; 8 | 9 | const store = createStore(); 10 | 11 | const App = () => ( 12 | 13 | 14 | 15 | ); 16 | 17 | export default App; 18 | -------------------------------------------------------------------------------- /src/apolloClient.js: -------------------------------------------------------------------------------- 1 | import { ApolloClient, createNetworkInterface } from 'react-apollo'; 2 | 3 | import { API_URL } from '@environment'; 4 | 5 | export default new ApolloClient({ 6 | networkInterface: createNetworkInterface({ 7 | uri: API_URL, 8 | }), 9 | }); 10 | -------------------------------------------------------------------------------- /src/components/Thumbnail/__snapshots__/test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`renders correctly 1`] = ` 4 | 5 | 22 | 23 | `; 24 | -------------------------------------------------------------------------------- /src/components/Thumbnail/index.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { Image, View, ActivityIndicator } from 'react-native'; 3 | import PropTypes from 'prop-types'; 4 | 5 | import { colors } from '@themes'; 6 | import { placeholderUser } from '@images'; 7 | 8 | import styles from './styles'; 9 | 10 | export default class Thumbnail extends PureComponent { 11 | static defaultProps = { 12 | source: placeholderUser, 13 | size: 100, 14 | }; 15 | static propTypes = { 16 | ...Image.propTypes, 17 | size: PropTypes.number.isRequired, 18 | }; 19 | 20 | componentWillMount() { 21 | this.updateState(this.props); 22 | } 23 | 24 | componentWillReceiveProps(nextProps) { 25 | this.updateState(nextProps); 26 | } 27 | 28 | updateState() { 29 | const loading = false; 30 | this.setState({ loading }); 31 | } 32 | 33 | render() { 34 | const { source, size } = this.props; 35 | const imageProps = { 36 | source, 37 | resizeMode: Image.resizeMode.cover, 38 | style: styles.image({ size }), 39 | onLoadStart: () => this.setState({ loading: true }), 40 | onLoadEnd: () => this.setState({ loading: false }), 41 | }; 42 | // If the URL is empty show placeholder 43 | if (!source.uri) { 44 | imageProps.source = placeholderUser; 45 | } 46 | const activityIndicatorProps = { 47 | style: { 48 | position: 'absolute', 49 | height: size, 50 | width: size, 51 | }, 52 | color: colors.black, 53 | }; 54 | return ( 55 | 56 | 57 | {this.state.loading && ( 58 | 59 | )} 60 | 61 | ); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/components/Thumbnail/styles.js: -------------------------------------------------------------------------------- 1 | export default { 2 | image: ({ size }) => ({ 3 | borderRadius: size * 0.5, 4 | height: size, 5 | width: size, 6 | }), 7 | }; 8 | -------------------------------------------------------------------------------- /src/components/Thumbnail/test.js: -------------------------------------------------------------------------------- 1 | import { shallow } from 'enzyme'; 2 | import React from 'react'; 3 | 4 | import { Thumbnail } from '@components'; 5 | 6 | it('renders correctly', () => { 7 | const wrapper = shallow(); 8 | expect(wrapper).toMatchSnapshot(); 9 | }); 10 | -------------------------------------------------------------------------------- /src/components/index.js: -------------------------------------------------------------------------------- 1 | export { default as Thumbnail } from './Thumbnail'; 2 | -------------------------------------------------------------------------------- /src/components/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@components" 3 | } 4 | -------------------------------------------------------------------------------- /src/createStore.js: -------------------------------------------------------------------------------- 1 | import { AsyncStorage } from 'react-native'; 2 | import { composeWithDevTools } from 'redux-devtools-extension'; 3 | import { createStore, applyMiddleware, combineReducers } from 'redux'; 4 | import { persistStore, autoRehydrate } from 'redux-persist'; 5 | import thunk from 'redux-thunk'; 6 | 7 | import client from './apolloClient'; 8 | 9 | import { home } from './screens'; 10 | 11 | const middleware = [thunk.withExtraArgument(client), client.middleware()]; 12 | 13 | export default (data = {}) => { 14 | const appReducer = combineReducers({ 15 | [home.NAME]: home.reducer, 16 | apollo: client.reducer(), 17 | }); 18 | 19 | const compose = composeWithDevTools( 20 | applyMiddleware(...middleware), 21 | autoRehydrate(), 22 | ); 23 | const store = createStore(appReducer, data, compose); 24 | 25 | // Persist and rehydrate a redux store 26 | persistStore(store, { 27 | storage: AsyncStorage, 28 | // Reducers to persist 29 | whitelist: [home.NAME], 30 | }); 31 | // Add purge to delete the persist store. 32 | // .purge(); 33 | 34 | return store; 35 | }; 36 | -------------------------------------------------------------------------------- /src/entities/Post.js: -------------------------------------------------------------------------------- 1 | export default class Feed { 2 | /** 3 | * Decode HTTP response or AsyncStorage 4 | * 5 | * @param {String[]} data The response of the request. 6 | * @return {Object[]} decoded Photo 7 | */ 8 | static decode(data) { 9 | const photo = { 10 | id: data.id, 11 | thumbnail: { uri: data.thumbnail }, 12 | }; 13 | return photo; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/entities/User.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Remove links and hashtags from description and add it to a list 3 | * 4 | * @param {String[]} description The description of the user 5 | * @return {Object[]} texts 6 | */ 7 | const parseDescription = description => { 8 | const text = description.split('\n').join('. '); 9 | const highlightes = text.match(/\s([W||H||I||T||E||B||E||A||R])\w+/g); 10 | const texts = []; 11 | 12 | let rawText = text; 13 | if (highlightes) { 14 | highlightes.forEach(link => { 15 | const [first, rest] = rawText.split(link); 16 | texts.push({ value: first, highlighted: false }); 17 | texts.push({ value: link, highlighted: true }); 18 | rawText = rest; 19 | }); 20 | } else { 21 | texts.push({ value: description, highlighted: false }); 22 | } 23 | 24 | return texts; 25 | }; 26 | 27 | export default class User { 28 | /** 29 | * Decode HTTP response or AsyncStorage 30 | * 31 | * @param {Object} data The response of the request. 32 | * @return {Object} decoded User 33 | */ 34 | static decode(data) { 35 | const user = { 36 | description: parseDescription(data.description), 37 | id: data.id, 38 | name: data.name, 39 | thumbnail: { uri: data.thumbnail }, 40 | photos: data.Profiles && data.Profiles.map(i => User.decodePhoto(i)), 41 | }; 42 | return user; 43 | } 44 | 45 | /** 46 | * Decode HTTP response or AsyncStorage 47 | * 48 | * @param {Object} data The response of the request. 49 | * @return {Object} decoded Photos 50 | */ 51 | static decodePhoto(data) { 52 | const photo = { 53 | id: data.id, 54 | thumbnail: { uri: data.thumbnail }, 55 | }; 56 | return photo; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/entities/index.js: -------------------------------------------------------------------------------- 1 | export { default as User } from './User'; 2 | export { default as Post } from './Post'; 3 | -------------------------------------------------------------------------------- /src/entities/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@entities" 3 | } 4 | -------------------------------------------------------------------------------- /src/environment/index.js: -------------------------------------------------------------------------------- 1 | const DEV = 'development'; 2 | const env = process.env.NODE_ENV || DEV; 3 | 4 | export const isDev = env === DEV; 5 | export const isTest = env === 'test'; 6 | 7 | if (isDev) { 8 | GLOBAL.XMLHttpRequest = 9 | GLOBAL.originalXMLHttpRequest || GLOBAL.XMLHttpRequest; 10 | } 11 | 12 | const urls = { 13 | development: 'http://localhost:3000', 14 | test: 'http://localhost:3000', 15 | production: 'http://localhost:3000', 16 | }; 17 | 18 | export const API_URL = urls[env]; 19 | -------------------------------------------------------------------------------- /src/environment/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@environment" 3 | } 4 | -------------------------------------------------------------------------------- /src/images/index.js: -------------------------------------------------------------------------------- 1 | export { default as placeholderUser } from './placeholderUser/user.png'; 2 | -------------------------------------------------------------------------------- /src/images/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@images" 3 | } 4 | -------------------------------------------------------------------------------- /src/images/placeholderUser/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gusgard/react-native-graphql-example/366369d38fd7f9111087106aac02f3512d4fbce8/src/images/placeholderUser/user.png -------------------------------------------------------------------------------- /src/query/getAllPopular.query.js: -------------------------------------------------------------------------------- 1 | import gql from 'graphql-tag'; 2 | 3 | export default gql` 4 | query getAllPopular { 5 | allPopulars { 6 | id 7 | thumbnail 8 | } 9 | } 10 | `; 11 | -------------------------------------------------------------------------------- /src/query/getUser.query.js: -------------------------------------------------------------------------------- 1 | import gql from 'graphql-tag'; 2 | 3 | export default gql` 4 | query getUser($id: ID!) { 5 | User(id: $id) { 6 | id 7 | name 8 | thumbnail 9 | description 10 | Profiles { 11 | id 12 | thumbnail 13 | } 14 | } 15 | } 16 | `; 17 | -------------------------------------------------------------------------------- /src/query/index.js: -------------------------------------------------------------------------------- 1 | export { default as GET_USER } from './getUser.query'; 2 | export { default as GET_ALL_USER } from './getAllPopular.query'; 3 | -------------------------------------------------------------------------------- /src/query/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@queries" 3 | } 4 | -------------------------------------------------------------------------------- /src/screens/home/__snapshots__/reducer.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`fetch popular photos 1`] = ` 4 | Object { 5 | "popular": Array [], 6 | "user": Object { 7 | "description": Array [], 8 | "name": "", 9 | "photos": Array [], 10 | "thumbnail": Object {}, 11 | }, 12 | } 13 | `; 14 | 15 | exports[`fetch user 1`] = ` 16 | Object { 17 | "popular": Array [], 18 | "user": Object { 19 | "description": Array [], 20 | "name": "", 21 | "photos": Array [], 22 | "thumbnail": Object {}, 23 | }, 24 | } 25 | `; 26 | -------------------------------------------------------------------------------- /src/screens/home/constants.js: -------------------------------------------------------------------------------- 1 | // name of this module 2 | export const NAME = 'home'; 3 | 4 | // action types 5 | export const FETCH_USER = `${NAME}/FETCH_USER`; 6 | export const FETCH_ALL_POPULAR = `${NAME}/FETCH_ALL_POPULAR`; 7 | -------------------------------------------------------------------------------- /src/screens/home/index.js: -------------------------------------------------------------------------------- 1 | import { NAME } from './constants'; 2 | import reducer from './reducer'; 3 | 4 | // to reduce the number of bugs, make sure not to export action types. 5 | // action types are internal only and only actions and reducer should access them 6 | 7 | export default { 8 | NAME, 9 | reducer, 10 | }; 11 | -------------------------------------------------------------------------------- /src/screens/home/reducer.js: -------------------------------------------------------------------------------- 1 | import { handleActions } from 'redux-actions'; 2 | import update from 'immutability-helper'; 3 | 4 | import { FETCH_USER, FETCH_ALL_POPULAR } from './constants'; 5 | 6 | export const initialState = { 7 | user: { 8 | photos: [], 9 | description: [], 10 | name: '', 11 | thumbnail: {}, 12 | }, 13 | popular: [], 14 | }; 15 | 16 | export default handleActions( 17 | { 18 | [FETCH_USER]: (state, { payload: { user } }) => 19 | update(state, { 20 | user: { $set: user }, 21 | }), 22 | [FETCH_ALL_POPULAR]: (state, { payload: { popular } }) => 23 | update(state, { 24 | popular: { $set: popular }, 25 | }), 26 | }, 27 | initialState, 28 | ); 29 | -------------------------------------------------------------------------------- /src/screens/home/reducer.test.js: -------------------------------------------------------------------------------- 1 | import home, { initialState } from './reducer' 2 | import * as actions from './screens/HomeMainScreen/actions' 3 | 4 | it('fetch popular photos', () => { 5 | expect(home(initialState, actions.fetchPhotosGrid())).toMatchSnapshot() 6 | }) 7 | 8 | it('fetch user', () => { 9 | expect(home(initialState, actions.fetchUser())).toMatchSnapshot() 10 | }) 11 | -------------------------------------------------------------------------------- /src/screens/home/screens/HomeMainScreen/actions.js: -------------------------------------------------------------------------------- 1 | import { Alert } from 'react-native'; 2 | 3 | import { User, Post } from '@entities'; 4 | import { GET_USER, GET_ALL_USER } from '@queries'; 5 | 6 | import { FETCH_USER, FETCH_ALL_POPULAR } from '../../constants'; 7 | 8 | export const fetchUser = userId => async (dispatch, getState, client) => { 9 | try { 10 | const query = await client.query({ 11 | query: GET_USER, 12 | variables: { 13 | id: userId, 14 | }, 15 | }); 16 | const { data: { User: userData } } = query; 17 | const user = User.decode(userData); 18 | 19 | dispatch({ type: FETCH_USER, payload: { user } }); 20 | } catch (e) { 21 | console.log(e); 22 | const title = 'Server error'; 23 | const message = 'Fail connection to server'; 24 | Alert.alert(title, message, [{ text: 'OK' }]); 25 | } 26 | }; 27 | 28 | export const fetchPhotosGrid = () => async (dispatch, getState, client) => { 29 | try { 30 | const query = await client.query({ 31 | query: GET_ALL_USER, 32 | }); 33 | const { data: { allPopulars } } = query; 34 | const popular = allPopulars.map(i => Post.decode(i)); 35 | dispatch({ type: FETCH_ALL_POPULAR, payload: { popular } }); 36 | } catch (e) { 37 | const title = 'Server error'; 38 | const message = 'Fail connection to server'; 39 | Alert.alert(title, message, [{ text: 'OK' }]); 40 | } 41 | }; 42 | -------------------------------------------------------------------------------- /src/screens/home/screens/HomeMainScreen/actions.testOLD.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | import mockStore from 'redux-mock-store'; 3 | import MockAdapter from 'axios-mock-adapter'; 4 | 5 | import { HttpService } from '@common'; 6 | import { Feed, User, FeedFacade, UserFacade } from '@entities'; 7 | 8 | import { fetchPhotosGrid, fetchUser } from './actions'; 9 | import { 10 | FETCH_USER, 11 | FETCH_PHOTOS_SLIDER, 12 | FETCH_ALL_POPULAR 13 | } from '../../constants'; 14 | 15 | const mockApi = new MockAdapter(HttpService.instance); 16 | 17 | describe('home actions', () => { 18 | let store; 19 | let posts; 20 | let rawUser; 21 | beforeEach(() => { 22 | store = mockStore(); 23 | posts = [ 24 | { 25 | createdAt: '2017-11-04T19:49:54.136Z', 26 | thumbnail: 'https://reactjs.org/logo-og.png', 27 | objectId: 18561785 28 | }, 29 | { 30 | createdAt: '2017-11-04T19:31:41.206Z', 31 | thumbnail: 'https://reactjs.org/logo-og.png', 32 | objectId: 18561778 33 | } 34 | ]; 35 | rawUser = { 36 | bio: '\n\n👻 ⬇️', 37 | name: 'name', 38 | profileThumbnail: 'https://reactjs.org/logo-og.png', 39 | createdAt: '2014-02-03T07:21:44.372Z', 40 | objectId: 318381 41 | }; 42 | }); 43 | 44 | it('fetch popular photos', async () => { 45 | const popularPhotos = posts.map(item => User.decodePhoto(item)); 46 | 47 | const expectedActions = [ 48 | { type: FETCH_ALL_POPULAR, payload: { popularPhotos } } 49 | ]; 50 | 51 | const response = { result: { posts } }; 52 | 53 | mockApi.onPost(FeedFacade.fetchPopularPhotosUrl).reply(200, response); 54 | 55 | await store.dispatch(fetchPhotosGrid()); 56 | 57 | const storeActions = store.getActions(); 58 | expect(storeActions).toEqual(expectedActions); 59 | expect(storeActions).toMatchSnapshot(); 60 | }); 61 | 62 | it('fetch user data', async () => { 63 | const user = User.decode(rawUser); 64 | const photos = posts.map(item => Feed.decode(item)); 65 | 66 | const expectedActions = [ 67 | { type: FETCH_USER, payload: { user } }, 68 | { type: FETCH_PHOTOS_SLIDER, payload: { photos } } 69 | ]; 70 | 71 | const userId = 1; 72 | mockApi.onPost(`${UserFacade.fetchOneUrl}${userId}`).reply(200, rawUser); 73 | 74 | const responseFetchPhotos = { result: { posts } }; 75 | mockApi.onPost(UserFacade.fetchPhotosUrl).reply(200, responseFetchPhotos); 76 | 77 | await store.dispatch(fetchUser(userId)); 78 | 79 | const storeActions = store.getActions(); 80 | expect(storeActions).toEqual(expectedActions); 81 | expect(storeActions).toMatchSnapshot(); 82 | }); 83 | }); 84 | -------------------------------------------------------------------------------- /src/screens/home/screens/HomeMainScreen/components/Description/__snapshots__/test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`renders Description without Read more text 1`] = ` 4 | 10 | 16 | Motivation to become the best version of you! 17 | 18 | 30 | #Whitebear 31 | 32 | 33 | `; 34 | 35 | exports[`renders correctly 1`] = ` 36 | 42 | 48 | Motivation to become the best version of you! 49 | 50 | 62 | #Whitebear 63 | 64 | 65 | `; 66 | -------------------------------------------------------------------------------- /src/screens/home/screens/HomeMainScreen/components/Description/index.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { Text } from 'react-native'; 3 | import PropTypes from 'prop-types'; 4 | 5 | import styles from './styles'; 6 | 7 | const MAX_LINES = 4; 8 | 9 | export default class Description extends PureComponent { 10 | static propTypes = { 11 | texts: PropTypes.array.isRequired, 12 | }; 13 | 14 | render() { 15 | const { texts } = this.props; 16 | return ( 17 | 18 | {texts.map( 19 | (text, index) => 20 | text.highlighted ? ( 21 | 22 | {text.value} 23 | 24 | ) : ( 25 | {text.value} 26 | ), 27 | )} 28 | 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/screens/home/screens/HomeMainScreen/components/Description/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | import { colors, fontSize } from '@themes'; 4 | 5 | export default StyleSheet.create({ 6 | description: { 7 | fontSize: fontSize.medium, 8 | }, 9 | highlighted: { 10 | fontWeight: 'bold', 11 | color: colors.primaryDark, 12 | }, 13 | readMore: { 14 | fontWeight: 'bold', 15 | }, 16 | }); 17 | -------------------------------------------------------------------------------- /src/screens/home/screens/HomeMainScreen/components/Description/test.js: -------------------------------------------------------------------------------- 1 | import { shallow } from 'enzyme'; 2 | import React from 'react'; 3 | 4 | import Description from './'; 5 | 6 | const description = [ 7 | { 8 | value: 'Motivation to become the best version of you!', 9 | highlighted: false, 10 | }, 11 | { 12 | value: '#Whitebear', 13 | highlighted: true, 14 | }, 15 | ]; 16 | 17 | it('renders correctly', () => { 18 | const wrapper = shallow(); 19 | expect(wrapper).toMatchSnapshot(); 20 | }); 21 | 22 | it('renders Description without Read more text', () => { 23 | const wrapper = shallow(, {}); 24 | wrapper.simulate('press'); 25 | expect(wrapper).toMatchSnapshot(); 26 | }); 27 | -------------------------------------------------------------------------------- /src/screens/home/screens/HomeMainScreen/components/UserProfile/__snapshots__/test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`renders correctly 1`] = ` 4 | 14 | 18 | 26 | 38 | 41 | 42 | 43 | `; 44 | -------------------------------------------------------------------------------- /src/screens/home/screens/HomeMainScreen/components/UserProfile/index.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { View, Text } from 'react-native'; 3 | import PropTypes from 'prop-types'; 4 | 5 | import { Thumbnail } from '@components'; 6 | import Description from '../Description'; 7 | 8 | import styles from './styles'; 9 | 10 | export default class UserProfile extends PureComponent { 11 | static propTypes = { 12 | name: PropTypes.string.isRequired, 13 | description: PropTypes.array.isRequired, 14 | picture: PropTypes.object.isRequired, 15 | }; 16 | 17 | render() { 18 | const { name, description, picture } = this.props; 19 | return ( 20 | 21 | 22 | 23 | {/* NAME */} 24 | {name} 25 | {/* DESCRIPTION */} 26 | 27 | 28 | 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/screens/home/screens/HomeMainScreen/components/UserProfile/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native' 2 | 3 | import { horizontal, vertical, fontSize } from '@themes' 4 | 5 | export default StyleSheet.create({ 6 | container: { 7 | flexDirection: 'row', 8 | paddingHorizontal: horizontal.small, 9 | paddingTop: vertical.small, 10 | paddingBottom: vertical.xxSmall, 11 | }, 12 | texts: { 13 | flex: 1, 14 | marginLeft: horizontal.small, 15 | }, 16 | name: { 17 | fontSize: fontSize.large, 18 | fontWeight: 'bold', 19 | marginBottom: vertical.xxSmall, 20 | }, 21 | }) 22 | -------------------------------------------------------------------------------- /src/screens/home/screens/HomeMainScreen/components/UserProfile/test.js: -------------------------------------------------------------------------------- 1 | import { shallow } from 'enzyme'; 2 | import React from 'react'; 3 | 4 | import UserProfile from './'; 5 | 6 | const user = { 7 | description: [], 8 | name: '', 9 | thumbnail: {}, 10 | }; 11 | 12 | it('renders correctly', () => { 13 | const wrapper = shallow( 14 | , 19 | ); 20 | expect(wrapper).toMatchSnapshot(); 21 | }); 22 | -------------------------------------------------------------------------------- /src/screens/home/screens/HomeMainScreen/components/index.js: -------------------------------------------------------------------------------- 1 | export { default as UserProfile } from './UserProfile'; 2 | -------------------------------------------------------------------------------- /src/screens/home/screens/HomeMainScreen/index.js: -------------------------------------------------------------------------------- 1 | import React, { PureComponent } from 'react'; 2 | import { Image, ScrollView, View } from 'react-native'; 3 | import { connect } from 'react-redux'; 4 | import PropTypes from 'prop-types'; 5 | import GridList from 'react-native-grid-list'; 6 | import SwiperFlatList from 'react-native-swiper-flatlist'; 7 | 8 | import * as actions from './actions'; 9 | import styles from './styles'; 10 | import { getUserState, getPopularPostState } from './selectors'; 11 | import { UserProfile } from './components'; 12 | 13 | class HomeMainScreen extends PureComponent { 14 | static propTypes = { 15 | user: PropTypes.object.isRequired, 16 | popular: PropTypes.array.isRequired, 17 | fetchUser: PropTypes.func.isRequired, 18 | fetchPhotosGrid: PropTypes.func.isRequired 19 | }; 20 | 21 | componentWillMount() { 22 | const { fetchUser, fetchPhotosGrid } = this.props; 23 | const userId = 1234; 24 | fetchUser(userId); 25 | fetchPhotosGrid(); 26 | } 27 | 28 | renderItemSwiper = ({ item }) => ( 29 | 30 | ); 31 | 32 | renderItemGrid = ({ item, animation }) => ( 33 | animation && animation.start()} 37 | /> 38 | ); 39 | 40 | render() { 41 | const { user, popular } = this.props; 42 | return ( 43 | 44 | 49 | 50 | 57 | 65 | 66 | 67 | ); 68 | } 69 | } 70 | 71 | export default connect( 72 | state => ({ 73 | user: getUserState(state), 74 | popular: getPopularPostState(state) 75 | }), 76 | dispatch => ({ 77 | fetchUser: id => dispatch(actions.fetchUser(id)), 78 | fetchPhotosGrid: () => dispatch(actions.fetchPhotosGrid()) 79 | }) 80 | )(HomeMainScreen); 81 | -------------------------------------------------------------------------------- /src/screens/home/screens/HomeMainScreen/selectors.js: -------------------------------------------------------------------------------- 1 | import { createSelector } from 'reselect'; 2 | 3 | import { NAME } from '../../constants'; 4 | 5 | const getPopularPost = state => state[NAME].popular; 6 | export const getPopularPostState = createSelector( 7 | [getPopularPost], 8 | popular => popular, 9 | ); 10 | 11 | const getUser = state => state[NAME].user; 12 | export const getUserState = createSelector([getUser], user => user); 13 | -------------------------------------------------------------------------------- /src/screens/home/screens/HomeMainScreen/selectors.test.js: -------------------------------------------------------------------------------- 1 | import { getUserState, getPopularPostState } from './selectors'; 2 | 3 | import { initialState } from '../../reducer'; 4 | import { NAME } from '../../constants'; 5 | 6 | it('selector getUserState', () => { 7 | const state = { 8 | [NAME]: initialState, 9 | }; 10 | const expected = { 11 | photos: [], 12 | description: [], 13 | name: '', 14 | thumbnail: {}, 15 | }; 16 | expect(getUserState(state)).toEqual(expected); 17 | }); 18 | 19 | it('selector getPopularPostState', () => { 20 | const state = { 21 | [NAME]: initialState, 22 | }; 23 | const expected = []; 24 | expect(getPopularPostState(state)).toEqual(expected); 25 | }); 26 | -------------------------------------------------------------------------------- /src/screens/home/screens/HomeMainScreen/styles.js: -------------------------------------------------------------------------------- 1 | import { StyleSheet } from 'react-native'; 2 | 3 | import { width, colors } from '@themes'; 4 | 5 | export default StyleSheet.create({ 6 | container: { 7 | flex: 1, 8 | backgroundColor: colors.primary, 9 | }, 10 | imageGrid: { 11 | width: '100%', 12 | height: '100%', 13 | }, 14 | imageSwiper: { 15 | height: width, 16 | width, 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /src/screens/index.js: -------------------------------------------------------------------------------- 1 | // NAME, reducer, actions 2 | export { default as home } from './home'; 3 | 4 | // Screens 5 | export { default as HomeMainScreen } from './home/screens/HomeMainScreen'; 6 | -------------------------------------------------------------------------------- /src/themes/colors.js: -------------------------------------------------------------------------------- 1 | export const colors = { 2 | white: '#FFFFFF', 3 | primary: 'rgb(90, 170, 200)', 4 | primaryDark: 'rgb(15, 45, 90)', 5 | primaryLight: 'rgb(45, 120, 210)', 6 | transparent: 'rgba(0, 0, 0, 0)', 7 | black: '#000000', 8 | }; 9 | -------------------------------------------------------------------------------- /src/themes/fonts.js: -------------------------------------------------------------------------------- 1 | export const fontSize = { 2 | small: 12, 3 | medium: 15, 4 | large: 20, 5 | }; 6 | -------------------------------------------------------------------------------- /src/themes/index.js: -------------------------------------------------------------------------------- 1 | export { colors } from './colors'; 2 | export { horizontal, vertical, width, height } from './layout'; 3 | export { fontSize } from './fonts'; 4 | -------------------------------------------------------------------------------- /src/themes/layout.js: -------------------------------------------------------------------------------- 1 | import { Dimensions } from 'react-native'; 2 | 3 | export const { width, height } = Dimensions.get('window'); 4 | 5 | export const horizontal = { 6 | xxSmall: width * 0.0125, 7 | xSmall: width * 0.025, 8 | small: width * 0.0375, 9 | medium: width * 0.05, 10 | large: width * 0.075, 11 | }; 12 | 13 | export const vertical = { 14 | xxSmall: height * 0.0125, 15 | xSmall: height * 0.025, 16 | small: height * 0.0375, 17 | medium: height * 0.05, 18 | normal: height * 0.065, 19 | large: height * 0.075, 20 | }; 21 | -------------------------------------------------------------------------------- /src/themes/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@themes" 3 | } 4 | --------------------------------------------------------------------------------