├── .babelrc ├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── cspell.json ├── example ├── .env.example ├── .eslintrc.json ├── .gitignore ├── .vscode │ └── settings.json ├── App.tsx ├── README.md ├── android │ ├── app │ │ ├── BUCK │ │ ├── build.gradle │ │ ├── build_defs.bzl │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── ReactNativeFlipper.java │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── io │ │ │ │ └── github │ │ │ │ └── cawfree │ │ │ │ └── thegraph │ │ │ │ ├── MainActivity.java │ │ │ │ └── MainApplication.java │ │ │ └── res │ │ │ ├── drawable │ │ │ ├── splashscreen.xml │ │ │ └── splashscreen_image.png │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── app.json ├── babel.config.js ├── index.d.ts ├── index.js ├── ios │ ├── Podfile │ ├── Podfile.lock │ ├── example.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── example.xcscheme │ ├── example.xcworkspace │ │ └── contents.xcworkspacedata │ └── example │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ └── LaunchScreen.xib │ │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── SplashScreen.imageset │ │ │ ├── Contents.json │ │ │ └── splashscreen.png │ │ └── SplashScreenBackground.imageset │ │ │ ├── Contents.json │ │ │ └── background.png │ │ ├── Info.plist │ │ ├── SplashScreen.storyboard │ │ ├── Supporting │ │ └── Expo.plist │ │ ├── main.m │ │ └── thegraph.entitlements ├── metro.config.js ├── package.json ├── scripts │ └── postinstall.js ├── tsconfig.json └── yarn.lock ├── package.json ├── src ├── components │ └── index.tsx ├── constants │ ├── createSubgraph.tsx │ └── index.tsx ├── containers │ └── index.tsx ├── contexts │ ├── TheGraphContext.tsx │ └── index.tsx ├── hooks │ ├── index.tsx │ ├── useCreateSubgraph.ts │ ├── useSubgraph.tsx │ ├── useSubgraphClient.tsx │ └── useTheGraph.tsx ├── index.tsx ├── providers │ ├── TheGraphProvider.tsx │ └── index.tsx └── types │ └── index.tsx ├── tsconfig.json └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-env", "@babel/preset-react"] 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | src 2 | example 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Alexander Thomas 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # thegraph-react 2 | 3 | ![https://camo.githubusercontent.com/0f9fcc0ac1b8617ad4989364f60f78b2d6b32985ad6a508f215f14d8f897b8d3/68747470733a2f2f62616467656e2e6e65742f62616467652f547970655363726970742f7374726963742532302546302539462539322541412f626c7565](https://camo.githubusercontent.com/0f9fcc0ac1b8617ad4989364f60f78b2d6b32985ad6a508f215f14d8f897b8d3/68747470733a2f2f62616467656e2e6e65742f62616467652f547970655363726970742f7374726963742532302546302539462539322541412f626c7565) 4 | 5 | ⚛️ Build decentralized applications quickly and cheaply on [**Ethereum**](https://ethereum.org/en/) and [**IPFS**](https://ipfs.io/) using [**GraphQL**](https://www.apollographql.com/). 6 | 7 | Compatible with both [**React**](https://reactjs.org) and [**React Native**](https://reactnative.dev)! 8 | 9 | ## 🚀 Getting Started 10 | 11 | Using [**yarn**](https://yarnpkg.com): 12 | 13 | ```sh 14 | yarn add thegraph-react 15 | ``` 16 | 17 | You'll also need to manually supply install the following dependencies: 18 | 19 | ```sh 20 | @apollo/client 21 | graphql 22 | nanoid 23 | ``` 24 | 25 | ## ✍️ Usage 26 | 27 | ```typescript 28 | import { gql } from "@apollo/client"; 29 | import React from "react"; 30 | import { StyleSheet, Text, View } from "react-native"; 31 | import { Chains, Subgraph, Subgraphs, TheGraphProvider, useCreateSubgraph, useSubgraph } from "thegraph-react"; 32 | 33 | const styles = StyleSheet.create({ 34 | center: { alignItems: "center", justifyContent: "center" }, 35 | }); 36 | 37 | function Aave({ aave }: { 38 | readonly aave: Subgraph, 39 | }): JSX.Element { 40 | const { useQuery } = useSubgraph(aave); 41 | const { error, loading, data } = useQuery(gql` 42 | { 43 | lendingPoolConfigurationHistoryItems(first: 5) { 44 | id 45 | provider { 46 | id 47 | } 48 | lendingPool 49 | lendingPoolCore 50 | } 51 | lendingPoolConfigurations(first: 5) { 52 | id 53 | lendingPool 54 | lendingPoolCore 55 | lendingPoolParametersProvider 56 | } 57 | } 58 | `); 59 | return ( 60 | 61 | {(error || loading) ? 'Loading...' : JSON.stringify(data)} 62 | 63 | ); 64 | } 65 | 66 | export default function App(): JSX.Element { 67 | const aave = useCreateSubgraph({ 68 | [Chains.MAINNET]: 'https://api.thegraph.com/subgraphs/name/aave/protocol', 69 | }); 70 | 71 | const subgraphs = React.useMemo((): Subgraphs => { 72 | return [aave]; 73 | }, [aave]); 74 | 75 | return ( 76 | 77 | 78 | 79 | ); 80 | } 81 | ``` 82 | 83 | ## ✌️ License 84 | [**MIT**](./LICENSE) 85 | -------------------------------------------------------------------------------- /cspell.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.1", 3 | "words": [ 4 | "cawfree", 5 | "graphprotocol", 6 | "ipfs", 7 | "thegraph" 8 | ] 9 | } -------------------------------------------------------------------------------- /example/.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/example/.env.example -------------------------------------------------------------------------------- /example/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "parser": "@typescript-eslint/parser", 4 | "env": { "es6": true }, 5 | "ignorePatterns": ["node_modules", "build", "coverage"], 6 | "plugins": ["import", "eslint-comments", "functional"], 7 | "extends": [ 8 | "eslint:recommended", 9 | "plugin:eslint-comments/recommended", 10 | "plugin:@typescript-eslint/recommended", 11 | "plugin:import/typescript", 12 | "plugin:functional/lite", 13 | "prettier", 14 | "prettier/@typescript-eslint" 15 | ], 16 | "globals": { "console": true, "__DEV__": true }, 17 | "rules": { 18 | "@typescript-eslint/explicit-module-boundary-types": "off", 19 | "eslint-comments/disable-enable-pair": [ 20 | "error", 21 | { "allowWholeFile": true } 22 | ], 23 | "eslint-comments/no-unused-disable": "error", 24 | "import/order": [ 25 | "error", 26 | { "newlines-between": "always", "alphabetize": { "order": "asc" } } 27 | ], 28 | "sort-imports": [ 29 | "error", 30 | { "ignoreDeclarationSort": true, "ignoreCase": true } 31 | ] 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | *.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | # Bundle artifacts 56 | *.jsbundle 57 | 58 | # CocoaPods 59 | /ios/Pods/ 60 | 61 | # Expo 62 | .expo/* 63 | web-build/ 64 | # @generated expo-cli sync-28e2ab0e9ece60556eaf932abe52d017ec33db50 65 | # The following patterns were generated by expo-cli 66 | 67 | # OSX 68 | # 69 | .DS_Store 70 | 71 | # Xcode 72 | # 73 | build/ 74 | *.pbxuser 75 | !default.pbxuser 76 | *.mode1v3 77 | !default.mode1v3 78 | *.mode2v3 79 | !default.mode2v3 80 | *.perspectivev3 81 | !default.perspectivev3 82 | xcuserdata 83 | *.xccheckout 84 | *.moved-aside 85 | DerivedData 86 | *.hmap 87 | *.ipa 88 | *.xcuserstate 89 | project.xcworkspace 90 | 91 | # Android/IntelliJ 92 | # 93 | build/ 94 | .idea 95 | .gradle 96 | local.properties 97 | *.iml 98 | 99 | # node.js 100 | # 101 | node_modules/ 102 | npm-debug.log 103 | yarn-error.log 104 | 105 | # BUCK 106 | buck-out/ 107 | \.buckd/ 108 | *.keystore 109 | !debug.keystore 110 | 111 | # fastlane 112 | # 113 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 114 | # screenshots whenever they are needed. 115 | # For more information about the recommended setup visit: 116 | # https://docs.fastlane.tools/best-practices/source-control/ 117 | 118 | */fastlane/report.xml 119 | */fastlane/Preview.html 120 | */fastlane/screenshots 121 | 122 | # Bundle artifacts 123 | *.jsbundle 124 | 125 | # CocoaPods 126 | /ios/Pods/ 127 | 128 | # Expo 129 | .expo/* 130 | web-build/ 131 | 132 | # @end expo-cli 133 | # Environment Variables (Store safe defaults in .env.example!) 134 | .env -------------------------------------------------------------------------------- /example/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "aave" 4 | ] 5 | } -------------------------------------------------------------------------------- /example/App.tsx: -------------------------------------------------------------------------------- 1 | import { gql } from "@apollo/client"; 2 | import React from "react"; 3 | import { StyleSheet, Text, View } from "react-native"; 4 | import { Chains, Subgraph, Subgraphs, TheGraphProvider, useCreateSubgraph, useSubgraph } from "thegraph-react"; 5 | 6 | const styles = StyleSheet.create({ 7 | center: { alignItems: "center", justifyContent: "center" }, 8 | }); 9 | 10 | function Aave({ aave }: { 11 | readonly aave: Subgraph, 12 | }): JSX.Element { 13 | const { useQuery } = useSubgraph(aave); 14 | const { error, loading, data } = useQuery(gql` 15 | { 16 | lendingPoolConfigurationHistoryItems(first: 5) { 17 | id 18 | provider { 19 | id 20 | } 21 | lendingPool 22 | lendingPoolCore 23 | } 24 | lendingPoolConfigurations(first: 5) { 25 | id 26 | lendingPool 27 | lendingPoolCore 28 | lendingPoolParametersProvider 29 | } 30 | } 31 | `); 32 | return ( 33 | 34 | {(error || loading) ? 'Loading...' : JSON.stringify(data)} 35 | 36 | ); 37 | } 38 | 39 | export default function App(): JSX.Element { 40 | const aave = useCreateSubgraph({ 41 | [Chains.MAINNET]: 'https://api.thegraph.com/subgraphs/name/aave/protocol', 42 | }); 43 | 44 | const subgraphs = React.useMemo((): Subgraphs => { 45 | return [aave]; 46 | }, [aave]); 47 | 48 | return ( 49 | 50 | 51 | 52 | ); 53 | } 54 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # [TypeScript Example](https://www.typescriptlang.org/) 2 | 3 |

4 | 5 | Supports Expo iOS 6 | 7 | Supports Expo Android 8 | 9 | Supports Expo Web 10 |

11 | 12 | ```sh 13 | npx create-react-native-app -t with-typescript 14 | ``` 15 | 16 | TypeScript is a superset of JavaScript which gives you static types and powerful tooling in Visual Studio Code including autocompletion and useful inline warnings for type errors. 17 | 18 | ## 🚀 How to use 19 | 20 | #### Creating a new project 21 | 22 | - Install the CLI: `npm i -g expo-cli` 23 | - Create a project: `expo init --template expo-template-blank-typescript` 24 | - `cd` into the project 25 | 26 | ### Adding TypeScript to existing projects 27 | 28 | - Copy the `tsconfig.json` from this repo, or new typescript template 29 | - Add typescript dependencies: `yarn add --dev @types/react @types/react-native @types/react-dom typescript` 30 | - Rename files to TypeScript, `.tsx` for React components and `.ts` for plain typescript files 31 | 32 | ## 📝 Notes 33 | 34 | - [Expo TypeScript guide](https://docs.expo.io/versions/latest/guides/typescript/) 35 | -------------------------------------------------------------------------------- /example/android/app/BUCK: -------------------------------------------------------------------------------- 1 | # To learn about Buck see [Docs](https://buckbuild.com/). 2 | # To run your application with Buck: 3 | # - install Buck 4 | # - `npm start` - to start the packager 5 | # - `cd android` 6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 8 | # - `buck install -r android/app` - compile, install and run application 9 | # 10 | 11 | load(":build_defs.bzl", "create_aar_targets", "create_jar_targets") 12 | 13 | lib_deps = [] 14 | 15 | create_aar_targets(glob(["libs/*.aar"])) 16 | 17 | create_jar_targets(glob(["libs/*.jar"])) 18 | 19 | android_library( 20 | name = "all-libs", 21 | exported_deps = lib_deps, 22 | ) 23 | 24 | android_library( 25 | name = "app-code", 26 | srcs = glob([ 27 | "src/main/java/**/*.java", 28 | ]), 29 | deps = [ 30 | ":all-libs", 31 | ":build_config", 32 | ":res", 33 | ], 34 | ) 35 | 36 | android_build_config( 37 | name = "build_config", 38 | package = "io.github.cawfree.thegraph", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "io.github.cawfree.thegraph", 44 | res = "src/main/res", 45 | ) 46 | 47 | android_binary( 48 | name = "app", 49 | keystore = "//android/keystores:debug", 50 | manifest = "src/main/AndroidManifest.xml", 51 | package_type = "debug", 52 | deps = [ 53 | ":app-code", 54 | ], 55 | ) 56 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: "com.android.application" 2 | 3 | import com.android.build.OutputFile 4 | 5 | /** 6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets 7 | * and bundleReleaseJsAndAssets). 8 | * These basically call `react-native bundle` with the correct arguments during the Android build 9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the 10 | * bundle directly from the development server. Below you can see all the possible configurations 11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the 12 | * `apply from: "../../node_modules/react-native/react.gradle"` line. 13 | * 14 | * project.ext.react = [ 15 | * // the name of the generated asset file containing your JS bundle 16 | * bundleAssetName: "index.android.bundle", 17 | * 18 | * // the entry file for bundle generation. If none specified and 19 | * // "index.android.js" exists, it will be used. Otherwise "index.js" is 20 | * // default. Can be overridden with ENTRY_FILE environment variable. 21 | * entryFile: "index.android.js", 22 | * 23 | * // https://reactnative.dev/docs/performance#enable-the-ram-format 24 | * bundleCommand: "ram-bundle", 25 | * 26 | * // whether to bundle JS and assets in debug mode 27 | * bundleInDebug: false, 28 | * 29 | * // whether to bundle JS and assets in release mode 30 | * bundleInRelease: true, 31 | * 32 | * // whether to bundle JS and assets in another build variant (if configured). 33 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 34 | * // The configuration property can be in the following formats 35 | * // 'bundleIn${productFlavor}${buildType}' 36 | * // 'bundleIn${buildType}' 37 | * // bundleInFreeDebug: true, 38 | * // bundleInPaidRelease: true, 39 | * // bundleInBeta: true, 40 | * 41 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 42 | * // for example: to disable dev mode in the staging build type (if configured) 43 | * devDisabledInStaging: true, 44 | * // The configuration property can be in the following formats 45 | * // 'devDisabledIn${productFlavor}${buildType}' 46 | * // 'devDisabledIn${buildType}' 47 | * 48 | * // the root of your project, i.e. where "package.json" lives 49 | * root: "../../", 50 | * 51 | * // where to put the JS bundle asset in debug mode 52 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 53 | * 54 | * // where to put the JS bundle asset in release mode 55 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 56 | * 57 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 58 | * // require('./image.png')), in debug mode 59 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 60 | * 61 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 62 | * // require('./image.png')), in release mode 63 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 64 | * 65 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 66 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 67 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 68 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 69 | * // for example, you might want to remove it from here. 70 | * inputExcludes: ["android/**", "ios/**"], 71 | * 72 | * // override which node gets called and with what additional arguments 73 | * nodeExecutableAndArgs: ["node"], 74 | * 75 | * // supply additional arguments to the packager 76 | * extraPackagerArgs: [] 77 | * ] 78 | */ 79 | 80 | project.ext.react = [ 81 | enableHermes: false 82 | ] 83 | 84 | apply from: '../../node_modules/react-native-unimodules/gradle.groovy' 85 | apply from: "../../node_modules/react-native/react.gradle" 86 | apply from: "../../node_modules/expo-constants/scripts/get-app-config-android.gradle" 87 | apply from: "../../node_modules/expo-updates/scripts/create-manifest-android.gradle" 88 | 89 | /** 90 | * Set this to true to create two separate APKs instead of one: 91 | * - An APK that only works on ARM devices 92 | * - An APK that only works on x86 devices 93 | * The advantage is the size of the APK is reduced by about 4MB. 94 | * Upload all the APKs to the Play Store and people will download 95 | * the correct one based on the CPU architecture of their device. 96 | */ 97 | def enableSeparateBuildPerCPUArchitecture = false 98 | 99 | /** 100 | * Run Proguard to shrink the Java bytecode in release builds. 101 | */ 102 | def enableProguardInReleaseBuilds = false 103 | 104 | /** 105 | * The preferred build flavor of JavaScriptCore. 106 | * 107 | * For example, to use the international variant, you can use: 108 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 109 | * 110 | * The international variant includes ICU i18n library and necessary data 111 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 112 | * give correct results when using with locales other than en-US. Note that 113 | * this variant is about 6MiB larger per architecture than default. 114 | */ 115 | def jscFlavor = 'org.webkit:android-jsc:+' 116 | 117 | /** 118 | * Whether to enable the Hermes VM. 119 | * 120 | * This should be set on project.ext.react and mirrored here. If it is not set 121 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode 122 | * and the benefits of using Hermes will therefore be sharply reduced. 123 | */ 124 | def enableHermes = project.ext.react.get("enableHermes", false); 125 | 126 | android { 127 | compileSdkVersion rootProject.ext.compileSdkVersion 128 | 129 | compileOptions { 130 | sourceCompatibility JavaVersion.VERSION_1_8 131 | targetCompatibility JavaVersion.VERSION_1_8 132 | } 133 | 134 | defaultConfig { 135 | applicationId 'io.github.cawfree.thegraph' 136 | minSdkVersion rootProject.ext.minSdkVersion 137 | targetSdkVersion rootProject.ext.targetSdkVersion 138 | versionCode 1 139 | versionName "1.0.0" 140 | } 141 | splits { 142 | abi { 143 | reset() 144 | enable enableSeparateBuildPerCPUArchitecture 145 | universalApk false // If true, also generate a universal APK 146 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" 147 | } 148 | } 149 | signingConfigs { 150 | debug { 151 | storeFile file('debug.keystore') 152 | storePassword 'android' 153 | keyAlias 'androiddebugkey' 154 | keyPassword 'android' 155 | } 156 | } 157 | buildTypes { 158 | debug { 159 | signingConfig signingConfigs.debug 160 | } 161 | release { 162 | // Caution! In production, you need to generate your own keystore file. 163 | // see https://reactnative.dev/docs/signed-apk-android. 164 | signingConfig signingConfigs.debug 165 | minifyEnabled enableProguardInReleaseBuilds 166 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 167 | } 168 | } 169 | 170 | // applicationVariants are e.g. debug, release 171 | applicationVariants.all { variant -> 172 | variant.outputs.each { output -> 173 | // For each separate APK per architecture, set a unique version code as described here: 174 | // https://developer.android.com/studio/build/configure-apk-splits.html 175 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] 176 | def abi = output.getFilter(OutputFile.ABI) 177 | if (abi != null) { // null for the universal-debug, universal-release variants 178 | output.versionCodeOverride = 179 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 180 | } 181 | 182 | } 183 | } 184 | } 185 | 186 | dependencies { 187 | implementation fileTree(dir: "libs", include: ["*.jar"]) 188 | //noinspection GradleDynamicVersion 189 | implementation "com.facebook.react:react-native:+" // From node_modules 190 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" 191 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { 192 | exclude group:'com.facebook.fbjni' 193 | } 194 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { 195 | exclude group:'com.facebook.flipper' 196 | exclude group:'com.squareup.okhttp3', module:'okhttp' 197 | } 198 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { 199 | exclude group:'com.facebook.flipper' 200 | } 201 | addUnimodulesDependencies() 202 | 203 | if (enableHermes) { 204 | def hermesPath = "../../node_modules/hermes-engine/android/"; 205 | debugImplementation files(hermesPath + "hermes-debug.aar") 206 | releaseImplementation files(hermesPath + "hermes-release.aar") 207 | } else { 208 | implementation jscFlavor 209 | } 210 | } 211 | 212 | // Run this once to be able to run the application with BUCK 213 | // puts all compile dependencies into folder libs for BUCK to use 214 | task copyDownloadableDepsToLibs(type: Copy) { 215 | from configurations.compile 216 | into 'libs' 217 | } 218 | 219 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) 220 | -------------------------------------------------------------------------------- /example/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 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 | -------------------------------------------------------------------------------- /example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/example/android/app/debug.keystore -------------------------------------------------------------------------------- /example/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/debug/java/com/example/ReactNativeFlipper.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | *

This source code is licensed under the MIT license found in the LICENSE file in the root 5 | * directory of this source tree. 6 | */ 7 | package com.example; 8 | 9 | import android.content.Context; 10 | import com.facebook.flipper.android.AndroidFlipperClient; 11 | import com.facebook.flipper.android.utils.FlipperUtils; 12 | import com.facebook.flipper.core.FlipperClient; 13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; 14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; 15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; 16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping; 17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; 18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; 19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; 20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin; 21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; 22 | import com.facebook.react.ReactInstanceManager; 23 | import com.facebook.react.bridge.ReactContext; 24 | import com.facebook.react.modules.network.NetworkingModule; 25 | import okhttp3.OkHttpClient; 26 | 27 | public class ReactNativeFlipper { 28 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 29 | if (FlipperUtils.shouldEnableFlipper(context)) { 30 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 31 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 32 | client.addPlugin(new ReactFlipperPlugin()); 33 | client.addPlugin(new DatabasesFlipperPlugin(context)); 34 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 35 | client.addPlugin(CrashReporterPlugin.getInstance()); 36 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 37 | NetworkingModule.setCustomClientBuilder( 38 | new NetworkingModule.CustomClientBuilder() { 39 | @Override 40 | public void apply(OkHttpClient.Builder builder) { 41 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 42 | } 43 | }); 44 | client.addPlugin(networkFlipperPlugin); 45 | client.start(); 46 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 47 | // Hence we run if after all native modules have been initialized 48 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 49 | if (reactContext == null) { 50 | reactInstanceManager.addReactInstanceEventListener( 51 | new ReactInstanceManager.ReactInstanceEventListener() { 52 | @Override 53 | public void onReactContextInitialized(ReactContext reactContext) { 54 | reactInstanceManager.removeReactInstanceEventListener(this); 55 | reactContext.runOnNativeModulesQueueThread( 56 | new Runnable() { 57 | @Override 58 | public void run() { 59 | client.addPlugin(new FrescoFlipperPlugin()); 60 | } 61 | }); 62 | } 63 | }); 64 | } else { 65 | client.addPlugin(new FrescoFlipperPlugin()); 66 | } 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/io/github/cawfree/thegraph/MainActivity.java: -------------------------------------------------------------------------------- 1 | package io.github.cawfree.thegraph; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.facebook.react.ReactActivity; 6 | import com.facebook.react.ReactActivityDelegate; 7 | import com.facebook.react.ReactRootView; 8 | import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView; 9 | 10 | import expo.modules.splashscreen.singletons.SplashScreen; 11 | import expo.modules.splashscreen.SplashScreenImageResizeMode; 12 | 13 | public class MainActivity extends ReactActivity { 14 | @Override 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | // SplashScreen.show(...) has to be called after super.onCreate(...) 18 | // Below line is handled by '@expo/configure-splash-screen' command and it's discouraged to modify it manually 19 | SplashScreen.show(this, SplashScreenImageResizeMode.CONTAIN, ReactRootView.class, false); 20 | } 21 | 22 | 23 | /** 24 | * Returns the name of the main component registered from JavaScript. 25 | * This is used to schedule rendering of the component. 26 | */ 27 | @Override 28 | protected String getMainComponentName() { 29 | return "main"; 30 | } 31 | 32 | @Override 33 | protected ReactActivityDelegate createReactActivityDelegate() { 34 | return new ReactActivityDelegate(this, getMainComponentName()) { 35 | @Override 36 | protected ReactRootView createRootView() { 37 | return new RNGestureHandlerEnabledRootView(MainActivity.this); 38 | } 39 | }; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/io/github/cawfree/thegraph/MainApplication.java: -------------------------------------------------------------------------------- 1 | package io.github.cawfree.thegraph; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import android.net.Uri; 6 | 7 | import com.facebook.react.PackageList; 8 | import com.facebook.react.ReactApplication; 9 | import com.facebook.react.ReactInstanceManager; 10 | import com.facebook.react.ReactNativeHost; 11 | import com.facebook.react.ReactPackage; 12 | import com.facebook.react.shell.MainReactPackage; 13 | import com.facebook.soloader.SoLoader; 14 | import io.github.cawfree.thegraph.generated.BasePackageList; 15 | 16 | import org.unimodules.adapters.react.ReactAdapterPackage; 17 | import org.unimodules.adapters.react.ModuleRegistryAdapter; 18 | import org.unimodules.adapters.react.ReactModuleRegistryProvider; 19 | import org.unimodules.core.interfaces.Package; 20 | import org.unimodules.core.interfaces.SingletonModule; 21 | import expo.modules.constants.ConstantsPackage; 22 | import expo.modules.permissions.PermissionsPackage; 23 | import expo.modules.filesystem.FileSystemPackage; 24 | import expo.modules.updates.UpdatesController; 25 | 26 | import java.lang.reflect.InvocationTargetException; 27 | import java.util.Arrays; 28 | import java.util.List; 29 | import javax.annotation.Nullable; 30 | 31 | public class MainApplication extends Application implements ReactApplication { 32 | private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider( 33 | new BasePackageList().getPackageList() 34 | ); 35 | 36 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 37 | @Override 38 | public boolean getUseDeveloperSupport() { 39 | return BuildConfig.DEBUG; 40 | } 41 | 42 | @Override 43 | protected List getPackages() { 44 | List packages = new PackageList(this).getPackages(); 45 | packages.add(new ModuleRegistryAdapter(mModuleRegistryProvider)); 46 | return packages; 47 | } 48 | 49 | @Override 50 | protected String getJSMainModuleName() { 51 | return "index"; 52 | } 53 | 54 | @Override 55 | protected @Nullable String getJSBundleFile() { 56 | if (BuildConfig.DEBUG) { 57 | return super.getJSBundleFile(); 58 | } else { 59 | return UpdatesController.getInstance().getLaunchAssetFile(); 60 | } 61 | } 62 | 63 | @Override 64 | protected @Nullable String getBundleAssetName() { 65 | if (BuildConfig.DEBUG) { 66 | return super.getBundleAssetName(); 67 | } else { 68 | return UpdatesController.getInstance().getBundleAssetName(); 69 | } 70 | } 71 | }; 72 | 73 | @Override 74 | public ReactNativeHost getReactNativeHost() { 75 | return mReactNativeHost; 76 | } 77 | 78 | @Override 79 | public void onCreate() { 80 | super.onCreate(); 81 | SoLoader.init(this, /* native exopackage */ false); 82 | 83 | if (!BuildConfig.DEBUG) { 84 | UpdatesController.initialize(this); 85 | } 86 | 87 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 88 | } 89 | 90 | /** 91 | * Loads Flipper in React Native templates. Call this in the onCreate method with something like 92 | * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 93 | * 94 | * @param context 95 | * @param reactInstanceManager 96 | */ 97 | private static void initializeFlipper( 98 | Context context, ReactInstanceManager reactInstanceManager) { 99 | if (BuildConfig.DEBUG) { 100 | try { 101 | /* 102 | We use reflection here to pick up the class that initializes Flipper, 103 | since Flipper library is not available in release mode 104 | */ 105 | Class aClass = Class.forName("io.github.cawfree.thegraph.ReactNativeFlipper"); 106 | aClass 107 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) 108 | .invoke(null, context, reactInstanceManager); 109 | } catch (ClassNotFoundException e) { 110 | e.printStackTrace(); 111 | } catch (NoSuchMethodException e) { 112 | e.printStackTrace(); 113 | } catch (IllegalAccessException e) { 114 | e.printStackTrace(); 115 | } catch (InvocationTargetException e) { 116 | e.printStackTrace(); 117 | } 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/splashscreen.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/splashscreen_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/example/android/app/src/main/res/drawable/splashscreen_image.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | #023c69 5 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | example 4 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 11 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "29.0.2" 6 | minSdkVersion = 21 7 | compileSdkVersion = 29 8 | targetSdkVersion = 29 9 | } 10 | repositories { 11 | google() 12 | jcenter() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle:3.5.3") 16 | 17 | // NOTE: Do not place your application dependencies here; they belong 18 | // in the individual module build.gradle files 19 | } 20 | } 21 | 22 | allprojects { 23 | repositories { 24 | mavenLocal() 25 | maven { 26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 27 | url("$rootDir/../node_modules/react-native/android") 28 | } 29 | maven { 30 | // Android JSC is installed from npm 31 | url("$rootDir/../node_modules/jsc-android/dist") 32 | } 33 | 34 | google() 35 | jcenter() 36 | maven { url 'https://www.jitpack.io' } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | 25 | # Automatically convert third-party libraries to use AndroidX 26 | android.enableJetifier=true 27 | 28 | # Version of flipper SDK to use with React Native 29 | FLIPPER_VERSION=0.54.0 -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | # Determine the Java command to use to start the JVM. 86 | if [ -n "$JAVA_HOME" ] ; then 87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 88 | # IBM's JDK on AIX uses strange locations for the executables 89 | JAVACMD="$JAVA_HOME/jre/sh/java" 90 | else 91 | JAVACMD="$JAVA_HOME/bin/java" 92 | fi 93 | if [ ! -x "$JAVACMD" ] ; then 94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 95 | 96 | Please set the JAVA_HOME variable in your environment to match the 97 | location of your Java installation." 98 | fi 99 | else 100 | JAVACMD="java" 101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 102 | 103 | Please set the JAVA_HOME variable in your environment to match the 104 | location of your Java installation." 105 | fi 106 | 107 | # Increase the maximum file descriptors if we can. 108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 109 | MAX_FD_LIMIT=`ulimit -H -n` 110 | if [ $? -eq 0 ] ; then 111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 112 | MAX_FD="$MAX_FD_LIMIT" 113 | fi 114 | ulimit -n $MAX_FD 115 | if [ $? -ne 0 ] ; then 116 | warn "Could not set maximum file descriptor limit: $MAX_FD" 117 | fi 118 | else 119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 120 | fi 121 | fi 122 | 123 | # For Darwin, add options to specify how the application appears in the dock 124 | if $darwin; then 125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 126 | fi 127 | 128 | # For Cygwin or MSYS, switch paths to Windows format before running java 129 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 132 | JAVACMD=`cygpath --unix "$JAVACMD"` 133 | 134 | # We build the pattern for arguments to be converted via cygpath 135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 136 | SEP="" 137 | for dir in $ROOTDIRSRAW ; do 138 | ROOTDIRS="$ROOTDIRS$SEP$dir" 139 | SEP="|" 140 | done 141 | OURCYGPATTERN="(^($ROOTDIRS))" 142 | # Add a user-defined pattern to the cygpath arguments 143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 145 | fi 146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 147 | i=0 148 | for arg in "$@" ; do 149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 151 | 152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 154 | else 155 | eval `echo args$i`="\"$arg\"" 156 | fi 157 | i=`expr $i + 1` 158 | done 159 | case $i in 160 | 0) set -- ;; 161 | 1) set -- "$args0" ;; 162 | 2) set -- "$args0" "$args1" ;; 163 | 3) set -- "$args0" "$args1" "$args2" ;; 164 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 165 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 166 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 167 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 168 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 169 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 170 | esac 171 | fi 172 | 173 | # Escape application args 174 | save () { 175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 176 | echo " " 177 | } 178 | APP_ARGS=`save "$@"` 179 | 180 | # Collect all arguments for the java command, following the shell quoting and substitution rules 181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 182 | 183 | exec "$JAVACMD" "$@" 184 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto init 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto init 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :init 68 | @rem Get command-line arguments, handling Windows variants 69 | 70 | if not "%OS%" == "Windows_NT" goto win9xME_args 71 | 72 | :win9xME_args 73 | @rem Slurp the command line arguments. 74 | set CMD_LINE_ARGS= 75 | set _SKIP=2 76 | 77 | :win9xME_args_slurp 78 | if "x%~1" == "x" goto execute 79 | 80 | set CMD_LINE_ARGS=%* 81 | 82 | :execute 83 | @rem Setup the command line 84 | 85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 86 | 87 | @rem Execute Gradle 88 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 89 | 90 | :end 91 | @rem End local scope for the variables with windows NT shell 92 | if "%ERRORLEVEL%"=="0" goto mainEnd 93 | 94 | :fail 95 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 96 | rem the _cmd.exe /c_ return code! 97 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 98 | exit /b 1 99 | 100 | :mainEnd 101 | if "%OS%"=="Windows_NT" endlocal 102 | 103 | :omega 104 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'example' 2 | 3 | apply from: '../node_modules/react-native-unimodules/gradle.groovy' 4 | includeUnimodulesProjects() 5 | 6 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); 7 | applyNativeModulesSettingsGradle(settings) 8 | 9 | include ':app' 10 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "ios": { 4 | "bundleIdentifier": "io.github.cawfree.thegraph" 5 | }, 6 | "android": { 7 | "package": "io.github.cawfree.thegraph" 8 | }, 9 | "scheme": "thegraphexample" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /example/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true); 3 | return { 4 | presets: ["babel-preset-expo"], 5 | plugins: [["module:react-native-dotenv"]], 6 | }; 7 | }; 8 | -------------------------------------------------------------------------------- /example/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module "@env" {} 2 | -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | // This file has been auto-generated by Ξ create-react-native-dapp Ξ. 2 | // Feel free to modify it, but please take care to maintain the exact 3 | // procedure listed between /* dapp-begin */ and /* dapp-end */, as 4 | // this will help persist a known template for future migrations. 5 | 6 | /* dapp-begin */ 7 | const { Platform, LogBox } = require("react-native"); 8 | 9 | if (Platform.OS !== "web") { 10 | require("react-native-get-random-values"); 11 | LogBox.ignoreLogs([ 12 | "Warning: The provided value 'ms-stream' is not a valid 'responseType'.", 13 | "Warning: The provided value 'moz-chunked-arraybuffer' is not a valid 'responseType'.", 14 | ]); 15 | } 16 | 17 | if (typeof Buffer === "undefined") { 18 | global.Buffer = require("buffer").Buffer; 19 | } 20 | 21 | global.btoa = global.btoa || require("base-64").encode; 22 | global.atob = global.atob || require("base-64").decode; 23 | 24 | process.version = "v9.40"; 25 | 26 | import { registerRootComponent } from "expo"; 27 | const { default: App } = require("./App"); 28 | /* dapp-end */ 29 | 30 | // registerRootComponent calls AppRegistry.registerComponent('main', () => App); 31 | // It also ensures that whether you load the app in the Expo client or in a native build, 32 | // the environment is set up appropriately 33 | registerRootComponent(App); 34 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/react-native-unimodules/cocoapods.rb' 3 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 4 | 5 | platform :ios, '10.0' 6 | 7 | target 'example' do 8 | use_unimodules! 9 | config = use_native_modules! 10 | 11 | use_react_native!(:path => config["reactNativePath"]) 12 | 13 | # Uncomment the code below to enable Flipper. 14 | # 15 | # You should not install Flipper in CI environments when creating release 16 | # builds, this will lead to significantly slower build times. 17 | # 18 | # Note that if you have use_frameworks! enabled, Flipper will not work. 19 | # 20 | # use_flipper! 21 | # post_install do |installer| 22 | # flipper_post_install(installer) 23 | # end 24 | end 25 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - boost-for-react-native (1.63.0) 3 | - DoubleConversion (1.1.6) 4 | - EXApplication (2.4.1): 5 | - UMCore 6 | - EXConstants (9.3.5): 7 | - UMConstantsInterface 8 | - UMCore 9 | - EXErrorRecovery (1.4.0): 10 | - UMCore 11 | - EXFileSystem (9.3.0): 12 | - UMCore 13 | - UMFileSystemInterface 14 | - EXFont (8.4.0): 15 | - UMCore 16 | - UMFontInterface 17 | - EXImageLoader (1.3.0): 18 | - React-Core 19 | - UMCore 20 | - UMImageLoaderInterface 21 | - EXKeepAwake (8.4.0): 22 | - UMCore 23 | - EXLinearGradient (8.4.0): 24 | - UMCore 25 | - EXLocation (10.0.0): 26 | - UMCore 27 | - UMPermissionsInterface 28 | - UMTaskManagerInterface 29 | - EXPermissions (10.0.0): 30 | - UMCore 31 | - UMPermissionsInterface 32 | - EXSecureStore (9.3.0): 33 | - UMCore 34 | - EXSplashScreen (0.8.1): 35 | - React-Core 36 | - UMCore 37 | - EXSQLite (8.5.0): 38 | - UMCore 39 | - UMFileSystemInterface 40 | - EXUpdates (0.4.1): 41 | - React-Core 42 | - UMCore 43 | - FBLazyVector (0.63.4) 44 | - FBReactNativeSpec (0.63.4): 45 | - Folly (= 2020.01.13.00) 46 | - RCTRequired (= 0.63.4) 47 | - RCTTypeSafety (= 0.63.4) 48 | - React-Core (= 0.63.4) 49 | - React-jsi (= 0.63.4) 50 | - ReactCommon/turbomodule/core (= 0.63.4) 51 | - Folly (2020.01.13.00): 52 | - boost-for-react-native 53 | - DoubleConversion 54 | - Folly/Default (= 2020.01.13.00) 55 | - glog 56 | - Folly/Default (2020.01.13.00): 57 | - boost-for-react-native 58 | - DoubleConversion 59 | - glog 60 | - glog (0.3.5) 61 | - RCTRequired (0.63.4) 62 | - RCTTypeSafety (0.63.4): 63 | - FBLazyVector (= 0.63.4) 64 | - Folly (= 2020.01.13.00) 65 | - RCTRequired (= 0.63.4) 66 | - React-Core (= 0.63.4) 67 | - React (0.63.4): 68 | - React-Core (= 0.63.4) 69 | - React-Core/DevSupport (= 0.63.4) 70 | - React-Core/RCTWebSocket (= 0.63.4) 71 | - React-RCTActionSheet (= 0.63.4) 72 | - React-RCTAnimation (= 0.63.4) 73 | - React-RCTBlob (= 0.63.4) 74 | - React-RCTImage (= 0.63.4) 75 | - React-RCTLinking (= 0.63.4) 76 | - React-RCTNetwork (= 0.63.4) 77 | - React-RCTSettings (= 0.63.4) 78 | - React-RCTText (= 0.63.4) 79 | - React-RCTVibration (= 0.63.4) 80 | - React-callinvoker (0.63.4) 81 | - React-Core (0.63.4): 82 | - Folly (= 2020.01.13.00) 83 | - glog 84 | - React-Core/Default (= 0.63.4) 85 | - React-cxxreact (= 0.63.4) 86 | - React-jsi (= 0.63.4) 87 | - React-jsiexecutor (= 0.63.4) 88 | - Yoga 89 | - React-Core/CoreModulesHeaders (0.63.4): 90 | - Folly (= 2020.01.13.00) 91 | - glog 92 | - React-Core/Default 93 | - React-cxxreact (= 0.63.4) 94 | - React-jsi (= 0.63.4) 95 | - React-jsiexecutor (= 0.63.4) 96 | - Yoga 97 | - React-Core/Default (0.63.4): 98 | - Folly (= 2020.01.13.00) 99 | - glog 100 | - React-cxxreact (= 0.63.4) 101 | - React-jsi (= 0.63.4) 102 | - React-jsiexecutor (= 0.63.4) 103 | - Yoga 104 | - React-Core/DevSupport (0.63.4): 105 | - Folly (= 2020.01.13.00) 106 | - glog 107 | - React-Core/Default (= 0.63.4) 108 | - React-Core/RCTWebSocket (= 0.63.4) 109 | - React-cxxreact (= 0.63.4) 110 | - React-jsi (= 0.63.4) 111 | - React-jsiexecutor (= 0.63.4) 112 | - React-jsinspector (= 0.63.4) 113 | - Yoga 114 | - React-Core/RCTActionSheetHeaders (0.63.4): 115 | - Folly (= 2020.01.13.00) 116 | - glog 117 | - React-Core/Default 118 | - React-cxxreact (= 0.63.4) 119 | - React-jsi (= 0.63.4) 120 | - React-jsiexecutor (= 0.63.4) 121 | - Yoga 122 | - React-Core/RCTAnimationHeaders (0.63.4): 123 | - Folly (= 2020.01.13.00) 124 | - glog 125 | - React-Core/Default 126 | - React-cxxreact (= 0.63.4) 127 | - React-jsi (= 0.63.4) 128 | - React-jsiexecutor (= 0.63.4) 129 | - Yoga 130 | - React-Core/RCTBlobHeaders (0.63.4): 131 | - Folly (= 2020.01.13.00) 132 | - glog 133 | - React-Core/Default 134 | - React-cxxreact (= 0.63.4) 135 | - React-jsi (= 0.63.4) 136 | - React-jsiexecutor (= 0.63.4) 137 | - Yoga 138 | - React-Core/RCTImageHeaders (0.63.4): 139 | - Folly (= 2020.01.13.00) 140 | - glog 141 | - React-Core/Default 142 | - React-cxxreact (= 0.63.4) 143 | - React-jsi (= 0.63.4) 144 | - React-jsiexecutor (= 0.63.4) 145 | - Yoga 146 | - React-Core/RCTLinkingHeaders (0.63.4): 147 | - Folly (= 2020.01.13.00) 148 | - glog 149 | - React-Core/Default 150 | - React-cxxreact (= 0.63.4) 151 | - React-jsi (= 0.63.4) 152 | - React-jsiexecutor (= 0.63.4) 153 | - Yoga 154 | - React-Core/RCTNetworkHeaders (0.63.4): 155 | - Folly (= 2020.01.13.00) 156 | - glog 157 | - React-Core/Default 158 | - React-cxxreact (= 0.63.4) 159 | - React-jsi (= 0.63.4) 160 | - React-jsiexecutor (= 0.63.4) 161 | - Yoga 162 | - React-Core/RCTSettingsHeaders (0.63.4): 163 | - Folly (= 2020.01.13.00) 164 | - glog 165 | - React-Core/Default 166 | - React-cxxreact (= 0.63.4) 167 | - React-jsi (= 0.63.4) 168 | - React-jsiexecutor (= 0.63.4) 169 | - Yoga 170 | - React-Core/RCTTextHeaders (0.63.4): 171 | - Folly (= 2020.01.13.00) 172 | - glog 173 | - React-Core/Default 174 | - React-cxxreact (= 0.63.4) 175 | - React-jsi (= 0.63.4) 176 | - React-jsiexecutor (= 0.63.4) 177 | - Yoga 178 | - React-Core/RCTVibrationHeaders (0.63.4): 179 | - Folly (= 2020.01.13.00) 180 | - glog 181 | - React-Core/Default 182 | - React-cxxreact (= 0.63.4) 183 | - React-jsi (= 0.63.4) 184 | - React-jsiexecutor (= 0.63.4) 185 | - Yoga 186 | - React-Core/RCTWebSocket (0.63.4): 187 | - Folly (= 2020.01.13.00) 188 | - glog 189 | - React-Core/Default (= 0.63.4) 190 | - React-cxxreact (= 0.63.4) 191 | - React-jsi (= 0.63.4) 192 | - React-jsiexecutor (= 0.63.4) 193 | - Yoga 194 | - React-CoreModules (0.63.4): 195 | - FBReactNativeSpec (= 0.63.4) 196 | - Folly (= 2020.01.13.00) 197 | - RCTTypeSafety (= 0.63.4) 198 | - React-Core/CoreModulesHeaders (= 0.63.4) 199 | - React-jsi (= 0.63.4) 200 | - React-RCTImage (= 0.63.4) 201 | - ReactCommon/turbomodule/core (= 0.63.4) 202 | - React-cxxreact (0.63.4): 203 | - boost-for-react-native (= 1.63.0) 204 | - DoubleConversion 205 | - Folly (= 2020.01.13.00) 206 | - glog 207 | - React-callinvoker (= 0.63.4) 208 | - React-jsinspector (= 0.63.4) 209 | - React-jsi (0.63.4): 210 | - boost-for-react-native (= 1.63.0) 211 | - DoubleConversion 212 | - Folly (= 2020.01.13.00) 213 | - glog 214 | - React-jsi/Default (= 0.63.4) 215 | - React-jsi/Default (0.63.4): 216 | - boost-for-react-native (= 1.63.0) 217 | - DoubleConversion 218 | - Folly (= 2020.01.13.00) 219 | - glog 220 | - React-jsiexecutor (0.63.4): 221 | - DoubleConversion 222 | - Folly (= 2020.01.13.00) 223 | - glog 224 | - React-cxxreact (= 0.63.4) 225 | - React-jsi (= 0.63.4) 226 | - React-jsinspector (0.63.4) 227 | - react-native-get-random-values (1.5.0): 228 | - React 229 | - React-RCTActionSheet (0.63.4): 230 | - React-Core/RCTActionSheetHeaders (= 0.63.4) 231 | - React-RCTAnimation (0.63.4): 232 | - FBReactNativeSpec (= 0.63.4) 233 | - Folly (= 2020.01.13.00) 234 | - RCTTypeSafety (= 0.63.4) 235 | - React-Core/RCTAnimationHeaders (= 0.63.4) 236 | - React-jsi (= 0.63.4) 237 | - ReactCommon/turbomodule/core (= 0.63.4) 238 | - React-RCTBlob (0.63.4): 239 | - FBReactNativeSpec (= 0.63.4) 240 | - Folly (= 2020.01.13.00) 241 | - React-Core/RCTBlobHeaders (= 0.63.4) 242 | - React-Core/RCTWebSocket (= 0.63.4) 243 | - React-jsi (= 0.63.4) 244 | - React-RCTNetwork (= 0.63.4) 245 | - ReactCommon/turbomodule/core (= 0.63.4) 246 | - React-RCTImage (0.63.4): 247 | - FBReactNativeSpec (= 0.63.4) 248 | - Folly (= 2020.01.13.00) 249 | - RCTTypeSafety (= 0.63.4) 250 | - React-Core/RCTImageHeaders (= 0.63.4) 251 | - React-jsi (= 0.63.4) 252 | - React-RCTNetwork (= 0.63.4) 253 | - ReactCommon/turbomodule/core (= 0.63.4) 254 | - React-RCTLinking (0.63.4): 255 | - FBReactNativeSpec (= 0.63.4) 256 | - React-Core/RCTLinkingHeaders (= 0.63.4) 257 | - React-jsi (= 0.63.4) 258 | - ReactCommon/turbomodule/core (= 0.63.4) 259 | - React-RCTNetwork (0.63.4): 260 | - FBReactNativeSpec (= 0.63.4) 261 | - Folly (= 2020.01.13.00) 262 | - RCTTypeSafety (= 0.63.4) 263 | - React-Core/RCTNetworkHeaders (= 0.63.4) 264 | - React-jsi (= 0.63.4) 265 | - ReactCommon/turbomodule/core (= 0.63.4) 266 | - React-RCTSettings (0.63.4): 267 | - FBReactNativeSpec (= 0.63.4) 268 | - Folly (= 2020.01.13.00) 269 | - RCTTypeSafety (= 0.63.4) 270 | - React-Core/RCTSettingsHeaders (= 0.63.4) 271 | - React-jsi (= 0.63.4) 272 | - ReactCommon/turbomodule/core (= 0.63.4) 273 | - React-RCTText (0.63.4): 274 | - React-Core/RCTTextHeaders (= 0.63.4) 275 | - React-RCTVibration (0.63.4): 276 | - FBReactNativeSpec (= 0.63.4) 277 | - Folly (= 2020.01.13.00) 278 | - React-Core/RCTVibrationHeaders (= 0.63.4) 279 | - React-jsi (= 0.63.4) 280 | - ReactCommon/turbomodule/core (= 0.63.4) 281 | - ReactCommon/turbomodule/core (0.63.4): 282 | - DoubleConversion 283 | - Folly (= 2020.01.13.00) 284 | - glog 285 | - React-callinvoker (= 0.63.4) 286 | - React-Core (= 0.63.4) 287 | - React-cxxreact (= 0.63.4) 288 | - React-jsi (= 0.63.4) 289 | - RNGestureHandler (1.8.0): 290 | - React 291 | - RNReanimated (1.13.2): 292 | - React-Core 293 | - RNScreens (2.15.1): 294 | - React-Core 295 | - UMAppLoader (1.4.0) 296 | - UMBarCodeScannerInterface (5.4.0) 297 | - UMCameraInterface (5.4.0) 298 | - UMConstantsInterface (5.4.0) 299 | - UMCore (6.0.0) 300 | - UMFaceDetectorInterface (5.4.0) 301 | - UMFileSystemInterface (5.4.0) 302 | - UMFontInterface (5.4.0) 303 | - UMImageLoaderInterface (5.4.0) 304 | - UMPermissionsInterface (5.4.0): 305 | - UMCore 306 | - UMReactNativeAdapter (5.7.0): 307 | - React-Core 308 | - UMCore 309 | - UMFontInterface 310 | - UMSensorsInterface (5.4.0) 311 | - UMTaskManagerInterface (5.4.0) 312 | - Yoga (1.14.0) 313 | 314 | DEPENDENCIES: 315 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) 316 | - EXApplication (from `../node_modules/expo-application/ios`) 317 | - EXConstants (from `../node_modules/expo-constants/ios`) 318 | - EXErrorRecovery (from `../node_modules/expo-error-recovery/ios`) 319 | - EXFileSystem (from `../node_modules/expo-file-system/ios`) 320 | - EXFont (from `../node_modules/expo-font/ios`) 321 | - EXImageLoader (from `../node_modules/expo-image-loader/ios`) 322 | - EXKeepAwake (from `../node_modules/expo-keep-awake/ios`) 323 | - EXLinearGradient (from `../node_modules/expo-linear-gradient/ios`) 324 | - EXLocation (from `../node_modules/expo-location/ios`) 325 | - EXPermissions (from `../node_modules/expo-permissions/ios`) 326 | - EXSecureStore (from `../node_modules/expo-secure-store/ios`) 327 | - EXSplashScreen (from `../node_modules/expo-splash-screen/ios`) 328 | - EXSQLite (from `../node_modules/expo-sqlite/ios`) 329 | - EXUpdates (from `../node_modules/expo-updates/ios`) 330 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) 331 | - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) 332 | - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`) 333 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) 334 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) 335 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) 336 | - React (from `../node_modules/react-native/`) 337 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) 338 | - React-Core (from `../node_modules/react-native/`) 339 | - React-Core/DevSupport (from `../node_modules/react-native/`) 340 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`) 341 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) 342 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) 343 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) 344 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) 345 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) 346 | - react-native-get-random-values (from `../node_modules/react-native-get-random-values`) 347 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) 348 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) 349 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) 350 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) 351 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) 352 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) 353 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) 354 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`) 355 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) 356 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) 357 | - RNGestureHandler (from `../node_modules/react-native-gesture-handler`) 358 | - RNReanimated (from `../node_modules/react-native-reanimated`) 359 | - RNScreens (from `../node_modules/react-native-screens`) 360 | - UMAppLoader (from `../node_modules/unimodules-app-loader/ios`) 361 | - UMBarCodeScannerInterface (from `../node_modules/unimodules-barcode-scanner-interface/ios`) 362 | - UMCameraInterface (from `../node_modules/unimodules-camera-interface/ios`) 363 | - UMConstantsInterface (from `../node_modules/unimodules-constants-interface/ios`) 364 | - "UMCore (from `../node_modules/@unimodules/core/ios`)" 365 | - UMFaceDetectorInterface (from `../node_modules/unimodules-face-detector-interface/ios`) 366 | - UMFileSystemInterface (from `../node_modules/unimodules-file-system-interface/ios`) 367 | - UMFontInterface (from `../node_modules/unimodules-font-interface/ios`) 368 | - UMImageLoaderInterface (from `../node_modules/unimodules-image-loader-interface/ios`) 369 | - UMPermissionsInterface (from `../node_modules/unimodules-permissions-interface/ios`) 370 | - "UMReactNativeAdapter (from `../node_modules/@unimodules/react-native-adapter/ios`)" 371 | - UMSensorsInterface (from `../node_modules/unimodules-sensors-interface/ios`) 372 | - UMTaskManagerInterface (from `../node_modules/unimodules-task-manager-interface/ios`) 373 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) 374 | 375 | SPEC REPOS: 376 | trunk: 377 | - boost-for-react-native 378 | 379 | EXTERNAL SOURCES: 380 | DoubleConversion: 381 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" 382 | EXApplication: 383 | :path: "../node_modules/expo-application/ios" 384 | EXConstants: 385 | :path: "../node_modules/expo-constants/ios" 386 | EXErrorRecovery: 387 | :path: "../node_modules/expo-error-recovery/ios" 388 | EXFileSystem: 389 | :path: "../node_modules/expo-file-system/ios" 390 | EXFont: 391 | :path: "../node_modules/expo-font/ios" 392 | EXImageLoader: 393 | :path: "../node_modules/expo-image-loader/ios" 394 | EXKeepAwake: 395 | :path: "../node_modules/expo-keep-awake/ios" 396 | EXLinearGradient: 397 | :path: "../node_modules/expo-linear-gradient/ios" 398 | EXLocation: 399 | :path: "../node_modules/expo-location/ios" 400 | EXPermissions: 401 | :path: "../node_modules/expo-permissions/ios" 402 | EXSecureStore: 403 | :path: "../node_modules/expo-secure-store/ios" 404 | EXSplashScreen: 405 | :path: "../node_modules/expo-splash-screen/ios" 406 | EXSQLite: 407 | :path: "../node_modules/expo-sqlite/ios" 408 | EXUpdates: 409 | :path: "../node_modules/expo-updates/ios" 410 | FBLazyVector: 411 | :path: "../node_modules/react-native/Libraries/FBLazyVector" 412 | FBReactNativeSpec: 413 | :path: "../node_modules/react-native/Libraries/FBReactNativeSpec" 414 | Folly: 415 | :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec" 416 | glog: 417 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" 418 | RCTRequired: 419 | :path: "../node_modules/react-native/Libraries/RCTRequired" 420 | RCTTypeSafety: 421 | :path: "../node_modules/react-native/Libraries/TypeSafety" 422 | React: 423 | :path: "../node_modules/react-native/" 424 | React-callinvoker: 425 | :path: "../node_modules/react-native/ReactCommon/callinvoker" 426 | React-Core: 427 | :path: "../node_modules/react-native/" 428 | React-CoreModules: 429 | :path: "../node_modules/react-native/React/CoreModules" 430 | React-cxxreact: 431 | :path: "../node_modules/react-native/ReactCommon/cxxreact" 432 | React-jsi: 433 | :path: "../node_modules/react-native/ReactCommon/jsi" 434 | React-jsiexecutor: 435 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor" 436 | React-jsinspector: 437 | :path: "../node_modules/react-native/ReactCommon/jsinspector" 438 | react-native-get-random-values: 439 | :path: "../node_modules/react-native-get-random-values" 440 | React-RCTActionSheet: 441 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS" 442 | React-RCTAnimation: 443 | :path: "../node_modules/react-native/Libraries/NativeAnimation" 444 | React-RCTBlob: 445 | :path: "../node_modules/react-native/Libraries/Blob" 446 | React-RCTImage: 447 | :path: "../node_modules/react-native/Libraries/Image" 448 | React-RCTLinking: 449 | :path: "../node_modules/react-native/Libraries/LinkingIOS" 450 | React-RCTNetwork: 451 | :path: "../node_modules/react-native/Libraries/Network" 452 | React-RCTSettings: 453 | :path: "../node_modules/react-native/Libraries/Settings" 454 | React-RCTText: 455 | :path: "../node_modules/react-native/Libraries/Text" 456 | React-RCTVibration: 457 | :path: "../node_modules/react-native/Libraries/Vibration" 458 | ReactCommon: 459 | :path: "../node_modules/react-native/ReactCommon" 460 | RNGestureHandler: 461 | :path: "../node_modules/react-native-gesture-handler" 462 | RNReanimated: 463 | :path: "../node_modules/react-native-reanimated" 464 | RNScreens: 465 | :path: "../node_modules/react-native-screens" 466 | UMAppLoader: 467 | :path: "../node_modules/unimodules-app-loader/ios" 468 | UMBarCodeScannerInterface: 469 | :path: "../node_modules/unimodules-barcode-scanner-interface/ios" 470 | UMCameraInterface: 471 | :path: "../node_modules/unimodules-camera-interface/ios" 472 | UMConstantsInterface: 473 | :path: "../node_modules/unimodules-constants-interface/ios" 474 | UMCore: 475 | :path: "../node_modules/@unimodules/core/ios" 476 | UMFaceDetectorInterface: 477 | :path: "../node_modules/unimodules-face-detector-interface/ios" 478 | UMFileSystemInterface: 479 | :path: "../node_modules/unimodules-file-system-interface/ios" 480 | UMFontInterface: 481 | :path: "../node_modules/unimodules-font-interface/ios" 482 | UMImageLoaderInterface: 483 | :path: "../node_modules/unimodules-image-loader-interface/ios" 484 | UMPermissionsInterface: 485 | :path: "../node_modules/unimodules-permissions-interface/ios" 486 | UMReactNativeAdapter: 487 | :path: "../node_modules/@unimodules/react-native-adapter/ios" 488 | UMSensorsInterface: 489 | :path: "../node_modules/unimodules-sensors-interface/ios" 490 | UMTaskManagerInterface: 491 | :path: "../node_modules/unimodules-task-manager-interface/ios" 492 | Yoga: 493 | :path: "../node_modules/react-native/ReactCommon/yoga" 494 | 495 | SPEC CHECKSUMS: 496 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c 497 | DoubleConversion: cde416483dac037923206447da6e1454df403714 498 | EXApplication: e3c201e7b913d081bbd37bd3c5d0e2cdc21733b4 499 | EXConstants: 54d0bf04319d1692c6c7bc03ca151ef7a71705a4 500 | EXErrorRecovery: b46af4b91e2b4ec598ab1fa51d2cf088aaf5511f 501 | EXFileSystem: 0e4974ab77bff04cda68d2886d070cbe64b93a6b 502 | EXFont: 30c64ed8735a180e3f20046e4fdac4ea074d71d3 503 | EXImageLoader: f96ec9992733a4224418bbd9382e5485c8948944 504 | EXKeepAwake: 615c5a6fca5c2afedf611bb6f7f2ca323246de94 505 | EXLinearGradient: c803fbd1aa974be038177b1e45524bc35759fe9c 506 | EXLocation: d55e2a37f61bcfb4eba9c813b3f4621d896c4c00 507 | EXPermissions: 17d4846ad1880f6891c74ae58ca1acb43e47ed47 508 | EXSecureStore: 1b571851e6068b30b8ec097be848a04603c03bae 509 | EXSplashScreen: 8c7c1112ce7611a853486af4737fe2298eda7657 510 | EXSQLite: bda6a286dded0637bb312ee781239dcca163ff4b 511 | EXUpdates: 28368049118dbe4ceaf4422ec72e0ad5f770df1f 512 | FBLazyVector: 3bb422f41b18121b71783a905c10e58606f7dc3e 513 | FBReactNativeSpec: f2c97f2529dd79c083355182cc158c9f98f4bd6e 514 | Folly: aeb27d02cdff07ca01f8a8a5a6dd5bcaf6be6f70 515 | glog: 2ad46e202fbaa5641fceb4b2af37dcd88fd8762d 516 | RCTRequired: 082f10cd3f905d6c124597fd1c14f6f2655ff65e 517 | RCTTypeSafety: 8c9c544ecbf20337d069e4ae7fd9a377aadf504b 518 | React: b0a957a2c44da4113b0c4c9853d8387f8e64e615 519 | React-callinvoker: c3f44dd3cb195b6aa46621fff95ded79d59043fe 520 | React-Core: d3b2a1ac9a2c13c3bcde712d9281fc1c8a5b315b 521 | React-CoreModules: 0581ff36cb797da0943d424f69e7098e43e9be60 522 | React-cxxreact: c1480d4fda5720086c90df537ee7d285d4c57ac3 523 | React-jsi: a0418934cf48f25b485631deb27c64dc40fb4c31 524 | React-jsiexecutor: 93bd528844ad21dc07aab1c67cb10abae6df6949 525 | React-jsinspector: 58aef7155bc9a9683f5b60b35eccea8722a4f53a 526 | react-native-get-random-values: 1404bd5cc0ab0e287f75ee1c489555688fc65f89 527 | React-RCTActionSheet: 89a0ca9f4a06c1f93c26067af074ccdce0f40336 528 | React-RCTAnimation: 1bde3ecc0c104c55df246eda516e0deb03c4e49b 529 | React-RCTBlob: a97d378b527740cc667e03ebfa183a75231ab0f0 530 | React-RCTImage: c1b1f2d3f43a4a528c8946d6092384b5c880d2f0 531 | React-RCTLinking: 35ae4ab9dc0410d1fcbdce4d7623194a27214fb2 532 | React-RCTNetwork: 29ec2696f8d8cfff7331fac83d3e893c95ef43ae 533 | React-RCTSettings: 60f0691bba2074ef394f95d4c2265ec284e0a46a 534 | React-RCTText: 5c51df3f08cb9dedc6e790161195d12bac06101c 535 | React-RCTVibration: ae4f914cfe8de7d4de95ae1ea6cc8f6315d73d9d 536 | ReactCommon: 73d79c7039f473b76db6ff7c6b159c478acbbb3b 537 | RNGestureHandler: 7a5833d0f788dbd107fbb913e09aa0c1ff333c39 538 | RNReanimated: e03f7425cb7a38dcf1b644d680d1bfc91c3337ad 539 | RNScreens: 8aca37f78a2c5d8b50e400612618d00c03695a8c 540 | UMAppLoader: 92d044af52626af3d81a69796ad666fc7a9a7d78 541 | UMBarCodeScannerInterface: 3f6c1b09ef4b867ce752b8c0b3893bcf9cd85f32 542 | UMCameraInterface: d516032121192fee9a6c93bdfff0bb2cc7282796 543 | UMConstantsInterface: 6825ea3832d26ed392ca6eff2df84edd69968fd0 544 | UMCore: 97ba5041c9c92317ce61739f6d126a692c8ef4a8 545 | UMFaceDetectorInterface: 60b36b07faa539205efce30b20c192e058b31c23 546 | UMFileSystemInterface: ab01294ce58a3c773aefb4a5b131ce589c199559 547 | UMFontInterface: 85fe1b845fb7caab45e04d9ce47e1677a5ce90a5 548 | UMImageLoaderInterface: 18f37df089b7e6d301e3acac025a8264d26b66d6 549 | UMPermissionsInterface: 807e5733b4c6607f35757b1dd128f370718d2f94 550 | UMReactNativeAdapter: 172def7895b2cb44a7dd021336e316d5fa8ea958 551 | UMSensorsInterface: 4df9ec662134de5614ae61acc249d6912db87ca5 552 | UMTaskManagerInterface: 4c60b43eaf3cb05a164bc9113258a171c18b7bf7 553 | Yoga: 4bd86afe9883422a7c4028c00e34790f560923d6 554 | 555 | PODFILE CHECKSUM: 5ebec0979968fb1e4f87b934b51f72c7ed697c55 556 | 557 | COCOAPODS: 1.10.1 558 | -------------------------------------------------------------------------------- /example/ios/example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 11 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 12 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 14 | 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; }; 15 | 96905EF65AED1B983A6B3ABC /* libPods-example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-example.a */; }; 16 | BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 21 | 13B07F961A680F5B00A75B9A /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = example/AppDelegate.h; sourceTree = ""; }; 23 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = example/AppDelegate.m; sourceTree = ""; }; 24 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 25 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = example/Images.xcassets; sourceTree = ""; }; 26 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = example/Info.plist; sourceTree = ""; }; 27 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = example/main.m; sourceTree = ""; }; 28 | 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | 6C2E3173556A471DD304B334 /* Pods-example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.debug.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.debug.xcconfig"; sourceTree = ""; }; 30 | 7A4D352CD337FB3A3BF06240 /* Pods-example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-example.release.xcconfig"; path = "Target Support Files/Pods-example/Pods-example.release.xcconfig"; sourceTree = ""; }; 31 | AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = example/SplashScreen.storyboard; sourceTree = ""; }; 32 | BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = ""; }; 33 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 34 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; 35 | /* End PBXFileReference section */ 36 | 37 | /* Begin PBXFrameworksBuildPhase section */ 38 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 39 | isa = PBXFrameworksBuildPhase; 40 | buildActionMask = 2147483647; 41 | files = ( 42 | 96905EF65AED1B983A6B3ABC /* libPods-example.a in Frameworks */, 43 | ); 44 | runOnlyForDeploymentPostprocessing = 0; 45 | }; 46 | /* End PBXFrameworksBuildPhase section */ 47 | 48 | /* Begin PBXGroup section */ 49 | 13B07FAE1A68108700A75B9A /* example */ = { 50 | isa = PBXGroup; 51 | children = ( 52 | BB2F792B24A3F905000567C9 /* Supporting */, 53 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 54 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 55 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 56 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 57 | 13B07FB61A68108700A75B9A /* Info.plist */, 58 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 59 | 13B07FB71A68108700A75B9A /* main.m */, 60 | AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */, 61 | ); 62 | name = example; 63 | sourceTree = ""; 64 | }; 65 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 69 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */, 70 | 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-example.a */, 71 | ); 72 | name = Frameworks; 73 | sourceTree = ""; 74 | }; 75 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | ); 79 | name = Libraries; 80 | sourceTree = ""; 81 | }; 82 | 83CBB9F61A601CBA00E9B192 = { 83 | isa = PBXGroup; 84 | children = ( 85 | 13B07FAE1A68108700A75B9A /* example */, 86 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 87 | 83CBBA001A601CBA00E9B192 /* Products */, 88 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 89 | D65327D7A22EEC0BE12398D9 /* Pods */, 90 | ); 91 | indentWidth = 2; 92 | sourceTree = ""; 93 | tabWidth = 2; 94 | usesTabs = 0; 95 | }; 96 | 83CBBA001A601CBA00E9B192 /* Products */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 13B07F961A680F5B00A75B9A /* example.app */, 100 | ); 101 | name = Products; 102 | sourceTree = ""; 103 | }; 104 | BB2F792B24A3F905000567C9 /* Supporting */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | BB2F792C24A3F905000567C9 /* Expo.plist */, 108 | ); 109 | name = Supporting; 110 | path = example/Supporting; 111 | sourceTree = ""; 112 | }; 113 | D65327D7A22EEC0BE12398D9 /* Pods */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 6C2E3173556A471DD304B334 /* Pods-example.debug.xcconfig */, 117 | 7A4D352CD337FB3A3BF06240 /* Pods-example.release.xcconfig */, 118 | ); 119 | path = Pods; 120 | sourceTree = ""; 121 | }; 122 | /* End PBXGroup section */ 123 | 124 | /* Begin PBXNativeTarget section */ 125 | 13B07F861A680F5B00A75B9A /* example */ = { 126 | isa = PBXNativeTarget; 127 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */; 128 | buildPhases = ( 129 | 08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */, 130 | FD10A7F022414F080027D42C /* Start Packager */, 131 | 13B07F871A680F5B00A75B9A /* Sources */, 132 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 133 | 13B07F8E1A680F5B00A75B9A /* Resources */, 134 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 135 | 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */, 136 | ); 137 | buildRules = ( 138 | ); 139 | dependencies = ( 140 | ); 141 | name = example; 142 | productName = example; 143 | productReference = 13B07F961A680F5B00A75B9A /* example.app */; 144 | productType = "com.apple.product-type.application"; 145 | }; 146 | /* End PBXNativeTarget section */ 147 | 148 | /* Begin PBXProject section */ 149 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 150 | isa = PBXProject; 151 | attributes = { 152 | LastUpgradeCheck = 1130; 153 | TargetAttributes = { 154 | 13B07F861A680F5B00A75B9A = { 155 | LastSwiftMigration = 1120; 156 | }; 157 | }; 158 | }; 159 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */; 160 | compatibilityVersion = "Xcode 3.2"; 161 | developmentRegion = en; 162 | hasScannedForEncodings = 0; 163 | knownRegions = ( 164 | en, 165 | Base, 166 | ); 167 | mainGroup = 83CBB9F61A601CBA00E9B192; 168 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 169 | projectDirPath = ""; 170 | projectRoot = ""; 171 | targets = ( 172 | 13B07F861A680F5B00A75B9A /* example */, 173 | ); 174 | }; 175 | /* End PBXProject section */ 176 | 177 | /* Begin PBXResourcesBuildPhase section */ 178 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 179 | isa = PBXResourcesBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | BB2F792D24A3F905000567C9 /* Expo.plist in Resources */, 183 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 184 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 185 | 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */, 186 | ); 187 | runOnlyForDeploymentPostprocessing = 0; 188 | }; 189 | /* End PBXResourcesBuildPhase section */ 190 | 191 | /* Begin PBXShellScriptBuildPhase section */ 192 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 193 | isa = PBXShellScriptBuildPhase; 194 | buildActionMask = 2147483647; 195 | files = ( 196 | ); 197 | inputPaths = ( 198 | ); 199 | name = "Bundle React Native code and images"; 200 | outputPaths = ( 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | shellPath = /bin/sh; 204 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n../node_modules/expo-constants/scripts/get-app-config-ios.sh\n../node_modules/expo-updates/scripts/create-manifest-ios.sh\n"; 205 | }; 206 | 08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */ = { 207 | isa = PBXShellScriptBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | ); 211 | inputFileListPaths = ( 212 | ); 213 | inputPaths = ( 214 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 215 | "${PODS_ROOT}/Manifest.lock", 216 | ); 217 | name = "[CP] Check Pods Manifest.lock"; 218 | outputFileListPaths = ( 219 | ); 220 | outputPaths = ( 221 | "$(DERIVED_FILE_DIR)/Pods-example-checkManifestLockResult.txt", 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | shellPath = /bin/sh; 225 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 226 | showEnvVarsInLog = 0; 227 | }; 228 | 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */ = { 229 | isa = PBXShellScriptBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | ); 233 | inputPaths = ( 234 | "${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources.sh", 235 | "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", 236 | ); 237 | name = "[CP] Copy Pods Resources"; 238 | outputPaths = ( 239 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", 240 | ); 241 | runOnlyForDeploymentPostprocessing = 0; 242 | shellPath = /bin/sh; 243 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-example/Pods-example-resources.sh\"\n"; 244 | showEnvVarsInLog = 0; 245 | }; 246 | FD10A7F022414F080027D42C /* Start Packager */ = { 247 | isa = PBXShellScriptBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | ); 251 | inputFileListPaths = ( 252 | ); 253 | inputPaths = ( 254 | ); 255 | name = "Start Packager"; 256 | outputFileListPaths = ( 257 | ); 258 | outputPaths = ( 259 | ); 260 | runOnlyForDeploymentPostprocessing = 0; 261 | shellPath = /bin/sh; 262 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; 263 | showEnvVarsInLog = 0; 264 | }; 265 | /* End PBXShellScriptBuildPhase section */ 266 | 267 | /* Begin PBXSourcesBuildPhase section */ 268 | 13B07F871A680F5B00A75B9A /* Sources */ = { 269 | isa = PBXSourcesBuildPhase; 270 | buildActionMask = 2147483647; 271 | files = ( 272 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 273 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 274 | ); 275 | runOnlyForDeploymentPostprocessing = 0; 276 | }; 277 | /* End PBXSourcesBuildPhase section */ 278 | 279 | /* Begin PBXVariantGroup section */ 280 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 281 | isa = PBXVariantGroup; 282 | children = ( 283 | 13B07FB21A68108700A75B9A /* Base */, 284 | ); 285 | name = LaunchScreen.xib; 286 | path = example; 287 | sourceTree = ""; 288 | }; 289 | /* End PBXVariantGroup section */ 290 | 291 | /* Begin XCBuildConfiguration section */ 292 | 13B07F941A680F5B00A75B9A /* Debug */ = { 293 | isa = XCBuildConfiguration; 294 | baseConfigurationReference = 6C2E3173556A471DD304B334 /* Pods-example.debug.xcconfig */; 295 | buildSettings = { 296 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 297 | CLANG_ENABLE_MODULES = YES; 298 | CURRENT_PROJECT_VERSION = 1; 299 | ENABLE_BITCODE = NO; 300 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; 301 | GCC_PREPROCESSOR_DEFINITIONS = ( 302 | "$(inherited)", 303 | "FB_SONARKIT_ENABLED=1", 304 | ); 305 | INFOPLIST_FILE = example/Info.plist; 306 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 307 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 308 | OTHER_LDFLAGS = ( 309 | "$(inherited)", 310 | "-ObjC", 311 | "-lc++", 312 | ); 313 | PRODUCT_BUNDLE_IDENTIFIER = "io.github.cawfree.thegraph"; 314 | PRODUCT_NAME = thegraph; 315 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 316 | SWIFT_VERSION = 5.0; 317 | VERSIONING_SYSTEM = "apple-generic"; 318 | TARGETED_DEVICE_FAMILY = "1"; 319 | CODE_SIGN_ENTITLEMENTS = example/thegraph.entitlements; 320 | }; 321 | name = Debug; 322 | }; 323 | 13B07F951A680F5B00A75B9A /* Release */ = { 324 | isa = XCBuildConfiguration; 325 | baseConfigurationReference = 7A4D352CD337FB3A3BF06240 /* Pods-example.release.xcconfig */; 326 | buildSettings = { 327 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 328 | CLANG_ENABLE_MODULES = YES; 329 | CURRENT_PROJECT_VERSION = 1; 330 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; 331 | INFOPLIST_FILE = example/Info.plist; 332 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 333 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 334 | OTHER_LDFLAGS = ( 335 | "$(inherited)", 336 | "-ObjC", 337 | "-lc++", 338 | ); 339 | PRODUCT_BUNDLE_IDENTIFIER = "io.github.cawfree.thegraph"; 340 | PRODUCT_NAME = thegraph; 341 | SWIFT_VERSION = 5.0; 342 | VERSIONING_SYSTEM = "apple-generic"; 343 | TARGETED_DEVICE_FAMILY = "1"; 344 | CODE_SIGN_ENTITLEMENTS = example/thegraph.entitlements; 345 | }; 346 | name = Release; 347 | }; 348 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 349 | isa = XCBuildConfiguration; 350 | buildSettings = { 351 | ALWAYS_SEARCH_USER_PATHS = NO; 352 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 353 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 354 | CLANG_CXX_LIBRARY = "libc++"; 355 | CLANG_ENABLE_MODULES = YES; 356 | CLANG_ENABLE_OBJC_ARC = YES; 357 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 358 | CLANG_WARN_BOOL_CONVERSION = YES; 359 | CLANG_WARN_COMMA = YES; 360 | CLANG_WARN_CONSTANT_CONVERSION = YES; 361 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 362 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 363 | CLANG_WARN_EMPTY_BODY = YES; 364 | CLANG_WARN_ENUM_CONVERSION = YES; 365 | CLANG_WARN_INFINITE_RECURSION = YES; 366 | CLANG_WARN_INT_CONVERSION = YES; 367 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 368 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 369 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 370 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 371 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 372 | CLANG_WARN_STRICT_PROTOTYPES = YES; 373 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 374 | CLANG_WARN_UNREACHABLE_CODE = YES; 375 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 376 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 377 | COPY_PHASE_STRIP = NO; 378 | ENABLE_STRICT_OBJC_MSGSEND = YES; 379 | ENABLE_TESTABILITY = YES; 380 | GCC_C_LANGUAGE_STANDARD = gnu99; 381 | GCC_DYNAMIC_NO_PIC = NO; 382 | GCC_NO_COMMON_BLOCKS = YES; 383 | GCC_OPTIMIZATION_LEVEL = 0; 384 | GCC_PREPROCESSOR_DEFINITIONS = ( 385 | "DEBUG=1", 386 | "$(inherited)", 387 | ); 388 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 389 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 390 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 391 | GCC_WARN_UNDECLARED_SELECTOR = YES; 392 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 393 | GCC_WARN_UNUSED_FUNCTION = YES; 394 | GCC_WARN_UNUSED_VARIABLE = YES; 395 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 396 | LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; 397 | LIBRARY_SEARCH_PATHS = ( 398 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 399 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", 400 | "\"$(inherited)\"", 401 | ); 402 | MTL_ENABLE_DEBUG_INFO = YES; 403 | ONLY_ACTIVE_ARCH = YES; 404 | SDKROOT = iphoneos; 405 | CODE_SIGN_ENTITLEMENTS = example/thegraph.entitlements; 406 | }; 407 | name = Debug; 408 | }; 409 | 83CBBA211A601CBA00E9B192 /* Release */ = { 410 | isa = XCBuildConfiguration; 411 | buildSettings = { 412 | ALWAYS_SEARCH_USER_PATHS = NO; 413 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 414 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 415 | CLANG_CXX_LIBRARY = "libc++"; 416 | CLANG_ENABLE_MODULES = YES; 417 | CLANG_ENABLE_OBJC_ARC = YES; 418 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 419 | CLANG_WARN_BOOL_CONVERSION = YES; 420 | CLANG_WARN_COMMA = YES; 421 | CLANG_WARN_CONSTANT_CONVERSION = YES; 422 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 423 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 424 | CLANG_WARN_EMPTY_BODY = YES; 425 | CLANG_WARN_ENUM_CONVERSION = YES; 426 | CLANG_WARN_INFINITE_RECURSION = YES; 427 | CLANG_WARN_INT_CONVERSION = YES; 428 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 429 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 430 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 431 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 432 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 433 | CLANG_WARN_STRICT_PROTOTYPES = YES; 434 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 435 | CLANG_WARN_UNREACHABLE_CODE = YES; 436 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 437 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 438 | COPY_PHASE_STRIP = YES; 439 | ENABLE_NS_ASSERTIONS = NO; 440 | ENABLE_STRICT_OBJC_MSGSEND = YES; 441 | GCC_C_LANGUAGE_STANDARD = gnu99; 442 | GCC_NO_COMMON_BLOCKS = YES; 443 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 444 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 445 | GCC_WARN_UNDECLARED_SELECTOR = YES; 446 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 447 | GCC_WARN_UNUSED_FUNCTION = YES; 448 | GCC_WARN_UNUSED_VARIABLE = YES; 449 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 450 | LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; 451 | LIBRARY_SEARCH_PATHS = ( 452 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 453 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", 454 | "\"$(inherited)\"", 455 | ); 456 | MTL_ENABLE_DEBUG_INFO = NO; 457 | SDKROOT = iphoneos; 458 | VALIDATE_PRODUCT = YES; 459 | CODE_SIGN_ENTITLEMENTS = example/thegraph.entitlements; 460 | }; 461 | name = Release; 462 | }; 463 | /* End XCBuildConfiguration section */ 464 | 465 | /* Begin XCConfigurationList section */ 466 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */ = { 467 | isa = XCConfigurationList; 468 | buildConfigurations = ( 469 | 13B07F941A680F5B00A75B9A /* Debug */, 470 | 13B07F951A680F5B00A75B9A /* Release */, 471 | ); 472 | defaultConfigurationIsVisible = 0; 473 | defaultConfigurationName = Release; 474 | }; 475 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */ = { 476 | isa = XCConfigurationList; 477 | buildConfigurations = ( 478 | 83CBBA201A601CBA00E9B192 /* Debug */, 479 | 83CBBA211A601CBA00E9B192 /* Release */, 480 | ); 481 | defaultConfigurationIsVisible = 0; 482 | defaultConfigurationName = Release; 483 | }; 484 | /* End XCConfigurationList section */ 485 | }; 486 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 487 | } 488 | -------------------------------------------------------------------------------- /example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 53 | 55 | 61 | 62 | 63 | 64 | 70 | 72 | 78 | 79 | 80 | 81 | 83 | 84 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /example/ios/example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/example/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | #import 5 | 6 | #import 7 | 8 | @interface AppDelegate : UMAppDelegateWrapper 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /example/ios/example/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import 4 | #import 5 | #import 6 | #import 7 | 8 | #import 9 | #import 10 | #import 11 | #import 12 | #import 13 | 14 | #if defined(FB_SONARKIT_ENABLED) && __has_include() 15 | #import 16 | #import 17 | #import 18 | #import 19 | #import 20 | #import 21 | 22 | static void InitializeFlipper(UIApplication *application) { 23 | FlipperClient *client = [FlipperClient sharedClient]; 24 | SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; 25 | [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; 26 | [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; 27 | [client addPlugin:[FlipperKitReactPlugin new]]; 28 | [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; 29 | [client start]; 30 | } 31 | #endif 32 | 33 | @interface AppDelegate () 34 | 35 | @property (nonatomic, strong) UMModuleRegistryAdapter *moduleRegistryAdapter; 36 | @property (nonatomic, strong) NSDictionary *launchOptions; 37 | 38 | @end 39 | 40 | @implementation AppDelegate 41 | 42 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 43 | { 44 | #if defined(FB_SONARKIT_ENABLED) && __has_include() 45 | InitializeFlipper(application); 46 | #endif 47 | 48 | self.moduleRegistryAdapter = [[UMModuleRegistryAdapter alloc] initWithModuleRegistryProvider:[[UMModuleRegistryProvider alloc] init]]; 49 | self.launchOptions = launchOptions; 50 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 51 | #ifdef DEBUG 52 | [self initializeReactNativeApp]; 53 | #else 54 | EXUpdatesAppController *controller = [EXUpdatesAppController sharedInstance]; 55 | controller.delegate = self; 56 | [controller startAndShowLaunchScreen:self.window]; 57 | #endif 58 | 59 | [super application:application didFinishLaunchingWithOptions:launchOptions]; 60 | 61 | return YES; 62 | } 63 | 64 | - (RCTBridge *)initializeReactNativeApp 65 | { 66 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:self.launchOptions]; 67 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"main" initialProperties:nil]; 68 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 69 | 70 | UIViewController *rootViewController = [UIViewController new]; 71 | rootViewController.view = rootView; 72 | self.window.rootViewController = rootViewController; 73 | [self.window makeKeyAndVisible]; 74 | 75 | return bridge; 76 | } 77 | 78 | - (NSArray> *)extraModulesForBridge:(RCTBridge *)bridge 79 | { 80 | NSArray> *extraModules = [_moduleRegistryAdapter extraModulesForBridge:bridge]; 81 | // If you'd like to export some custom RCTBridgeModules that are not Expo modules, add them here! 82 | return extraModules; 83 | } 84 | 85 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge { 86 | #ifdef DEBUG 87 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 88 | #else 89 | return [[EXUpdatesAppController sharedInstance] launchAssetUrl]; 90 | #endif 91 | } 92 | 93 | - (void)appController:(EXUpdatesAppController *)appController didStartWithSuccess:(BOOL)success { 94 | appController.bridge = [self initializeReactNativeApp]; 95 | EXSplashScreenService *splashScreenService = (EXSplashScreenService *)[UMModuleRegistryProvider getSingletonModuleForClass:[EXSplashScreenService class]]; 96 | [splashScreenService showSplashScreenFor:self.window.rootViewController]; 97 | } 98 | 99 | // Linking API 100 | - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *)options { 101 | return [RCTLinkingManager application:application openURL:url options:options]; 102 | } 103 | 104 | // Universal Links 105 | - (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray> * _Nullable))restorationHandler { 106 | return [RCTLinkingManager application:application 107 | continueUserActivity:userActivity 108 | restorationHandler:restorationHandler]; 109 | } 110 | 111 | @end 112 | -------------------------------------------------------------------------------- /example/ios/example/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /example/ios/example/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 | } 39 | -------------------------------------------------------------------------------- /example/ios/example/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "version": 1, 4 | "author": "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/example/Images.xcassets/SplashScreen.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "idiom": "universal", 5 | "filename": "splashscreen.png", 6 | "scale": "1x" 7 | }, 8 | { 9 | "idiom": "universal", 10 | "scale": "2x" 11 | }, 12 | { 13 | "idiom": "universal", 14 | "scale": "3x" 15 | } 16 | ], 17 | "info": { 18 | "version": 1, 19 | "author": "xcode" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /example/ios/example/Images.xcassets/SplashScreen.imageset/splashscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/example/ios/example/Images.xcassets/SplashScreen.imageset/splashscreen.png -------------------------------------------------------------------------------- /example/ios/example/Images.xcassets/SplashScreenBackground.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "idiom": "universal", 5 | "filename": "background.png", 6 | "scale": "1x" 7 | }, 8 | { 9 | "idiom": "universal", 10 | "scale": "2x" 11 | }, 12 | { 13 | "idiom": "universal", 14 | "scale": "3x" 15 | } 16 | ], 17 | "info": { 18 | "version": 1, 19 | "author": "xcode" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /example/ios/example/Images.xcassets/SplashScreenBackground.imageset/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/example/ios/example/Images.xcassets/SplashScreenBackground.imageset/background.png -------------------------------------------------------------------------------- /example/ios/example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | NSExceptionDomains 30 | 31 | localhost 32 | 33 | NSExceptionAllowsInsecureHTTPLoads 34 | 35 | 36 | 37 | 38 | NSLocationWhenInUseUsageDescription 39 | 40 | UILaunchStoryboardName 41 | SplashScreen 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationPortraitUpsideDown 50 | UIInterfaceOrientationLandscapeLeft 51 | UIInterfaceOrientationLandscapeRight 52 | 53 | UIViewControllerBasedStatusBarAppearance 54 | 55 | UIStatusBarStyle 56 | UIStatusBarStyleDefault 57 | CFBundleURLTypes 58 | 59 | 60 | CFBundleURLSchemes 61 | 62 | thegraphexample 63 | io.github.cawfree.thegraph 64 | 65 | 66 | 67 | UIRequiresFullScreen 68 | 69 | CFBundleDisplayName 70 | example 71 | 72 | -------------------------------------------------------------------------------- /example/ios/example/SplashScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 39 | 40 | 41 | 42 | 53 | 54 | 55 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /example/ios/example/Supporting/Expo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | EXUpdatesSDKVersion 6 | 40.0.0 7 | EXUpdatesURL 8 | https://exp.host/@cawfree/example 9 | EXUpdatesEnabled 10 | 11 | EXUpdatesCheckOnLaunch 12 | ALWAYS 13 | EXUpdatesLaunchWaitMs 14 | 0 15 | 16 | -------------------------------------------------------------------------------- /example/ios/example/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /example/ios/example/thegraph.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | -------------------------------------------------------------------------------- /example/metro.config.js: -------------------------------------------------------------------------------- 1 | const extraNodeModules = require("node-libs-browser"); 2 | 3 | module.exports = { 4 | resolver: { 5 | extraNodeModules, 6 | }, 7 | transformer: { 8 | assetPlugins: ["expo-asset/tools/hashAssetFiles"], 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@apollo/client": "^3.3.7", 4 | "base-64": "1.0.0", 5 | "buffer": "6.0.3", 6 | "expo": "~40.0.0", 7 | "expo-splash-screen": "~0.8.0", 8 | "expo-status-bar": "~1.0.3", 9 | "expo-updates": "~0.4.0", 10 | "graphql": "^15.4.0", 11 | "nanoid": "^3.1.20", 12 | "node-libs-browser": "2.2.1", 13 | "path-browserify": "0.0.0", 14 | "react": "16.13.1", 15 | "react-dom": "16.13.1", 16 | "react-native": "~0.63.4", 17 | "react-native-crypto": "2.2.0", 18 | "react-native-dotenv": "2.4.3", 19 | "react-native-gesture-handler": "~1.8.0", 20 | "react-native-get-random-values": "1.5.0", 21 | "react-native-reanimated": "~1.13.0", 22 | "react-native-screens": "~2.15.0", 23 | "react-native-stream": "0.1.9", 24 | "react-native-unimodules": "~0.12.0", 25 | "react-native-web": "~0.13.12", 26 | "thegraph-react": "../", 27 | "web3": "1.3.1" 28 | }, 29 | "devDependencies": { 30 | "@babel/core": "~7.9.0", 31 | "@types/react": "~16.9.35", 32 | "@types/react-dom": "~16.9.8", 33 | "@types/react-native": "~0.63.2", 34 | "@typescript-eslint/eslint-plugin": "^4.0.1", 35 | "@typescript-eslint/parser": "^4.0.1", 36 | "babel-jest": "~25.2.6", 37 | "dotenv": "8.2.0", 38 | "eslint": "^7.8.0", 39 | "eslint-config-prettier": "^6.11.0", 40 | "eslint-plugin-eslint-comments": "^3.2.0", 41 | "eslint-plugin-functional": "^3.0.2", 42 | "eslint-plugin-import": "^2.22.0", 43 | "husky": "4.3.8", 44 | "jest": "~25.2.6", 45 | "lint-staged": "10.5.3", 46 | "prettier": "2.2.1", 47 | "react-test-renderer": "~16.13.1", 48 | "typescript": "~4.0.0" 49 | }, 50 | "scripts": { 51 | "start": "react-native start", 52 | "android": "react-native run-android", 53 | "ios": "react-native run-ios", 54 | "web": "expo web", 55 | "eject": "expo eject", 56 | "postinstall": "node scripts/postinstall" 57 | }, 58 | "private": true, 59 | "name": "example", 60 | "version": "1.0.0", 61 | "license": "MIT", 62 | "author": "Alex Thomas (@cawfree) ", 63 | "keywords": [ 64 | "react", 65 | "react-native", 66 | "dapp", 67 | "ethereum", 68 | "web3", 69 | "starter", 70 | "react-native-web" 71 | ], 72 | "husky": { 73 | "hooks": { 74 | "pre-commit": "lint-staged" 75 | } 76 | }, 77 | "react-native": { 78 | "stream": "react-native-stream", 79 | "crypto": "react-native-crypto", 80 | "path": "path-browserify", 81 | "process": "node-libs-browser/mock/process" 82 | }, 83 | "lint-staged": { 84 | "*.{ts,tsx}": "eslint --ext '.ts,.tsx' -c .eslintrc.json" 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /example/scripts/postinstall.js: -------------------------------------------------------------------------------- 1 | require("dotenv/config"); 2 | const { execSync } = require("child_process"); 3 | 4 | execSync("npx pod-install", { stdio: "inherit" }); 5 | -------------------------------------------------------------------------------- /example/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "jsx": "react-native", 5 | "lib": ["dom", "esnext"], 6 | "moduleResolution": "node", 7 | "noEmit": true, 8 | "skipLibCheck": true, 9 | "resolveJsonModule": true, 10 | "typeRoots": ["index.d.ts"] 11 | }, 12 | "include": ["**/*.ts", "**/*.tsx"], 13 | "exclude": [ 14 | "node_modules", 15 | "babel.config.js", 16 | "metro.config.js", 17 | "jest.config.js" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "build": "rm -rf dist node_modules; yarn && yarn tsc && babel dist --out-dir dist && rm -rf node_modules" 4 | }, 5 | "types": "dist/index.d.ts", 6 | "keywords": [ 7 | "thegraph", 8 | "graphprotocol", 9 | "react", 10 | "react-native", 11 | "ethereum", 12 | "ipfs" 13 | ], 14 | "devDependencies": { 15 | "@babel/cli": "^7.12.10", 16 | "@babel/core": "^7.12.10", 17 | "@babel/preset-env": "^7.12.11", 18 | "@babel/preset-react": "^7.12.10", 19 | "@types/node": "^14.14.21", 20 | "@types/react": "^17.0.0", 21 | "typescript": "^4.1.3", 22 | "@apollo/client": "^3.3.7", 23 | "graphql": "^15.4.0", 24 | "react": "16.13.1", 25 | "nanoid": "^3.1.20" 26 | }, 27 | "name": "thegraph-react", 28 | "version": "1.0.0-alpha.1", 29 | "description": "⚛️ React bindings for helping build decentralized applications quickly on Ethereum and IPFS using GraphQL.", 30 | "main": "dist", 31 | "repository": "https://github.com/cawfree/thegraph-react", 32 | "author": "Alex Thomas (@cawfree) ", 33 | "license": "MIT", 34 | "private": false 35 | } 36 | -------------------------------------------------------------------------------- /src/components/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/src/components/index.tsx -------------------------------------------------------------------------------- /src/constants/createSubgraph.tsx: -------------------------------------------------------------------------------- 1 | import { ApolloClientOptions, NormalizedCacheObject } from "@apollo/client"; 2 | 3 | import { Subgraph, SubgraphURIs } from "../types"; 4 | 5 | export default function createSubgraph( 6 | id: string, 7 | uris: SubgraphURIs, 8 | options?: ApolloClientOptions, 9 | ): Subgraph { 10 | return Object.freeze({ id, uris, options }); 11 | } 12 | -------------------------------------------------------------------------------- /src/constants/index.tsx: -------------------------------------------------------------------------------- 1 | export { default as createSubgraph } from './createSubgraph'; 2 | -------------------------------------------------------------------------------- /src/containers/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cawfree/thegraph-react/f13a6f9821d0f0109e8997c3c0fad67dcb010893/src/containers/index.tsx -------------------------------------------------------------------------------- /src/contexts/TheGraphContext.tsx: -------------------------------------------------------------------------------- 1 | import { NormalizedCacheObject } from '@apollo/client'; 2 | import * as React from 'react'; 3 | 4 | import { Chains, TheGraphContextValue } from '../types'; 5 | 6 | const defaultValue: TheGraphContextValue = { 7 | chain: Chains.MAINNET, 8 | subgraphs: [], 9 | clients: {}, 10 | }; 11 | 12 | export default React.createContext(defaultValue); 13 | -------------------------------------------------------------------------------- /src/contexts/index.tsx: -------------------------------------------------------------------------------- 1 | export { default as TheGraphContext } from './TheGraphContext'; 2 | -------------------------------------------------------------------------------- /src/hooks/index.tsx: -------------------------------------------------------------------------------- 1 | export { default as useTheGraph } from './useTheGraph'; 2 | export { default as useCreateSubgraph } from './useCreateSubgraph'; 3 | export { default as useSubgraph } from './useSubgraph'; 4 | 5 | -------------------------------------------------------------------------------- /src/hooks/useCreateSubgraph.ts: -------------------------------------------------------------------------------- 1 | import { ApolloClientOptions, NormalizedCacheObject } from '@apollo/client'; 2 | import { nanoid } from 'nanoid/non-secure'; 3 | import * as React from 'react'; 4 | 5 | import { createSubgraph } from '../constants'; 6 | import { Subgraph, SubgraphURIs } from '../types'; 7 | 8 | export default function useCreateSubgraph(uris: SubgraphURIs, options?: ApolloClientOptions): Subgraph { 9 | const id = React.useMemo(nanoid, []); 10 | return React.useMemo(() => ( 11 | createSubgraph(id, uris, options) 12 | ), [id, uris, options]); 13 | } 14 | -------------------------------------------------------------------------------- /src/hooks/useSubgraph.tsx: -------------------------------------------------------------------------------- 1 | import { useQuery as baseUseQuery, DocumentNode, QueryHookOptions, QueryResult, TypedDocumentNode } from "@apollo/client"; 2 | import * as React from 'react'; 3 | 4 | import { Subgraph } from "../types"; 5 | 6 | import useSubgraphClient from "./useSubgraphClient"; 7 | 8 | export type useSubgraphResult = { 9 | readonly useQuery: (query: DocumentNode | TypedDocumentNode, options?: QueryHookOptions) => QueryResult 10 | }; 11 | 12 | export default function useSubgraph(subgraph: Subgraph): useSubgraphResult { 13 | const client = useSubgraphClient(subgraph); 14 | 15 | const useQuery = React.useCallback( 16 | function useQuery( 17 | query: DocumentNode | TypedDocumentNode, 18 | options?: QueryHookOptions 19 | ): QueryResult { 20 | return baseUseQuery(query, { ...(options || {}), client }); 21 | }, 22 | [client], 23 | ); 24 | 25 | return { useQuery }; 26 | } 27 | -------------------------------------------------------------------------------- /src/hooks/useSubgraphClient.tsx: -------------------------------------------------------------------------------- 1 | import { ApolloClient } from '@apollo/client'; 2 | 3 | import { CachingStrategy, Subgraph } from '../types'; 4 | 5 | import useTheGraph from './useTheGraph'; 6 | 7 | export default function useSubgraphClient(subgraph: Subgraph): ApolloClient { 8 | const { clients } = useTheGraph(); 9 | return clients[subgraph.id]; 10 | } 11 | -------------------------------------------------------------------------------- /src/hooks/useTheGraph.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | import { TheGraphContext } from '../contexts'; 4 | import type { TheGraphContextValue } from '../types'; 5 | 6 | export default function useTheGraph(): TheGraphContextValue { 7 | return React.useContext(TheGraphContext); 8 | } 9 | -------------------------------------------------------------------------------- /src/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './constants'; 2 | export * from './providers'; 3 | export * from './hooks'; 4 | export * from './types'; 5 | -------------------------------------------------------------------------------- /src/providers/TheGraphProvider.tsx: -------------------------------------------------------------------------------- 1 | import { ApolloClient, InMemoryCache } from "@apollo/client"; 2 | import * as React from "react"; 3 | 4 | import { TheGraphContext } from '../contexts'; 5 | import { useTheGraph } from '../hooks'; 6 | import type { CachingStrategy, Subgraph, SubgraphClients, TheGraphContextValue, TheGraphSubgraphConfig } from '../types'; 7 | 8 | export type TheGraphProviderProps = TheGraphSubgraphConfig & { 9 | readonly children?: JSX.Element | readonly JSX.Element[]; 10 | }; 11 | 12 | export default function TheGraphProvider({ 13 | chain, 14 | subgraphs, 15 | children, 16 | }: TheGraphProviderProps): JSX.Element { 17 | const cache = React.useMemo(() => new InMemoryCache(), []); 18 | const nextClients = React.useMemo((): SubgraphClients => { 19 | return subgraphs.reduce( 20 | (e, { id, options, uris }: Subgraph) => ({ 21 | ...e, 22 | [id]: new ApolloClient({ ...(!!options && typeof options === 'object' ? options : {}), uri: uris[chain], cache }), 23 | }), {}); 24 | }, [subgraphs, chain, cache]); 25 | const parentContext = useTheGraph(); 26 | const value = React.useMemo((): TheGraphContextValue => { 27 | const { subgraphs: parentSubgraphs, clients: parentClients } = parentContext; 28 | return { 29 | chain, 30 | subgraphs: [...parentSubgraphs, ...subgraphs].filter((e, i, orig) => orig.indexOf(e) === i), 31 | clients: { 32 | ...parentClients, 33 | ...nextClients, 34 | }, 35 | }; 36 | }, [parentContext, chain, subgraphs, nextClients]); 37 | return ( 38 | 39 | {children} 40 | 41 | ); 42 | } 43 | -------------------------------------------------------------------------------- /src/providers/index.tsx: -------------------------------------------------------------------------------- 1 | export { default as TheGraphProvider } from './TheGraphProvider'; 2 | -------------------------------------------------------------------------------- /src/types/index.tsx: -------------------------------------------------------------------------------- 1 | import type { ApolloClient, ApolloClientOptions, NormalizedCacheObject } from "@apollo/client"; 2 | 3 | export enum Chains { 4 | MAINNET = 'mainnet', 5 | ROPSTEN = 'ropsten', 6 | GOERLI = 'goerli', 7 | RINKEBY = 'rinkeby', 8 | }; 9 | 10 | export type SubgraphURIs = { 11 | readonly [k in Chains]?: string; 12 | }; 13 | 14 | export type CachingStrategy = NormalizedCacheObject; 15 | 16 | export type TheGraphCacheOptions = ApolloClientOptions; 17 | 18 | export type Subgraph = { 19 | readonly id: string; 20 | readonly uris: SubgraphURIs; 21 | readonly options?: TheGraphCacheOptions; 22 | }; 23 | 24 | export type Subgraphs = readonly Subgraph[]; 25 | 26 | export type TheGraphSubgraphConfig = { 27 | readonly chain: Chains; 28 | readonly subgraphs: readonly Subgraph[]; 29 | } 30 | 31 | export type SubgraphClients = Record>; 32 | 33 | export type TheGraphContextValue= TheGraphSubgraphConfig & { 34 | readonly clients: SubgraphClients; 35 | }; 36 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "downlevelIteration": true, 5 | "experimentalDecorators": true, 6 | "declaration": true, 7 | "forceConsistentCasingInFileNames": true, 8 | "lib": ["es6", "esnext"], 9 | "module": "esnext", 10 | "moduleResolution": "node", 11 | "noImplicitAny": true, 12 | "noImplicitThis": true, 13 | "removeComments": true, 14 | "resolveJsonModule": true, 15 | "skipLibCheck": true, 16 | "suppressImplicitAnyIndexErrors": true, 17 | "strict": true, 18 | "target": "esnext", 19 | "jsx": "react", 20 | "types": [], 21 | "outDir": "dist" 22 | }, 23 | "include": ["./src"], 24 | "exclude": ["./example", "./node_modules/"] 25 | } --------------------------------------------------------------------------------