├── .circleci └── config.yml ├── .editorconfig ├── .gitattributes ├── .gitignore ├── .yarnrc ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── android ├── build.gradle ├── gradle.properties └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── visioncameraocr │ ├── VisionCameraOcrModule.kt │ └── VisionCameraOcrPackage.kt ├── babel.config.js ├── example ├── android │ ├── app │ │ ├── build.gradle │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ ├── AndroidManifest.xml │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── visioncameraocr │ │ │ │ └── ReactNativeFlipper.java │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── visioncameraocr │ │ │ │ ├── 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.tsx ├── ios │ ├── File.swift │ ├── Podfile │ ├── Podfile.lock │ ├── VisionCameraOcrExample-Bridging-Header.h │ ├── VisionCameraOcrExample.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── VisionCameraOcrExample.xcscheme │ ├── VisionCameraOcrExample.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── VisionCameraOcrExample │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ └── main.m ├── metro.config.js ├── package.json ├── src │ └── App.tsx └── yarn.lock ├── ios ├── VisionCameraOcr-Bridging-Header.h ├── VisionCameraOcr.m ├── VisionCameraOcr.swift └── VisionCameraOcr.xcodeproj │ └── project.pbxproj ├── package.json ├── scripts └── bootstrap.js ├── src ├── __tests__ │ └── index.test.tsx └── index.tsx ├── tsconfig.build.json ├── tsconfig.json ├── vision-camera-ocr.podspec └── yarn.lock /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2.1 2 | 3 | executors: 4 | default: 5 | docker: 6 | - image: circleci/node:10 7 | working_directory: ~/project 8 | 9 | commands: 10 | attach_project: 11 | steps: 12 | - attach_workspace: 13 | at: ~/project 14 | 15 | jobs: 16 | install-dependencies: 17 | executor: default 18 | steps: 19 | - checkout 20 | - attach_project 21 | - restore_cache: 22 | keys: 23 | - dependencies-{{ checksum "package.json" }} 24 | - dependencies- 25 | - restore_cache: 26 | keys: 27 | - dependencies-example-{{ checksum "example/package.json" }} 28 | - dependencies-example- 29 | - run: 30 | name: Install dependencies 31 | command: | 32 | yarn install --cwd example --frozen-lockfile 33 | yarn install --frozen-lockfile 34 | - save_cache: 35 | key: dependencies-{{ checksum "package.json" }} 36 | paths: node_modules 37 | - save_cache: 38 | key: dependencies-example-{{ checksum "example/package.json" }} 39 | paths: example/node_modules 40 | - persist_to_workspace: 41 | root: . 42 | paths: . 43 | 44 | lint: 45 | executor: default 46 | steps: 47 | - attach_project 48 | - run: 49 | name: Lint files 50 | command: | 51 | yarn lint 52 | 53 | typescript: 54 | executor: default 55 | steps: 56 | - attach_project 57 | - run: 58 | name: Typecheck files 59 | command: | 60 | yarn typescript 61 | 62 | unit-tests: 63 | executor: default 64 | steps: 65 | - attach_project 66 | - run: 67 | name: Run unit tests 68 | command: | 69 | yarn test --coverage 70 | - store_artifacts: 71 | path: coverage 72 | destination: coverage 73 | 74 | build-package: 75 | executor: default 76 | steps: 77 | - attach_project 78 | - run: 79 | name: Build package 80 | command: | 81 | yarn prepare 82 | 83 | workflows: 84 | build-and-test: 85 | jobs: 86 | - install-dependencies 87 | - lint: 88 | requires: 89 | - install-dependencies 90 | - typescript: 91 | requires: 92 | - install-dependencies 93 | - unit-tests: 94 | requires: 95 | - install-dependencies 96 | - build-package: 97 | requires: 98 | - install-dependencies 99 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | 9 | indent_style = space 10 | indent_size = 2 11 | 12 | end_of_line = lf 13 | charset = utf-8 14 | trim_trailing_whitespace = true 15 | insert_final_newline = true 16 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | # specific for windows script files 3 | *.bat text eol=crlf -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # XDE 6 | .expo/ 7 | 8 | # VSCode 9 | .vscode/ 10 | jsconfig.json 11 | 12 | # Xcode 13 | # 14 | build/ 15 | *.pbxuser 16 | !default.pbxuser 17 | *.mode1v3 18 | !default.mode1v3 19 | *.mode2v3 20 | !default.mode2v3 21 | *.perspectivev3 22 | !default.perspectivev3 23 | xcuserdata 24 | *.xccheckout 25 | *.moved-aside 26 | DerivedData 27 | *.hmap 28 | *.ipa 29 | *.xcuserstate 30 | project.xcworkspace 31 | 32 | # Android/IJ 33 | # 34 | .idea 35 | .gradle 36 | local.properties 37 | android.iml 38 | 39 | # Cocoapods 40 | # 41 | example/ios/Pods 42 | 43 | # node.js 44 | # 45 | node_modules/ 46 | npm-debug.log 47 | yarn-debug.log 48 | yarn-error.log 49 | 50 | # BUCK 51 | buck-out/ 52 | \.buckd/ 53 | android/app/libs 54 | android/keystores/debug.keystore 55 | 56 | # Expo 57 | .expo/* 58 | 59 | # generated by bob 60 | lib/ 61 | -------------------------------------------------------------------------------- /.yarnrc: -------------------------------------------------------------------------------- 1 | # Override Yarn command so we can automatically setup the repo on running `yarn` 2 | 3 | yarn-path "scripts/bootstrap.js" 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project. 4 | 5 | ## Development workflow 6 | 7 | To get started with the project, run `yarn` in the root directory to install the required dependencies for each package: 8 | 9 | ```sh 10 | yarn 11 | ``` 12 | 13 | > While it's possible to use [`npm`](https://github.com/npm/cli), the tooling is built around [`yarn`](https://classic.yarnpkg.com/), so you'll have an easier time if you use `yarn` for development. 14 | 15 | While developing, you can run the [example app](/example/) to test your changes. Any changes you make in your library's JavaScript code will be reflected in the example app without a rebuild. If you change any native code, then you'll need to rebuild the example app. 16 | 17 | To start the packager: 18 | 19 | ```sh 20 | yarn example start 21 | ``` 22 | 23 | To run the example app on Android: 24 | 25 | ```sh 26 | yarn example android 27 | ``` 28 | 29 | To run the example app on iOS: 30 | 31 | ```sh 32 | yarn example ios 33 | ``` 34 | 35 | Make sure your code passes TypeScript and ESLint. Run the following to verify: 36 | 37 | ```sh 38 | yarn typescript 39 | yarn lint 40 | ``` 41 | 42 | To fix formatting errors, run the following: 43 | 44 | ```sh 45 | yarn lint --fix 46 | ``` 47 | 48 | Remember to add tests for your change if possible. Run the unit tests by: 49 | 50 | ```sh 51 | yarn test 52 | ``` 53 | 54 | To edit the Objective-C files, open `example/ios/VisionCameraOcrExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > vision-camera-ocr`. 55 | 56 | To edit the Kotlin files, open `example/android` in Android studio and find the source files at `visioncameraocr` under `Android`. 57 | 58 | ### Commit message convention 59 | 60 | We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages: 61 | 62 | - `fix`: bug fixes, e.g. fix crash due to deprecated method. 63 | - `feat`: new features, e.g. add new method to the module. 64 | - `refactor`: code refactor, e.g. migrate from class components to hooks. 65 | - `docs`: changes into documentation, e.g. add usage example for the module.. 66 | - `test`: adding or updating tests, e.g. add integration tests using detox. 67 | - `chore`: tooling changes, e.g. change CI config. 68 | 69 | Our pre-commit hooks verify that your commit message matches this format when committing. 70 | 71 | ### Linting and tests 72 | 73 | [ESLint](https://eslint.org/), [Prettier](https://prettier.io/), [TypeScript](https://www.typescriptlang.org/) 74 | 75 | We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing. 76 | 77 | Our pre-commit hooks verify that the linter and tests pass when committing. 78 | 79 | ### Publishing to npm 80 | 81 | We use [release-it](https://github.com/release-it/release-it) to make it easier to publish new versions. It handles common tasks like bumping version based on semver, creating tags and releases etc. 82 | 83 | To publish new versions, run the following: 84 | 85 | ```sh 86 | yarn release 87 | ``` 88 | 89 | ### Scripts 90 | 91 | The `package.json` file contains various scripts for common tasks: 92 | 93 | - `yarn bootstrap`: setup project by installing all dependencies and pods. 94 | - `yarn typescript`: type-check files with TypeScript. 95 | - `yarn lint`: lint files with ESLint. 96 | - `yarn test`: run unit tests with Jest. 97 | - `yarn example start`: start the Metro server for the example app. 98 | - `yarn example android`: run the example app on Android. 99 | - `yarn example ios`: run the example app on iOS. 100 | 101 | ### Sending a pull request 102 | 103 | > **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github). 104 | 105 | When you're sending a pull request: 106 | 107 | - Prefer small pull requests focused on one change. 108 | - Verify that linters and tests are passing. 109 | - Review the documentation to make sure it looks good. 110 | - Follow the pull request template when opening a pull request. 111 | - For pull requests that change the API or implementation, discuss with maintainers first by opening an issue. 112 | 113 | ## Code of Conduct 114 | 115 | ### Our Pledge 116 | 117 | We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. 118 | 119 | We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. 120 | 121 | ### Our Standards 122 | 123 | Examples of behavior that contributes to a positive environment for our community include: 124 | 125 | - Demonstrating empathy and kindness toward other people 126 | - Being respectful of differing opinions, viewpoints, and experiences 127 | - Giving and gracefully accepting constructive feedback 128 | - Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience 129 | - Focusing on what is best not just for us as individuals, but for the overall community 130 | 131 | Examples of unacceptable behavior include: 132 | 133 | - The use of sexualized language or imagery, and sexual attention or 134 | advances of any kind 135 | - Trolling, insulting or derogatory comments, and personal or political attacks 136 | - Public or private harassment 137 | - Publishing others' private information, such as a physical or email 138 | address, without their explicit permission 139 | - Other conduct which could reasonably be considered inappropriate in a 140 | professional setting 141 | 142 | ### Enforcement Responsibilities 143 | 144 | Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. 145 | 146 | Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. 147 | 148 | ### Scope 149 | 150 | This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. 151 | 152 | ### Enforcement 153 | 154 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly. 155 | 156 | All community leaders are obligated to respect the privacy and security of the reporter of any incident. 157 | 158 | ### Enforcement Guidelines 159 | 160 | Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: 161 | 162 | #### 1. Correction 163 | 164 | **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. 165 | 166 | **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. 167 | 168 | #### 2. Warning 169 | 170 | **Community Impact**: A violation through a single incident or series of actions. 171 | 172 | **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. 173 | 174 | #### 3. Temporary Ban 175 | 176 | **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. 177 | 178 | **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. 179 | 180 | #### 4. Permanent Ban 181 | 182 | **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. 183 | 184 | **Consequence**: A permanent ban from any sort of public interaction within the community. 185 | 186 | ### Attribution 187 | 188 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, 189 | available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 190 | 191 | Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). 192 | 193 | [homepage]: https://www.contributor-covenant.org 194 | 195 | For answers to common questions about this code of conduct, see the FAQ at 196 | https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. 197 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 rodrigo gomes 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 | # vision-camera-ocr 2 | 3 | VisionCamera Frame Processor Plugin that uses MLKit Text Recognition API to recognize text in any Latin-based character set 4 | 5 | ## Installation 6 | 7 | ```sh 8 | npm install vision-camera-ocr 9 | ``` 10 | 11 | ## Usage 12 | 13 | ```js 14 | import VisionCameraOcr from "vision-camera-ocr"; 15 | 16 | // ... 17 | 18 | const result = await VisionCameraOcr.multiply(3, 7); 19 | ``` 20 | 21 | ## Contributing 22 | 23 | See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow. 24 | 25 | ## License 26 | 27 | MIT 28 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | // Buildscript is evaluated before everything else so we can't use getExtOrDefault 3 | def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : project.properties['VisionCameraOcr_kotlinVersion'] 4 | 5 | repositories { 6 | google() 7 | jcenter() 8 | } 9 | 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:3.2.1' 12 | // noinspection DifferentKotlinGradleVersion 13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 14 | } 15 | } 16 | 17 | apply plugin: 'com.android.library' 18 | apply plugin: 'kotlin-android' 19 | 20 | def getExtOrDefault(name) { 21 | return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['VisionCameraOcr_' + name] 22 | } 23 | 24 | def getExtOrIntegerDefault(name) { 25 | return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['VisionCameraOcr_' + name]).toInteger() 26 | } 27 | 28 | android { 29 | compileSdkVersion getExtOrIntegerDefault('compileSdkVersion') 30 | buildToolsVersion getExtOrDefault('buildToolsVersion') 31 | defaultConfig { 32 | minSdkVersion 16 33 | targetSdkVersion getExtOrIntegerDefault('targetSdkVersion') 34 | versionCode 1 35 | versionName "1.0" 36 | 37 | } 38 | 39 | buildTypes { 40 | release { 41 | minifyEnabled false 42 | } 43 | } 44 | lintOptions { 45 | disable 'GradleCompatible' 46 | } 47 | compileOptions { 48 | sourceCompatibility JavaVersion.VERSION_1_8 49 | targetCompatibility JavaVersion.VERSION_1_8 50 | } 51 | } 52 | 53 | repositories { 54 | mavenCentral() 55 | jcenter() 56 | google() 57 | 58 | def found = false 59 | def defaultDir = null 60 | def androidSourcesName = 'React Native sources' 61 | 62 | if (rootProject.ext.has('reactNativeAndroidRoot')) { 63 | defaultDir = rootProject.ext.get('reactNativeAndroidRoot') 64 | } else { 65 | defaultDir = new File( 66 | projectDir, 67 | '/../../../node_modules/react-native/android' 68 | ) 69 | } 70 | 71 | if (defaultDir.exists()) { 72 | maven { 73 | url defaultDir.toString() 74 | name androidSourcesName 75 | } 76 | 77 | logger.info(":${project.name}:reactNativeAndroidRoot ${defaultDir.canonicalPath}") 78 | found = true 79 | } else { 80 | def parentDir = rootProject.projectDir 81 | 82 | 1.upto(5, { 83 | if (found) return true 84 | parentDir = parentDir.parentFile 85 | 86 | def androidSourcesDir = new File( 87 | parentDir, 88 | 'node_modules/react-native' 89 | ) 90 | 91 | def androidPrebuiltBinaryDir = new File( 92 | parentDir, 93 | 'node_modules/react-native/android' 94 | ) 95 | 96 | if (androidPrebuiltBinaryDir.exists()) { 97 | maven { 98 | url androidPrebuiltBinaryDir.toString() 99 | name androidSourcesName 100 | } 101 | 102 | logger.info(":${project.name}:reactNativeAndroidRoot ${androidPrebuiltBinaryDir.canonicalPath}") 103 | found = true 104 | } else if (androidSourcesDir.exists()) { 105 | maven { 106 | url androidSourcesDir.toString() 107 | name androidSourcesName 108 | } 109 | 110 | logger.info(":${project.name}:reactNativeAndroidRoot ${androidSourcesDir.canonicalPath}") 111 | found = true 112 | } 113 | }) 114 | } 115 | 116 | if (!found) { 117 | throw new GradleException( 118 | "${project.name}: unable to locate React Native android sources. " + 119 | "Ensure you have you installed React Native as a dependency in your project and try again." 120 | ) 121 | } 122 | } 123 | 124 | def kotlin_version = getExtOrDefault('kotlinVersion') 125 | 126 | dependencies { 127 | // noinspection GradleDynamicVersion 128 | api 'com.facebook.react:react-native:+' 129 | implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" 130 | } 131 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | VisionCameraOcr_kotlinVersion=1.3.50 2 | VisionCameraOcr_compileSdkVersion=29 3 | VisionCameraOcr_buildToolsVersion=29.0.2 4 | VisionCameraOcr_targetSdkVersion=29 5 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/src/main/java/com/visioncameraocr/VisionCameraOcrModule.kt: -------------------------------------------------------------------------------- 1 | package com.visioncameraocr 2 | 3 | import com.facebook.react.bridge.ReactApplicationContext 4 | import com.facebook.react.bridge.ReactContextBaseJavaModule 5 | import com.facebook.react.bridge.ReactMethod 6 | import com.facebook.react.bridge.Promise 7 | 8 | class VisionCameraOcrModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) { 9 | 10 | override fun getName(): String { 11 | return "VisionCameraOcr" 12 | } 13 | 14 | // Example method 15 | // See https://reactnative.dev/docs/native-modules-android 16 | @ReactMethod 17 | fun multiply(a: Int, b: Int, promise: Promise) { 18 | 19 | promise.resolve(a * b) 20 | 21 | } 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /android/src/main/java/com/visioncameraocr/VisionCameraOcrPackage.kt: -------------------------------------------------------------------------------- 1 | package com.visioncameraocr 2 | 3 | import com.facebook.react.ReactPackage 4 | import com.facebook.react.bridge.NativeModule 5 | import com.facebook.react.bridge.ReactApplicationContext 6 | import com.facebook.react.uimanager.ViewManager 7 | 8 | 9 | class VisionCameraOcrPackage : ReactPackage { 10 | override fun createNativeModules(reactContext: ReactApplicationContext): List { 11 | return listOf(VisionCameraOcrModule(reactContext)) 12 | } 13 | 14 | override fun createViewManagers(reactContext: ReactApplicationContext): List> { 15 | return emptyList() 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /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 19 | * entryFile: "index.android.js", 20 | * 21 | * // https://reactnative.dev/docs/performance#enable-the-ram-format 22 | * bundleCommand: "ram-bundle", 23 | * 24 | * // whether to bundle JS and assets in debug mode 25 | * bundleInDebug: false, 26 | * 27 | * // whether to bundle JS and assets in release mode 28 | * bundleInRelease: true, 29 | * 30 | * // whether to bundle JS and assets in another build variant (if configured). 31 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants 32 | * // The configuration property can be in the following formats 33 | * // 'bundleIn${productFlavor}${buildType}' 34 | * // 'bundleIn${buildType}' 35 | * // bundleInFreeDebug: true, 36 | * // bundleInPaidRelease: true, 37 | * // bundleInBeta: true, 38 | * 39 | * // whether to disable dev mode in custom build variants (by default only disabled in release) 40 | * // for VisionCameraOcrExample: to disable dev mode in the staging build type (if configured) 41 | * devDisabledInStaging: true, 42 | * // The configuration property can be in the following formats 43 | * // 'devDisabledIn${productFlavor}${buildType}' 44 | * // 'devDisabledIn${buildType}' 45 | * 46 | * // the root of your project, i.e. where "package.json" lives 47 | * root: "../../", 48 | * 49 | * // where to put the JS bundle asset in debug mode 50 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", 51 | * 52 | * // where to put the JS bundle asset in release mode 53 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release", 54 | * 55 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 56 | * // require('./image.png')), in debug mode 57 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", 58 | * 59 | * // where to put drawable resources / React Native assets, e.g. the ones you use via 60 | * // require('./image.png')), in release mode 61 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", 62 | * 63 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means 64 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to 65 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle 66 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ 67 | * // for VisionCameraOcrExample, you might want to remove it from here. 68 | * inputExcludes: ["android/**", "ios/**"], 69 | * 70 | * // override which node gets called and with what additional arguments 71 | * nodeExecutableAndArgs: ["node"], 72 | * 73 | * // supply additional arguments to the packager 74 | * extraPackagerArgs: [] 75 | * ] 76 | */ 77 | 78 | project.ext.react = [ 79 | enableHermes: false, // clean and rebuild if changing 80 | entryFile: "index.tsx", 81 | ] 82 | 83 | apply from: "../../node_modules/react-native/react.gradle" 84 | 85 | /** 86 | * Set this to true to create two separate APKs instead of one: 87 | * - An APK that only works on ARM devices 88 | * - An APK that only works on x86 devices 89 | * The advantage is the size of the APK is reduced by about 4MB. 90 | * Upload all the APKs to the Play Store and people will download 91 | * the correct one based on the CPU architecture of their device. 92 | */ 93 | def enableSeparateBuildPerCPUArchitecture = false 94 | 95 | /** 96 | * Run Proguard to shrink the Java bytecode in release builds. 97 | */ 98 | def enableProguardInReleaseBuilds = false 99 | 100 | /** 101 | * The preferred build flavor of JavaScriptCore. 102 | * 103 | * For VisionCameraOcrExample, to use the international variant, you can use: 104 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` 105 | * 106 | * The international variant includes ICU i18n library and necessary data 107 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that 108 | * give correct results when using with locales other than en-US. Note that 109 | * this variant is about 6MiB larger per architecture than default. 110 | */ 111 | def jscFlavor = 'org.webkit:android-jsc:+' 112 | 113 | /** 114 | * Whether to enable the Hermes VM. 115 | * 116 | * This should be set on project.ext.react and mirrored here. If it is not set 117 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode 118 | * and the benefits of using Hermes will therefore be sharply reduced. 119 | */ 120 | def enableHermes = project.ext.react.get("enableHermes", false); 121 | 122 | android { 123 | compileSdkVersion rootProject.ext.compileSdkVersion 124 | 125 | compileOptions { 126 | sourceCompatibility JavaVersion.VERSION_1_8 127 | targetCompatibility JavaVersion.VERSION_1_8 128 | } 129 | 130 | defaultConfig { 131 | applicationId "com.example.visioncameraocr" 132 | minSdkVersion rootProject.ext.minSdkVersion 133 | targetSdkVersion rootProject.ext.targetSdkVersion 134 | versionCode 1 135 | versionName "1.0" 136 | } 137 | splits { 138 | abi { 139 | reset() 140 | enable enableSeparateBuildPerCPUArchitecture 141 | universalApk false // If true, also generate a universal APK 142 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" 143 | } 144 | } 145 | signingConfigs { 146 | debug { 147 | storeFile file('debug.keystore') 148 | storePassword 'android' 149 | keyAlias 'androiddebugkey' 150 | keyPassword 'android' 151 | } 152 | } 153 | buildTypes { 154 | debug { 155 | signingConfig signingConfigs.debug 156 | } 157 | release { 158 | // Caution! In production, you need to generate your own keystore file. 159 | // see https://reactnative.dev/docs/signed-apk-android. 160 | signingConfig signingConfigs.debug 161 | minifyEnabled enableProguardInReleaseBuilds 162 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 163 | } 164 | } 165 | // applicationVariants are e.g. debug, release 166 | applicationVariants.all { variant -> 167 | variant.outputs.each { output -> 168 | // For each separate APK per architecture, set a unique version code as described here: 169 | // https://developer.android.com/studio/build/configure-apk-splits.html 170 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] 171 | def abi = output.getFilter(OutputFile.ABI) 172 | if (abi != null) { // null for the universal-debug, universal-release variants 173 | output.versionCodeOverride = 174 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 175 | } 176 | 177 | } 178 | } 179 | } 180 | 181 | dependencies { 182 | implementation fileTree(dir: "libs", include: ["*.jar"]) 183 | //noinspection GradleDynamicVersion 184 | implementation "com.facebook.react:react-native:+" // From node_modules 185 | 186 | 187 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" 188 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { 189 | exclude group:'com.facebook.fbjni' 190 | } 191 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { 192 | exclude group:'com.facebook.flipper' 193 | exclude group:'com.squareup.okhttp3', module:'okhttp' 194 | } 195 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { 196 | exclude group:'com.facebook.flipper' 197 | } 198 | 199 | if (enableHermes) { 200 | def hermesPath = "../../node_modules/hermes-engine/android/"; 201 | debugImplementation files(hermesPath + "hermes-debug.aar") 202 | releaseImplementation files(hermesPath + "hermes-release.aar") 203 | } else { 204 | implementation jscFlavor 205 | } 206 | 207 | implementation project(':visioncameraocr') 208 | } 209 | 210 | // Run this once to be able to run the application with BUCK 211 | // puts all compile dependencies into folder libs for BUCK to use 212 | task copyDownloadableDepsToLibs(type: Copy) { 213 | from configurations.compile 214 | into 'libs' 215 | } 216 | 217 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) 218 | -------------------------------------------------------------------------------- /example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodgomesc/vision-camera-ocr/d459eceeda668accb3b2c9fccf871f5bbac5efa1/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 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/app/src/debug/java/com/example/visioncameraocr/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.visioncameraocr; 8 | 9 | import android.content.Context; 10 | import com.facebook.flipper.android.AndroidFlipperClient; 11 | import com.facebook.flipper.android.utils.FlipperUtils; 12 | import com.facebook.flipper.core.FlipperClient; 13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; 14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; 15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; 16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping; 17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; 18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; 19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; 20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin; 21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; 22 | import com.facebook.react.ReactInstanceManager; 23 | import com.facebook.react.bridge.ReactContext; 24 | import com.facebook.react.modules.network.NetworkingModule; 25 | import okhttp3.OkHttpClient; 26 | 27 | public class ReactNativeFlipper { 28 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 29 | if (FlipperUtils.shouldEnableFlipper(context)) { 30 | final FlipperClient client = AndroidFlipperClient.getInstance(context); 31 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); 32 | client.addPlugin(new ReactFlipperPlugin()); 33 | client.addPlugin(new DatabasesFlipperPlugin(context)); 34 | client.addPlugin(new SharedPreferencesFlipperPlugin(context)); 35 | client.addPlugin(CrashReporterPlugin.getInstance()); 36 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); 37 | NetworkingModule.setCustomClientBuilder( 38 | new NetworkingModule.CustomClientBuilder() { 39 | @Override 40 | public void apply(OkHttpClient.Builder builder) { 41 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); 42 | } 43 | }); 44 | client.addPlugin(networkFlipperPlugin); 45 | client.start(); 46 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized 47 | // Hence we run if after all native modules have been initialized 48 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); 49 | if (reactContext == null) { 50 | reactInstanceManager.addReactInstanceEventListener( 51 | new ReactInstanceManager.ReactInstanceEventListener() { 52 | @Override 53 | public void onReactContextInitialized(ReactContext reactContext) { 54 | reactInstanceManager.removeReactInstanceEventListener(this); 55 | reactContext.runOnNativeModulesQueueThread( 56 | new Runnable() { 57 | @Override 58 | public void run() { 59 | client.addPlugin(new FrescoFlipperPlugin()); 60 | } 61 | }); 62 | } 63 | }); 64 | } else { 65 | client.addPlugin(new FrescoFlipperPlugin()); 66 | } 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/visioncameraocr/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.visioncameraocr; 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 "VisionCameraOcrExample"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/visioncameraocr/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.example.visioncameraocr; 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.ReactNativeHost; 8 | import com.facebook.react.ReactPackage; 9 | import com.facebook.react.ReactInstanceManager; 10 | import com.facebook.soloader.SoLoader; 11 | import java.lang.reflect.InvocationTargetException; 12 | import java.util.List; 13 | import com.visioncameraocr.VisionCameraOcrPackage; 14 | 15 | public class MainApplication extends Application implements ReactApplication { 16 | 17 | private final ReactNativeHost mReactNativeHost = 18 | new ReactNativeHost(this) { 19 | @Override 20 | public boolean getUseDeveloperSupport() { 21 | return BuildConfig.DEBUG; 22 | } 23 | 24 | @Override 25 | protected List getPackages() { 26 | @SuppressWarnings("UnnecessaryLocalVariable") 27 | List packages = new PackageList(this).getPackages(); 28 | // Packages that cannot be autolinked yet can be added manually here, for VisionCameraOcrExample: 29 | // packages.add(new MyReactNativePackage()); 30 | packages.add(new VisionCameraOcrPackage()); 31 | return packages; 32 | } 33 | 34 | @Override 35 | protected String getJSMainModuleName() { 36 | return "index"; 37 | } 38 | 39 | @Override 40 | protected JSIModulePackage getJSIModulePackage() { 41 | return new ReanimatedJSIModulePackage(); 42 | } 43 | }; 44 | 45 | @Override 46 | public ReactNativeHost getReactNativeHost() { 47 | return mReactNativeHost; 48 | } 49 | 50 | @Override 51 | public void onCreate() { 52 | super.onCreate(); 53 | SoLoader.init(this, /* native exopackage */ false); 54 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); // Remove this line if you don't want Flipper enabled 55 | } 56 | 57 | /** 58 | * Loads Flipper in React Native templates. 59 | * 60 | * @param context 61 | */ 62 | private static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { 63 | if (BuildConfig.DEBUG) { 64 | try { 65 | /* 66 | We use reflection here to pick up the class that initializes Flipper, 67 | since Flipper library is not available in release mode 68 | */ 69 | Class aClass = Class.forName("com.visioncameraocrExample.ReactNativeFlipper"); 70 | aClass 71 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) 72 | .invoke(null, context, reactInstanceManager); 73 | } catch (ClassNotFoundException e) { 74 | e.printStackTrace(); 75 | } catch (NoSuchMethodException e) { 76 | e.printStackTrace(); 77 | } catch (IllegalAccessException e) { 78 | e.printStackTrace(); 79 | } catch (InvocationTargetException e) { 80 | e.printStackTrace(); 81 | } 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodgomesc/vision-camera-ocr/d459eceeda668accb3b2c9fccf871f5bbac5efa1/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/rodgomesc/vision-camera-ocr/d459eceeda668accb3b2c9fccf871f5bbac5efa1/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/rodgomesc/vision-camera-ocr/d459eceeda668accb3b2c9fccf871f5bbac5efa1/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/rodgomesc/vision-camera-ocr/d459eceeda668accb3b2c9fccf871f5bbac5efa1/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/rodgomesc/vision-camera-ocr/d459eceeda668accb3b2c9fccf871f5bbac5efa1/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/rodgomesc/vision-camera-ocr/d459eceeda668accb3b2c9fccf871f5bbac5efa1/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/rodgomesc/vision-camera-ocr/d459eceeda668accb3b2c9fccf871f5bbac5efa1/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/rodgomesc/vision-camera-ocr/d459eceeda668accb3b2c9fccf871f5bbac5efa1/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/rodgomesc/vision-camera-ocr/d459eceeda668accb3b2c9fccf871f5bbac5efa1/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/rodgomesc/vision-camera-ocr/d459eceeda668accb3b2c9fccf871f5bbac5efa1/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | VisionCameraOcr 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 | minSdkVersion = 21 6 | compileSdkVersion = 30 7 | targetSdkVersion = 30 8 | ndkVersion = "20.1.5948944" 9 | } 10 | repositories { 11 | google() 12 | jcenter() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle:3.5.3") 16 | 17 | // NOTE: Do not place your application dependencies here; they belong 18 | // in the individual module build.gradle files 19 | } 20 | } 21 | 22 | allprojects { 23 | repositories { 24 | mavenLocal() 25 | maven { 26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 27 | url("$rootDir/../node_modules/react-native/android") 28 | } 29 | maven { 30 | // Android JSC is installed from npm 31 | url("$rootDir/../node_modules/jsc-android/dist") 32 | } 33 | 34 | google() 35 | jcenter() 36 | maven { url 'https://www.jitpack.io' } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useAndroidX=true 21 | android.enableJetifier=true 22 | FLIPPER_VERSION=0.54.0 23 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rodgomesc/vision-camera-ocr/d459eceeda668accb3b2c9fccf871f5bbac5efa1/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.2-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /example/android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # 4 | # Copyright 2015 the original author or authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | ## 21 | ## Gradle start up script for UN*X 22 | ## 23 | ############################################################################## 24 | 25 | # Attempt to set APP_HOME 26 | # Resolve links: $0 may be a link 27 | PRG="$0" 28 | # Need this for relative symlinks. 29 | while [ -h "$PRG" ] ; do 30 | ls=`ls -ld "$PRG"` 31 | link=`expr "$ls" : '.*-> \(.*\)$'` 32 | if expr "$link" : '/.*' > /dev/null; then 33 | PRG="$link" 34 | else 35 | PRG=`dirname "$PRG"`"/$link" 36 | fi 37 | done 38 | SAVED="`pwd`" 39 | cd "`dirname \"$PRG\"`/" >/dev/null 40 | APP_HOME="`pwd -P`" 41 | cd "$SAVED" >/dev/null 42 | 43 | APP_NAME="Gradle" 44 | APP_BASE_NAME=`basename "$0"` 45 | 46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 48 | 49 | # Use the maximum available, or set MAX_FD != -1 to use that value. 50 | MAX_FD="maximum" 51 | 52 | warn () { 53 | echo "$*" 54 | } 55 | 56 | die () { 57 | echo 58 | echo "$*" 59 | echo 60 | exit 1 61 | } 62 | 63 | # OS specific support (must be 'true' or 'false'). 64 | cygwin=false 65 | msys=false 66 | darwin=false 67 | nonstop=false 68 | case "`uname`" in 69 | CYGWIN* ) 70 | cygwin=true 71 | ;; 72 | Darwin* ) 73 | darwin=true 74 | ;; 75 | MINGW* ) 76 | msys=true 77 | ;; 78 | NONSTOP* ) 79 | nonstop=true 80 | ;; 81 | esac 82 | 83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 84 | 85 | # Determine the Java command to use to start the JVM. 86 | if [ -n "$JAVA_HOME" ] ; then 87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 88 | # IBM's JDK on AIX uses strange locations for the executables 89 | JAVACMD="$JAVA_HOME/jre/sh/java" 90 | else 91 | JAVACMD="$JAVA_HOME/bin/java" 92 | fi 93 | if [ ! -x "$JAVACMD" ] ; then 94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 95 | 96 | Please set the JAVA_HOME variable in your environment to match the 97 | location of your Java installation." 98 | fi 99 | else 100 | JAVACMD="java" 101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 102 | 103 | Please set the JAVA_HOME variable in your environment to match the 104 | location of your Java installation." 105 | fi 106 | 107 | # Increase the maximum file descriptors if we can. 108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 109 | MAX_FD_LIMIT=`ulimit -H -n` 110 | if [ $? -eq 0 ] ; then 111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 112 | MAX_FD="$MAX_FD_LIMIT" 113 | fi 114 | ulimit -n $MAX_FD 115 | if [ $? -ne 0 ] ; then 116 | warn "Could not set maximum file descriptor limit: $MAX_FD" 117 | fi 118 | else 119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 120 | fi 121 | fi 122 | 123 | # For Darwin, add options to specify how the application appears in the dock 124 | if $darwin; then 125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 126 | fi 127 | 128 | # For Cygwin or MSYS, switch paths to Windows format before running java 129 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then 130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 132 | JAVACMD=`cygpath --unix "$JAVACMD"` 133 | 134 | # We build the pattern for arguments to be converted via cygpath 135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 136 | SEP="" 137 | for dir in $ROOTDIRSRAW ; do 138 | ROOTDIRS="$ROOTDIRS$SEP$dir" 139 | SEP="|" 140 | done 141 | OURCYGPATTERN="(^($ROOTDIRS))" 142 | # Add a user-defined pattern to the cygpath arguments 143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 145 | fi 146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 147 | i=0 148 | for arg in "$@" ; do 149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 151 | 152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 154 | else 155 | eval `echo args$i`="\"$arg\"" 156 | fi 157 | i=`expr $i + 1` 158 | done 159 | case $i in 160 | 0) set -- ;; 161 | 1) set -- "$args0" ;; 162 | 2) set -- "$args0" "$args1" ;; 163 | 3) set -- "$args0" "$args1" "$args2" ;; 164 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;; 165 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 166 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 167 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 168 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 169 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 170 | esac 171 | fi 172 | 173 | # Escape application args 174 | save () { 175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 176 | echo " " 177 | } 178 | APP_ARGS=`save "$@"` 179 | 180 | # Collect all arguments for the java command, following the shell quoting and substitution rules 181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 182 | 183 | exec "$JAVACMD" "$@" 184 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem http://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto init 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto init 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :init 68 | @rem Get command-line arguments, handling Windows variants 69 | 70 | if not "%OS%" == "Windows_NT" goto win9xME_args 71 | 72 | :win9xME_args 73 | @rem Slurp the command line arguments. 74 | set CMD_LINE_ARGS= 75 | set _SKIP=2 76 | 77 | :win9xME_args_slurp 78 | if "x%~1" == "x" goto execute 79 | 80 | set CMD_LINE_ARGS=%* 81 | 82 | :execute 83 | @rem Setup the command line 84 | 85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 86 | 87 | @rem Execute Gradle 88 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 89 | 90 | :end 91 | @rem End local scope for the variables with windows NT shell 92 | if "%ERRORLEVEL%"=="0" goto mainEnd 93 | 94 | :fail 95 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 96 | rem the _cmd.exe /c_ return code! 97 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 98 | exit /b 1 99 | 100 | :mainEnd 101 | if "%OS%"=="Windows_NT" endlocal 102 | 103 | :omega 104 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'VisionCameraOcrExample' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | 5 | include ':visioncameraocr' 6 | project(':visioncameraocr').projectDir = new File(rootProject.projectDir, '../../android') 7 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "VisionCameraOcrExample", 3 | "displayName": "VisionCameraOcr Example" 4 | } 5 | -------------------------------------------------------------------------------- /example/babel.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const pak = require('../package.json'); 3 | 4 | module.exports = { 5 | presets: ['module:metro-react-native-babel-preset'], 6 | plugins: [ 7 | [ 8 | 'module-resolver', 9 | { 10 | extensions: ['.tsx', '.ts', '.js', '.json'], 11 | alias: { 12 | [pak.name]: path.join(__dirname, '..', pak.source), 13 | }, 14 | }, 15 | ], 16 | [ 17 | 'react-native-reanimated/plugin', 18 | { 19 | globals: ['__scanOCR'], 20 | }, 21 | ], 22 | ], 23 | }; 24 | -------------------------------------------------------------------------------- /example/index.tsx: -------------------------------------------------------------------------------- 1 | import 'react-native-reanimated'; 2 | import { AppRegistry } from 'react-native'; 3 | import App from './src/App'; 4 | import { name as appName } from './app.json'; 5 | 6 | AppRegistry.registerComponent(appName, () => App); 7 | -------------------------------------------------------------------------------- /example/ios/File.swift: -------------------------------------------------------------------------------- 1 | // 2 | // File.swift 3 | // VisionCameraOcrExample 4 | // 5 | // Created by Rodrigo Gomes on 30/08/21. 6 | // 7 | 8 | import Foundation 9 | -------------------------------------------------------------------------------- /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, '11.0' 5 | 6 | target 'VisionCameraOcrExample' do 7 | config = use_native_modules! 8 | 9 | use_react_native!(:path => config["reactNativePath"]) 10 | 11 | pod 'vision-camera-ocr', :path => '../..' 12 | 13 | # Enables Flipper. 14 | # 15 | # Note that if you have use_frameworks! enabled, Flipper will not work and 16 | # you should disable these next few lines. 17 | use_flipper!({ 'Flipper' => '0.80.0' }) 18 | post_install do |installer| 19 | flipper_post_install(installer) 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /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.2) 6 | - FBReactNativeSpec (0.64.2): 7 | - RCT-Folly (= 2020.01.13.00) 8 | - RCTRequired (= 0.64.2) 9 | - RCTTypeSafety (= 0.64.2) 10 | - React-Core (= 0.64.2) 11 | - React-jsi (= 0.64.2) 12 | - ReactCommon/turbomodule/core (= 0.64.2) 13 | - Flipper (0.80.0): 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.80.0): 28 | - FlipperKit/Core (= 0.80.0) 29 | - FlipperKit/Core (0.80.0): 30 | - Flipper (~> 0.80.0) 31 | - FlipperKit/CppBridge 32 | - FlipperKit/FBCxxFollyDynamicConvert 33 | - FlipperKit/FBDefines 34 | - FlipperKit/FKPortForwarding 35 | - FlipperKit/CppBridge (0.80.0): 36 | - Flipper (~> 0.80.0) 37 | - FlipperKit/FBCxxFollyDynamicConvert (0.80.0): 38 | - Flipper-Folly (~> 2.5) 39 | - FlipperKit/FBDefines (0.80.0) 40 | - FlipperKit/FKPortForwarding (0.80.0): 41 | - CocoaAsyncSocket (~> 7.6) 42 | - Flipper-PeerTalk (~> 0.0.4) 43 | - FlipperKit/FlipperKitHighlightOverlay (0.80.0) 44 | - FlipperKit/FlipperKitLayoutPlugin (0.80.0): 45 | - FlipperKit/Core 46 | - FlipperKit/FlipperKitHighlightOverlay 47 | - FlipperKit/FlipperKitLayoutTextSearchable 48 | - YogaKit (~> 1.18) 49 | - FlipperKit/FlipperKitLayoutTextSearchable (0.80.0) 50 | - FlipperKit/FlipperKitNetworkPlugin (0.80.0): 51 | - FlipperKit/Core 52 | - FlipperKit/FlipperKitReactPlugin (0.80.0): 53 | - FlipperKit/Core 54 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.80.0): 55 | - FlipperKit/Core 56 | - FlipperKit/SKIOSNetworkPlugin (0.80.0): 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.2) 72 | - RCTTypeSafety (0.64.2): 73 | - FBLazyVector (= 0.64.2) 74 | - RCT-Folly (= 2020.01.13.00) 75 | - RCTRequired (= 0.64.2) 76 | - React-Core (= 0.64.2) 77 | - React (0.64.2): 78 | - React-Core (= 0.64.2) 79 | - React-Core/DevSupport (= 0.64.2) 80 | - React-Core/RCTWebSocket (= 0.64.2) 81 | - React-RCTActionSheet (= 0.64.2) 82 | - React-RCTAnimation (= 0.64.2) 83 | - React-RCTBlob (= 0.64.2) 84 | - React-RCTImage (= 0.64.2) 85 | - React-RCTLinking (= 0.64.2) 86 | - React-RCTNetwork (= 0.64.2) 87 | - React-RCTSettings (= 0.64.2) 88 | - React-RCTText (= 0.64.2) 89 | - React-RCTVibration (= 0.64.2) 90 | - React-callinvoker (0.64.2) 91 | - React-Core (0.64.2): 92 | - glog 93 | - RCT-Folly (= 2020.01.13.00) 94 | - React-Core/Default (= 0.64.2) 95 | - React-cxxreact (= 0.64.2) 96 | - React-jsi (= 0.64.2) 97 | - React-jsiexecutor (= 0.64.2) 98 | - React-perflogger (= 0.64.2) 99 | - Yoga 100 | - React-Core/CoreModulesHeaders (0.64.2): 101 | - glog 102 | - RCT-Folly (= 2020.01.13.00) 103 | - React-Core/Default 104 | - React-cxxreact (= 0.64.2) 105 | - React-jsi (= 0.64.2) 106 | - React-jsiexecutor (= 0.64.2) 107 | - React-perflogger (= 0.64.2) 108 | - Yoga 109 | - React-Core/Default (0.64.2): 110 | - glog 111 | - RCT-Folly (= 2020.01.13.00) 112 | - React-cxxreact (= 0.64.2) 113 | - React-jsi (= 0.64.2) 114 | - React-jsiexecutor (= 0.64.2) 115 | - React-perflogger (= 0.64.2) 116 | - Yoga 117 | - React-Core/DevSupport (0.64.2): 118 | - glog 119 | - RCT-Folly (= 2020.01.13.00) 120 | - React-Core/Default (= 0.64.2) 121 | - React-Core/RCTWebSocket (= 0.64.2) 122 | - React-cxxreact (= 0.64.2) 123 | - React-jsi (= 0.64.2) 124 | - React-jsiexecutor (= 0.64.2) 125 | - React-jsinspector (= 0.64.2) 126 | - React-perflogger (= 0.64.2) 127 | - Yoga 128 | - React-Core/RCTActionSheetHeaders (0.64.2): 129 | - glog 130 | - RCT-Folly (= 2020.01.13.00) 131 | - React-Core/Default 132 | - React-cxxreact (= 0.64.2) 133 | - React-jsi (= 0.64.2) 134 | - React-jsiexecutor (= 0.64.2) 135 | - React-perflogger (= 0.64.2) 136 | - Yoga 137 | - React-Core/RCTAnimationHeaders (0.64.2): 138 | - glog 139 | - RCT-Folly (= 2020.01.13.00) 140 | - React-Core/Default 141 | - React-cxxreact (= 0.64.2) 142 | - React-jsi (= 0.64.2) 143 | - React-jsiexecutor (= 0.64.2) 144 | - React-perflogger (= 0.64.2) 145 | - Yoga 146 | - React-Core/RCTBlobHeaders (0.64.2): 147 | - glog 148 | - RCT-Folly (= 2020.01.13.00) 149 | - React-Core/Default 150 | - React-cxxreact (= 0.64.2) 151 | - React-jsi (= 0.64.2) 152 | - React-jsiexecutor (= 0.64.2) 153 | - React-perflogger (= 0.64.2) 154 | - Yoga 155 | - React-Core/RCTImageHeaders (0.64.2): 156 | - glog 157 | - RCT-Folly (= 2020.01.13.00) 158 | - React-Core/Default 159 | - React-cxxreact (= 0.64.2) 160 | - React-jsi (= 0.64.2) 161 | - React-jsiexecutor (= 0.64.2) 162 | - React-perflogger (= 0.64.2) 163 | - Yoga 164 | - React-Core/RCTLinkingHeaders (0.64.2): 165 | - glog 166 | - RCT-Folly (= 2020.01.13.00) 167 | - React-Core/Default 168 | - React-cxxreact (= 0.64.2) 169 | - React-jsi (= 0.64.2) 170 | - React-jsiexecutor (= 0.64.2) 171 | - React-perflogger (= 0.64.2) 172 | - Yoga 173 | - React-Core/RCTNetworkHeaders (0.64.2): 174 | - glog 175 | - RCT-Folly (= 2020.01.13.00) 176 | - React-Core/Default 177 | - React-cxxreact (= 0.64.2) 178 | - React-jsi (= 0.64.2) 179 | - React-jsiexecutor (= 0.64.2) 180 | - React-perflogger (= 0.64.2) 181 | - Yoga 182 | - React-Core/RCTSettingsHeaders (0.64.2): 183 | - glog 184 | - RCT-Folly (= 2020.01.13.00) 185 | - React-Core/Default 186 | - React-cxxreact (= 0.64.2) 187 | - React-jsi (= 0.64.2) 188 | - React-jsiexecutor (= 0.64.2) 189 | - React-perflogger (= 0.64.2) 190 | - Yoga 191 | - React-Core/RCTTextHeaders (0.64.2): 192 | - glog 193 | - RCT-Folly (= 2020.01.13.00) 194 | - React-Core/Default 195 | - React-cxxreact (= 0.64.2) 196 | - React-jsi (= 0.64.2) 197 | - React-jsiexecutor (= 0.64.2) 198 | - React-perflogger (= 0.64.2) 199 | - Yoga 200 | - React-Core/RCTVibrationHeaders (0.64.2): 201 | - glog 202 | - RCT-Folly (= 2020.01.13.00) 203 | - React-Core/Default 204 | - React-cxxreact (= 0.64.2) 205 | - React-jsi (= 0.64.2) 206 | - React-jsiexecutor (= 0.64.2) 207 | - React-perflogger (= 0.64.2) 208 | - Yoga 209 | - React-Core/RCTWebSocket (0.64.2): 210 | - glog 211 | - RCT-Folly (= 2020.01.13.00) 212 | - React-Core/Default (= 0.64.2) 213 | - React-cxxreact (= 0.64.2) 214 | - React-jsi (= 0.64.2) 215 | - React-jsiexecutor (= 0.64.2) 216 | - React-perflogger (= 0.64.2) 217 | - Yoga 218 | - React-CoreModules (0.64.2): 219 | - FBReactNativeSpec (= 0.64.2) 220 | - RCT-Folly (= 2020.01.13.00) 221 | - RCTTypeSafety (= 0.64.2) 222 | - React-Core/CoreModulesHeaders (= 0.64.2) 223 | - React-jsi (= 0.64.2) 224 | - React-RCTImage (= 0.64.2) 225 | - ReactCommon/turbomodule/core (= 0.64.2) 226 | - React-cxxreact (0.64.2): 227 | - boost-for-react-native (= 1.63.0) 228 | - DoubleConversion 229 | - glog 230 | - RCT-Folly (= 2020.01.13.00) 231 | - React-callinvoker (= 0.64.2) 232 | - React-jsi (= 0.64.2) 233 | - React-jsinspector (= 0.64.2) 234 | - React-perflogger (= 0.64.2) 235 | - React-runtimeexecutor (= 0.64.2) 236 | - React-jsi (0.64.2): 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.2) 242 | - React-jsi/Default (0.64.2): 243 | - boost-for-react-native (= 1.63.0) 244 | - DoubleConversion 245 | - glog 246 | - RCT-Folly (= 2020.01.13.00) 247 | - React-jsiexecutor (0.64.2): 248 | - DoubleConversion 249 | - glog 250 | - RCT-Folly (= 2020.01.13.00) 251 | - React-cxxreact (= 0.64.2) 252 | - React-jsi (= 0.64.2) 253 | - React-perflogger (= 0.64.2) 254 | - React-jsinspector (0.64.2) 255 | - React-perflogger (0.64.2) 256 | - React-RCTActionSheet (0.64.2): 257 | - React-Core/RCTActionSheetHeaders (= 0.64.2) 258 | - React-RCTAnimation (0.64.2): 259 | - FBReactNativeSpec (= 0.64.2) 260 | - RCT-Folly (= 2020.01.13.00) 261 | - RCTTypeSafety (= 0.64.2) 262 | - React-Core/RCTAnimationHeaders (= 0.64.2) 263 | - React-jsi (= 0.64.2) 264 | - ReactCommon/turbomodule/core (= 0.64.2) 265 | - React-RCTBlob (0.64.2): 266 | - FBReactNativeSpec (= 0.64.2) 267 | - RCT-Folly (= 2020.01.13.00) 268 | - React-Core/RCTBlobHeaders (= 0.64.2) 269 | - React-Core/RCTWebSocket (= 0.64.2) 270 | - React-jsi (= 0.64.2) 271 | - React-RCTNetwork (= 0.64.2) 272 | - ReactCommon/turbomodule/core (= 0.64.2) 273 | - React-RCTImage (0.64.2): 274 | - FBReactNativeSpec (= 0.64.2) 275 | - RCT-Folly (= 2020.01.13.00) 276 | - RCTTypeSafety (= 0.64.2) 277 | - React-Core/RCTImageHeaders (= 0.64.2) 278 | - React-jsi (= 0.64.2) 279 | - React-RCTNetwork (= 0.64.2) 280 | - ReactCommon/turbomodule/core (= 0.64.2) 281 | - React-RCTLinking (0.64.2): 282 | - FBReactNativeSpec (= 0.64.2) 283 | - React-Core/RCTLinkingHeaders (= 0.64.2) 284 | - React-jsi (= 0.64.2) 285 | - ReactCommon/turbomodule/core (= 0.64.2) 286 | - React-RCTNetwork (0.64.2): 287 | - FBReactNativeSpec (= 0.64.2) 288 | - RCT-Folly (= 2020.01.13.00) 289 | - RCTTypeSafety (= 0.64.2) 290 | - React-Core/RCTNetworkHeaders (= 0.64.2) 291 | - React-jsi (= 0.64.2) 292 | - ReactCommon/turbomodule/core (= 0.64.2) 293 | - React-RCTSettings (0.64.2): 294 | - FBReactNativeSpec (= 0.64.2) 295 | - RCT-Folly (= 2020.01.13.00) 296 | - RCTTypeSafety (= 0.64.2) 297 | - React-Core/RCTSettingsHeaders (= 0.64.2) 298 | - React-jsi (= 0.64.2) 299 | - ReactCommon/turbomodule/core (= 0.64.2) 300 | - React-RCTText (0.64.2): 301 | - React-Core/RCTTextHeaders (= 0.64.2) 302 | - React-RCTVibration (0.64.2): 303 | - FBReactNativeSpec (= 0.64.2) 304 | - RCT-Folly (= 2020.01.13.00) 305 | - React-Core/RCTVibrationHeaders (= 0.64.2) 306 | - React-jsi (= 0.64.2) 307 | - ReactCommon/turbomodule/core (= 0.64.2) 308 | - React-runtimeexecutor (0.64.2): 309 | - React-jsi (= 0.64.2) 310 | - ReactCommon/turbomodule/core (0.64.2): 311 | - DoubleConversion 312 | - glog 313 | - RCT-Folly (= 2020.01.13.00) 314 | - React-callinvoker (= 0.64.2) 315 | - React-Core (= 0.64.2) 316 | - React-cxxreact (= 0.64.2) 317 | - React-jsi (= 0.64.2) 318 | - React-perflogger (= 0.64.2) 319 | - RNReanimated (2.3.0-alpha.2): 320 | - DoubleConversion 321 | - FBLazyVector 322 | - FBReactNativeSpec 323 | - glog 324 | - RCT-Folly 325 | - RCTRequired 326 | - RCTTypeSafety 327 | - React 328 | - React-callinvoker 329 | - React-Core 330 | - React-Core/DevSupport 331 | - React-Core/RCTWebSocket 332 | - React-CoreModules 333 | - React-cxxreact 334 | - React-jsi 335 | - React-jsiexecutor 336 | - React-jsinspector 337 | - React-RCTActionSheet 338 | - React-RCTAnimation 339 | - React-RCTBlob 340 | - React-RCTImage 341 | - React-RCTLinking 342 | - React-RCTNetwork 343 | - React-RCTSettings 344 | - React-RCTText 345 | - React-RCTVibration 346 | - ReactCommon/turbomodule/core 347 | - Yoga 348 | - vision-camera-ocr (0.1.0): 349 | - React-Core 350 | - VisionCamera (2.6.1): 351 | - React 352 | - React-callinvoker 353 | - React-Core 354 | - Yoga (1.14.0) 355 | - YogaKit (1.18.1): 356 | - Yoga (~> 1.14) 357 | 358 | DEPENDENCIES: 359 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) 360 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) 361 | - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) 362 | - Flipper (= 0.80.0) 363 | - Flipper-DoubleConversion (= 1.1.7) 364 | - Flipper-Folly (~> 2.5.3) 365 | - Flipper-Glog (= 0.3.6) 366 | - Flipper-PeerTalk (~> 0.0.4) 367 | - Flipper-RSocket (~> 1.3) 368 | - FlipperKit (= 0.80.0) 369 | - FlipperKit/Core (= 0.80.0) 370 | - FlipperKit/CppBridge (= 0.80.0) 371 | - FlipperKit/FBCxxFollyDynamicConvert (= 0.80.0) 372 | - FlipperKit/FBDefines (= 0.80.0) 373 | - FlipperKit/FKPortForwarding (= 0.80.0) 374 | - FlipperKit/FlipperKitHighlightOverlay (= 0.80.0) 375 | - FlipperKit/FlipperKitLayoutPlugin (= 0.80.0) 376 | - FlipperKit/FlipperKitLayoutTextSearchable (= 0.80.0) 377 | - FlipperKit/FlipperKitNetworkPlugin (= 0.80.0) 378 | - FlipperKit/FlipperKitReactPlugin (= 0.80.0) 379 | - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.80.0) 380 | - FlipperKit/SKIOSNetworkPlugin (= 0.80.0) 381 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) 382 | - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) 383 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) 384 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) 385 | - React (from `../node_modules/react-native/`) 386 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) 387 | - React-Core (from `../node_modules/react-native/`) 388 | - React-Core/DevSupport (from `../node_modules/react-native/`) 389 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`) 390 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) 391 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) 392 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) 393 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) 394 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) 395 | - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) 396 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) 397 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) 398 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) 399 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) 400 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) 401 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) 402 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) 403 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`) 404 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) 405 | - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) 406 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) 407 | - RNReanimated (from `../node_modules/react-native-reanimated`) 408 | - vision-camera-ocr (from `../..`) 409 | - VisionCamera (from `../node_modules/react-native-vision-camera`) 410 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) 411 | 412 | SPEC REPOS: 413 | trunk: 414 | - boost-for-react-native 415 | - CocoaAsyncSocket 416 | - Flipper 417 | - Flipper-DoubleConversion 418 | - Flipper-Folly 419 | - Flipper-Glog 420 | - Flipper-PeerTalk 421 | - Flipper-RSocket 422 | - FlipperKit 423 | - libevent 424 | - OpenSSL-Universal 425 | - YogaKit 426 | 427 | EXTERNAL SOURCES: 428 | DoubleConversion: 429 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" 430 | FBLazyVector: 431 | :path: "../node_modules/react-native/Libraries/FBLazyVector" 432 | FBReactNativeSpec: 433 | :path: "../node_modules/react-native/React/FBReactNativeSpec" 434 | glog: 435 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" 436 | RCT-Folly: 437 | :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" 438 | RCTRequired: 439 | :path: "../node_modules/react-native/Libraries/RCTRequired" 440 | RCTTypeSafety: 441 | :path: "../node_modules/react-native/Libraries/TypeSafety" 442 | React: 443 | :path: "../node_modules/react-native/" 444 | React-callinvoker: 445 | :path: "../node_modules/react-native/ReactCommon/callinvoker" 446 | React-Core: 447 | :path: "../node_modules/react-native/" 448 | React-CoreModules: 449 | :path: "../node_modules/react-native/React/CoreModules" 450 | React-cxxreact: 451 | :path: "../node_modules/react-native/ReactCommon/cxxreact" 452 | React-jsi: 453 | :path: "../node_modules/react-native/ReactCommon/jsi" 454 | React-jsiexecutor: 455 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor" 456 | React-jsinspector: 457 | :path: "../node_modules/react-native/ReactCommon/jsinspector" 458 | React-perflogger: 459 | :path: "../node_modules/react-native/ReactCommon/reactperflogger" 460 | React-RCTActionSheet: 461 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS" 462 | React-RCTAnimation: 463 | :path: "../node_modules/react-native/Libraries/NativeAnimation" 464 | React-RCTBlob: 465 | :path: "../node_modules/react-native/Libraries/Blob" 466 | React-RCTImage: 467 | :path: "../node_modules/react-native/Libraries/Image" 468 | React-RCTLinking: 469 | :path: "../node_modules/react-native/Libraries/LinkingIOS" 470 | React-RCTNetwork: 471 | :path: "../node_modules/react-native/Libraries/Network" 472 | React-RCTSettings: 473 | :path: "../node_modules/react-native/Libraries/Settings" 474 | React-RCTText: 475 | :path: "../node_modules/react-native/Libraries/Text" 476 | React-RCTVibration: 477 | :path: "../node_modules/react-native/Libraries/Vibration" 478 | React-runtimeexecutor: 479 | :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" 480 | ReactCommon: 481 | :path: "../node_modules/react-native/ReactCommon" 482 | RNReanimated: 483 | :path: "../node_modules/react-native-reanimated" 484 | vision-camera-ocr: 485 | :path: "../.." 486 | VisionCamera: 487 | :path: "../node_modules/react-native-vision-camera" 488 | Yoga: 489 | :path: "../node_modules/react-native/ReactCommon/yoga" 490 | 491 | SPEC CHECKSUMS: 492 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c 493 | CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 494 | DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de 495 | FBLazyVector: e686045572151edef46010a6f819ade377dfeb4b 496 | FBReactNativeSpec: f9e96515dc283629029f69181e003ebed33c8efb 497 | Flipper: ed161911b24ac3f237ed57febeed5d71d432d9bf 498 | Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 499 | Flipper-Folly: 755929a4f851b2fb2c347d533a23f191b008554c 500 | Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 501 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 502 | Flipper-RSocket: 127954abe8b162fcaf68d2134d34dc2bd7076154 503 | FlipperKit: 57764956d2f0f972c1af5075a9c8f05ca5b12349 504 | glog: 73c2498ac6884b13ede40eda8228cb1eee9d9d62 505 | libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 506 | OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b 507 | RCT-Folly: ec7a233ccc97cc556cf7237f0db1ff65b986f27c 508 | RCTRequired: 6d3e854f0e7260a648badd0d44fc364bc9da9728 509 | RCTTypeSafety: c1f31d19349c6b53085766359caac425926fafaa 510 | React: bda6b6d7ae912de97d7a61aa5c160db24aa2ad69 511 | React-callinvoker: 9840ea7e8e88ed73d438edb725574820b29b5baa 512 | React-Core: b5e385da7ce5f16a220fc60fd0749eae2c6120f0 513 | React-CoreModules: 17071a4e2c5239b01585f4aa8070141168ab298f 514 | React-cxxreact: 9be7b6340ed9f7c53e53deca7779f07cd66525ba 515 | React-jsi: 67747b9722f6dab2ffe15b011bcf6b3f2c3f1427 516 | React-jsiexecutor: 80c46bd381fd06e418e0d4f53672dc1d1945c4c3 517 | React-jsinspector: cc614ec18a9ca96fd275100c16d74d62ee11f0ae 518 | React-perflogger: 25373e382fed75ce768a443822f07098a15ab737 519 | React-RCTActionSheet: af7796ba49ffe4ca92e7277a5d992d37203f7da5 520 | React-RCTAnimation: 6a2e76ab50c6f25b428d81b76a5a45351c4d77aa 521 | React-RCTBlob: 02a2887023e0eed99391b6445b2e23a2a6f9226d 522 | React-RCTImage: ce5bf8e7438f2286d9b646a05d6ab11f38b0323d 523 | React-RCTLinking: ccd20742de14e020cb5f99d5c7e0bf0383aefbd9 524 | React-RCTNetwork: dfb9d089ab0753e5e5f55fc4b1210858f7245647 525 | React-RCTSettings: b14aef2d83699e48b410fb7c3ba5b66cd3291ae2 526 | React-RCTText: 41a2e952dd9adc5caf6fb68ed46b275194d5da5f 527 | React-RCTVibration: 24600e3b1aaa77126989bc58b6747509a1ba14f3 528 | React-runtimeexecutor: a9904c6d0218fb9f8b19d6dd88607225927668f9 529 | ReactCommon: 149906e01aa51142707a10665185db879898e966 530 | RNReanimated: daebbd404c0cd9df6daa248d63dd940086bea9ff 531 | vision-camera-ocr: 7c1c07d0dd2ccd7629c500194ab34b402c1963f3 532 | VisionCamera: dc481620431e31c1d6bbbc438d8a1d9c56f3d304 533 | Yoga: 575c581c63e0d35c9a83f4b46d01d63abc1100ac 534 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a 535 | 536 | PODFILE CHECKSUM: 5ac42b6f94ec9f0877743043abd37e647f6d88db 537 | 538 | COCOAPODS: 1.10.1 539 | -------------------------------------------------------------------------------- /example/ios/VisionCameraOcrExample-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | -------------------------------------------------------------------------------- /example/ios/VisionCameraOcrExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 53; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 11 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 12 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 13 | 4C39C56BAD484C67AA576FFA /* libPods-VisionCameraOcrExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CA3E69C5B9553B26FBA2DF04 /* libPods-VisionCameraOcrExample.a */; }; 14 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; 15 | B4822FB126DDB78900193C68 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4822FB026DDB78900193C68 /* File.swift */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 20 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 21 | 00E356F21AD99517003FC87E /* VisionCameraOcrExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VisionCameraOcrExampleTests.m; sourceTree = ""; }; 22 | 1172626FD82B50406EC37522 /* Pods-VisionCameraOcrExample-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VisionCameraOcrExample-tvOSTests.release.xcconfig"; path = "Target Support Files/Pods-VisionCameraOcrExample-tvOSTests/Pods-VisionCameraOcrExample-tvOSTests.release.xcconfig"; sourceTree = ""; }; 23 | 13B07F961A680F5B00A75B9A /* VisionCameraOcrExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VisionCameraOcrExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = VisionCameraOcrExample/AppDelegate.h; sourceTree = ""; }; 25 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = VisionCameraOcrExample/AppDelegate.m; sourceTree = ""; }; 26 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = VisionCameraOcrExample/Images.xcassets; sourceTree = ""; }; 27 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = VisionCameraOcrExample/Info.plist; sourceTree = ""; }; 28 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = VisionCameraOcrExample/main.m; sourceTree = ""; }; 29 | 20AB94514737C20DFC4350AE /* Pods-VisionCameraOcrExample-VisionCameraOcrExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VisionCameraOcrExample-VisionCameraOcrExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-VisionCameraOcrExample-VisionCameraOcrExampleTests/Pods-VisionCameraOcrExample-VisionCameraOcrExampleTests.debug.xcconfig"; sourceTree = ""; }; 30 | 47F7ED3B7971BE374F7B8635 /* Pods-VisionCameraOcrExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VisionCameraOcrExample.debug.xcconfig"; path = "Target Support Files/Pods-VisionCameraOcrExample/Pods-VisionCameraOcrExample.debug.xcconfig"; sourceTree = ""; }; 31 | 6F6A20A3A2D31400635C17C3 /* libPods-VisionCameraOcrExample-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VisionCameraOcrExample-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | 7533C965B72700ED5E109803 /* libPods-VisionCameraOcrExample-VisionCameraOcrExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VisionCameraOcrExample-VisionCameraOcrExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = VisionCameraOcrExample/LaunchScreen.storyboard; sourceTree = ""; }; 34 | AE69546072F7DC475F196F4C /* Pods-VisionCameraOcrExample-tvOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VisionCameraOcrExample-tvOS.debug.xcconfig"; path = "Target Support Files/Pods-VisionCameraOcrExample-tvOS/Pods-VisionCameraOcrExample-tvOS.debug.xcconfig"; sourceTree = ""; }; 35 | B4822FAF26DDB78800193C68 /* VisionCameraOcrExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "VisionCameraOcrExample-Bridging-Header.h"; sourceTree = ""; }; 36 | B4822FB026DDB78900193C68 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; }; 37 | B56BA239C969F702C63633C7 /* libPods-VisionCameraOcrExample-tvOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VisionCameraOcrExample-tvOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | CA3E69C5B9553B26FBA2DF04 /* libPods-VisionCameraOcrExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VisionCameraOcrExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | E00ACF0FDA8BF921659E2F9A /* Pods-VisionCameraOcrExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VisionCameraOcrExample.release.xcconfig"; path = "Target Support Files/Pods-VisionCameraOcrExample/Pods-VisionCameraOcrExample.release.xcconfig"; sourceTree = ""; }; 40 | E88D904CC5F3CC947B01AB46 /* Pods-VisionCameraOcrExample-tvOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VisionCameraOcrExample-tvOS.release.xcconfig"; path = "Target Support Files/Pods-VisionCameraOcrExample-tvOS/Pods-VisionCameraOcrExample-tvOS.release.xcconfig"; sourceTree = ""; }; 41 | EC1294380F6AD2F72CA45BA5 /* Pods-VisionCameraOcrExample-VisionCameraOcrExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VisionCameraOcrExample-VisionCameraOcrExampleTests.release.xcconfig"; path = "Target Support Files/Pods-VisionCameraOcrExample-VisionCameraOcrExampleTests/Pods-VisionCameraOcrExample-VisionCameraOcrExampleTests.release.xcconfig"; sourceTree = ""; }; 42 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; 43 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; 44 | FFD6887008BEF5F1A6973F45 /* Pods-VisionCameraOcrExample-tvOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VisionCameraOcrExample-tvOSTests.debug.xcconfig"; path = "Target Support Files/Pods-VisionCameraOcrExample-tvOSTests/Pods-VisionCameraOcrExample-tvOSTests.debug.xcconfig"; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | 4C39C56BAD484C67AA576FFA /* libPods-VisionCameraOcrExample.a in Frameworks */, 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | /* End PBXFrameworksBuildPhase section */ 57 | 58 | /* Begin PBXGroup section */ 59 | 00E356EF1AD99517003FC87E /* VisionCameraOcrExampleTests */ = { 60 | isa = PBXGroup; 61 | children = ( 62 | 00E356F21AD99517003FC87E /* VisionCameraOcrExampleTests.m */, 63 | 00E356F01AD99517003FC87E /* Supporting Files */, 64 | ); 65 | path = VisionCameraOcrExampleTests; 66 | sourceTree = ""; 67 | }; 68 | 00E356F01AD99517003FC87E /* Supporting Files */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | 00E356F11AD99517003FC87E /* Info.plist */, 72 | ); 73 | name = "Supporting Files"; 74 | sourceTree = ""; 75 | }; 76 | 13B07FAE1A68108700A75B9A /* VisionCameraOcrExample */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 80 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 81 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 82 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 83 | 13B07FB61A68108700A75B9A /* Info.plist */, 84 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, 85 | 13B07FB71A68108700A75B9A /* main.m */, 86 | B4822FB026DDB78900193C68 /* File.swift */, 87 | B4822FAF26DDB78800193C68 /* VisionCameraOcrExample-Bridging-Header.h */, 88 | ); 89 | name = VisionCameraOcrExample; 90 | sourceTree = ""; 91 | }; 92 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */, 96 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */, 97 | CA3E69C5B9553B26FBA2DF04 /* libPods-VisionCameraOcrExample.a */, 98 | 7533C965B72700ED5E109803 /* libPods-VisionCameraOcrExample-VisionCameraOcrExampleTests.a */, 99 | B56BA239C969F702C63633C7 /* libPods-VisionCameraOcrExample-tvOS.a */, 100 | 6F6A20A3A2D31400635C17C3 /* libPods-VisionCameraOcrExample-tvOSTests.a */, 101 | ); 102 | name = Frameworks; 103 | sourceTree = ""; 104 | }; 105 | 6B9684456A2045ADE5A6E47E /* Pods */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 47F7ED3B7971BE374F7B8635 /* Pods-VisionCameraOcrExample.debug.xcconfig */, 109 | E00ACF0FDA8BF921659E2F9A /* Pods-VisionCameraOcrExample.release.xcconfig */, 110 | 20AB94514737C20DFC4350AE /* Pods-VisionCameraOcrExample-VisionCameraOcrExampleTests.debug.xcconfig */, 111 | EC1294380F6AD2F72CA45BA5 /* Pods-VisionCameraOcrExample-VisionCameraOcrExampleTests.release.xcconfig */, 112 | AE69546072F7DC475F196F4C /* Pods-VisionCameraOcrExample-tvOS.debug.xcconfig */, 113 | E88D904CC5F3CC947B01AB46 /* Pods-VisionCameraOcrExample-tvOS.release.xcconfig */, 114 | FFD6887008BEF5F1A6973F45 /* Pods-VisionCameraOcrExample-tvOSTests.debug.xcconfig */, 115 | 1172626FD82B50406EC37522 /* Pods-VisionCameraOcrExample-tvOSTests.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 /* VisionCameraOcrExample */, 131 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 132 | 00E356EF1AD99517003FC87E /* VisionCameraOcrExampleTests */, 133 | 83CBBA001A601CBA00E9B192 /* Products */, 134 | 2D16E6871FA4F8E400B85C8A /* Frameworks */, 135 | 6B9684456A2045ADE5A6E47E /* Pods */, 136 | ); 137 | indentWidth = 2; 138 | sourceTree = ""; 139 | tabWidth = 2; 140 | usesTabs = 0; 141 | }; 142 | 83CBBA001A601CBA00E9B192 /* Products */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 13B07F961A680F5B00A75B9A /* VisionCameraOcrExample.app */, 146 | ); 147 | name = Products; 148 | sourceTree = ""; 149 | }; 150 | /* End PBXGroup section */ 151 | 152 | /* Begin PBXNativeTarget section */ 153 | 13B07F861A680F5B00A75B9A /* VisionCameraOcrExample */ = { 154 | isa = PBXNativeTarget; 155 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "VisionCameraOcrExample" */; 156 | buildPhases = ( 157 | 4F0A6FC082772762E3E4C96C /* [CP] Check Pods Manifest.lock */, 158 | FD10A7F022414F080027D42C /* Start Packager */, 159 | 13B07F871A680F5B00A75B9A /* Sources */, 160 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 161 | 13B07F8E1A680F5B00A75B9A /* Resources */, 162 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 163 | C1D60D28B925C94BD88E79D7 /* [CP] Copy Pods Resources */, 164 | 10994DDF2F0285F2491A27D3 /* [CP] Embed Pods Frameworks */, 165 | ); 166 | buildRules = ( 167 | ); 168 | dependencies = ( 169 | ); 170 | name = VisionCameraOcrExample; 171 | productName = VisionCameraOcrExample; 172 | productReference = 13B07F961A680F5B00A75B9A /* VisionCameraOcrExample.app */; 173 | productType = "com.apple.product-type.application"; 174 | }; 175 | /* End PBXNativeTarget section */ 176 | 177 | /* Begin PBXProject section */ 178 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 179 | isa = PBXProject; 180 | attributes = { 181 | BuildIndependentTargetsInParallel = YES; 182 | LastUpgradeCheck = 1130; 183 | TargetAttributes = { 184 | 13B07F861A680F5B00A75B9A = { 185 | LastSwiftMigration = 1240; 186 | }; 187 | }; 188 | }; 189 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "VisionCameraOcrExample" */; 190 | compatibilityVersion = "Xcode 11.0"; 191 | developmentRegion = en; 192 | hasScannedForEncodings = 0; 193 | knownRegions = ( 194 | en, 195 | Base, 196 | ); 197 | mainGroup = 83CBB9F61A601CBA00E9B192; 198 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 199 | projectDirPath = ""; 200 | projectRoot = ""; 201 | targets = ( 202 | 13B07F861A680F5B00A75B9A /* VisionCameraOcrExample */, 203 | ); 204 | }; 205 | /* End PBXProject section */ 206 | 207 | /* Begin PBXResourcesBuildPhase section */ 208 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 209 | isa = PBXResourcesBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 213 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 214 | ); 215 | runOnlyForDeploymentPostprocessing = 0; 216 | }; 217 | /* End PBXResourcesBuildPhase section */ 218 | 219 | /* Begin PBXShellScriptBuildPhase section */ 220 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 221 | isa = PBXShellScriptBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | ); 225 | inputPaths = ( 226 | ); 227 | name = "Bundle React Native code and images"; 228 | outputPaths = ( 229 | ); 230 | runOnlyForDeploymentPostprocessing = 0; 231 | shellPath = /bin/sh; 232 | shellScript = "export ENTRY_FILE=index.tsx\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; 233 | }; 234 | 10994DDF2F0285F2491A27D3 /* [CP] Embed Pods Frameworks */ = { 235 | isa = PBXShellScriptBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | ); 239 | inputFileListPaths = ( 240 | "${PODS_ROOT}/Target Support Files/Pods-VisionCameraOcrExample/Pods-VisionCameraOcrExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", 241 | ); 242 | name = "[CP] Embed Pods Frameworks"; 243 | outputFileListPaths = ( 244 | "${PODS_ROOT}/Target Support Files/Pods-VisionCameraOcrExample/Pods-VisionCameraOcrExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", 245 | ); 246 | runOnlyForDeploymentPostprocessing = 0; 247 | shellPath = /bin/sh; 248 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-VisionCameraOcrExample/Pods-VisionCameraOcrExample-frameworks.sh\"\n"; 249 | showEnvVarsInLog = 0; 250 | }; 251 | 4F0A6FC082772762E3E4C96C /* [CP] Check Pods Manifest.lock */ = { 252 | isa = PBXShellScriptBuildPhase; 253 | buildActionMask = 2147483647; 254 | files = ( 255 | ); 256 | inputFileListPaths = ( 257 | ); 258 | inputPaths = ( 259 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 260 | "${PODS_ROOT}/Manifest.lock", 261 | ); 262 | name = "[CP] Check Pods Manifest.lock"; 263 | outputFileListPaths = ( 264 | ); 265 | outputPaths = ( 266 | "$(DERIVED_FILE_DIR)/Pods-VisionCameraOcrExample-checkManifestLockResult.txt", 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | shellPath = /bin/sh; 270 | 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"; 271 | showEnvVarsInLog = 0; 272 | }; 273 | C1D60D28B925C94BD88E79D7 /* [CP] Copy Pods Resources */ = { 274 | isa = PBXShellScriptBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | ); 278 | inputFileListPaths = ( 279 | "${PODS_ROOT}/Target Support Files/Pods-VisionCameraOcrExample/Pods-VisionCameraOcrExample-resources-${CONFIGURATION}-input-files.xcfilelist", 280 | ); 281 | name = "[CP] Copy Pods Resources"; 282 | outputFileListPaths = ( 283 | "${PODS_ROOT}/Target Support Files/Pods-VisionCameraOcrExample/Pods-VisionCameraOcrExample-resources-${CONFIGURATION}-output-files.xcfilelist", 284 | ); 285 | runOnlyForDeploymentPostprocessing = 0; 286 | shellPath = /bin/sh; 287 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-VisionCameraOcrExample/Pods-VisionCameraOcrExample-resources.sh\"\n"; 288 | showEnvVarsInLog = 0; 289 | }; 290 | FD10A7F022414F080027D42C /* Start Packager */ = { 291 | isa = PBXShellScriptBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | ); 295 | inputFileListPaths = ( 296 | ); 297 | inputPaths = ( 298 | ); 299 | name = "Start Packager"; 300 | outputFileListPaths = ( 301 | ); 302 | outputPaths = ( 303 | ); 304 | runOnlyForDeploymentPostprocessing = 0; 305 | shellPath = /bin/sh; 306 | 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"; 307 | showEnvVarsInLog = 0; 308 | }; 309 | /* End PBXShellScriptBuildPhase section */ 310 | 311 | /* Begin PBXSourcesBuildPhase section */ 312 | 13B07F871A680F5B00A75B9A /* Sources */ = { 313 | isa = PBXSourcesBuildPhase; 314 | buildActionMask = 2147483647; 315 | files = ( 316 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 317 | B4822FB126DDB78900193C68 /* File.swift in Sources */, 318 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 319 | ); 320 | runOnlyForDeploymentPostprocessing = 0; 321 | }; 322 | /* End PBXSourcesBuildPhase section */ 323 | 324 | /* Begin XCBuildConfiguration section */ 325 | 13B07F941A680F5B00A75B9A /* Debug */ = { 326 | isa = XCBuildConfiguration; 327 | baseConfigurationReference = 47F7ED3B7971BE374F7B8635 /* Pods-VisionCameraOcrExample.debug.xcconfig */; 328 | buildSettings = { 329 | ARCHS = "$(ARCHS_STANDARD)"; 330 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 331 | CLANG_ENABLE_MODULES = YES; 332 | CURRENT_PROJECT_VERSION = 1; 333 | DEVELOPMENT_TEAM = GLBCP2HQPB; 334 | ENABLE_BITCODE = NO; 335 | INFOPLIST_FILE = VisionCameraOcrExample/Info.plist; 336 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 337 | LD_RUNPATH_SEARCH_PATHS = ( 338 | "$(inherited)", 339 | "@executable_path/Frameworks", 340 | ); 341 | LIBRARY_SEARCH_PATHS = ( 342 | "$(inherited)", 343 | "\"${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket\"", 344 | "\"${PODS_CONFIGURATION_BUILD_DIR}/DoubleConversion\"", 345 | "\"${PODS_CONFIGURATION_BUILD_DIR}/FBReactNativeSpec\"", 346 | "\"${PODS_CONFIGURATION_BUILD_DIR}/Flipper\"", 347 | "\"${PODS_CONFIGURATION_BUILD_DIR}/Flipper-DoubleConversion\"", 348 | "\"${PODS_CONFIGURATION_BUILD_DIR}/Flipper-Folly\"", 349 | "\"${PODS_CONFIGURATION_BUILD_DIR}/Flipper-Glog\"", 350 | "\"${PODS_CONFIGURATION_BUILD_DIR}/Flipper-PeerTalk\"", 351 | "\"${PODS_CONFIGURATION_BUILD_DIR}/Flipper-RSocket\"", 352 | "\"${PODS_CONFIGURATION_BUILD_DIR}/FlipperKit\"", 353 | "\"${PODS_CONFIGURATION_BUILD_DIR}/RCT-Folly\"", 354 | "\"${PODS_CONFIGURATION_BUILD_DIR}/RCTTypeSafety\"", 355 | "\"${PODS_CONFIGURATION_BUILD_DIR}/RNReanimated\"", 356 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Core\"", 357 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-CoreModules\"", 358 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTAnimation\"", 359 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTBlob\"", 360 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTImage\"", 361 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTLinking\"", 362 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTNetwork\"", 363 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTSettings\"", 364 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTText\"", 365 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTVibration\"", 366 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-cxxreact\"", 367 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-jsi\"", 368 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-jsiexecutor\"", 369 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-jsinspector\"", 370 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-perflogger\"", 371 | "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon\"", 372 | "\"${PODS_CONFIGURATION_BUILD_DIR}/VisionCamera\"", 373 | "\"${PODS_CONFIGURATION_BUILD_DIR}/Yoga\"", 374 | "\"${PODS_CONFIGURATION_BUILD_DIR}/YogaKit\"", 375 | "\"${PODS_CONFIGURATION_BUILD_DIR}/glog\"", 376 | "\"${PODS_CONFIGURATION_BUILD_DIR}/libevent\"", 377 | "\"${PODS_CONFIGURATION_BUILD_DIR}/vision-camera-ocr\"", 378 | "\"$(SDKROOT)/usr/lib/swift\\\"", 379 | ); 380 | OTHER_LDFLAGS = ( 381 | "$(inherited)", 382 | "-ObjC", 383 | "-lc++", 384 | ); 385 | PRODUCT_BUNDLE_IDENTIFIER = com.example.visioncameraocr; 386 | PRODUCT_NAME = VisionCameraOcrExample; 387 | SWIFT_OBJC_BRIDGING_HEADER = "VisionCameraOcrExample-Bridging-Header.h"; 388 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 389 | SWIFT_VERSION = 5.0; 390 | VERSIONING_SYSTEM = "apple-generic"; 391 | }; 392 | name = Debug; 393 | }; 394 | 13B07F951A680F5B00A75B9A /* Release */ = { 395 | isa = XCBuildConfiguration; 396 | baseConfigurationReference = E00ACF0FDA8BF921659E2F9A /* Pods-VisionCameraOcrExample.release.xcconfig */; 397 | buildSettings = { 398 | ARCHS = "$(ARCHS_STANDARD)"; 399 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 400 | CLANG_ENABLE_MODULES = YES; 401 | CURRENT_PROJECT_VERSION = 1; 402 | DEVELOPMENT_TEAM = GLBCP2HQPB; 403 | INFOPLIST_FILE = VisionCameraOcrExample/Info.plist; 404 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 405 | LD_RUNPATH_SEARCH_PATHS = ( 406 | "$(inherited)", 407 | "@executable_path/Frameworks", 408 | ); 409 | LIBRARY_SEARCH_PATHS = ( 410 | "$(inherited)", 411 | "\"${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket\"", 412 | "\"${PODS_CONFIGURATION_BUILD_DIR}/DoubleConversion\"", 413 | "\"${PODS_CONFIGURATION_BUILD_DIR}/FBReactNativeSpec\"", 414 | "\"${PODS_CONFIGURATION_BUILD_DIR}/RCT-Folly\"", 415 | "\"${PODS_CONFIGURATION_BUILD_DIR}/RCTTypeSafety\"", 416 | "\"${PODS_CONFIGURATION_BUILD_DIR}/RNReanimated\"", 417 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Core\"", 418 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-CoreModules\"", 419 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTAnimation\"", 420 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTBlob\"", 421 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTImage\"", 422 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTLinking\"", 423 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTNetwork\"", 424 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTSettings\"", 425 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTText\"", 426 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTVibration\"", 427 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-cxxreact\"", 428 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-jsi\"", 429 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-jsiexecutor\"", 430 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-jsinspector\"", 431 | "\"${PODS_CONFIGURATION_BUILD_DIR}/React-perflogger\"", 432 | "\"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon\"", 433 | "\"${PODS_CONFIGURATION_BUILD_DIR}/VisionCamera\"", 434 | "\"${PODS_CONFIGURATION_BUILD_DIR}/Yoga\"", 435 | "\"${PODS_CONFIGURATION_BUILD_DIR}/YogaKit\"", 436 | "\"${PODS_CONFIGURATION_BUILD_DIR}/glog\"", 437 | "\"${PODS_CONFIGURATION_BUILD_DIR}/libevent\"", 438 | "\"${PODS_CONFIGURATION_BUILD_DIR}/vision-camera-ocr\"", 439 | "\"$(SDKROOT)/usr/lib/swift\\\"", 440 | ); 441 | OTHER_LDFLAGS = ( 442 | "$(inherited)", 443 | "-ObjC", 444 | "-lc++", 445 | ); 446 | PRODUCT_BUNDLE_IDENTIFIER = com.example.visioncameraocr; 447 | PRODUCT_NAME = VisionCameraOcrExample; 448 | SWIFT_OBJC_BRIDGING_HEADER = "VisionCameraOcrExample-Bridging-Header.h"; 449 | SWIFT_VERSION = 5.0; 450 | VERSIONING_SYSTEM = "apple-generic"; 451 | }; 452 | name = Release; 453 | }; 454 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 455 | isa = XCBuildConfiguration; 456 | buildSettings = { 457 | ALWAYS_SEARCH_USER_PATHS = NO; 458 | ARCHS = "$(ARCHS_STANDARD)"; 459 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 460 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 461 | CLANG_CXX_LIBRARY = "libc++"; 462 | CLANG_ENABLE_MODULES = YES; 463 | CLANG_ENABLE_OBJC_ARC = YES; 464 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 465 | CLANG_WARN_BOOL_CONVERSION = YES; 466 | CLANG_WARN_COMMA = YES; 467 | CLANG_WARN_CONSTANT_CONVERSION = YES; 468 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 469 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 470 | CLANG_WARN_EMPTY_BODY = YES; 471 | CLANG_WARN_ENUM_CONVERSION = YES; 472 | CLANG_WARN_INFINITE_RECURSION = YES; 473 | CLANG_WARN_INT_CONVERSION = YES; 474 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 475 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 476 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 477 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 478 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 479 | CLANG_WARN_STRICT_PROTOTYPES = YES; 480 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 481 | CLANG_WARN_UNREACHABLE_CODE = YES; 482 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 483 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 484 | COPY_PHASE_STRIP = NO; 485 | ENABLE_STRICT_OBJC_MSGSEND = YES; 486 | ENABLE_TESTABILITY = YES; 487 | GCC_C_LANGUAGE_STANDARD = gnu99; 488 | GCC_DYNAMIC_NO_PIC = NO; 489 | GCC_NO_COMMON_BLOCKS = YES; 490 | GCC_OPTIMIZATION_LEVEL = 0; 491 | GCC_PREPROCESSOR_DEFINITIONS = ( 492 | "DEBUG=1", 493 | "$(inherited)", 494 | ); 495 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 496 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 497 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 498 | GCC_WARN_UNDECLARED_SELECTOR = YES; 499 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 500 | GCC_WARN_UNUSED_FUNCTION = YES; 501 | GCC_WARN_UNUSED_VARIABLE = YES; 502 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 503 | LD_RUNPATH_SEARCH_PATHS = ( 504 | /usr/lib/swift, 505 | "$(inherited)", 506 | ); 507 | LIBRARY_SEARCH_PATHS = ( 508 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 509 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", 510 | "\"$(inherited)\"", 511 | ); 512 | MTL_ENABLE_DEBUG_INFO = YES; 513 | ONLY_ACTIVE_ARCH = YES; 514 | SDKROOT = iphoneos; 515 | }; 516 | name = Debug; 517 | }; 518 | 83CBBA211A601CBA00E9B192 /* Release */ = { 519 | isa = XCBuildConfiguration; 520 | buildSettings = { 521 | ALWAYS_SEARCH_USER_PATHS = NO; 522 | ARCHS = "$(ARCHS_STANDARD)"; 523 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 524 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 525 | CLANG_CXX_LIBRARY = "libc++"; 526 | CLANG_ENABLE_MODULES = YES; 527 | CLANG_ENABLE_OBJC_ARC = YES; 528 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 529 | CLANG_WARN_BOOL_CONVERSION = YES; 530 | CLANG_WARN_COMMA = YES; 531 | CLANG_WARN_CONSTANT_CONVERSION = YES; 532 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 533 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 534 | CLANG_WARN_EMPTY_BODY = YES; 535 | CLANG_WARN_ENUM_CONVERSION = YES; 536 | CLANG_WARN_INFINITE_RECURSION = YES; 537 | CLANG_WARN_INT_CONVERSION = YES; 538 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 539 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 540 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 541 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 542 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 543 | CLANG_WARN_STRICT_PROTOTYPES = YES; 544 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 545 | CLANG_WARN_UNREACHABLE_CODE = YES; 546 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 547 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 548 | COPY_PHASE_STRIP = YES; 549 | ENABLE_NS_ASSERTIONS = NO; 550 | ENABLE_STRICT_OBJC_MSGSEND = YES; 551 | GCC_C_LANGUAGE_STANDARD = gnu99; 552 | GCC_NO_COMMON_BLOCKS = YES; 553 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 554 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 555 | GCC_WARN_UNDECLARED_SELECTOR = YES; 556 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 557 | GCC_WARN_UNUSED_FUNCTION = YES; 558 | GCC_WARN_UNUSED_VARIABLE = YES; 559 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 560 | LD_RUNPATH_SEARCH_PATHS = ( 561 | /usr/lib/swift, 562 | "$(inherited)", 563 | ); 564 | LIBRARY_SEARCH_PATHS = ( 565 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", 566 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", 567 | "\"$(inherited)\"", 568 | ); 569 | MTL_ENABLE_DEBUG_INFO = NO; 570 | SDKROOT = iphoneos; 571 | VALIDATE_PRODUCT = YES; 572 | }; 573 | name = Release; 574 | }; 575 | /* End XCBuildConfiguration section */ 576 | 577 | /* Begin XCConfigurationList section */ 578 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "VisionCameraOcrExample" */ = { 579 | isa = XCConfigurationList; 580 | buildConfigurations = ( 581 | 13B07F941A680F5B00A75B9A /* Debug */, 582 | 13B07F951A680F5B00A75B9A /* Release */, 583 | ); 584 | defaultConfigurationIsVisible = 0; 585 | defaultConfigurationName = Debug; 586 | }; 587 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "VisionCameraOcrExample" */ = { 588 | isa = XCConfigurationList; 589 | buildConfigurations = ( 590 | 83CBBA201A601CBA00E9B192 /* Debug */, 591 | 83CBBA211A601CBA00E9B192 /* Release */, 592 | ); 593 | defaultConfigurationIsVisible = 0; 594 | defaultConfigurationName = Debug; 595 | }; 596 | /* End XCConfigurationList section */ 597 | }; 598 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 599 | } 600 | -------------------------------------------------------------------------------- /example/ios/VisionCameraOcrExample.xcodeproj/xcshareddata/xcschemes/VisionCameraOcrExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 51 | 52 | 53 | 54 | 55 | 56 | 66 | 68 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /example/ios/VisionCameraOcrExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/VisionCameraOcrExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/VisionCameraOcrExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (nonatomic, strong) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /example/ios/VisionCameraOcrExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import "AppDelegate.h" 9 | 10 | #import 11 | #import 12 | #import 13 | 14 | #ifdef FB_SONARKIT_ENABLED 15 | #import 16 | #import 17 | #import 18 | #import 19 | #import 20 | #import 21 | static void InitializeFlipper(UIApplication *application) { 22 | FlipperClient *client = [FlipperClient sharedClient]; 23 | SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; 24 | [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; 25 | [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; 26 | [client addPlugin:[FlipperKitReactPlugin new]]; 27 | [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; 28 | [client start]; 29 | } 30 | #endif 31 | 32 | @implementation AppDelegate 33 | 34 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 35 | { 36 | #ifdef FB_SONARKIT_ENABLED 37 | InitializeFlipper(application); 38 | #endif 39 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; 40 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge 41 | moduleName:@"VisionCameraOcrExample" 42 | initialProperties:nil]; 43 | 44 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 45 | 46 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 47 | UIViewController *rootViewController = [UIViewController new]; 48 | rootViewController.view = rootView; 49 | self.window.rootViewController = rootViewController; 50 | [self.window makeKeyAndVisible]; 51 | return YES; 52 | } 53 | 54 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge 55 | { 56 | #if DEBUG 57 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; 58 | #else 59 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; 60 | #endif 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /example/ios/VisionCameraOcrExample/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/VisionCameraOcrExample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/VisionCameraOcrExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSCameraUsageDescription 6 | $(PRODUCT_NAME) needs access to your Camera. 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleDisplayName 10 | VisionCameraOcr Example 11 | CFBundleExecutable 12 | $(EXECUTABLE_NAME) 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | $(PRODUCT_NAME) 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1 27 | LSRequiresIPhoneOS 28 | 29 | NSAppTransportSecurity 30 | 31 | NSAllowsArbitraryLoads 32 | 33 | NSExceptionDomains 34 | 35 | localhost 36 | 37 | NSExceptionAllowsInsecureHTTPLoads 38 | 39 | 40 | 41 | 42 | NSLocationWhenInUseUsageDescription 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/VisionCameraOcrExample/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /example/ios/VisionCameraOcrExample/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /example/metro.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const exclusionList = require('metro-config/src/defaults/exclusionList'); 3 | const escape = require('escape-string-regexp'); 4 | const pak = require('../package.json'); 5 | 6 | const root = path.resolve(__dirname, '..'); 7 | 8 | const modules = Object.keys({ 9 | ...pak.peerDependencies, 10 | }); 11 | 12 | module.exports = { 13 | projectRoot: __dirname, 14 | watchFolders: [root], 15 | 16 | // We need to make sure that only one version is loaded for peerDependencies 17 | // So we blacklist them at the root, and alias them to the versions in example's node_modules 18 | resolver: { 19 | blacklistRE: exclusionList( 20 | modules.map( 21 | (m) => 22 | new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`) 23 | ) 24 | ), 25 | 26 | extraNodeModules: modules.reduce((acc, name) => { 27 | acc[name] = path.join(__dirname, 'node_modules', name); 28 | return acc; 29 | }, {}), 30 | }, 31 | 32 | transformer: { 33 | getTransformOptions: async () => ({ 34 | transform: { 35 | experimentalImportSupport: false, 36 | inlineRequires: true, 37 | }, 38 | }), 39 | }, 40 | }; 41 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vision-camera-ocr-example", 3 | "description": "Example app for vision-camera-ocr", 4 | "version": "0.0.1", 5 | "private": true, 6 | "scripts": { 7 | "android": "react-native run-android", 8 | "ios": "react-native run-ios", 9 | "start": "react-native start" 10 | }, 11 | "dependencies": { 12 | "react": "17.0.1", 13 | "react-native": "^0.64.2", 14 | "react-native-reanimated": "2.3.0-alpha.2", 15 | "react-native-vision-camera": "^2.6.1" 16 | }, 17 | "devDependencies": { 18 | "@babel/core": "^7.15.0", 19 | "@babel/runtime": "^7.15.3", 20 | "@types/react-native": "^0.64.13", 21 | "babel-plugin-module-resolver": "^4.1.0", 22 | "metro-react-native-babel-preset": "^0.66.2" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /example/src/App.tsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable react-native/no-inline-styles */ 2 | import * as React from 'react'; 3 | 4 | import { runOnJS } from 'react-native-reanimated'; 5 | import { StyleSheet, View, Text } from 'react-native'; 6 | import { scanOCR } from 'vision-camera-ocr'; 7 | import { 8 | useCameraDevices, 9 | useFrameProcessor, 10 | Camera, 11 | } from 'react-native-vision-camera'; 12 | 13 | export default function App() { 14 | const [hasPermission, setHasPermission] = React.useState(false); 15 | const [ocr, setOcr] = React.useState(); 16 | const devices = useCameraDevices(); 17 | const device = devices.front; 18 | 19 | React.useEffect(() => { 20 | console.log(ocr); 21 | }, [ocr]); 22 | 23 | const frameProcessor = useFrameProcessor((frame) => { 24 | 'worklet'; 25 | const scannedOcr = scanOCR(frame); 26 | 27 | runOnJS(setOcr)(scannedOcr); 28 | }, []); 29 | 30 | React.useEffect(() => { 31 | (async () => { 32 | const status = await Camera.requestCameraPermission(); 33 | setHasPermission(status === 'authorized'); 34 | })(); 35 | }, []); 36 | 37 | return device !== undefined && hasPermission ? ( 38 | 48 | ) : ( 49 | 50 | no camera devices 51 | 52 | ); 53 | } 54 | -------------------------------------------------------------------------------- /ios/VisionCameraOcr-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import 5 | #import 6 | -------------------------------------------------------------------------------- /ios/VisionCameraOcr.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface VISION_EXPORT_SWIFT_FRAME_PROCESSOR(scanOCR, QRCodeFrameProcessorPlugin) 5 | @end 6 | -------------------------------------------------------------------------------- /ios/VisionCameraOcr.swift: -------------------------------------------------------------------------------- 1 | import Vision 2 | 3 | @objc(QRCodeFrameProcessorPlugin) 4 | public class QRCodeFrameProcessorPlugin: NSObject, FrameProcessorPluginBase { 5 | 6 | @objc 7 | public static func callback(_ frame: Frame!, withArgs _: [Any]!) -> Any! { 8 | // guard let imageBuffer = CMSampleBufferGetImageBuffer(frame.buffer) else { 9 | // return nil 10 | // } 11 | 12 | // NSLog("ExamplePlugin!!!") 13 | 14 | 15 | // let orientation = frame.orientation 16 | // code goes here 17 | return [ 18 | "example_str": "Test", 19 | "example_bool": true, 20 | "example_double": 5.3, 21 | "example_array": [ 22 | "Hello", 23 | true, 24 | 17.38, 25 | ], 26 | ] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ios/VisionCameraOcr.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 11 | 5E555C0D2413F4C50049A1A2 /* VisionCameraOcr.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* VisionCameraOcr.m */; }; 12 | F4FF95D7245B92E800C19C63 /* VisionCameraOcr.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4FF95D6245B92E800C19C63 /* VisionCameraOcr.swift */; }; 13 | 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXCopyFilesBuildPhase section */ 17 | 58B511D91A9E6C8500147676 /* CopyFiles */ = { 18 | isa = PBXCopyFilesBuildPhase; 19 | buildActionMask = 2147483647; 20 | dstPath = "include/$(PRODUCT_NAME)"; 21 | dstSubfolderSpec = 16; 22 | files = ( 23 | ); 24 | runOnlyForDeploymentPostprocessing = 0; 25 | }; 26 | /* End PBXCopyFilesBuildPhase section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 134814201AA4EA6300B7C361 /* libVisionCameraOcr.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libVisionCameraOcr.a; sourceTree = BUILT_PRODUCTS_DIR; }; 30 | 31 | B3E7B5891CC2AC0600A0062D /* VisionCameraOcr.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VisionCameraOcr.m; sourceTree = ""; }; 32 | F4FF95D5245B92E700C19C63 /* VisionCameraOcr-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "VisionCameraOcr-Bridging-Header.h"; sourceTree = ""; }; 33 | F4FF95D6245B92E800C19C63 /* VisionCameraOcr.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VisionCameraOcr.swift; sourceTree = ""; }; 34 | 35 | /* End PBXFileReference section */ 36 | 37 | /* Begin PBXFrameworksBuildPhase section */ 38 | 58B511D81A9E6C8500147676 /* Frameworks */ = { 39 | isa = PBXFrameworksBuildPhase; 40 | buildActionMask = 2147483647; 41 | files = ( 42 | ); 43 | runOnlyForDeploymentPostprocessing = 0; 44 | }; 45 | /* End PBXFrameworksBuildPhase section */ 46 | 47 | /* Begin PBXGroup section */ 48 | 134814211AA4EA7D00B7C361 /* Products */ = { 49 | isa = PBXGroup; 50 | children = ( 51 | 134814201AA4EA6300B7C361 /* libVisionCameraOcr.a */, 52 | ); 53 | name = Products; 54 | sourceTree = ""; 55 | }; 56 | 58B511D21A9E6C8500147676 = { 57 | isa = PBXGroup; 58 | children = ( 59 | 60 | F4FF95D6245B92E800C19C63 /* VisionCameraOcr.swift */, 61 | B3E7B5891CC2AC0600A0062D /* VisionCameraOcr.m */, 62 | F4FF95D5245B92E700C19C63 /* VisionCameraOcr-Bridging-Header.h */, 63 | 64 | 134814211AA4EA7D00B7C361 /* Products */, 65 | ); 66 | sourceTree = ""; 67 | }; 68 | /* End PBXGroup section */ 69 | 70 | /* Begin PBXNativeTarget section */ 71 | 58B511DA1A9E6C8500147676 /* VisionCameraOcr */ = { 72 | isa = PBXNativeTarget; 73 | buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "VisionCameraOcr" */; 74 | buildPhases = ( 75 | 58B511D71A9E6C8500147676 /* Sources */, 76 | 58B511D81A9E6C8500147676 /* Frameworks */, 77 | 58B511D91A9E6C8500147676 /* CopyFiles */, 78 | ); 79 | buildRules = ( 80 | ); 81 | dependencies = ( 82 | ); 83 | name = VisionCameraOcr; 84 | productName = RCTDataManager; 85 | productReference = 134814201AA4EA6300B7C361 /* libVisionCameraOcr.a */; 86 | productType = "com.apple.product-type.library.static"; 87 | }; 88 | /* End PBXNativeTarget section */ 89 | 90 | /* Begin PBXProject section */ 91 | 58B511D31A9E6C8500147676 /* Project object */ = { 92 | isa = PBXProject; 93 | attributes = { 94 | LastUpgradeCheck = 0920; 95 | ORGANIZATIONNAME = Facebook; 96 | TargetAttributes = { 97 | 58B511DA1A9E6C8500147676 = { 98 | CreatedOnToolsVersion = 6.1.1; 99 | }; 100 | }; 101 | }; 102 | buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "VisionCameraOcr" */; 103 | compatibilityVersion = "Xcode 3.2"; 104 | developmentRegion = English; 105 | hasScannedForEncodings = 0; 106 | knownRegions = ( 107 | English, 108 | en, 109 | ); 110 | mainGroup = 58B511D21A9E6C8500147676; 111 | productRefGroup = 58B511D21A9E6C8500147676; 112 | projectDirPath = ""; 113 | projectRoot = ""; 114 | targets = ( 115 | 58B511DA1A9E6C8500147676 /* VisionCameraOcr */, 116 | ); 117 | }; 118 | /* End PBXProject section */ 119 | 120 | /* Begin PBXSourcesBuildPhase section */ 121 | 58B511D71A9E6C8500147676 /* Sources */ = { 122 | isa = PBXSourcesBuildPhase; 123 | buildActionMask = 2147483647; 124 | files = ( 125 | 126 | F4FF95D7245B92E800C19C63 /* VisionCameraOcr.swift in Sources */, 127 | B3E7B58A1CC2AC0600A0062D /* VisionCameraOcr.m in Sources */, 128 | 129 | ); 130 | runOnlyForDeploymentPostprocessing = 0; 131 | }; 132 | /* End PBXSourcesBuildPhase section */ 133 | 134 | /* Begin XCBuildConfiguration section */ 135 | 58B511ED1A9E6C8500147676 /* Debug */ = { 136 | isa = XCBuildConfiguration; 137 | buildSettings = { 138 | ALWAYS_SEARCH_USER_PATHS = NO; 139 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 140 | CLANG_CXX_LIBRARY = "libc++"; 141 | CLANG_ENABLE_MODULES = YES; 142 | CLANG_ENABLE_OBJC_ARC = YES; 143 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 144 | CLANG_WARN_BOOL_CONVERSION = YES; 145 | CLANG_WARN_COMMA = YES; 146 | CLANG_WARN_CONSTANT_CONVERSION = YES; 147 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 148 | CLANG_WARN_EMPTY_BODY = YES; 149 | CLANG_WARN_ENUM_CONVERSION = YES; 150 | CLANG_WARN_INFINITE_RECURSION = YES; 151 | CLANG_WARN_INT_CONVERSION = YES; 152 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 153 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 154 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 155 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 156 | CLANG_WARN_STRICT_PROTOTYPES = YES; 157 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 158 | CLANG_WARN_UNREACHABLE_CODE = YES; 159 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 160 | COPY_PHASE_STRIP = NO; 161 | ENABLE_STRICT_OBJC_MSGSEND = YES; 162 | ENABLE_TESTABILITY = YES; 163 | GCC_C_LANGUAGE_STANDARD = gnu99; 164 | GCC_DYNAMIC_NO_PIC = NO; 165 | GCC_NO_COMMON_BLOCKS = YES; 166 | GCC_OPTIMIZATION_LEVEL = 0; 167 | GCC_PREPROCESSOR_DEFINITIONS = ( 168 | "DEBUG=1", 169 | "$(inherited)", 170 | ); 171 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 172 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 173 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 174 | GCC_WARN_UNDECLARED_SELECTOR = YES; 175 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 176 | GCC_WARN_UNUSED_FUNCTION = YES; 177 | GCC_WARN_UNUSED_VARIABLE = YES; 178 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 179 | MTL_ENABLE_DEBUG_INFO = YES; 180 | ONLY_ACTIVE_ARCH = YES; 181 | SDKROOT = iphoneos; 182 | }; 183 | name = Debug; 184 | }; 185 | 58B511EE1A9E6C8500147676 /* Release */ = { 186 | isa = XCBuildConfiguration; 187 | buildSettings = { 188 | ALWAYS_SEARCH_USER_PATHS = NO; 189 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 190 | CLANG_CXX_LIBRARY = "libc++"; 191 | CLANG_ENABLE_MODULES = YES; 192 | CLANG_ENABLE_OBJC_ARC = YES; 193 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 194 | CLANG_WARN_BOOL_CONVERSION = YES; 195 | CLANG_WARN_COMMA = YES; 196 | CLANG_WARN_CONSTANT_CONVERSION = YES; 197 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 198 | CLANG_WARN_EMPTY_BODY = YES; 199 | CLANG_WARN_ENUM_CONVERSION = YES; 200 | CLANG_WARN_INFINITE_RECURSION = YES; 201 | CLANG_WARN_INT_CONVERSION = YES; 202 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 203 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 204 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 205 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 206 | CLANG_WARN_STRICT_PROTOTYPES = YES; 207 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 208 | CLANG_WARN_UNREACHABLE_CODE = YES; 209 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 210 | COPY_PHASE_STRIP = YES; 211 | ENABLE_NS_ASSERTIONS = NO; 212 | ENABLE_STRICT_OBJC_MSGSEND = YES; 213 | GCC_C_LANGUAGE_STANDARD = gnu99; 214 | GCC_NO_COMMON_BLOCKS = YES; 215 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 216 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 217 | GCC_WARN_UNDECLARED_SELECTOR = YES; 218 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 219 | GCC_WARN_UNUSED_FUNCTION = YES; 220 | GCC_WARN_UNUSED_VARIABLE = YES; 221 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 222 | MTL_ENABLE_DEBUG_INFO = NO; 223 | SDKROOT = iphoneos; 224 | VALIDATE_PRODUCT = YES; 225 | }; 226 | name = Release; 227 | }; 228 | 58B511F01A9E6C8500147676 /* Debug */ = { 229 | isa = XCBuildConfiguration; 230 | buildSettings = { 231 | HEADER_SEARCH_PATHS = ( 232 | "$(inherited)", 233 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 234 | "$(SRCROOT)/../../../React/**", 235 | "$(SRCROOT)/../../react-native/React/**", 236 | ); 237 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 238 | OTHER_LDFLAGS = "-ObjC"; 239 | PRODUCT_NAME = VisionCameraOcr; 240 | SKIP_INSTALL = YES; 241 | 242 | SWIFT_OBJC_BRIDGING_HEADER = "VisionCameraOcr-Bridging-Header.h"; 243 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 244 | SWIFT_VERSION = 5.2; 245 | 246 | }; 247 | name = Debug; 248 | }; 249 | 58B511F11A9E6C8500147676 /* Release */ = { 250 | isa = XCBuildConfiguration; 251 | buildSettings = { 252 | HEADER_SEARCH_PATHS = ( 253 | "$(inherited)", 254 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 255 | "$(SRCROOT)/../../../React/**", 256 | "$(SRCROOT)/../../react-native/React/**", 257 | ); 258 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 259 | OTHER_LDFLAGS = "-ObjC"; 260 | PRODUCT_NAME = VisionCameraOcr; 261 | SKIP_INSTALL = YES; 262 | 263 | SWIFT_OBJC_BRIDGING_HEADER = "VisionCameraOcr-Bridging-Header.h"; 264 | SWIFT_VERSION = 5.2; 265 | 266 | }; 267 | name = Release; 268 | }; 269 | /* End XCBuildConfiguration section */ 270 | 271 | /* Begin XCConfigurationList section */ 272 | 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "VisionCameraOcr" */ = { 273 | isa = XCConfigurationList; 274 | buildConfigurations = ( 275 | 58B511ED1A9E6C8500147676 /* Debug */, 276 | 58B511EE1A9E6C8500147676 /* Release */, 277 | ); 278 | defaultConfigurationIsVisible = 0; 279 | defaultConfigurationName = Release; 280 | }; 281 | 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "VisionCameraOcr" */ = { 282 | isa = XCConfigurationList; 283 | buildConfigurations = ( 284 | 58B511F01A9E6C8500147676 /* Debug */, 285 | 58B511F11A9E6C8500147676 /* Release */, 286 | ); 287 | defaultConfigurationIsVisible = 0; 288 | defaultConfigurationName = Release; 289 | }; 290 | /* End XCConfigurationList section */ 291 | }; 292 | rootObject = 58B511D31A9E6C8500147676 /* Project object */; 293 | } 294 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vision-camera-ocr", 3 | "version": "0.1.0", 4 | "description": "VisionCamera Frame Processor Plugin that uses MLKit Text Recognition API to recognize text in any Latin-based character set", 5 | "main": "lib/commonjs/index", 6 | "module": "lib/module/index", 7 | "types": "lib/typescript/index.d.ts", 8 | "react-native": "src/index", 9 | "source": "src/index", 10 | "files": [ 11 | "src", 12 | "lib", 13 | "android", 14 | "ios", 15 | "cpp", 16 | "vision-camera-ocr.podspec", 17 | "!lib/typescript/example", 18 | "!android/build", 19 | "!ios/build", 20 | "!**/__tests__", 21 | "!**/__fixtures__", 22 | "!**/__mocks__" 23 | ], 24 | "scripts": { 25 | "test": "jest", 26 | "typescript": "tsc --noEmit", 27 | "lint": "eslint \"**/*.{js,ts,tsx}\"", 28 | "prepare": "bob build", 29 | "release": "release-it", 30 | "example": "yarn --cwd example", 31 | "pods": "cd example && pod-install --quiet", 32 | "bootstrap": "yarn example && yarn && yarn pods" 33 | }, 34 | "keywords": [ 35 | "react-native", 36 | "ios", 37 | "android" 38 | ], 39 | "repository": "https://github.com/rodgomesc/vision-camera-ocr", 40 | "author": "rodrigo gomes (https://github.com/rodgomesc)", 41 | "license": "MIT", 42 | "bugs": { 43 | "url": "https://github.com/rodgomesc/vision-camera-ocr/issues" 44 | }, 45 | "homepage": "https://github.com/rodgomesc/vision-camera-ocr#readme", 46 | "publishConfig": { 47 | "registry": "https://registry.npmjs.org/" 48 | }, 49 | "devDependencies": { 50 | "@react-native-community/eslint-config": "^3.0.0", 51 | "@release-it/conventional-changelog": "^2.0.0", 52 | "@types/react": "^17.0.18", 53 | "@types/jest": "^26.0.0", 54 | "@types/react-native": "0.64.13", 55 | "commitlint": "^11.0.0", 56 | "eslint": "^7.32.0", 57 | "eslint-config-prettier": "^8.3.0", 58 | "eslint-plugin-prettier": "^3.4.0", 59 | "husky": "^4.2.5", 60 | "pod-install": "^0.1.26", 61 | "prettier": "^2.0.5", 62 | "react": "17.0.1", 63 | "react-native": "0.64.2", 64 | "react-native-builder-bob": "^0.18.0", 65 | "release-it": "^14.2.2", 66 | "typescript": "^4.1.3", 67 | "react-native-vision-camera": "^2.6.1", 68 | "react-native-reanimated": "2.2.0" 69 | }, 70 | "peerDependencies": { 71 | "react": "*", 72 | "react-native": "*" 73 | }, 74 | "jest": { 75 | "preset": "react-native", 76 | "modulePathIgnorePatterns": [ 77 | "/example/node_modules", 78 | "/lib/" 79 | ] 80 | }, 81 | "eslintConfig": { 82 | "root": true, 83 | "extends": [ 84 | "@react-native-community", 85 | "prettier" 86 | ], 87 | "rules": { 88 | "prettier/prettier": [ 89 | "error", 90 | { 91 | "quoteProps": "consistent", 92 | "singleQuote": true, 93 | "tabWidth": 2, 94 | "trailingComma": "es5", 95 | "useTabs": false 96 | } 97 | ] 98 | } 99 | }, 100 | "eslintIgnore": [ 101 | "node_modules/", 102 | "lib/" 103 | ], 104 | "prettier": { 105 | "quoteProps": "consistent", 106 | "singleQuote": true, 107 | "tabWidth": 2, 108 | "trailingComma": "es5", 109 | "useTabs": false 110 | }, 111 | "react-native-builder-bob": { 112 | "source": "src", 113 | "output": "lib", 114 | "targets": [ 115 | "commonjs", 116 | "module", 117 | [ 118 | "typescript", 119 | { 120 | "project": "tsconfig.build.json" 121 | } 122 | ] 123 | ] 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /scripts/bootstrap.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const child_process = require('child_process'); 3 | 4 | const root = path.resolve(__dirname, '..'); 5 | const args = process.argv.slice(2); 6 | const options = { 7 | cwd: process.cwd(), 8 | env: process.env, 9 | stdio: 'inherit', 10 | encoding: 'utf-8', 11 | }; 12 | 13 | let result; 14 | 15 | if (process.cwd() !== root || args.length) { 16 | // We're not in the root of the project, or additional arguments were passed 17 | // In this case, forward the command to `yarn` 18 | result = child_process.spawnSync('yarn', args, options); 19 | } else { 20 | // If `yarn` is run without arguments, perform bootstrap 21 | result = child_process.spawnSync('yarn', ['bootstrap'], options); 22 | } 23 | 24 | process.exitCode = result.status; 25 | -------------------------------------------------------------------------------- /src/__tests__/index.test.tsx: -------------------------------------------------------------------------------- 1 | it.todo('write a test'); 2 | -------------------------------------------------------------------------------- /src/index.tsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | import type { Frame } from 'react-native-vision-camera'; 3 | 4 | /** 5 | * Scans OCR. 6 | */ 7 | 8 | export function scanOCR(frame: Frame): any { 9 | 'worklet'; 10 | // @ts-ignore 11 | return __scanOCR(frame); 12 | } 13 | -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "extends": "./tsconfig", 4 | "exclude": ["example"] 5 | } 6 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "./", 4 | "paths": { 5 | "vision-camera-ocr": ["./src/index"] 6 | }, 7 | "allowUnreachableCode": false, 8 | "allowUnusedLabels": false, 9 | "esModuleInterop": true, 10 | "importsNotUsedAsValues": "error", 11 | "forceConsistentCasingInFileNames": true, 12 | "jsx": "react", 13 | "lib": ["esnext"], 14 | "module": "esnext", 15 | "moduleResolution": "node", 16 | "noFallthroughCasesInSwitch": true, 17 | "noImplicitReturns": true, 18 | "noImplicitUseStrict": false, 19 | "noStrictGenericChecks": false, 20 | "noUnusedLocals": true, 21 | "noUnusedParameters": true, 22 | "resolveJsonModule": true, 23 | "skipLibCheck": true, 24 | "strict": true, 25 | "target": "esnext" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vision-camera-ocr.podspec: -------------------------------------------------------------------------------- 1 | require "json" 2 | 3 | package = JSON.parse(File.read(File.join(__dir__, "package.json"))) 4 | 5 | Pod::Spec.new do |s| 6 | s.name = "vision-camera-ocr" 7 | s.version = package["version"] 8 | s.summary = package["description"] 9 | s.homepage = package["homepage"] 10 | s.license = package["license"] 11 | s.authors = package["author"] 12 | 13 | s.platforms = { :ios => "11.0" } 14 | s.source = { :git => "https://github.com/rodgomesc/vision-camera-ocr.git", :tag => "#{s.version}" } 15 | 16 | s.source_files = "ios/**/*.{h,m,mm,swift}" 17 | 18 | s.dependency "React-Core" 19 | end 20 | --------------------------------------------------------------------------------