├── .buckconfig ├── .eslintrc.js ├── .gitattributes ├── .github └── workflows │ └── publish.yml ├── .gitignore ├── .prettierrc.js ├── .watchmanconfig ├── LICENSE ├── README.md ├── READMEv1.md ├── android.gif ├── docs ├── .nojekyll ├── README.md ├── _coverpage.md ├── _sidebar.md ├── examples.md ├── index.html ├── props.md └── usage.md ├── example ├── .buckconfig ├── .editorconfig ├── .eslintrc.js ├── .gitattributes ├── .gitignore ├── .prettierrc.js ├── .watchmanconfig ├── AdvancedExample.tsx ├── App.tsx ├── BasicExample.tsx ├── __tests__ │ └── App-test.tsx ├── 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 │ │ │ └── com │ │ │ │ └── example │ │ │ │ ├── MainActivity.java │ │ │ │ └── MainApplication.java │ │ │ └── res │ │ │ ├── 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 │ │ │ ├── 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.js ├── ios │ ├── Podfile │ ├── Podfile.lock │ ├── example.xcodeproj │ │ └── project.pbxproj │ ├── example.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── xcschemes │ │ │ └── Example.xcscheme │ ├── example │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ └── main.m │ └── exampleTests │ │ ├── Info.plist │ │ └── exampleTests.m ├── metro.config.js ├── package.json ├── tsconfig.json └── yarn.lock ├── iOS.gif ├── newAndroid.png ├── newIOS.png ├── package.json ├── src ├── Components │ └── AutoComplete.tsx ├── FormBuilder.tsx ├── Inputs │ ├── InputAutocomplete.tsx │ ├── InputSelect.tsx │ └── InputText.tsx ├── Logic │ └── Logic.tsx ├── Types │ └── Types.ts └── index.ts ├── tsconfig.json └── yarn.lock /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | parser: '@typescript-eslint/parser', 5 | plugins: ['@typescript-eslint'], 6 | }; 7 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow that is manually triggered 2 | 3 | name: Manual workflow 4 | 5 | on: 6 | push: 7 | branches: [master] 8 | 9 | jobs: 10 | publish: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v1 14 | - uses: actions/setup-node@v1 15 | with: 16 | node-version: 12 17 | - run: npx i-peers 18 | - run: npm run build 19 | - uses: JS-DevTools/npm-publish@v1 20 | with: 21 | token: ${{ secrets.NPM_TOKEN }} 22 | -------------------------------------------------------------------------------- /.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 | # Visual Studio Code 34 | # 35 | .vscode/ 36 | 37 | # node.js 38 | # 39 | node_modules/ 40 | npm-debug.log 41 | yarn-error.log 42 | 43 | # BUCK 44 | buck-out/ 45 | \.buckd/ 46 | *.keystore 47 | !debug.keystore 48 | 49 | # fastlane 50 | # 51 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 52 | # screenshots whenever they are needed. 53 | # For more information about the recommended setup visit: 54 | # https://docs.fastlane.tools/best-practices/source-control/ 55 | 56 | */fastlane/report.xml 57 | */fastlane/Preview.html 58 | */fastlane/screenshots 59 | 60 | # Bundle artifact 61 | *.jsbundle 62 | 63 | # CocoaPods 64 | /ios/Pods/ 65 | dist 66 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | jsxBracketSameLine: true, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | }; 7 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Fateh Farooqui 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # react-native-paper-form-builder 2 | 3 | #### This is readme file for version 2+, For v1 doc go to this [link](READMEv1.md) 4 | 5 | [![npm version](https://img.shields.io/npm/v/react-native-paper-form-builder.svg?style=for-the-badge)](https://www.npmjs.com/package/react-native-paper-form-builder) 6 | [![npm downloads](https://img.shields.io/npm/dm/react-native-paper-form-builder.svg?style=for-the-badge)](https://www.npmjs.com/package/react-native-paper-form-builder) 7 | [![npm](https://img.shields.io/npm/dt/react-native-paper-form-builder.svg?style=for-the-badge)](https://www.npmjs.com/package/react-native-paper-form-builder) 8 | [![npm](https://img.shields.io/npm/l/react-native-paper-form-builder?style=for-the-badge)](https://github.com/fateh999/react-native-paper-form-builder/blob/master/LICENSE) 9 | 10 | Form Builder written in typescript with inbuilt Validation, dropdown, autocomplete powered by [react-hook-form](https://react-hook-form.com/) & [react-native-paper](https://callstack.github.io/react-native-paper/). 11 | 12 | #### Dependencies to Install : 13 | 14 | - [react-native-paper](https://www.npmjs.com/package/react-native-paper) 15 | 16 | - [react-hook-form](https://www.npmjs.com/package/react-hook-form) 17 | 18 | #### Note : 19 | 20 | For maintainability this library will only target latest versions of react-hook-form and react-native-paper. 21 | 22 | #### Documentation : 23 | 24 | - [https://fateh999.github.io/react-native-paper-form-builder](https://fateh999.github.io/react-native-paper-form-builder) 25 | 26 | #### Demo : 27 | 28 | ![](iOS.gif) 29 | ![](android.gif) 30 | 31 | #### Steps to install : 32 | 33 | ```javascript 34 | 35 | npm install react-native-paper-form-builder 36 | 37 | ``` 38 | 39 | or 40 | 41 | ```javascript 42 | 43 | yarn add react-native-paper-form-builder 44 | 45 | ``` 46 | 47 | ```javascript 48 | import {FormBuilder} from 'react-native-paper-form-builder'; 49 | ``` 50 | 51 | #### Usage : 52 | 53 | ```javascript 54 | import React from 'react'; 55 | import {View, StyleSheet, ScrollView, Text} from 'react-native'; 56 | import {FormBuilder} from 'react-native-paper-form-builder'; 57 | import {useForm} from 'react-hook-form'; 58 | import {Button} from 'react-native-paper'; 59 | 60 | function BasicExample() { 61 | const {control, setFocus, handleSubmit} = useForm({ 62 | defaultValues: { 63 | email: '', 64 | password: '', 65 | }, 66 | mode: 'onChange', 67 | }); 68 | 69 | return ( 70 | 71 | 72 | Form Builder Basic Demo 73 | 106 | 113 | 114 | 115 | ); 116 | } 117 | 118 | const styles = StyleSheet.create({ 119 | containerStyle: { 120 | flex: 1, 121 | }, 122 | scrollViewStyle: { 123 | flex: 1, 124 | padding: 15, 125 | justifyContent: 'center', 126 | }, 127 | headingStyle: { 128 | fontSize: 30, 129 | textAlign: 'center', 130 | marginBottom: 40, 131 | }, 132 | }); 133 | 134 | export default BasicExample; 135 | ``` 136 | 137 | #### For More Advanced Example as in the Demo check [App.tsx](example/App.tsx) 138 | 139 |

fateh999




140 | -------------------------------------------------------------------------------- /READMEv1.md: -------------------------------------------------------------------------------- 1 | # react-native-paper-form-builder 2 | 3 | Form Builder written in typescript with inbuilt Validation, dropdown, autocomplete powered by [react-hook-form](https://react-hook-form.com/) & [react-native-paper](https://callstack.github.io/react-native-paper/). 4 | 5 | [![NPM](https://nodei.co/npm/react-native-paper-form-builder.png?downloads=true)](https://nodei.co/npm/react-native-paper-form-builder/) 6 | 7 | #### Dependencies to Install : 8 | 9 | - [react-native-paper](https://www.npmjs.com/package/react-native-paper) 10 | 11 | - [react-hook-form](https://www.npmjs.com/package/react-hook-form) 12 | 13 | - [react-native-vector-icons](https://www.npmjs.com/package/react-native-vector-icons) Follow the configuration step of react-native-vector-icons as provided in the docs. 14 | 15 | #### Demo : 16 | 17 | ![](https://i.ibb.co/C6RDdC2/ezgif-7-c021a6c1fa26.gif) 18 | 19 | #### Steps to install : 20 | 21 | ```javascript 22 | 23 | npm i react-native-paper-form-builder 24 | 25 | ``` 26 | 27 | ```javascript 28 | import FormBuilder from 'react-native-paper-form-builder'; 29 | ``` 30 | 31 | #### Usage : 32 | 33 | ```javascript 34 | import React from 'react'; 35 | 36 | import {View, StyleSheet, ScrollView, Text} from 'react-native'; 37 | 38 | import FormBuilder from 'react-native-paper-form-builder'; 39 | 40 | import {useForm} from 'react-hook-form'; 41 | 42 | import {Button} from 'react-native-paper'; 43 | 44 | function BasicExample() { 45 | const form = useForm({ 46 | defaultValues: { 47 | email: '', 48 | 49 | password: '', 50 | }, 51 | 52 | mode: 'onChange', 53 | }); 54 | 55 | return ( 56 | 57 | 58 | Form Builder Basic Demo 59 | 60 | 105 | 112 | 113 | 114 | 115 | ); 116 | } 117 | 118 | const styles = StyleSheet.create({ 119 | containerStyle: { 120 | flex: 1, 121 | }, 122 | 123 | scrollViewStyle: { 124 | flex: 1, 125 | 126 | padding: 15, 127 | 128 | justifyContent: 'center', 129 | }, 130 | 131 | headingStyle: { 132 | fontSize: 30, 133 | 134 | textAlign: 'center', 135 | 136 | marginBottom: 40, 137 | }, 138 | }); 139 | 140 | export default BasicExample; 141 | ``` 142 | 143 | #### For More Advanced Example as in the Demo check [App.tsx](https://github.com/fateh999/react-native-paper-form-builder/blob/master/App.tsx) 144 | 145 | #### Props: 146 | 147 | | Name | Description | 148 | | --------------- | -------------------------------------------------------------------------------------------- | 149 | | formConfigArray | Array of Input Configs which are specified below | 150 | | form | useForm hook value | 151 | | children | (Optional) React Component For Showing Buttons or any other component at the end of the form | | children | Optional React Component For Showing Buttons or any other component at the end of the form | 152 | | CustomInput | (Optional) Custom React Input in place of react native paper default input | 153 | | helperTextStyle | (Optional) Bottom Helper Text Style | 154 | | inputViewStyle | (Optional) Container Style wrapping text input | 155 | 156 | #### How to generate different input types: 157 | 158 | 1. TextInput 159 | 160 | ```javascript 161 | 162 | { 163 | 164 | type: 'input', 165 | 166 | name: string, // Same as defined in default values 167 | 168 | label?: string, 169 | 170 | variant?: 'outlined' | 'flat', 171 | 172 | rules?: ValidationOptions,// Validation Rules of Controller component from React Hook Form 173 | 174 | textInputProps?: React.ComponentProps // Props of React Native Paper TextInput 175 | 176 | } 177 | 178 | ``` 179 | 180 | 2. Select 181 | 182 | ```javascript 183 | 184 | { 185 | 186 | type: 'select', 187 | 188 | name: string, // Same as defined in default values 189 | 190 | options: Array<{ value: string | number,label: string }>, 191 | 192 | label?: string, 193 | 194 | variant?: 'outlined' | 'flat', 195 | 196 | rules?: ValidationOptions,// Validation Rules of Controller component from React Hook Form 197 | 198 | } 199 | 200 | ``` 201 | 202 | 3. Autocomplete 203 | 204 | ```javascript 205 | 206 | { 207 | 208 | type: 'autocomplete', 209 | 210 | name: string, // Same as defined in default values 211 | 212 | options: Array<{ value: string | number,label: string }>, 213 | 214 | label?: string, 215 | 216 | variant?: 'outlined' | 'flat', 217 | 218 | loadOptions?: any, // Pass a function that reloads options in case they fail to update 219 | 220 | rules?: ValidationOptions,// Validation Rules of Controller component from React Hook Form 221 | 222 | } 223 | 224 | ``` 225 | 226 | 4. Checkbox 227 | 228 | ```javascript 229 | 230 | { 231 | 232 | type: 'checkbox', 233 | 234 | name: string, // Same as defined in default values 235 | 236 | label?: string | React.ReactNode, 237 | 238 | rules?: ValidationOptions,// Validation Rules of Controller component from React Hook Form 239 | 240 | } 241 | 242 | ``` 243 | 244 | 5. Radio 245 | 246 | ```javascript 247 | 248 | { 249 | 250 | type: 'radio', 251 | 252 | name: string, // Same as defined in default values 253 | 254 | label?: string | React.ReactNode, 255 | 256 | rules?: ValidationOptions,// Validation Rules of Controller component from React Hook Form 257 | 258 | } 259 | 260 | ``` 261 | 262 | 6. Switch 263 | 264 | ```javascript 265 | 266 | { 267 | 268 | type: 'switch', 269 | 270 | name: string, // Same as defined in default values 271 | 272 | label?: string | React.ReactNode, 273 | 274 | rules?: ValidationOptions,// Validation Rules of Controller component from React Hook Form 275 | 276 | } 277 | 278 | ``` 279 | 280 | 7. Custom 281 | 282 | ```javascript 283 | 284 | { 285 | 286 | type: 'custom', 287 | 288 | name: string, // Same as defined in default values 289 | 290 | jsx?: React.ReactNode, 291 | 292 | rules?: ValidationOptions,// Validation Rules of Controller component from React Hook Form 293 | 294 | } 295 | 296 | ``` 297 | 298 | #### Simple Example of Custom Input: 299 | 300 | ```javascript 301 | function SimpleCustomTextInput(props: TextInputProps) { 302 | const {error, label, style} = props; 303 | 304 | return ( 305 | 320 | ); 321 | } 322 | ``` 323 | 324 | #### TODO : 325 | 326 | - ~~Modal Autocomplete~~ 327 | 328 | - ~~Custom Input~~ 329 | - ~~FlatList Integration in Autocomplete~~ 330 | - ~~Refresh handler in Autocomplete~~ 331 | - Input Icons 332 | - Export Components like AutoComplete and Select 333 | -------------------------------------------------------------------------------- /android.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/android.gif -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/docs/.nojekyll -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # react-native-paper-form-builder 2 | 3 | [![npm version](https://img.shields.io/npm/v/react-native-paper-form-builder.svg?style=for-the-badge)](https://www.npmjs.com/package/react-native-paper-form-builder) 4 | [![npm downloads](https://img.shields.io/npm/dm/react-native-paper-form-builder.svg?style=for-the-badge)](https://www.npmjs.com/package/react-native-paper-form-builder) 5 | [![npm](https://img.shields.io/npm/dt/react-native-paper-form-builder.svg?style=for-the-badge)](https://www.npmjs.com/package/react-native-paper-form-builder) 6 | [![npm](https://img.shields.io/npm/l/react-native-paper-form-builder?style=for-the-badge)](https://github.com/fateh999/react-native-paper-form-builder/blob/master/LICENSE) 7 | 8 | Form Builder written in typescript with inbuilt Validation, dropdown, autocomplete powered by [react-hook-form](https://react-hook-form.com/) & [react-native-paper](https://callstack.github.io/react-native-paper/). 9 | 10 | ```sh 11 | yarn add react-native-paper-form-builder 12 | ``` 13 | 14 | or 15 | 16 | ```sh 17 | npm install react-native-paper-form-builder 18 | ``` 19 | 20 | ## Peer Dependencies to Install : 21 | 22 | - [react-native-paper](https://www.npmjs.com/package/react-native-paper) 23 | 24 | - [react-hook-form](https://www.npmjs.com/package/react-hook-form) 25 | 26 | ## Demo : 27 | 28 | ![](https://github.com/fateh999/react-native-paper-form-builder/raw/master/iOS.gif) 29 | ![](https://github.com/fateh999/react-native-paper-form-builder/raw/master/android.gif) 30 | 31 | ## What's New in v2.0.4: 32 | 33 | - Create column layout in FormBuilder like shown below 34 | 35 | 36 | 37 | 38 | 39 | - Use custom input. 40 | -------------------------------------------------------------------------------- /docs/_coverpage.md: -------------------------------------------------------------------------------- 1 | # react-native-paper-form-builder 2 | 3 | > React Native Paper Form Builder. 4 | 5 | - Easy to use 6 | - Save your time with inbuilt validations powered by [react-hook-form](https://react-hook-form.com/) 7 | 8 | [GitHub](https://github.com/fateh999/react-native-paper-form-builder) 9 | [Get Started](/README) 10 | 11 | ![color](#f2fcfe) 12 | -------------------------------------------------------------------------------- /docs/_sidebar.md: -------------------------------------------------------------------------------- 1 | - [Home](README.md) 2 | - [Examples](examples.md) 3 | - [Usage](usage.md) 4 | - [Props](props.md) 5 | -------------------------------------------------------------------------------- /docs/examples.md: -------------------------------------------------------------------------------- 1 | # Basic Example 2 | 3 | ```jsx 4 | import React from 'react'; 5 | import {View, StyleSheet, ScrollView, Text} from 'react-native'; 6 | import {FormBuilder} from './dist'; 7 | import {useForm} from 'react-hook-form'; 8 | import {Button} from 'react-native-paper'; 9 | 10 | function BasicExample() { 11 | const {control, setFocus, handleSubmit} = useForm({ 12 | defaultValues: { 13 | email: '', 14 | password: '', 15 | }, 16 | mode: 'onChange', 17 | }); 18 | 19 | return ( 20 | 21 | 22 | Form Builder Basic Demo 23 | 56 | 63 | 64 | 65 | ); 66 | } 67 | 68 | const styles = StyleSheet.create({ 69 | containerStyle: { 70 | flex: 1, 71 | }, 72 | scrollViewStyle: { 73 | flex: 1, 74 | padding: 15, 75 | justifyContent: 'center', 76 | }, 77 | headingStyle: { 78 | fontSize: 30, 79 | textAlign: 'center', 80 | marginBottom: 40, 81 | }, 82 | }); 83 | 84 | export default BasicExample; 85 | ``` 86 | 87 | # Advanced Example 88 | 89 | ```jsx 90 | import React, {Fragment} from 'react'; 91 | import {useController, useForm} from 'react-hook-form'; 92 | import {Button, Checkbox, List, TextInput} from 'react-native-paper'; 93 | import {FormBuilder} from './dist'; 94 | import {LogicProps} from './dist/Types/Types'; 95 | 96 | function AdvancedExample() { 97 | const {control, setFocus, handleSubmit} = useForm({ 98 | defaultValues: { 99 | name: '', 100 | email: '', 101 | password: '', 102 | city: '', 103 | gender: '', 104 | rememberMe: 'checked', 105 | }, 106 | mode: 'onChange', 107 | }); 108 | 109 | return ( 110 | 111 | , 121 | }, 122 | rules: { 123 | required: { 124 | value: true, 125 | message: 'Name is required', 126 | }, 127 | }, 128 | }, 129 | { 130 | name: 'email', 131 | type: 'email', 132 | textInputProps: { 133 | label: 'Email', 134 | left: , 135 | }, 136 | rules: { 137 | required: { 138 | value: true, 139 | message: 'Email is required', 140 | }, 141 | pattern: { 142 | value: 143 | /[A-Za-z0-9._%+-]{3,}@[a-zA-Z]{3,}([.]{1}[a-zA-Z]{2,}|[.]{1}[a-zA-Z]{2,}[.]{1}[a-zA-Z]{2,})/, 144 | message: 'Email is invalid', 145 | }, 146 | }, 147 | }, 148 | { 149 | name: 'password', 150 | type: 'password', 151 | textInputProps: { 152 | label: 'Password', 153 | left: , 154 | }, 155 | rules: { 156 | required: { 157 | value: true, 158 | message: 'Password is required', 159 | }, 160 | minLength: { 161 | value: 8, 162 | message: 'Password should be atleast 8 characters', 163 | }, 164 | maxLength: { 165 | value: 30, 166 | message: 'Password should be between 8 and 30 characters', 167 | }, 168 | }, 169 | }, 170 | { 171 | name: 'city', 172 | type: 'autocomplete', 173 | textInputProps: { 174 | label: 'City', 175 | left: , 176 | }, 177 | rules: { 178 | required: { 179 | value: true, 180 | message: 'City is required', 181 | }, 182 | }, 183 | options: [ 184 | { 185 | label: 'Lucknow', 186 | value: 1, 187 | }, 188 | { 189 | label: 'Noida', 190 | value: 2, 191 | }, 192 | { 193 | label: 'Delhi', 194 | value: 3, 195 | }, 196 | { 197 | label: 'Bangalore', 198 | value: 4, 199 | }, 200 | { 201 | label: 'Pune', 202 | value: 5, 203 | }, 204 | { 205 | label: 'Mumbai', 206 | value: 6, 207 | }, 208 | { 209 | label: 'Ahmedabad', 210 | value: 7, 211 | }, 212 | { 213 | label: 'Patna', 214 | value: 8, 215 | }, 216 | ], 217 | }, 218 | { 219 | name: 'gender', 220 | type: 'select', 221 | textInputProps: { 222 | label: 'Gender', 223 | left: , 224 | }, 225 | rules: { 226 | required: { 227 | value: true, 228 | message: 'Gender is required', 229 | }, 230 | }, 231 | options: [ 232 | { 233 | value: 0, 234 | label: 'Female', 235 | }, 236 | { 237 | value: 1, 238 | label: 'Male', 239 | }, 240 | { 241 | value: 2, 242 | label: 'Others', 243 | }, 244 | ], 245 | }, 246 | { 247 | name: 'rememberMe', 248 | type: 'custom', 249 | JSX: RememberMe, 250 | }, 251 | ]} 252 | /> 253 | 256 | 257 | ); 258 | } 259 | 260 | function RememberMe(props: LogicProps) { 261 | const {name, rules, shouldUnregister, defaultValue, control} = props; 262 | const {field} = useController({ 263 | name, 264 | rules, 265 | shouldUnregister, 266 | defaultValue, 267 | control, 268 | }); 269 | 270 | return ( 271 | ( 274 | { 277 | field.onChange(field.value === 'checked' ? 'unchecked' : 'checked'); 278 | }} 279 | /> 280 | )} 281 | /> 282 | ); 283 | } 284 | 285 | export default AdvancedExample; 286 | ``` 287 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | React Native Paper Form Builder 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/props.md: -------------------------------------------------------------------------------- 1 | ```javascript 2 | 3 | type $DeepPartial = {[P in keyof T]?: $DeepPartial}; 4 | type FormBuilderProps = { 5 | formConfigArray: Array< 6 | Omit | Array> 7 | >; 8 | inputSpacing?: number; 9 | inputSpacingHorizontal?: number; 10 | theme?: $DeepPartial | Theme; 11 | control: any; 12 | setFocus: (name: any) => void; 13 | CustomTextInput?: any; 14 | }; 15 | 16 | type INPUT_TYPES = 17 | | 'text' 18 | | 'email' 19 | | 'password' 20 | | 'select' 21 | | 'custom' 22 | | 'autocomplete'; 23 | 24 | type OPTIONS = Array<{label: string; value: string | number}>; 25 | 26 | type LogicProps = { 27 | name: string; 28 | rules?: Omit; 29 | shouldUnregister?: boolean; 30 | defaultValue?: unknown; 31 | type: INPUT_TYPES; 32 | textInputProps?: ComponentProps; 33 | options?: OPTIONS; 34 | control: any; 35 | JSX?: typeof Logic; 36 | inputSpacing?: number; 37 | inputSpacingHorizontal?: number; 38 | flex?: number; 39 | CustomAutoComplete?: typeof AutoComplete; 40 | CustomTextInput?: any; 41 | onDismiss?: () => void; 42 | }; 43 | 44 | type InputAutocompleteProps = { 45 | field: ControllerRenderProps; 46 | formState: UseFormStateReturn; 47 | textInputProps?: ComponentProps; 48 | options: OPTIONS; 49 | CustomAutoComplete?: typeof AutoComplete; 50 | CustomTextInput?: any; 51 | }; 52 | 53 | type AutoCompleteProps = { 54 | visible: boolean; 55 | setVisible: (visible: boolean) => void; 56 | textInputProps?: ComponentProps; 57 | options: OPTIONS; 58 | field: ControllerRenderProps; 59 | }; 60 | 61 | type InputSelectProps = { 62 | field: ControllerRenderProps; 63 | formState: UseFormStateReturn; 64 | textInputProps?: ComponentProps; 65 | options: OPTIONS; 66 | CustomTextInput?: any; 67 | onDismiss?: () => void; 68 | }; 69 | 70 | type InputTextProps = { 71 | field: ControllerRenderProps; 72 | formState: UseFormStateReturn; 73 | textInputProps?: ComponentProps; 74 | CustomTextInput?: any; 75 | }; 76 | ``` 77 | -------------------------------------------------------------------------------- /docs/usage.md: -------------------------------------------------------------------------------- 1 | # Input Types 2 | 3 | For detailed info on validation rules go here 4 | 5 | https://react-hook-form.com/api/useform/register 6 | 7 | ### text 8 | 9 | ```jsx 10 | import React from 'react'; 11 | import {FormBuilder} from 'react-hook-form'; 12 | import {useForm} from 'react-hook-form'; 13 | 14 | function Example() { 15 | const {control, setFocus} = useForm({ 16 | defaultValues: { 17 | name: '', 18 | }, 19 | mode: 'onChange', 20 | }); 21 | 22 | return ( 23 | 42 | ); 43 | } 44 | ``` 45 | 46 | ### email 47 | 48 | ```jsx 49 | import React from 'react'; 50 | import {FormBuilder} from 'react-hook-form'; 51 | import {useForm} from 'react-hook-form'; 52 | 53 | function Example() { 54 | const {control, setFocus} = useForm({ 55 | defaultValues: { 56 | email: '', 57 | }, 58 | mode: 'onChange', 59 | }); 60 | 61 | return ( 62 | 86 | ); 87 | } 88 | ``` 89 | 90 | ### password 91 | 92 | ```jsx 93 | import React from 'react'; 94 | import {FormBuilder} from 'react-hook-form'; 95 | import {useForm} from 'react-hook-form'; 96 | 97 | function Example() { 98 | const {control, setFocus} = useForm({ 99 | defaultValues: { 100 | password: '', 101 | }, 102 | mode: 'onChange', 103 | }); 104 | 105 | return ( 106 | 133 | ); 134 | } 135 | ``` 136 | 137 | ### select 138 | 139 | ```jsx 140 | import React from 'react'; 141 | import {FormBuilder} from 'react-hook-form'; 142 | import {useForm} from 'react-hook-form'; 143 | 144 | function Example() { 145 | const {control, setFocus} = useForm({ 146 | defaultValues: { 147 | gender: '', 148 | }, 149 | mode: 'onChange', 150 | }); 151 | 152 | return ( 153 | 186 | ); 187 | } 188 | ``` 189 | 190 | ### autocomplete 191 | 192 | ```jsx 193 | import React from 'react'; 194 | import {FormBuilder} from 'react-hook-form'; 195 | import {useForm} from 'react-hook-form'; 196 | 197 | function Example() { 198 | const {control, setFocus} = useForm({ 199 | defaultValues: { 200 | city: '', 201 | }, 202 | mode: 'onChange', 203 | }); 204 | 205 | return ( 206 | 259 | ); 260 | } 261 | ``` 262 | 263 | ### custom 264 | 265 | ```jsx 266 | import React from 'react'; 267 | import {FormBuilder} from 'react-hook-form'; 268 | import {useForm} from 'react-hook-form'; 269 | 270 | function Example() { 271 | const {control, setFocus} = useForm({ 272 | defaultValues: { 273 | rememberMe: 'checked', 274 | }, 275 | mode: 'onChange', 276 | }); 277 | 278 | return ( 279 | 290 | ); 291 | } 292 | 293 | function RememberMe(props: LogicProps) { 294 | const {name, rules, shouldUnregister, defaultValue, control} = props; 295 | const {field} = useController({ 296 | name, 297 | rules, 298 | shouldUnregister, 299 | defaultValue, 300 | control, 301 | }); 302 | 303 | return ( 304 | ( 307 | { 310 | field.onChange(field.value === 'checked' ? 'unchecked' : 'checked'); 311 | }} 312 | /> 313 | )} 314 | /> 315 | ); 316 | } 317 | ``` 318 | -------------------------------------------------------------------------------- /example/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /example/.editorconfig: -------------------------------------------------------------------------------- 1 | # Windows files 2 | [*.bat] 3 | end_of_line = crlf 4 | -------------------------------------------------------------------------------- /example/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /example/.gitattributes: -------------------------------------------------------------------------------- 1 | # Windows files should use crlf line endings 2 | # https://help.github.com/articles/dealing-with-line-endings/ 3 | *.bat text eol=crlf 4 | -------------------------------------------------------------------------------- /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 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | yarn-error.log 37 | 38 | # BUCK 39 | buck-out/ 40 | \.buckd/ 41 | *.keystore 42 | !debug.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | 58 | # CocoaPods 59 | /ios/Pods/ 60 | -------------------------------------------------------------------------------- /example/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | jsxBracketSameLine: true, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | arrowParens: 'avoid', 7 | }; 8 | -------------------------------------------------------------------------------- /example/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /example/AdvancedExample.tsx: -------------------------------------------------------------------------------- 1 | import React, {Fragment} from 'react'; 2 | import {useController, useForm} from 'react-hook-form'; 3 | import {Button, Checkbox, List, TextInput} from 'react-native-paper'; 4 | import {FormBuilder} from 'react-native-paper-form-builder'; 5 | import {LogicProps} from 'react-native-paper-form-builder/dist/Types/Types'; 6 | 7 | function AdvancedExample() { 8 | const {control, setFocus, handleSubmit} = useForm({ 9 | defaultValues: { 10 | firstName: '', 11 | lastName: '', 12 | email: '', 13 | password: '', 14 | city: '', 15 | gender: '', 16 | rememberMe: 'checked', 17 | }, 18 | mode: 'onChange', 19 | }); 20 | 21 | return ( 22 | 23 | , 34 | }, 35 | rules: { 36 | required: { 37 | value: true, 38 | message: 'First name is required', 39 | }, 40 | }, 41 | flex: 1.5, 42 | }, 43 | { 44 | name: 'lastName', 45 | type: 'text', 46 | textInputProps: { 47 | label: 'Last Name', 48 | left: , 49 | }, 50 | rules: { 51 | required: { 52 | value: true, 53 | message: 'Last name is required', 54 | }, 55 | }, 56 | flex: 1, 57 | }, 58 | ], 59 | { 60 | name: 'email', 61 | type: 'email', 62 | textInputProps: { 63 | label: 'Email', 64 | left: , 65 | }, 66 | rules: { 67 | required: { 68 | value: true, 69 | message: 'Email is required', 70 | }, 71 | pattern: { 72 | value: 73 | /[A-Za-z0-9._%+-]{3,}@[a-zA-Z]{3,}([.]{1}[a-zA-Z]{2,}|[.]{1}[a-zA-Z]{2,}[.]{1}[a-zA-Z]{2,})/, 74 | message: 'Email is invalid', 75 | }, 76 | }, 77 | }, 78 | { 79 | name: 'password', 80 | type: 'password', 81 | textInputProps: { 82 | label: 'Password', 83 | left: , 84 | }, 85 | rules: { 86 | required: { 87 | value: true, 88 | message: 'Password is required', 89 | }, 90 | minLength: { 91 | value: 8, 92 | message: 'Password should be atleast 8 characters', 93 | }, 94 | maxLength: { 95 | value: 30, 96 | message: 'Password should be between 8 and 30 characters', 97 | }, 98 | }, 99 | }, 100 | { 101 | name: 'city', 102 | type: 'autocomplete', 103 | textInputProps: { 104 | label: 'City', 105 | left: , 106 | }, 107 | rules: { 108 | required: { 109 | value: true, 110 | message: 'City is required', 111 | }, 112 | }, 113 | options: [ 114 | { 115 | label: 'Lucknow', 116 | value: 1, 117 | }, 118 | { 119 | label: 'Noida', 120 | value: 2, 121 | }, 122 | { 123 | label: 'Delhi', 124 | value: 3, 125 | }, 126 | { 127 | label: 'Bangalore', 128 | value: 4, 129 | }, 130 | { 131 | label: 'Pune', 132 | value: 5, 133 | }, 134 | { 135 | label: 'Mumbai', 136 | value: 6, 137 | }, 138 | { 139 | label: 'Ahmedabad', 140 | value: 7, 141 | }, 142 | { 143 | label: 'Patna', 144 | value: 8, 145 | }, 146 | ], 147 | }, 148 | { 149 | name: 'gender', 150 | type: 'select', 151 | textInputProps: { 152 | label: 'Gender', 153 | left: , 154 | }, 155 | rules: { 156 | required: { 157 | value: true, 158 | message: 'Gender is required', 159 | }, 160 | }, 161 | options: [ 162 | { 163 | value: 0, 164 | label: 'Female', 165 | }, 166 | { 167 | value: 1, 168 | label: 'Male', 169 | }, 170 | { 171 | value: 2, 172 | label: 'Others', 173 | }, 174 | ], 175 | }, 176 | { 177 | name: 'rememberMe', 178 | type: 'custom', 179 | JSX: TermsCheckBox, 180 | }, 181 | ]} 182 | /> 183 | 186 | 187 | ); 188 | } 189 | 190 | function TermsCheckBox(props: LogicProps) { 191 | const {name, rules, shouldUnregister, defaultValue, control} = props; 192 | const {field} = useController({ 193 | name, 194 | rules, 195 | shouldUnregister, 196 | defaultValue, 197 | control, 198 | }); 199 | 200 | return ( 201 | ( 204 | { 207 | field.onChange(field.value === 'checked' ? 'unchecked' : 'checked'); 208 | }} 209 | /> 210 | )} 211 | /> 212 | ); 213 | } 214 | 215 | export default AdvancedExample; 216 | -------------------------------------------------------------------------------- /example/App.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | Appbar, 3 | DarkTheme, 4 | DefaultTheme, 5 | Provider, 6 | Surface, 7 | ThemeProvider, 8 | } from 'react-native-paper'; 9 | import React, {useState} from 'react'; 10 | import { 11 | Platform, 12 | SafeAreaView, 13 | ScrollView, 14 | StatusBar, 15 | StyleSheet, 16 | } from 'react-native'; 17 | import AdvancedExample from './AdvancedExample'; 18 | //@ts-ignore 19 | import KeyboardSpacer from 'react-native-keyboard-spacer'; 20 | 21 | function App() { 22 | const [nightMode, setNightmode] = useState(false); 23 | 24 | return ( 25 | 26 | 27 | 33 | 34 | 35 | 36 | setNightmode(!nightMode)} 39 | /> 40 | 41 | 42 | 46 | 47 | 48 | {Platform.OS === 'ios' && } 49 | 50 | 51 | 52 | 53 | ); 54 | } 55 | 56 | export default App; 57 | 58 | const styles = StyleSheet.create({ 59 | container: { 60 | flex: 1, 61 | }, 62 | scrollView: { 63 | flexGrow: 1, 64 | padding: 20, 65 | }, 66 | }); 67 | -------------------------------------------------------------------------------- /example/BasicExample.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {View, StyleSheet, ScrollView, Text} from 'react-native'; 3 | import {FormBuilder} from 'react-native-paper-form-builder'; 4 | import {useForm} from 'react-hook-form'; 5 | import {Button} from 'react-native-paper'; 6 | 7 | function BasicExample() { 8 | const {control, setFocus, handleSubmit} = useForm({ 9 | defaultValues: { 10 | email: '', 11 | password: '', 12 | }, 13 | mode: 'onChange', 14 | }); 15 | 16 | return ( 17 | 18 | 19 | Form Builder Basic Demo 20 | 53 | 60 | 61 | 62 | ); 63 | } 64 | 65 | const styles = StyleSheet.create({ 66 | containerStyle: { 67 | flex: 1, 68 | }, 69 | scrollViewStyle: { 70 | flex: 1, 71 | padding: 15, 72 | justifyContent: 'center', 73 | }, 74 | headingStyle: { 75 | fontSize: 30, 76 | textAlign: 'center', 77 | marginBottom: 40, 78 | }, 79 | }); 80 | 81 | export default BasicExample; 82 | -------------------------------------------------------------------------------- /example/__tests__/App-test.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /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 = "com.example", 39 | ) 40 | 41 | android_resource( 42 | name = "res", 43 | package = "com.example", 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, // clean and rebuild if changing 82 | ] 83 | 84 | apply from: "../../node_modules/react-native/react.gradle" 85 | apply from: "../../node_modules/react-native-vector-icons/fonts.gradle" 86 | 87 | /** 88 | * Set this to true to create two separate APKs instead of one: 89 | * - An APK that only works on ARM devices 90 | * - An APK that only works on x86 devices 91 | * The advantage is the size of the APK is reduced by about 4MB. 92 | * Upload all the APKs to the Play Store and people will download 93 | * the correct one based on the CPU architecture of their device. 94 | */ 95 | def enableSeparateBuildPerCPUArchitecture = false 96 | 97 | /** 98 | * Run Proguard to shrink the Java bytecode in release builds. 99 | */ 100 | def enableProguardInReleaseBuilds = false 101 | 102 | /** 103 | * The preferred build flavor of JavaScriptCore. 104 | * 105 | * For example, to use the international variant, you can use: 106 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 107 | * 108 | * The international variant includes ICU i18n library and necessary data 109 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 110 | * give correct results when using with locales other than en-US. Note that 111 | * this variant is about 6MiB larger per architecture than default. 112 | */ 113 | def jscFlavor = 'org.webkit:android-jsc:+' 114 | 115 | /** 116 | * Whether to enable the Hermes VM. 117 | * 118 | * This should be set on project.ext.react and mirrored here. If it is not set 119 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode 120 | * and the benefits of using Hermes will therefore be sharply reduced. 121 | */ 122 | def enableHermes = project.ext.react.get("enableHermes", false); 123 | 124 | android { 125 | ndkVersion rootProject.ext.ndkVersion 126 | 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 "com.example" 136 | minSdkVersion rootProject.ext.minSdkVersion 137 | targetSdkVersion rootProject.ext.targetSdkVersion 138 | versionCode 1 139 | versionName "1.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 | // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. 176 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] 177 | def abi = output.getFilter(OutputFile.ABI) 178 | if (abi != null) { // null for the universal-debug, universal-release variants 179 | output.versionCodeOverride = 180 | defaultConfig.versionCode * 1000 + versionCodes.get(abi) 181 | } 182 | 183 | } 184 | } 185 | } 186 | 187 | dependencies { 188 | implementation fileTree(dir: "libs", include: ["*.jar"]) 189 | //noinspection GradleDynamicVersion 190 | implementation "com.facebook.react:react-native:+" // From node_modules 191 | 192 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" 193 | 194 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { 195 | exclude group:'com.facebook.fbjni' 196 | } 197 | 198 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { 199 | exclude group:'com.facebook.flipper' 200 | exclude group:'com.squareup.okhttp3', module:'okhttp' 201 | } 202 | 203 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { 204 | exclude group:'com.facebook.flipper' 205 | } 206 | 207 | if (enableHermes) { 208 | def hermesPath = "../../node_modules/hermes-engine/android/"; 209 | debugImplementation files(hermesPath + "hermes-debug.aar") 210 | releaseImplementation files(hermesPath + "hermes-release.aar") 211 | } else { 212 | implementation jscFlavor 213 | } 214 | } 215 | 216 | // Run this once to be able to run the application with BUCK 217 | // puts all compile dependencies into folder libs for BUCK to use 218 | task copyDownloadableDepsToLibs(type: Copy) { 219 | from configurations.compile 220 | into 'libs' 221 | } 222 | 223 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) 224 | -------------------------------------------------------------------------------- /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/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/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 | 2 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /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 | 32 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 33 | client.addPlugin(new ReactFlipperPlugin()); 34 | client.addPlugin(new DatabasesFlipperPlugin(context)); 35 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 36 | client.addPlugin(CrashReporterPlugin.getInstance()); 37 | 38 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 39 | NetworkingModule.setCustomClientBuilder( 40 | new NetworkingModule.CustomClientBuilder() { 41 | @Override 42 | public void apply(OkHttpClient.Builder builder) { 43 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 44 | } 45 | }); 46 | client.addPlugin(networkFlipperPlugin); 47 | client.start(); 48 | 49 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 50 | // Hence we run if after all native modules have been initialized 51 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 52 | if (reactContext == null) { 53 | reactInstanceManager.addReactInstanceEventListener( 54 | new ReactInstanceManager.ReactInstanceEventListener() { 55 | @Override 56 | public void onReactContextInitialized(ReactContext reactContext) { 57 | reactInstanceManager.removeReactInstanceEventListener(this); 58 | reactContext.runOnNativeModulesQueueThread( 59 | new Runnable() { 60 | @Override 61 | public void run() { 62 | client.addPlugin(new FrescoFlipperPlugin()); 63 | } 64 | }); 65 | } 66 | }); 67 | } else { 68 | client.addPlugin(new FrescoFlipperPlugin()); 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "Example"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.example; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import com.facebook.react.PackageList; 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactInstanceManager; 8 | import com.facebook.react.ReactNativeHost; 9 | import com.facebook.react.ReactPackage; 10 | import com.facebook.soloader.SoLoader; 11 | import java.lang.reflect.InvocationTargetException; 12 | import java.util.List; 13 | 14 | public class MainApplication extends Application implements ReactApplication { 15 | 16 | private final ReactNativeHost mReactNativeHost = 17 | new ReactNativeHost(this) { 18 | @Override 19 | public boolean getUseDeveloperSupport() { 20 | return BuildConfig.DEBUG; 21 | } 22 | 23 | @Override 24 | protected List getPackages() { 25 | @SuppressWarnings("UnnecessaryLocalVariable") 26 | List packages = new PackageList(this).getPackages(); 27 | // Packages that cannot be autolinked yet can be added manually here, for example: 28 | // packages.add(new MyReactNativePackage()); 29 | return packages; 30 | } 31 | 32 | @Override 33 | protected String getJSMainModuleName() { 34 | return "index"; 35 | } 36 | }; 37 | 38 | @Override 39 | public ReactNativeHost getReactNativeHost() { 40 | return mReactNativeHost; 41 | } 42 | 43 | @Override 44 | public void onCreate() { 45 | super.onCreate(); 46 | SoLoader.init(this, /* native exopackage */ false); 47 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 48 | } 49 | 50 | /** 51 | * Loads Flipper in React Native templates. Call this in the onCreate method with something like 52 | * initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); 53 | * 54 | * @param context 55 | * @param reactInstanceManager 56 | */ 57 | private static void initializeFlipper( 58 | Context context, ReactInstanceManager reactInstanceManager) { 59 | if (BuildConfig.DEBUG) { 60 | try { 61 | /* 62 | We use reflection here to pick up the class that initializes Flipper, 63 | since Flipper library is not available in release mode 64 | */ 65 | Class aClass = Class.forName("com.example.ReactNativeFlipper"); 66 | aClass 67 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) 68 | .invoke(null, context, reactInstanceManager); 69 | } catch (ClassNotFoundException e) { 70 | e.printStackTrace(); 71 | } catch (NoSuchMethodException e) { 72 | e.printStackTrace(); 73 | } catch (IllegalAccessException e) { 74 | e.printStackTrace(); 75 | } catch (InvocationTargetException e) { 76 | e.printStackTrace(); 77 | } 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/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/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/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/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/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/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/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/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/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/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/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/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/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/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/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/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/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/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Example 3 | 4 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /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.3" 6 | minSdkVersion = 21 7 | compileSdkVersion = 29 8 | targetSdkVersion = 29 9 | ndkVersion = "20.1.5948944" 10 | } 11 | repositories { 12 | google() 13 | jcenter() 14 | } 15 | dependencies { 16 | classpath("com.android.tools.build:gradle:4.1.0") 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 | # Automatically convert third-party libraries to use AndroidX 25 | android.enableJetifier=true 26 | 27 | # Version of flipper SDK to use with React Native 28 | FLIPPER_VERSION=0.75.1 29 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/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.7-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 | 86 | # Determine the Java command to use to start the JVM. 87 | if [ -n "$JAVA_HOME" ] ; then 88 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 89 | # IBM's JDK on AIX uses strange locations for the executables 90 | JAVACMD="$JAVA_HOME/jre/sh/java" 91 | else 92 | JAVACMD="$JAVA_HOME/bin/java" 93 | fi 94 | if [ ! -x "$JAVACMD" ] ; then 95 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 96 | 97 | Please set the JAVA_HOME variable in your environment to match the 98 | location of your Java installation." 99 | fi 100 | else 101 | JAVACMD="java" 102 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 103 | 104 | Please set the JAVA_HOME variable in your environment to match the 105 | location of your Java installation." 106 | fi 107 | 108 | # Increase the maximum file descriptors if we can. 109 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 110 | MAX_FD_LIMIT=`ulimit -H -n` 111 | if [ $? -eq 0 ] ; then 112 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 113 | MAX_FD="$MAX_FD_LIMIT" 114 | fi 115 | ulimit -n $MAX_FD 116 | if [ $? -ne 0 ] ; then 117 | warn "Could not set maximum file descriptor limit: $MAX_FD" 118 | fi 119 | else 120 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 121 | fi 122 | fi 123 | 124 | # For Darwin, add options to specify how the application appears in the dock 125 | if $darwin; then 126 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 127 | fi 128 | 129 | # For Cygwin or MSYS, switch paths to Windows format before running java 130 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 131 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 132 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 133 | 134 | JAVACMD=`cygpath --unix "$JAVACMD"` 135 | 136 | # We build the pattern for arguments to be converted via cygpath 137 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 138 | SEP="" 139 | for dir in $ROOTDIRSRAW ; do 140 | ROOTDIRS="$ROOTDIRS$SEP$dir" 141 | SEP="|" 142 | done 143 | OURCYGPATTERN="(^($ROOTDIRS))" 144 | # Add a user-defined pattern to the cygpath arguments 145 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 146 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 147 | fi 148 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 149 | i=0 150 | for arg in "$@" ; do 151 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 152 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 153 | 154 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 155 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 156 | else 157 | eval `echo args$i`="\"$arg\"" 158 | fi 159 | i=`expr $i + 1` 160 | done 161 | case $i in 162 | 0) set -- ;; 163 | 1) set -- "$args0" ;; 164 | 2) set -- "$args0" "$args1" ;; 165 | 3) set -- "$args0" "$args1" "$args2" ;; 166 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 167 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 168 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 169 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 170 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 171 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 172 | esac 173 | fi 174 | 175 | # Escape application args 176 | save () { 177 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 178 | echo " " 179 | } 180 | APP_ARGS=`save "$@"` 181 | 182 | # Collect all arguments for the java command, following the shell quoting and substitution rules 183 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 184 | 185 | exec "$JAVACMD" "$@" 186 | -------------------------------------------------------------------------------- /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 execute 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 execute 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 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'Example' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Example", 3 | "displayName": "Example" 4 | } -------------------------------------------------------------------------------- /example/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons'; 9 | 10 | MaterialCommunityIcons.loadFont(); 11 | 12 | AppRegistry.registerComponent(appName, () => App); 13 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | platform :ios, '10.0' 5 | 6 | target 'Example' do 7 | config = use_native_modules! 8 | pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons' 9 | 10 | use_react_native!( 11 | :path => config[:reactNativePath], 12 | # to enable hermes on iOS, change `false` to `true` and then install pods 13 | :hermes_enabled => false 14 | ) 15 | 16 | target 'ExampleTests' do 17 | inherit! :complete 18 | # Pods for testing 19 | end 20 | 21 | # Enables Flipper. 22 | # 23 | # Note that if you have use_frameworks! enabled, Flipper will not work and 24 | # you should disable the next line. 25 | use_flipper!() 26 | 27 | post_install do |installer| 28 | react_native_post_install(installer) 29 | end 30 | end -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - boost-for-react-native (1.63.0) 3 | - CocoaAsyncSocket (7.6.5) 4 | - DoubleConversion (1.1.6) 5 | - FBLazyVector (0.64.1) 6 | - FBReactNativeSpec (0.64.1): 7 | - RCT-Folly (= 2020.01.13.00) 8 | - RCTRequired (= 0.64.1) 9 | - RCTTypeSafety (= 0.64.1) 10 | - React-Core (= 0.64.1) 11 | - React-jsi (= 0.64.1) 12 | - ReactCommon/turbomodule/core (= 0.64.1) 13 | - Flipper (0.75.1): 14 | - Flipper-Folly (~> 2.5) 15 | - Flipper-RSocket (~> 1.3) 16 | - Flipper-DoubleConversion (1.1.7) 17 | - Flipper-Folly (2.5.3): 18 | - boost-for-react-native 19 | - Flipper-DoubleConversion 20 | - Flipper-Glog 21 | - libevent (~> 2.1.12) 22 | - OpenSSL-Universal (= 1.1.180) 23 | - Flipper-Glog (0.3.6) 24 | - Flipper-PeerTalk (0.0.4) 25 | - Flipper-RSocket (1.3.1): 26 | - Flipper-Folly (~> 2.5) 27 | - FlipperKit (0.75.1): 28 | - FlipperKit/Core (= 0.75.1) 29 | - FlipperKit/Core (0.75.1): 30 | - Flipper (~> 0.75.1) 31 | - FlipperKit/CppBridge 32 | - FlipperKit/FBCxxFollyDynamicConvert 33 | - FlipperKit/FBDefines 34 | - FlipperKit/FKPortForwarding 35 | - FlipperKit/CppBridge (0.75.1): 36 | - Flipper (~> 0.75.1) 37 | - FlipperKit/FBCxxFollyDynamicConvert (0.75.1): 38 | - Flipper-Folly (~> 2.5) 39 | - FlipperKit/FBDefines (0.75.1) 40 | - FlipperKit/FKPortForwarding (0.75.1): 41 | - CocoaAsyncSocket (~> 7.6) 42 | - Flipper-PeerTalk (~> 0.0.4) 43 | - FlipperKit/FlipperKitHighlightOverlay (0.75.1) 44 | - FlipperKit/FlipperKitLayoutPlugin (0.75.1): 45 | - FlipperKit/Core 46 | - FlipperKit/FlipperKitHighlightOverlay 47 | - FlipperKit/FlipperKitLayoutTextSearchable 48 | - YogaKit (~> 1.18) 49 | - FlipperKit/FlipperKitLayoutTextSearchable (0.75.1) 50 | - FlipperKit/FlipperKitNetworkPlugin (0.75.1): 51 | - FlipperKit/Core 52 | - FlipperKit/FlipperKitReactPlugin (0.75.1): 53 | - FlipperKit/Core 54 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.75.1): 55 | - FlipperKit/Core 56 | - FlipperKit/SKIOSNetworkPlugin (0.75.1): 57 | - FlipperKit/Core 58 | - FlipperKit/FlipperKitNetworkPlugin 59 | - glog (0.3.5) 60 | - libevent (2.1.12) 61 | - OpenSSL-Universal (1.1.180) 62 | - RCT-Folly (2020.01.13.00): 63 | - boost-for-react-native 64 | - DoubleConversion 65 | - glog 66 | - RCT-Folly/Default (= 2020.01.13.00) 67 | - RCT-Folly/Default (2020.01.13.00): 68 | - boost-for-react-native 69 | - DoubleConversion 70 | - glog 71 | - RCTRequired (0.64.1) 72 | - RCTTypeSafety (0.64.1): 73 | - FBLazyVector (= 0.64.1) 74 | - RCT-Folly (= 2020.01.13.00) 75 | - RCTRequired (= 0.64.1) 76 | - React-Core (= 0.64.1) 77 | - React (0.64.1): 78 | - React-Core (= 0.64.1) 79 | - React-Core/DevSupport (= 0.64.1) 80 | - React-Core/RCTWebSocket (= 0.64.1) 81 | - React-RCTActionSheet (= 0.64.1) 82 | - React-RCTAnimation (= 0.64.1) 83 | - React-RCTBlob (= 0.64.1) 84 | - React-RCTImage (= 0.64.1) 85 | - React-RCTLinking (= 0.64.1) 86 | - React-RCTNetwork (= 0.64.1) 87 | - React-RCTSettings (= 0.64.1) 88 | - React-RCTText (= 0.64.1) 89 | - React-RCTVibration (= 0.64.1) 90 | - React-callinvoker (0.64.1) 91 | - React-Core (0.64.1): 92 | - glog 93 | - RCT-Folly (= 2020.01.13.00) 94 | - React-Core/Default (= 0.64.1) 95 | - React-cxxreact (= 0.64.1) 96 | - React-jsi (= 0.64.1) 97 | - React-jsiexecutor (= 0.64.1) 98 | - React-perflogger (= 0.64.1) 99 | - Yoga 100 | - React-Core/CoreModulesHeaders (0.64.1): 101 | - glog 102 | - RCT-Folly (= 2020.01.13.00) 103 | - React-Core/Default 104 | - React-cxxreact (= 0.64.1) 105 | - React-jsi (= 0.64.1) 106 | - React-jsiexecutor (= 0.64.1) 107 | - React-perflogger (= 0.64.1) 108 | - Yoga 109 | - React-Core/Default (0.64.1): 110 | - glog 111 | - RCT-Folly (= 2020.01.13.00) 112 | - React-cxxreact (= 0.64.1) 113 | - React-jsi (= 0.64.1) 114 | - React-jsiexecutor (= 0.64.1) 115 | - React-perflogger (= 0.64.1) 116 | - Yoga 117 | - React-Core/DevSupport (0.64.1): 118 | - glog 119 | - RCT-Folly (= 2020.01.13.00) 120 | - React-Core/Default (= 0.64.1) 121 | - React-Core/RCTWebSocket (= 0.64.1) 122 | - React-cxxreact (= 0.64.1) 123 | - React-jsi (= 0.64.1) 124 | - React-jsiexecutor (= 0.64.1) 125 | - React-jsinspector (= 0.64.1) 126 | - React-perflogger (= 0.64.1) 127 | - Yoga 128 | - React-Core/RCTActionSheetHeaders (0.64.1): 129 | - glog 130 | - RCT-Folly (= 2020.01.13.00) 131 | - React-Core/Default 132 | - React-cxxreact (= 0.64.1) 133 | - React-jsi (= 0.64.1) 134 | - React-jsiexecutor (= 0.64.1) 135 | - React-perflogger (= 0.64.1) 136 | - Yoga 137 | - React-Core/RCTAnimationHeaders (0.64.1): 138 | - glog 139 | - RCT-Folly (= 2020.01.13.00) 140 | - React-Core/Default 141 | - React-cxxreact (= 0.64.1) 142 | - React-jsi (= 0.64.1) 143 | - React-jsiexecutor (= 0.64.1) 144 | - React-perflogger (= 0.64.1) 145 | - Yoga 146 | - React-Core/RCTBlobHeaders (0.64.1): 147 | - glog 148 | - RCT-Folly (= 2020.01.13.00) 149 | - React-Core/Default 150 | - React-cxxreact (= 0.64.1) 151 | - React-jsi (= 0.64.1) 152 | - React-jsiexecutor (= 0.64.1) 153 | - React-perflogger (= 0.64.1) 154 | - Yoga 155 | - React-Core/RCTImageHeaders (0.64.1): 156 | - glog 157 | - RCT-Folly (= 2020.01.13.00) 158 | - React-Core/Default 159 | - React-cxxreact (= 0.64.1) 160 | - React-jsi (= 0.64.1) 161 | - React-jsiexecutor (= 0.64.1) 162 | - React-perflogger (= 0.64.1) 163 | - Yoga 164 | - React-Core/RCTLinkingHeaders (0.64.1): 165 | - glog 166 | - RCT-Folly (= 2020.01.13.00) 167 | - React-Core/Default 168 | - React-cxxreact (= 0.64.1) 169 | - React-jsi (= 0.64.1) 170 | - React-jsiexecutor (= 0.64.1) 171 | - React-perflogger (= 0.64.1) 172 | - Yoga 173 | - React-Core/RCTNetworkHeaders (0.64.1): 174 | - glog 175 | - RCT-Folly (= 2020.01.13.00) 176 | - React-Core/Default 177 | - React-cxxreact (= 0.64.1) 178 | - React-jsi (= 0.64.1) 179 | - React-jsiexecutor (= 0.64.1) 180 | - React-perflogger (= 0.64.1) 181 | - Yoga 182 | - React-Core/RCTSettingsHeaders (0.64.1): 183 | - glog 184 | - RCT-Folly (= 2020.01.13.00) 185 | - React-Core/Default 186 | - React-cxxreact (= 0.64.1) 187 | - React-jsi (= 0.64.1) 188 | - React-jsiexecutor (= 0.64.1) 189 | - React-perflogger (= 0.64.1) 190 | - Yoga 191 | - React-Core/RCTTextHeaders (0.64.1): 192 | - glog 193 | - RCT-Folly (= 2020.01.13.00) 194 | - React-Core/Default 195 | - React-cxxreact (= 0.64.1) 196 | - React-jsi (= 0.64.1) 197 | - React-jsiexecutor (= 0.64.1) 198 | - React-perflogger (= 0.64.1) 199 | - Yoga 200 | - React-Core/RCTVibrationHeaders (0.64.1): 201 | - glog 202 | - RCT-Folly (= 2020.01.13.00) 203 | - React-Core/Default 204 | - React-cxxreact (= 0.64.1) 205 | - React-jsi (= 0.64.1) 206 | - React-jsiexecutor (= 0.64.1) 207 | - React-perflogger (= 0.64.1) 208 | - Yoga 209 | - React-Core/RCTWebSocket (0.64.1): 210 | - glog 211 | - RCT-Folly (= 2020.01.13.00) 212 | - React-Core/Default (= 0.64.1) 213 | - React-cxxreact (= 0.64.1) 214 | - React-jsi (= 0.64.1) 215 | - React-jsiexecutor (= 0.64.1) 216 | - React-perflogger (= 0.64.1) 217 | - Yoga 218 | - React-CoreModules (0.64.1): 219 | - FBReactNativeSpec (= 0.64.1) 220 | - RCT-Folly (= 2020.01.13.00) 221 | - RCTTypeSafety (= 0.64.1) 222 | - React-Core/CoreModulesHeaders (= 0.64.1) 223 | - React-jsi (= 0.64.1) 224 | - React-RCTImage (= 0.64.1) 225 | - ReactCommon/turbomodule/core (= 0.64.1) 226 | - React-cxxreact (0.64.1): 227 | - boost-for-react-native (= 1.63.0) 228 | - DoubleConversion 229 | - glog 230 | - RCT-Folly (= 2020.01.13.00) 231 | - React-callinvoker (= 0.64.1) 232 | - React-jsi (= 0.64.1) 233 | - React-jsinspector (= 0.64.1) 234 | - React-perflogger (= 0.64.1) 235 | - React-runtimeexecutor (= 0.64.1) 236 | - React-jsi (0.64.1): 237 | - boost-for-react-native (= 1.63.0) 238 | - DoubleConversion 239 | - glog 240 | - RCT-Folly (= 2020.01.13.00) 241 | - React-jsi/Default (= 0.64.1) 242 | - React-jsi/Default (0.64.1): 243 | - boost-for-react-native (= 1.63.0) 244 | - DoubleConversion 245 | - glog 246 | - RCT-Folly (= 2020.01.13.00) 247 | - React-jsiexecutor (0.64.1): 248 | - DoubleConversion 249 | - glog 250 | - RCT-Folly (= 2020.01.13.00) 251 | - React-cxxreact (= 0.64.1) 252 | - React-jsi (= 0.64.1) 253 | - React-perflogger (= 0.64.1) 254 | - React-jsinspector (0.64.1) 255 | - React-perflogger (0.64.1) 256 | - React-RCTActionSheet (0.64.1): 257 | - React-Core/RCTActionSheetHeaders (= 0.64.1) 258 | - React-RCTAnimation (0.64.1): 259 | - FBReactNativeSpec (= 0.64.1) 260 | - RCT-Folly (= 2020.01.13.00) 261 | - RCTTypeSafety (= 0.64.1) 262 | - React-Core/RCTAnimationHeaders (= 0.64.1) 263 | - React-jsi (= 0.64.1) 264 | - ReactCommon/turbomodule/core (= 0.64.1) 265 | - React-RCTBlob (0.64.1): 266 | - FBReactNativeSpec (= 0.64.1) 267 | - RCT-Folly (= 2020.01.13.00) 268 | - React-Core/RCTBlobHeaders (= 0.64.1) 269 | - React-Core/RCTWebSocket (= 0.64.1) 270 | - React-jsi (= 0.64.1) 271 | - React-RCTNetwork (= 0.64.1) 272 | - ReactCommon/turbomodule/core (= 0.64.1) 273 | - React-RCTImage (0.64.1): 274 | - FBReactNativeSpec (= 0.64.1) 275 | - RCT-Folly (= 2020.01.13.00) 276 | - RCTTypeSafety (= 0.64.1) 277 | - React-Core/RCTImageHeaders (= 0.64.1) 278 | - React-jsi (= 0.64.1) 279 | - React-RCTNetwork (= 0.64.1) 280 | - ReactCommon/turbomodule/core (= 0.64.1) 281 | - React-RCTLinking (0.64.1): 282 | - FBReactNativeSpec (= 0.64.1) 283 | - React-Core/RCTLinkingHeaders (= 0.64.1) 284 | - React-jsi (= 0.64.1) 285 | - ReactCommon/turbomodule/core (= 0.64.1) 286 | - React-RCTNetwork (0.64.1): 287 | - FBReactNativeSpec (= 0.64.1) 288 | - RCT-Folly (= 2020.01.13.00) 289 | - RCTTypeSafety (= 0.64.1) 290 | - React-Core/RCTNetworkHeaders (= 0.64.1) 291 | - React-jsi (= 0.64.1) 292 | - ReactCommon/turbomodule/core (= 0.64.1) 293 | - React-RCTSettings (0.64.1): 294 | - FBReactNativeSpec (= 0.64.1) 295 | - RCT-Folly (= 2020.01.13.00) 296 | - RCTTypeSafety (= 0.64.1) 297 | - React-Core/RCTSettingsHeaders (= 0.64.1) 298 | - React-jsi (= 0.64.1) 299 | - ReactCommon/turbomodule/core (= 0.64.1) 300 | - React-RCTText (0.64.1): 301 | - React-Core/RCTTextHeaders (= 0.64.1) 302 | - React-RCTVibration (0.64.1): 303 | - FBReactNativeSpec (= 0.64.1) 304 | - RCT-Folly (= 2020.01.13.00) 305 | - React-Core/RCTVibrationHeaders (= 0.64.1) 306 | - React-jsi (= 0.64.1) 307 | - ReactCommon/turbomodule/core (= 0.64.1) 308 | - React-runtimeexecutor (0.64.1): 309 | - React-jsi (= 0.64.1) 310 | - ReactCommon/turbomodule/core (0.64.1): 311 | - DoubleConversion 312 | - glog 313 | - RCT-Folly (= 2020.01.13.00) 314 | - React-callinvoker (= 0.64.1) 315 | - React-Core (= 0.64.1) 316 | - React-cxxreact (= 0.64.1) 317 | - React-jsi (= 0.64.1) 318 | - React-perflogger (= 0.64.1) 319 | - RNDateTimePicker (3.5.2): 320 | - React-Core 321 | - RNVectorIcons (8.1.0): 322 | - React-Core 323 | - Yoga (1.14.0) 324 | - YogaKit (1.18.1): 325 | - Yoga (~> 1.14) 326 | 327 | DEPENDENCIES: 328 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) 329 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) 330 | - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) 331 | - Flipper (~> 0.75.1) 332 | - Flipper-DoubleConversion (= 1.1.7) 333 | - Flipper-Folly (~> 2.5.3) 334 | - Flipper-Glog (= 0.3.6) 335 | - Flipper-PeerTalk (~> 0.0.4) 336 | - Flipper-RSocket (~> 1.3) 337 | - FlipperKit (~> 0.75.1) 338 | - FlipperKit/Core (~> 0.75.1) 339 | - FlipperKit/CppBridge (~> 0.75.1) 340 | - FlipperKit/FBCxxFollyDynamicConvert (~> 0.75.1) 341 | - FlipperKit/FBDefines (~> 0.75.1) 342 | - FlipperKit/FKPortForwarding (~> 0.75.1) 343 | - FlipperKit/FlipperKitHighlightOverlay (~> 0.75.1) 344 | - FlipperKit/FlipperKitLayoutPlugin (~> 0.75.1) 345 | - FlipperKit/FlipperKitLayoutTextSearchable (~> 0.75.1) 346 | - FlipperKit/FlipperKitNetworkPlugin (~> 0.75.1) 347 | - FlipperKit/FlipperKitReactPlugin (~> 0.75.1) 348 | - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.75.1) 349 | - FlipperKit/SKIOSNetworkPlugin (~> 0.75.1) 350 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) 351 | - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) 352 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) 353 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) 354 | - React (from `../node_modules/react-native/`) 355 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) 356 | - React-Core (from `../node_modules/react-native/`) 357 | - React-Core/DevSupport (from `../node_modules/react-native/`) 358 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`) 359 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) 360 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) 361 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) 362 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) 363 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) 364 | - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) 365 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) 366 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) 367 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) 368 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) 369 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) 370 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) 371 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) 372 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`) 373 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) 374 | - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) 375 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) 376 | - "RNDateTimePicker (from `../node_modules/@react-native-community/datetimepicker`)" 377 | - RNVectorIcons (from `../node_modules/react-native-vector-icons`) 378 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) 379 | 380 | SPEC REPOS: 381 | trunk: 382 | - boost-for-react-native 383 | - CocoaAsyncSocket 384 | - Flipper 385 | - Flipper-DoubleConversion 386 | - Flipper-Folly 387 | - Flipper-Glog 388 | - Flipper-PeerTalk 389 | - Flipper-RSocket 390 | - FlipperKit 391 | - libevent 392 | - OpenSSL-Universal 393 | - YogaKit 394 | 395 | EXTERNAL SOURCES: 396 | DoubleConversion: 397 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" 398 | FBLazyVector: 399 | :path: "../node_modules/react-native/Libraries/FBLazyVector" 400 | FBReactNativeSpec: 401 | :path: "../node_modules/react-native/React/FBReactNativeSpec" 402 | glog: 403 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" 404 | RCT-Folly: 405 | :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" 406 | RCTRequired: 407 | :path: "../node_modules/react-native/Libraries/RCTRequired" 408 | RCTTypeSafety: 409 | :path: "../node_modules/react-native/Libraries/TypeSafety" 410 | React: 411 | :path: "../node_modules/react-native/" 412 | React-callinvoker: 413 | :path: "../node_modules/react-native/ReactCommon/callinvoker" 414 | React-Core: 415 | :path: "../node_modules/react-native/" 416 | React-CoreModules: 417 | :path: "../node_modules/react-native/React/CoreModules" 418 | React-cxxreact: 419 | :path: "../node_modules/react-native/ReactCommon/cxxreact" 420 | React-jsi: 421 | :path: "../node_modules/react-native/ReactCommon/jsi" 422 | React-jsiexecutor: 423 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor" 424 | React-jsinspector: 425 | :path: "../node_modules/react-native/ReactCommon/jsinspector" 426 | React-perflogger: 427 | :path: "../node_modules/react-native/ReactCommon/reactperflogger" 428 | React-RCTActionSheet: 429 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS" 430 | React-RCTAnimation: 431 | :path: "../node_modules/react-native/Libraries/NativeAnimation" 432 | React-RCTBlob: 433 | :path: "../node_modules/react-native/Libraries/Blob" 434 | React-RCTImage: 435 | :path: "../node_modules/react-native/Libraries/Image" 436 | React-RCTLinking: 437 | :path: "../node_modules/react-native/Libraries/LinkingIOS" 438 | React-RCTNetwork: 439 | :path: "../node_modules/react-native/Libraries/Network" 440 | React-RCTSettings: 441 | :path: "../node_modules/react-native/Libraries/Settings" 442 | React-RCTText: 443 | :path: "../node_modules/react-native/Libraries/Text" 444 | React-RCTVibration: 445 | :path: "../node_modules/react-native/Libraries/Vibration" 446 | React-runtimeexecutor: 447 | :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" 448 | ReactCommon: 449 | :path: "../node_modules/react-native/ReactCommon" 450 | RNDateTimePicker: 451 | :path: "../node_modules/@react-native-community/datetimepicker" 452 | RNVectorIcons: 453 | :path: "../node_modules/react-native-vector-icons" 454 | Yoga: 455 | :path: "../node_modules/react-native/ReactCommon/yoga" 456 | 457 | SPEC CHECKSUMS: 458 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c 459 | CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 460 | DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de 461 | FBLazyVector: 7b423f9e248eae65987838148c36eec1dbfe0b53 462 | FBReactNativeSpec: 9fad09909e07bdf207be991a9ebb820f537975f5 463 | Flipper: d3da1aa199aad94455ae725e9f3aa43f3ec17021 464 | Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 465 | Flipper-Folly: 755929a4f851b2fb2c347d533a23f191b008554c 466 | Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 467 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 468 | Flipper-RSocket: 127954abe8b162fcaf68d2134d34dc2bd7076154 469 | FlipperKit: 8a20b5c5fcf9436cac58551dc049867247f64b00 470 | glog: 73c2498ac6884b13ede40eda8228cb1eee9d9d62 471 | libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 472 | OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b 473 | RCT-Folly: ec7a233ccc97cc556cf7237f0db1ff65b986f27c 474 | RCTRequired: ec2ebc96b7bfba3ca5c32740f5a0c6a014a274d2 475 | RCTTypeSafety: 22567f31e67c3e088c7ac23ea46ab6d4779c0ea5 476 | React: a241e3dbb1e91d06332f1dbd2b3ab26e1a4c4b9d 477 | React-callinvoker: da4d1c6141696a00163960906bc8a55b985e4ce4 478 | React-Core: 46ba164c437d7dac607b470c83c8308b05799748 479 | React-CoreModules: 217bd14904491c7b9940ff8b34a3fe08013c2f14 480 | React-cxxreact: 0090588ae6660c4615d3629fdd5c768d0983add4 481 | React-jsi: 5de8204706bd872b78ea646aee5d2561ca1214b6 482 | React-jsiexecutor: 124e8f99992490d0d13e0649d950d3e1aae06fe9 483 | React-jsinspector: 500a59626037be5b3b3d89c5151bc3baa9abf1a9 484 | React-perflogger: aad6d4b4a267936b3667260d1f649b6f6069a675 485 | React-RCTActionSheet: fc376be462c9c8d6ad82c0905442fd77f82a9d2a 486 | React-RCTAnimation: ba0a1c3a2738be224a08092fa7f1b444ab77d309 487 | React-RCTBlob: f758d4403fc5828a326dc69e27b41e1a92f34947 488 | React-RCTImage: ce57088705f4a8d03f6594b066a59c29143ba73e 489 | React-RCTLinking: 852a3a95c65fa63f657a4b4e2d3d83a815e00a7c 490 | React-RCTNetwork: 9d7ccb8a08d522d71700b4fb677d9fa28cccd118 491 | React-RCTSettings: d8aaf4389ff06114dee8c42ef5f0f2915946011e 492 | React-RCTText: 809c12ed6b261796ba056c04fcd20d8b90bcc81d 493 | React-RCTVibration: 4b99a7f5c6c0abbc5256410cc5425fb8531986e1 494 | React-runtimeexecutor: ff951a0c241bfaefc4940a3f1f1a229e7cb32fa6 495 | ReactCommon: bedc99ed4dae329c4fcf128d0c31b9115e5365ca 496 | RNDateTimePicker: 7658208086d86d09e1627b5c34ba0cf237c60140 497 | RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4 498 | Yoga: a7de31c64fe738607e7a3803e3f591a4b1df7393 499 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a 500 | 501 | PODFILE CHECKSUM: febc7ce3a967c3e83de5f230433cdee21bb62bbe 502 | 503 | COCOAPODS: 1.10.1 504 | -------------------------------------------------------------------------------- /example/ios/example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00E356F31AD99517003FC87E /* ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* ExampleTests.m */; }; 11 | 0472AF1A71C986433525CAEF /* libPods-Example-ExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 13622603A98DCF024DEECAB1 /* libPods-Example-ExampleTests.a */; }; 12 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 13 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 14 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 15 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; 16 | F141E3F59E957CCDCA5655A5 /* libPods-Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 47F74E5EDCC9881F00017917 /* libPods-Example.a */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A; 25 | remoteInfo = Example; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 00E356EE1AD99517003FC87E /* ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 31 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 00E356F21AD99517003FC87E /* ExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleTests.m; sourceTree = ""; }; 33 | 0F020E7B474CC69C6177656E /* 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 = ""; }; 34 | 13622603A98DCF024DEECAB1 /* libPods-Example-ExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example-ExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | 13B07F961A680F5B00A75B9A /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Example/AppDelegate.h; sourceTree = ""; }; 37 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Example/AppDelegate.m; sourceTree = ""; }; 38 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Example/Images.xcassets; sourceTree = ""; }; 39 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Example/Info.plist; sourceTree = ""; }; 40 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Example/main.m; sourceTree = ""; }; 41 | 47F74E5EDCC9881F00017917 /* libPods-Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Example.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 5FADAC70F51AA70DE6ECBC75 /* Pods-Example-ExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-ExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests.debug.xcconfig"; sourceTree = ""; }; 43 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = Example/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 8CB40D6737164DF88CFE09B6 /* 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 = ""; }; 45 | CEEA0D0663E02D84F89ADBE9 /* Pods-Example-ExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example-ExampleTests.release.xcconfig"; path = "Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests.release.xcconfig"; sourceTree = ""; }; 46 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 47 | /* End PBXFileReference section */ 48 | 49 | /* Begin PBXFrameworksBuildPhase section */ 50 | 00E356EB1AD99517003FC87E /* Frameworks */ = { 51 | isa = PBXFrameworksBuildPhase; 52 | buildActionMask = 2147483647; 53 | files = ( 54 | 0472AF1A71C986433525CAEF /* libPods-Example-ExampleTests.a in Frameworks */, 55 | ); 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 59 | isa = PBXFrameworksBuildPhase; 60 | buildActionMask = 2147483647; 61 | files = ( 62 | F141E3F59E957CCDCA5655A5 /* libPods-Example.a in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 00E356EF1AD99517003FC87E /* ExampleTests */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 00E356F21AD99517003FC87E /* ExampleTests.m */, 73 | 00E356F01AD99517003FC87E /* Supporting Files */, 74 | ); 75 | path = ExampleTests; 76 | sourceTree = ""; 77 | }; 78 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 00E356F11AD99517003FC87E /* Info.plist */, 82 | ); 83 | name = "Supporting Files"; 84 | sourceTree = ""; 85 | }; 86 | 13B07FAE1A68108700A75B9A /* Example */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 90 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 91 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 92 | 13B07FB61A68108700A75B9A /* Info.plist */, 93 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, 94 | 13B07FB71A68108700A75B9A /* main.m */, 95 | ); 96 | name = Example; 97 | sourceTree = ""; 98 | }; 99 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 103 | 47F74E5EDCC9881F00017917 /* libPods-Example.a */, 104 | 13622603A98DCF024DEECAB1 /* libPods-Example-ExampleTests.a */, 105 | ); 106 | name = Frameworks; 107 | sourceTree = ""; 108 | }; 109 | 7081D4DF4AF3CC5C0598D467 /* Pods */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 0F020E7B474CC69C6177656E /* Pods-Example.debug.xcconfig */, 113 | 8CB40D6737164DF88CFE09B6 /* Pods-Example.release.xcconfig */, 114 | 5FADAC70F51AA70DE6ECBC75 /* Pods-Example-ExampleTests.debug.xcconfig */, 115 | CEEA0D0663E02D84F89ADBE9 /* Pods-Example-ExampleTests.release.xcconfig */, 116 | ); 117 | path = Pods; 118 | sourceTree = ""; 119 | }; 120 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | ); 124 | name = Libraries; 125 | sourceTree = ""; 126 | }; 127 | 83CBB9F61A601CBA00E9B192 = { 128 | isa = PBXGroup; 129 | children = ( 130 | 13B07FAE1A68108700A75B9A /* Example */, 131 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 132 | 00E356EF1AD99517003FC87E /* ExampleTests */, 133 | 83CBBA001A601CBA00E9B192 /* Products */, 134 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 135 | 7081D4DF4AF3CC5C0598D467 /* Pods */, 136 | ); 137 | indentWidth = 2; 138 | sourceTree = ""; 139 | tabWidth = 2; 140 | usesTabs = 0; 141 | }; 142 | 83CBBA001A601CBA00E9B192 /* Products */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 13B07F961A680F5B00A75B9A /* Example.app */, 146 | 00E356EE1AD99517003FC87E /* ExampleTests.xctest */, 147 | ); 148 | name = Products; 149 | sourceTree = ""; 150 | }; 151 | /* End PBXGroup section */ 152 | 153 | /* Begin PBXNativeTarget section */ 154 | 00E356ED1AD99517003FC87E /* ExampleTests */ = { 155 | isa = PBXNativeTarget; 156 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ExampleTests" */; 157 | buildPhases = ( 158 | 3B42C44826C3FAAE42E8D5F8 /* [CP] Check Pods Manifest.lock */, 159 | 00E356EA1AD99517003FC87E /* Sources */, 160 | 00E356EB1AD99517003FC87E /* Frameworks */, 161 | 00E356EC1AD99517003FC87E /* Resources */, 162 | 8FA7492F9F83C2710153215C /* [CP] Embed Pods Frameworks */, 163 | A07D84215E3C880290FC0D73 /* [CP] Copy Pods Resources */, 164 | ); 165 | buildRules = ( 166 | ); 167 | dependencies = ( 168 | 00E356F51AD99517003FC87E /* PBXTargetDependency */, 169 | ); 170 | name = ExampleTests; 171 | productName = ExampleTests; 172 | productReference = 00E356EE1AD99517003FC87E /* ExampleTests.xctest */; 173 | productType = "com.apple.product-type.bundle.unit-test"; 174 | }; 175 | 13B07F861A680F5B00A75B9A /* Example */ = { 176 | isa = PBXNativeTarget; 177 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Example" */; 178 | buildPhases = ( 179 | F5946F79366245E368D178D3 /* [CP] Check Pods Manifest.lock */, 180 | FD10A7F022414F080027D42C /* Start Packager */, 181 | 13B07F871A680F5B00A75B9A /* Sources */, 182 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 183 | 13B07F8E1A680F5B00A75B9A /* Resources */, 184 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 185 | 9D17BD3539C905B898D8F22C /* [CP] Embed Pods Frameworks */, 186 | A93161D696E4A8ACD3CF864F /* [CP] Copy Pods Resources */, 187 | ); 188 | buildRules = ( 189 | ); 190 | dependencies = ( 191 | ); 192 | name = Example; 193 | productName = Example; 194 | productReference = 13B07F961A680F5B00A75B9A /* Example.app */; 195 | productType = "com.apple.product-type.application"; 196 | }; 197 | /* End PBXNativeTarget section */ 198 | 199 | /* Begin PBXProject section */ 200 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 201 | isa = PBXProject; 202 | attributes = { 203 | LastUpgradeCheck = 1210; 204 | TargetAttributes = { 205 | 00E356ED1AD99517003FC87E = { 206 | CreatedOnToolsVersion = 6.2; 207 | TestTargetID = 13B07F861A680F5B00A75B9A; 208 | }; 209 | 13B07F861A680F5B00A75B9A = { 210 | LastSwiftMigration = 1120; 211 | }; 212 | }; 213 | }; 214 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Example" */; 215 | compatibilityVersion = "Xcode 12.0"; 216 | developmentRegion = en; 217 | hasScannedForEncodings = 0; 218 | knownRegions = ( 219 | en, 220 | Base, 221 | ); 222 | mainGroup = 83CBB9F61A601CBA00E9B192; 223 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 224 | projectDirPath = ""; 225 | projectRoot = ""; 226 | targets = ( 227 | 13B07F861A680F5B00A75B9A /* Example */, 228 | 00E356ED1AD99517003FC87E /* ExampleTests */, 229 | ); 230 | }; 231 | /* End PBXProject section */ 232 | 233 | /* Begin PBXResourcesBuildPhase section */ 234 | 00E356EC1AD99517003FC87E /* Resources */ = { 235 | isa = PBXResourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | }; 241 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 242 | isa = PBXResourcesBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 246 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 247 | ); 248 | runOnlyForDeploymentPostprocessing = 0; 249 | }; 250 | /* End PBXResourcesBuildPhase section */ 251 | 252 | /* Begin PBXShellScriptBuildPhase section */ 253 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 254 | isa = PBXShellScriptBuildPhase; 255 | buildActionMask = 2147483647; 256 | files = ( 257 | ); 258 | inputPaths = ( 259 | ); 260 | name = "Bundle React Native code and images"; 261 | outputPaths = ( 262 | ); 263 | runOnlyForDeploymentPostprocessing = 0; 264 | shellPath = /bin/sh; 265 | shellScript = "set -e\n\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; 266 | }; 267 | 3B42C44826C3FAAE42E8D5F8 /* [CP] Check Pods Manifest.lock */ = { 268 | isa = PBXShellScriptBuildPhase; 269 | buildActionMask = 2147483647; 270 | files = ( 271 | ); 272 | inputFileListPaths = ( 273 | ); 274 | inputPaths = ( 275 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 276 | "${PODS_ROOT}/Manifest.lock", 277 | ); 278 | name = "[CP] Check Pods Manifest.lock"; 279 | outputFileListPaths = ( 280 | ); 281 | outputPaths = ( 282 | "$(DERIVED_FILE_DIR)/Pods-Example-ExampleTests-checkManifestLockResult.txt", 283 | ); 284 | runOnlyForDeploymentPostprocessing = 0; 285 | shellPath = /bin/sh; 286 | 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"; 287 | showEnvVarsInLog = 0; 288 | }; 289 | 8FA7492F9F83C2710153215C /* [CP] Embed Pods Frameworks */ = { 290 | isa = PBXShellScriptBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | ); 294 | inputFileListPaths = ( 295 | "${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", 296 | ); 297 | name = "[CP] Embed Pods Frameworks"; 298 | outputFileListPaths = ( 299 | "${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | shellPath = /bin/sh; 303 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-frameworks.sh\"\n"; 304 | showEnvVarsInLog = 0; 305 | }; 306 | 9D17BD3539C905B898D8F22C /* [CP] Embed Pods Frameworks */ = { 307 | isa = PBXShellScriptBuildPhase; 308 | buildActionMask = 2147483647; 309 | files = ( 310 | ); 311 | inputFileListPaths = ( 312 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks-${CONFIGURATION}-input-files.xcfilelist", 313 | ); 314 | name = "[CP] Embed Pods Frameworks"; 315 | outputFileListPaths = ( 316 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks-${CONFIGURATION}-output-files.xcfilelist", 317 | ); 318 | runOnlyForDeploymentPostprocessing = 0; 319 | shellPath = /bin/sh; 320 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-frameworks.sh\"\n"; 321 | showEnvVarsInLog = 0; 322 | }; 323 | A07D84215E3C880290FC0D73 /* [CP] Copy Pods Resources */ = { 324 | isa = PBXShellScriptBuildPhase; 325 | buildActionMask = 2147483647; 326 | files = ( 327 | ); 328 | inputFileListPaths = ( 329 | "${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-resources-${CONFIGURATION}-input-files.xcfilelist", 330 | ); 331 | name = "[CP] Copy Pods Resources"; 332 | outputFileListPaths = ( 333 | "${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-resources-${CONFIGURATION}-output-files.xcfilelist", 334 | ); 335 | runOnlyForDeploymentPostprocessing = 0; 336 | shellPath = /bin/sh; 337 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example-ExampleTests/Pods-Example-ExampleTests-resources.sh\"\n"; 338 | showEnvVarsInLog = 0; 339 | }; 340 | A93161D696E4A8ACD3CF864F /* [CP] Copy Pods Resources */ = { 341 | isa = PBXShellScriptBuildPhase; 342 | buildActionMask = 2147483647; 343 | files = ( 344 | ); 345 | inputFileListPaths = ( 346 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-resources-${CONFIGURATION}-input-files.xcfilelist", 347 | ); 348 | name = "[CP] Copy Pods Resources"; 349 | outputFileListPaths = ( 350 | "${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-resources-${CONFIGURATION}-output-files.xcfilelist", 351 | ); 352 | runOnlyForDeploymentPostprocessing = 0; 353 | shellPath = /bin/sh; 354 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Example/Pods-Example-resources.sh\"\n"; 355 | showEnvVarsInLog = 0; 356 | }; 357 | F5946F79366245E368D178D3 /* [CP] Check Pods Manifest.lock */ = { 358 | isa = PBXShellScriptBuildPhase; 359 | buildActionMask = 2147483647; 360 | files = ( 361 | ); 362 | inputFileListPaths = ( 363 | ); 364 | inputPaths = ( 365 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 366 | "${PODS_ROOT}/Manifest.lock", 367 | ); 368 | name = "[CP] Check Pods Manifest.lock"; 369 | outputFileListPaths = ( 370 | ); 371 | outputPaths = ( 372 | "$(DERIVED_FILE_DIR)/Pods-Example-checkManifestLockResult.txt", 373 | ); 374 | runOnlyForDeploymentPostprocessing = 0; 375 | shellPath = /bin/sh; 376 | 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"; 377 | showEnvVarsInLog = 0; 378 | }; 379 | FD10A7F022414F080027D42C /* Start Packager */ = { 380 | isa = PBXShellScriptBuildPhase; 381 | buildActionMask = 2147483647; 382 | files = ( 383 | ); 384 | inputFileListPaths = ( 385 | ); 386 | inputPaths = ( 387 | ); 388 | name = "Start Packager"; 389 | outputFileListPaths = ( 390 | ); 391 | outputPaths = ( 392 | ); 393 | runOnlyForDeploymentPostprocessing = 0; 394 | shellPath = /bin/sh; 395 | 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"; 396 | showEnvVarsInLog = 0; 397 | }; 398 | /* End PBXShellScriptBuildPhase section */ 399 | 400 | /* Begin PBXSourcesBuildPhase section */ 401 | 00E356EA1AD99517003FC87E /* Sources */ = { 402 | isa = PBXSourcesBuildPhase; 403 | buildActionMask = 2147483647; 404 | files = ( 405 | 00E356F31AD99517003FC87E /* ExampleTests.m in Sources */, 406 | ); 407 | runOnlyForDeploymentPostprocessing = 0; 408 | }; 409 | 13B07F871A680F5B00A75B9A /* Sources */ = { 410 | isa = PBXSourcesBuildPhase; 411 | buildActionMask = 2147483647; 412 | files = ( 413 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 414 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 415 | ); 416 | runOnlyForDeploymentPostprocessing = 0; 417 | }; 418 | /* End PBXSourcesBuildPhase section */ 419 | 420 | /* Begin PBXTargetDependency section */ 421 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { 422 | isa = PBXTargetDependency; 423 | target = 13B07F861A680F5B00A75B9A /* Example */; 424 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; 425 | }; 426 | /* End PBXTargetDependency section */ 427 | 428 | /* Begin XCBuildConfiguration section */ 429 | 00E356F61AD99517003FC87E /* Debug */ = { 430 | isa = XCBuildConfiguration; 431 | baseConfigurationReference = 5FADAC70F51AA70DE6ECBC75 /* Pods-Example-ExampleTests.debug.xcconfig */; 432 | buildSettings = { 433 | BUNDLE_LOADER = "$(TEST_HOST)"; 434 | GCC_PREPROCESSOR_DEFINITIONS = ( 435 | "DEBUG=1", 436 | "$(inherited)", 437 | ); 438 | INFOPLIST_FILE = ExampleTests/Info.plist; 439 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 440 | LD_RUNPATH_SEARCH_PATHS = ( 441 | "$(inherited)", 442 | "@executable_path/Frameworks", 443 | "@loader_path/Frameworks", 444 | ); 445 | OTHER_LDFLAGS = ( 446 | "-ObjC", 447 | "-lc++", 448 | "$(inherited)", 449 | ); 450 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 451 | PRODUCT_NAME = "$(TARGET_NAME)"; 452 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; 453 | }; 454 | name = Debug; 455 | }; 456 | 00E356F71AD99517003FC87E /* Release */ = { 457 | isa = XCBuildConfiguration; 458 | baseConfigurationReference = CEEA0D0663E02D84F89ADBE9 /* Pods-Example-ExampleTests.release.xcconfig */; 459 | buildSettings = { 460 | BUNDLE_LOADER = "$(TEST_HOST)"; 461 | COPY_PHASE_STRIP = NO; 462 | INFOPLIST_FILE = ExampleTests/Info.plist; 463 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 464 | LD_RUNPATH_SEARCH_PATHS = ( 465 | "$(inherited)", 466 | "@executable_path/Frameworks", 467 | "@loader_path/Frameworks", 468 | ); 469 | OTHER_LDFLAGS = ( 470 | "-ObjC", 471 | "-lc++", 472 | "$(inherited)", 473 | ); 474 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; 475 | PRODUCT_NAME = "$(TARGET_NAME)"; 476 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; 477 | }; 478 | name = Release; 479 | }; 480 | 13B07F941A680F5B00A75B9A /* Debug */ = { 481 | isa = XCBuildConfiguration; 482 | baseConfigurationReference = 0F020E7B474CC69C6177656E /* Pods-Example.debug.xcconfig */; 483 | buildSettings = { 484 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 485 | CLANG_ENABLE_MODULES = YES; 486 | CURRENT_PROJECT_VERSION = 1; 487 | ENABLE_BITCODE = NO; 488 | INFOPLIST_FILE = Example/Info.plist; 489 | LD_RUNPATH_SEARCH_PATHS = ( 490 | "$(inherited)", 491 | "@executable_path/Frameworks", 492 | ); 493 | OTHER_LDFLAGS = ( 494 | "$(inherited)", 495 | "-ObjC", 496 | "-lc++", 497 | ); 498 | PRODUCT_BUNDLE_IDENTIFIER = com.example; 499 | PRODUCT_NAME = Example; 500 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 501 | SWIFT_VERSION = 5.0; 502 | VERSIONING_SYSTEM = "apple-generic"; 503 | }; 504 | name = Debug; 505 | }; 506 | 13B07F951A680F5B00A75B9A /* Release */ = { 507 | isa = XCBuildConfiguration; 508 | baseConfigurationReference = 8CB40D6737164DF88CFE09B6 /* Pods-Example.release.xcconfig */; 509 | buildSettings = { 510 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 511 | CLANG_ENABLE_MODULES = YES; 512 | CURRENT_PROJECT_VERSION = 1; 513 | INFOPLIST_FILE = Example/Info.plist; 514 | LD_RUNPATH_SEARCH_PATHS = ( 515 | "$(inherited)", 516 | "@executable_path/Frameworks", 517 | ); 518 | OTHER_LDFLAGS = ( 519 | "$(inherited)", 520 | "-ObjC", 521 | "-lc++", 522 | ); 523 | PRODUCT_BUNDLE_IDENTIFIER = com.example; 524 | PRODUCT_NAME = Example; 525 | SWIFT_VERSION = 5.0; 526 | VERSIONING_SYSTEM = "apple-generic"; 527 | }; 528 | name = Release; 529 | }; 530 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 531 | isa = XCBuildConfiguration; 532 | buildSettings = { 533 | ALWAYS_SEARCH_USER_PATHS = NO; 534 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 535 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 536 | CLANG_CXX_LIBRARY = "libc++"; 537 | CLANG_ENABLE_MODULES = YES; 538 | CLANG_ENABLE_OBJC_ARC = YES; 539 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 540 | CLANG_WARN_BOOL_CONVERSION = YES; 541 | CLANG_WARN_COMMA = YES; 542 | CLANG_WARN_CONSTANT_CONVERSION = YES; 543 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 544 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 545 | CLANG_WARN_EMPTY_BODY = YES; 546 | CLANG_WARN_ENUM_CONVERSION = YES; 547 | CLANG_WARN_INFINITE_RECURSION = YES; 548 | CLANG_WARN_INT_CONVERSION = YES; 549 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 550 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 551 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 552 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 553 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 554 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 555 | CLANG_WARN_STRICT_PROTOTYPES = YES; 556 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 557 | CLANG_WARN_UNREACHABLE_CODE = YES; 558 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 559 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 560 | COPY_PHASE_STRIP = NO; 561 | ENABLE_STRICT_OBJC_MSGSEND = YES; 562 | ENABLE_TESTABILITY = YES; 563 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 "; 564 | GCC_C_LANGUAGE_STANDARD = gnu99; 565 | GCC_DYNAMIC_NO_PIC = NO; 566 | GCC_NO_COMMON_BLOCKS = YES; 567 | GCC_OPTIMIZATION_LEVEL = 0; 568 | GCC_PREPROCESSOR_DEFINITIONS = ( 569 | "DEBUG=1", 570 | "$(inherited)", 571 | ); 572 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 573 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 574 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 575 | GCC_WARN_UNDECLARED_SELECTOR = YES; 576 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 577 | GCC_WARN_UNUSED_FUNCTION = YES; 578 | GCC_WARN_UNUSED_VARIABLE = YES; 579 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 580 | LD_RUNPATH_SEARCH_PATHS = ( 581 | /usr/lib/swift, 582 | "$(inherited)", 583 | ); 584 | LIBRARY_SEARCH_PATHS = ( 585 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 586 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", 587 | "\"$(inherited)\"", 588 | ); 589 | MTL_ENABLE_DEBUG_INFO = YES; 590 | ONLY_ACTIVE_ARCH = YES; 591 | SDKROOT = iphoneos; 592 | }; 593 | name = Debug; 594 | }; 595 | 83CBBA211A601CBA00E9B192 /* Release */ = { 596 | isa = XCBuildConfiguration; 597 | buildSettings = { 598 | ALWAYS_SEARCH_USER_PATHS = NO; 599 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 600 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 601 | CLANG_CXX_LIBRARY = "libc++"; 602 | CLANG_ENABLE_MODULES = YES; 603 | CLANG_ENABLE_OBJC_ARC = YES; 604 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 605 | CLANG_WARN_BOOL_CONVERSION = YES; 606 | CLANG_WARN_COMMA = YES; 607 | CLANG_WARN_CONSTANT_CONVERSION = YES; 608 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 609 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 610 | CLANG_WARN_EMPTY_BODY = YES; 611 | CLANG_WARN_ENUM_CONVERSION = YES; 612 | CLANG_WARN_INFINITE_RECURSION = YES; 613 | CLANG_WARN_INT_CONVERSION = YES; 614 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 615 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 616 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 617 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 618 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 619 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 620 | CLANG_WARN_STRICT_PROTOTYPES = YES; 621 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 622 | CLANG_WARN_UNREACHABLE_CODE = YES; 623 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 624 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 625 | COPY_PHASE_STRIP = YES; 626 | ENABLE_NS_ASSERTIONS = NO; 627 | ENABLE_STRICT_OBJC_MSGSEND = YES; 628 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 "; 629 | GCC_C_LANGUAGE_STANDARD = gnu99; 630 | GCC_NO_COMMON_BLOCKS = YES; 631 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 632 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 633 | GCC_WARN_UNDECLARED_SELECTOR = YES; 634 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 635 | GCC_WARN_UNUSED_FUNCTION = YES; 636 | GCC_WARN_UNUSED_VARIABLE = YES; 637 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 638 | LD_RUNPATH_SEARCH_PATHS = ( 639 | /usr/lib/swift, 640 | "$(inherited)", 641 | ); 642 | LIBRARY_SEARCH_PATHS = ( 643 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 644 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", 645 | "\"$(inherited)\"", 646 | ); 647 | MTL_ENABLE_DEBUG_INFO = NO; 648 | SDKROOT = iphoneos; 649 | VALIDATE_PRODUCT = YES; 650 | }; 651 | name = Release; 652 | }; 653 | /* End XCBuildConfiguration section */ 654 | 655 | /* Begin XCConfigurationList section */ 656 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "ExampleTests" */ = { 657 | isa = XCConfigurationList; 658 | buildConfigurations = ( 659 | 00E356F61AD99517003FC87E /* Debug */, 660 | 00E356F71AD99517003FC87E /* Release */, 661 | ); 662 | defaultConfigurationIsVisible = 0; 663 | defaultConfigurationName = Release; 664 | }; 665 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Example" */ = { 666 | isa = XCConfigurationList; 667 | buildConfigurations = ( 668 | 13B07F941A680F5B00A75B9A /* Debug */, 669 | 13B07F951A680F5B00A75B9A /* Release */, 670 | ); 671 | defaultConfigurationIsVisible = 0; 672 | defaultConfigurationName = Release; 673 | }; 674 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Example" */ = { 675 | isa = XCConfigurationList; 676 | buildConfigurations = ( 677 | 83CBBA201A601CBA00E9B192 /* Debug */, 678 | 83CBBA211A601CBA00E9B192 /* Release */, 679 | ); 680 | defaultConfigurationIsVisible = 0; 681 | defaultConfigurationName = Release; 682 | }; 683 | /* End XCConfigurationList section */ 684 | }; 685 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 686 | } 687 | -------------------------------------------------------------------------------- /example/ios/example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/example.xcworkspace/xcshareddata/xcschemes/Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /example/ios/example/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /example/ios/example/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | 3 | #import 4 | #import 5 | #import 6 | 7 | #ifdef FB_SONARKIT_ENABLED 8 | #import 9 | #import 10 | #import 11 | #import 12 | #import 13 | #import 14 | 15 | static void InitializeFlipper(UIApplication *application) { 16 | FlipperClient *client = [FlipperClient sharedClient]; 17 | SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; 18 | [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; 19 | [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; 20 | [client addPlugin:[FlipperKitReactPlugin new]]; 21 | [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; 22 | [client start]; 23 | } 24 | #endif 25 | 26 | @implementation AppDelegate 27 | 28 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 29 | { 30 | #ifdef FB_SONARKIT_ENABLED 31 | InitializeFlipper(application); 32 | #endif 33 | 34 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; 35 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge 36 | moduleName:@"Example" 37 | initialProperties:nil]; 38 | 39 | if (@available(iOS 13.0, *)) { 40 | rootView.backgroundColor = [UIColor systemBackgroundColor]; 41 | } else { 42 | rootView.backgroundColor = [UIColor whiteColor]; 43 | } 44 | 45 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 46 | UIViewController *rootViewController = [UIViewController new]; 47 | rootViewController.view = rootView; 48 | self.window.rootViewController = rootViewController; 49 | [self.window makeKeyAndVisible]; 50 | return YES; 51 | } 52 | 53 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 54 | { 55 | #if DEBUG 56 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 57 | #else 58 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 59 | #endif 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /example/ios/example/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Example 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSExceptionDomains 30 | 31 | localhost 32 | 33 | NSExceptionAllowsInsecureHTTPLoads 34 | 35 | 36 | 37 | 38 | NSLocationWhenInUseUsageDescription 39 | 40 | UIAppFonts 41 | 42 | MaterialCommunityIcons.ttf 43 | 44 | UILaunchStoryboardName 45 | LaunchScreen 46 | UIRequiredDeviceCapabilities 47 | 48 | armv7 49 | 50 | UISupportedInterfaceOrientations 51 | 52 | UIInterfaceOrientationPortrait 53 | UIInterfaceOrientationLandscapeLeft 54 | UIInterfaceOrientationLandscapeRight 55 | 56 | UIViewControllerBasedStatusBarAppearance 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /example/ios/example/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /example/ios/exampleTests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /example/ios/exampleTests/exampleTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import 5 | #import 6 | 7 | #define TIMEOUT_SECONDS 600 8 | #define TEXT_TO_LOOK_FOR @"Welcome to React" 9 | 10 | @interface ExampleTests : XCTestCase 11 | 12 | @end 13 | 14 | @implementation ExampleTests 15 | 16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 17 | { 18 | if (test(view)) { 19 | return YES; 20 | } 21 | for (UIView *subview in [view subviews]) { 22 | if ([self findSubviewInView:subview matching:test]) { 23 | return YES; 24 | } 25 | } 26 | return NO; 27 | } 28 | 29 | - (void)testRendersWelcomeScreen 30 | { 31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; 32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 33 | BOOL foundElement = NO; 34 | 35 | __block NSString *redboxError = nil; 36 | #ifdef DEBUG 37 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 38 | if (level >= RCTLogLevelError) { 39 | redboxError = message; 40 | } 41 | }); 42 | #endif 43 | 44 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 45 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 46 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 47 | 48 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 49 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 50 | return YES; 51 | } 52 | return NO; 53 | }]; 54 | } 55 | 56 | #ifdef DEBUG 57 | RCTSetLogFunction(RCTDefaultLogFunction); 58 | #endif 59 | 60 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 61 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 62 | } 63 | 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /example/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | const path = require('path'); 9 | const exclusionList = require('metro-config/src/defaults/exclusionList'); 10 | 11 | const moduleRoot = path.resolve(__dirname, '..'); 12 | 13 | module.exports = { 14 | watchFolders: [moduleRoot], 15 | resolver: { 16 | extraNodeModules: { 17 | react: path.resolve(__dirname, 'node_modules/react'), 18 | 'react-native': path.resolve(__dirname, 'node_modules/react-native'), 19 | 'react-native-paper': path.resolve( 20 | __dirname, 21 | 'node_modules/react-native-paper', 22 | ), 23 | 'react-hook-form': path.resolve( 24 | __dirname, 25 | 'node_modules/react-hook-form', 26 | ), 27 | }, 28 | blockList: exclusionList([ 29 | new RegExp(`${moduleRoot}/node_modules/react/.*`), 30 | new RegExp(`${moduleRoot}/node_modules/react-native/.*`), 31 | new RegExp(`${moduleRoot}/node_modules/react-native-paper/.*`), 32 | new RegExp(`${moduleRoot}/node_modules/react-hook-form/.*`), 33 | ]), 34 | }, 35 | transformer: { 36 | getTransformOptions: async () => ({ 37 | transform: { 38 | experimentalImportSupport: false, 39 | inlineRequires: true, 40 | }, 41 | }), 42 | }, 43 | }; 44 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "android": "react-native run-android", 7 | "ios": "react-native run-ios", 8 | "start": "react-native start", 9 | "test": "jest", 10 | "lint": "eslint . --ext .js,.jsx,.ts,.tsx" 11 | }, 12 | "dependencies": { 13 | "@react-native-community/datetimepicker": "^3.5.2", 14 | "@types/react-native-vector-icons": "^6.4.6", 15 | "react": "17.0.1", 16 | "react-hook-form": "^7.8.2", 17 | "react-native": "0.64.1", 18 | "react-native-keyboard-aware-scroll-view": "^0.9.4", 19 | "react-native-keyboard-spacer": "^0.4.1", 20 | "react-native-modal-datetime-picker": "^10.0.0", 21 | "react-native-paper": "^4.9.1", 22 | "react-native-vector-icons": "^8.1.0" 23 | }, 24 | "devDependencies": { 25 | "@babel/core": "^7.12.9", 26 | "@babel/runtime": "^7.12.5", 27 | "@react-native-community/eslint-config": "^2.0.0", 28 | "@types/jest": "^26.0.23", 29 | "@types/react-native": "^0.64.5", 30 | "@types/react-test-renderer": "^16.9.2", 31 | "babel-jest": "^26.6.3", 32 | "eslint": "^7.14.0", 33 | "jest": "^26.6.3", 34 | "metro-react-native-babel-preset": "^0.64.0", 35 | "react-test-renderer": "17.0.1", 36 | "typescript": "^3.8.3" 37 | }, 38 | "resolutions": { 39 | "@types/react": "^17" 40 | }, 41 | "jest": { 42 | "preset": "react-native", 43 | "moduleFileExtensions": [ 44 | "ts", 45 | "tsx", 46 | "js", 47 | "jsx", 48 | "json", 49 | "node" 50 | ] 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /example/tsconfig.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "compilerOptions": { 4 | /* Basic Options */ 5 | "target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ 6 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ 7 | "lib": ["es2017"], /* Specify library files to be included in the compilation. */ 8 | "allowJs": true, /* Allow javascript files to be compiled. */ 9 | // "checkJs": true, /* Report errors in .js files. */ 10 | "jsx": "react-native", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ 11 | // "declaration": true, /* Generates corresponding '.d.ts' file. */ 12 | // "sourceMap": true, /* Generates corresponding '.map' file. */ 13 | // "outFile": "./", /* Concatenate and emit output to single file. */ 14 | // "outDir": "./", /* Redirect output structure to the directory. */ 15 | // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 16 | // "removeComments": true, /* Do not emit comments to output. */ 17 | "noEmit": true, /* Do not emit outputs. */ 18 | // "incremental": true, /* Enable incremental compilation */ 19 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */ 20 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 21 | "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ 22 | 23 | /* Strict Type-Checking Options */ 24 | "strict": true, /* Enable all strict type-checking options. */ 25 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ 26 | // "strictNullChecks": true, /* Enable strict null checks. */ 27 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ 28 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ 29 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ 30 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ 31 | 32 | /* Additional Checks */ 33 | // "noUnusedLocals": true, /* Report errors on unused locals. */ 34 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 35 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 36 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 37 | 38 | /* Module Resolution Options */ 39 | "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ 40 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ 41 | "paths": { 42 | "react-native-paper-form-builder": ["../src"], 43 | "react-native-paper-form-builder/dist/Types/Types": ["../src/Types/Types.ts"] 44 | }, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 45 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 46 | // "typeRoots": [], /* List of folders to include type definitions from. */ 47 | // "types": [], /* Type declaration files to be included in compilation. */ 48 | "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 49 | "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 50 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 51 | "skipLibCheck": false /* Skip type checking of declaration files. */ 52 | 53 | /* Source Map Options */ 54 | // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 55 | // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ 56 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 57 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 58 | 59 | /* Experimental Options */ 60 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 61 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 62 | }, 63 | "exclude": [ 64 | "node_modules", "babel.config.js", "metro.config.js", "jest.config.js" 65 | ] 66 | } 67 | -------------------------------------------------------------------------------- /iOS.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/iOS.gif -------------------------------------------------------------------------------- /newAndroid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/newAndroid.png -------------------------------------------------------------------------------- /newIOS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fateh999/react-native-paper-form-builder/d0487b3bc5ff9f36370b2f985587633b6222acee/newIOS.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-paper-form-builder", 3 | "version": "2.1.3", 4 | "description": "Form builder component using React Native Paper and React Hook Form", 5 | "files": [ 6 | "dist" 7 | ], 8 | "main": "dist/index.js", 9 | "types": "dist/index.d.ts", 10 | "scripts": { 11 | "build": "tsc" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/fateh999/react-native-paper-form-builder.git" 16 | }, 17 | "keywords": [ 18 | "FormBuilder", 19 | "Material", 20 | "Forms", 21 | "React", 22 | "Native", 23 | "Paper" 24 | ], 25 | "author": "Fateh Farooqui", 26 | "license": "MIT", 27 | "bugs": { 28 | "url": "https://github.com/fateh999/react-native-paper-form-builder/issues" 29 | }, 30 | "homepage": "https://github.com/fateh999/react-native-paper-form-builder#readme", 31 | "publishConfig": { 32 | "registry": "https://registry.npmjs.org/" 33 | }, 34 | "peerDependencies": { 35 | "react": "*", 36 | "react-native": "*", 37 | "react-native-paper": "*", 38 | "@types/react": "*", 39 | "@types/react-native": "*", 40 | "typescript": "*", 41 | "react-hook-form": "*" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Components/AutoComplete.tsx: -------------------------------------------------------------------------------- 1 | import React, {useMemo, useState} from 'react'; 2 | import {FlatList, Modal, SafeAreaView, StyleSheet, View} from 'react-native'; 3 | import { 4 | Appbar, 5 | Divider, 6 | List, 7 | Searchbar, 8 | Surface, 9 | useTheme, 10 | } from 'react-native-paper'; 11 | import {AutoCompleteProps} from '../Types/Types'; 12 | 13 | function AutoComplete(props: AutoCompleteProps) { 14 | const {visible, setVisible, textInputProps, options, field} = props; 15 | const theme = useTheme(); 16 | const styles = useMemo( 17 | () => 18 | StyleSheet.create({ 19 | containerStyle: { 20 | flex: 1, 21 | }, 22 | searchStyle: { 23 | padding: 20, 24 | }, 25 | }), 26 | [], 27 | ); 28 | const [selectedValue, setSelectedValue] = useState(field.value); 29 | const [search, setSearch] = useState(''); 30 | 31 | return ( 32 | setVisible(false)}> 33 | 34 | 35 | setVisible(false)} /> 39 | 40 | { 45 | field.onChange(selectedValue); 46 | setVisible(false); 47 | }} 48 | /> 49 | 50 | 51 | 52 | 58 | 59 | 62 | option.label.toLowerCase().indexOf(search.toLowerCase()) !== -1, 63 | )} 64 | renderItem={({item}) => ( 65 | { 68 | setSelectedValue(`${item.value}`); 69 | }} 70 | titleStyle={{ 71 | color: 72 | `${item.value}` === selectedValue 73 | ? theme.colors.primary 74 | : theme.colors.text, 75 | }} 76 | /> 77 | )} 78 | ItemSeparatorComponent={() => } 79 | keyExtractor={(item) => `${item.value}`} 80 | /> 81 | 82 | 83 | 84 | ); 85 | } 86 | 87 | export default AutoComplete; 88 | -------------------------------------------------------------------------------- /src/FormBuilder.tsx: -------------------------------------------------------------------------------- 1 | import React, {Fragment, useMemo} from 'react'; 2 | import {StyleSheet, View} from 'react-native'; 3 | import {useTheme} from 'react-native-paper'; 4 | import {Theme} from 'react-native-paper/lib/typescript/types'; 5 | import Logic from './Logic/Logic'; 6 | import {FormBuilderProps} from './Types/Types'; 7 | 8 | function mergeDeep(...objects: any) { 9 | const isObject = (obj: any) => obj && typeof obj === 'object'; 10 | 11 | return objects.reduce((prev: any, obj: any) => { 12 | Object.keys(obj).forEach((key) => { 13 | const pVal = prev[key]; 14 | const oVal = obj[key]; 15 | 16 | if (Array.isArray(pVal) && Array.isArray(oVal)) { 17 | prev[key] = pVal.concat(...oVal); 18 | } else if (isObject(pVal) && isObject(oVal)) { 19 | prev[key] = mergeDeep(pVal, oVal); 20 | } else { 21 | prev[key] = oVal; 22 | } 23 | }); 24 | 25 | return prev; 26 | }, {}); 27 | } 28 | 29 | function FormBuilder(props: FormBuilderProps) { 30 | const currentTheme = useTheme(); 31 | const { 32 | formConfigArray, 33 | theme, 34 | control, 35 | setFocus, 36 | inputSpacing = 15, 37 | inputSpacingHorizontal = 15, 38 | CustomTextInput, 39 | } = props; 40 | const THEME: Theme = theme ? mergeDeep(currentTheme, theme) : currentTheme; 41 | 42 | const styles = useMemo( 43 | () => 44 | StyleSheet.create({ 45 | rowStyle: { 46 | flexDirection: 'row', 47 | }, 48 | }), 49 | [], 50 | ); 51 | 52 | return ( 53 | 54 | {formConfigArray.map((item, index) => { 55 | if (Array.isArray(item)) { 56 | return ( 57 | 58 | {item.map((_item, _index) => { 59 | const INPUT = _item?.CustomTextInput ?? CustomTextInput; 60 | const next = item[_index + 1] 61 | ? item[_index + 1] 62 | : formConfigArray[index + 1]; 63 | const nextItem = Array.isArray(next) ? next?.[0] : next; 64 | const onSubmitEditing = 65 | _item.textInputProps?.onSubmitEditing ?? 66 | (() => { 67 | if (nextItem) { 68 | if (setFocus && nextItem.type !== 'custom') { 69 | setFocus(nextItem.name); 70 | } 71 | } 72 | }); 73 | const returnKeyType = next ? 'next' : 'done'; 74 | const horizontalSpacing = 75 | _index < item.length - 1 76 | ? _item.inputSpacingHorizontal ?? inputSpacingHorizontal 77 | : 0; 78 | 79 | return ( 80 | 89 | 100 | 105 | 106 | ); 107 | })} 108 | 109 | ); 110 | } else { 111 | const INPUT = item?.CustomTextInput ?? CustomTextInput; 112 | const next = formConfigArray[index + 1]; 113 | const nextItem = Array.isArray(next) ? next?.[0] : next; 114 | const onSubmitEditing = 115 | item.textInputProps?.onSubmitEditing ?? 116 | (() => { 117 | if (nextItem) { 118 | if (setFocus && nextItem.type !== 'custom') { 119 | setFocus(nextItem.name); 120 | } 121 | } 122 | }); 123 | const returnKeyType = next ? 'next' : 'done'; 124 | 125 | return ( 126 | 127 | 138 | 141 | 142 | ); 143 | } 144 | })} 145 | 146 | ); 147 | } 148 | 149 | export default FormBuilder; 150 | -------------------------------------------------------------------------------- /src/Inputs/InputAutocomplete.tsx: -------------------------------------------------------------------------------- 1 | import React, {Fragment, useMemo, useState} from 'react'; 2 | import {Keyboard, StyleSheet, View} from 'react-native'; 3 | import { 4 | TouchableRipple, 5 | useTheme, 6 | TextInput, 7 | HelperText, 8 | } from 'react-native-paper'; 9 | import AutoComplete from '../Components/AutoComplete'; 10 | import {InputAutocompleteProps} from '../Types/Types'; 11 | 12 | function InputAutocomplete(props: InputAutocompleteProps) { 13 | const { 14 | formState, 15 | field, 16 | textInputProps, 17 | options, 18 | CustomAutoComplete, 19 | CustomTextInput, 20 | } = props; 21 | const theme = useTheme(); 22 | const errorMessage = formState.errors?.[field.name]?.message; 23 | const textColor = errorMessage ? theme.colors.error : theme.colors.text; 24 | const [visible, setVisible] = useState(false); 25 | const AUTOCOMPLETE = CustomAutoComplete ?? AutoComplete; 26 | const INPUT = CustomTextInput ?? TextInput; 27 | 28 | const styles = useMemo( 29 | () => 30 | StyleSheet.create({ 31 | textInputStyle: { 32 | color: textColor, 33 | }, 34 | }), 35 | [textColor], 36 | ); 37 | 38 | return ( 39 | 40 | { 42 | Keyboard.dismiss(); 43 | setVisible(true); 44 | }}> 45 | 46 | { 51 | Keyboard.dismiss(); 52 | setVisible(true); 53 | }} 54 | {...textInputProps} 55 | value={ 56 | options.find(({value}) => `${value}` === `${field.value}`)?.label 57 | } 58 | style={[styles.textInputStyle, textInputProps?.style]} 59 | /> 60 | 61 | 62 | 69 | {errorMessage && {errorMessage}} 70 | 71 | ); 72 | } 73 | 74 | export default InputAutocomplete; 75 | -------------------------------------------------------------------------------- /src/Inputs/InputSelect.tsx: -------------------------------------------------------------------------------- 1 | import React, {Fragment, useCallback, useMemo, useState} from 'react'; 2 | import {Keyboard, LayoutChangeEvent, StyleSheet, View} from 'react-native'; 3 | import { 4 | Menu, 5 | TouchableRipple, 6 | useTheme, 7 | TextInput, 8 | Divider, 9 | HelperText, 10 | } from 'react-native-paper'; 11 | import {InputSelectProps} from '../Types/Types'; 12 | 13 | function InputSelect(props: InputSelectProps) { 14 | const { 15 | formState, 16 | field, 17 | textInputProps, 18 | options, 19 | CustomTextInput, 20 | onDismiss = () => {}, 21 | } = props; 22 | const theme = useTheme(); 23 | const errorMessage = formState.errors?.[field.name]?.message; 24 | const textColor = errorMessage ? theme.colors.error : theme.colors.text; 25 | const [visible, setVisible] = useState(false); 26 | const [width, setWidth] = useState(0); 27 | const [height, setHeight] = useState(0); 28 | const INPUT = CustomTextInput ?? TextInput; 29 | 30 | const styles = useMemo( 31 | () => 32 | StyleSheet.create({ 33 | textInputStyle: { 34 | color: textColor, 35 | }, 36 | menuStyle: { 37 | minWidth: width, 38 | width: width, 39 | marginTop: height, 40 | }, 41 | }), 42 | [height, textColor, theme.colors.onSurface, theme.colors.surface, width], 43 | ); 44 | 45 | const onLayout = useCallback((event: LayoutChangeEvent) => { 46 | const {width: _width, height: _height} = event.nativeEvent.layout; 47 | setWidth(_width); 48 | setHeight(_height); 49 | }, []); 50 | 51 | return ( 52 | 53 |

setVisible(false)} 56 | style={styles.menuStyle} 57 | anchor={ 58 | { 60 | Keyboard.dismiss(); 61 | if (!textInputProps.disabled) { 62 | setVisible(true); 63 | } 64 | }}> 65 | 66 | `${value}` === `${field.value}`) 73 | ?.label 74 | } 75 | onFocus={() => { 76 | Keyboard.dismiss(); 77 | if (!textInputProps.disabled) { 78 | setVisible(true); 79 | } 80 | }} 81 | style={[styles.textInputStyle, textInputProps?.style]} 82 | /> 83 | 84 | 85 | }> 86 | {options.map(({label: _label, value: _value}, _index) => { 87 | return ( 88 | 89 | { 93 | field.onChange(`${_value}`); 94 | setVisible(false); 95 | !!onDismiss && onDismiss(); 96 | }} 97 | titleStyle={{ 98 | color: 99 | `${_value}` === `${field.value}` 100 | ? theme.colors.primary 101 | : theme.colors.text, 102 | }} 103 | /> 104 | {_index < options.length - 1 && } 105 | 106 | ); 107 | })} 108 | 109 | {errorMessage && {errorMessage}} 110 | 111 | ); 112 | } 113 | 114 | export default InputSelect; 115 | -------------------------------------------------------------------------------- /src/Inputs/InputText.tsx: -------------------------------------------------------------------------------- 1 | import React, {Fragment, useMemo} from 'react'; 2 | import {StyleSheet} from 'react-native'; 3 | import {HelperText, TextInput, useTheme} from 'react-native-paper'; 4 | import {InputTextProps} from '../Types/Types'; 5 | 6 | function InputText(props: InputTextProps) { 7 | const {formState, field, textInputProps, CustomTextInput} = props; 8 | const theme = useTheme(); 9 | const errorMessage = formState.errors?.[field.name]?.message; 10 | const textColor = errorMessage ? theme.colors.error : theme.colors.text; 11 | const INPUT = CustomTextInput ?? TextInput; 12 | 13 | const styles = useMemo( 14 | () => 15 | StyleSheet.create({ 16 | textInputStyle: { 17 | color: textColor, 18 | }, 19 | }), 20 | [textColor], 21 | ); 22 | 23 | return ( 24 | 25 | field.onChange(text)} 32 | style={[styles.textInputStyle, textInputProps?.style]} 33 | /> 34 | 35 | {errorMessage && {errorMessage}} 36 | 37 | ); 38 | } 39 | 40 | export default InputText; 41 | -------------------------------------------------------------------------------- /src/Logic/Logic.tsx: -------------------------------------------------------------------------------- 1 | import React, {Fragment} from 'react'; 2 | import {useController} from 'react-hook-form'; 3 | import {TextInput} from 'react-native-paper'; 4 | import InputAutocomplete from '../Inputs/InputAutocomplete'; 5 | import InputSelect from '../Inputs/InputSelect'; 6 | import InputText from '../Inputs/InputText'; 7 | import {LogicProps} from '../Types/Types'; 8 | 9 | function Logic(props: LogicProps) { 10 | const { 11 | name, 12 | rules, 13 | shouldUnregister, 14 | defaultValue, 15 | control, 16 | type, 17 | textInputProps, 18 | JSX, 19 | options, 20 | CustomAutoComplete, 21 | CustomTextInput, 22 | onDismiss, 23 | } = props; 24 | const {field, formState} = useController({ 25 | name, 26 | rules, 27 | shouldUnregister, 28 | defaultValue, 29 | control, 30 | }); 31 | 32 | switch (type) { 33 | case 'text': { 34 | return ( 35 | 41 | ); 42 | } 43 | case 'email': { 44 | return ( 45 | 55 | ); 56 | } 57 | case 'password': { 58 | return ( 59 | 68 | ); 69 | } 70 | case 'select': { 71 | return ( 72 | 73 | {options && ( 74 | , 80 | }} 81 | options={options} 82 | CustomTextInput={CustomTextInput} 83 | onDismiss={onDismiss} 84 | /> 85 | )} 86 | 87 | ); 88 | } 89 | case 'autocomplete': { 90 | return ( 91 | 92 | {options && ( 93 | , 99 | }} 100 | options={options} 101 | CustomAutoComplete={CustomAutoComplete} 102 | CustomTextInput={CustomTextInput} 103 | /> 104 | )} 105 | 106 | ); 107 | } 108 | case 'custom': { 109 | return JSX && JSX(props); 110 | } 111 | } 112 | } 113 | 114 | export default Logic; 115 | -------------------------------------------------------------------------------- /src/Types/Types.ts: -------------------------------------------------------------------------------- 1 | import {ComponentProps} from 'react'; 2 | import { 3 | Control, 4 | ControllerRenderProps, 5 | FieldValues, 6 | RegisterOptions, 7 | UseFormStateReturn, 8 | } from 'react-hook-form'; 9 | import {TextInput} from 'react-native-paper'; 10 | import {Theme} from 'react-native-paper/lib/typescript/types'; 11 | import AutoComplete from '../Components/AutoComplete'; 12 | import Logic from '../Logic/Logic'; 13 | 14 | export type $DeepPartial = {[P in keyof T]?: $DeepPartial}; 15 | export type FormBuilderProps = { 16 | formConfigArray: Array< 17 | Omit | Array> 18 | >; 19 | inputSpacing?: number; 20 | inputSpacingHorizontal?: number; 21 | theme?: $DeepPartial | Theme; 22 | control: any; 23 | setFocus: (name: any) => void; 24 | CustomTextInput?: any; 25 | }; 26 | 27 | export type INPUT_TYPES = 28 | | 'text' 29 | | 'email' 30 | | 'password' 31 | | 'select' 32 | | 'custom' 33 | | 'autocomplete'; 34 | 35 | export type OPTIONS = Array<{label: string; value: string | number}>; 36 | 37 | export type LogicProps = { 38 | name: string; 39 | rules?: Omit; 40 | shouldUnregister?: boolean; 41 | defaultValue?: unknown; 42 | type: INPUT_TYPES; 43 | textInputProps?: ComponentProps; 44 | options?: OPTIONS; 45 | control: any; 46 | JSX?: typeof Logic; 47 | inputSpacing?: number; 48 | inputSpacingHorizontal?: number; 49 | flex?: number; 50 | CustomAutoComplete?: typeof AutoComplete; 51 | CustomTextInput?: any; 52 | onDismiss?: () => void; 53 | }; 54 | 55 | export type InputAutocompleteProps = { 56 | field: ControllerRenderProps; 57 | formState: UseFormStateReturn; 58 | textInputProps?: ComponentProps; 59 | options: OPTIONS; 60 | CustomAutoComplete?: typeof AutoComplete; 61 | CustomTextInput?: any; 62 | }; 63 | 64 | export type AutoCompleteProps = { 65 | visible: boolean; 66 | setVisible: (visible: boolean) => void; 67 | textInputProps?: ComponentProps; 68 | options: OPTIONS; 69 | field: ControllerRenderProps; 70 | }; 71 | 72 | export type InputSelectProps = { 73 | field: ControllerRenderProps; 74 | formState: UseFormStateReturn; 75 | textInputProps?: ComponentProps; 76 | options: OPTIONS; 77 | CustomTextInput?: any; 78 | onDismiss?: () => void; 79 | }; 80 | 81 | export type InputTextProps = { 82 | field: ControllerRenderProps; 83 | formState: UseFormStateReturn; 84 | textInputProps?: ComponentProps; 85 | CustomTextInput?: any; 86 | }; 87 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import AutoComplete from './Components/AutoComplete'; 2 | import FormBuilder from './FormBuilder'; 3 | import InputAutocomplete from './Inputs/InputAutocomplete'; 4 | import InputSelect from './Inputs/InputSelect'; 5 | import InputText from './Inputs/InputText'; 6 | import Logic from './Logic/Logic'; 7 | 8 | export { 9 | FormBuilder, 10 | Logic, 11 | AutoComplete, 12 | InputSelect, 13 | InputText, 14 | InputAutocomplete, 15 | }; 16 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["es6"], 4 | "declaration": true, 5 | "declarationDir": "./dist", 6 | "strict": true, 7 | "allowSyntheticDefaultImports": true, 8 | "sourceMap": false, 9 | "noUnusedParameters": true, 10 | "strictNullChecks": true, 11 | "moduleResolution": "node", 12 | "noImplicitAny": false, 13 | "outDir": "./dist", 14 | "target": "esnext", 15 | "jsx": "react-native", 16 | "skipLibCheck": true, 17 | "typeRoots": ["node_modules/@types"] 18 | }, 19 | "include": ["./src"], 20 | "exclude": ["./node_modules", "./example"] 21 | } 22 | --------------------------------------------------------------------------------