;
11 |
--------------------------------------------------------------------------------
/dist/Permissions.js:
--------------------------------------------------------------------------------
1 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3 | return new (P || (P = Promise))(function (resolve, reject) {
4 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7 | step((generator = generator.apply(thisArg, _arguments || [])).next());
8 | });
9 | };
10 | import { Platform } from "react-native";
11 | import { check, RESULTS, request, PERMISSIONS, } from "react-native-permissions";
12 | export const isIOS = Platform.OS === "ios";
13 | export const checkForPermission = (permissionOf) => __awaiter(void 0, void 0, void 0, function* () {
14 | const response = yield check(permissionOf);
15 | switch (response) {
16 | case RESULTS.UNAVAILABLE:
17 | case RESULTS.LIMITED:
18 | case RESULTS.GRANTED:
19 | case RESULTS.BLOCKED:
20 | return response;
21 | case RESULTS.DENIED:
22 | return yield requestForPermission(permissionOf);
23 | }
24 | });
25 | export const requestForPermission = (permissionOf) => __awaiter(void 0, void 0, void 0, function* () { return yield request(permissionOf); });
26 | export const getBooleanForPermission = (permissionStatus) => {
27 | if (!isIOS) {
28 | if (permissionStatus === RESULTS.GRANTED ||
29 | permissionStatus === RESULTS.LIMITED) {
30 | return true;
31 | }
32 | }
33 | else {
34 | if (permissionStatus === RESULTS.GRANTED) {
35 | return true;
36 | }
37 | }
38 | return false;
39 | };
40 | export const getStorageOrLibraryPermission = () => __awaiter(void 0, void 0, void 0, function* () {
41 | let permission;
42 | if (!isIOS) {
43 | permission = yield checkForPermission(PERMISSIONS.ANDROID.WRITE_EXTERNAL_STORAGE);
44 | }
45 | else {
46 | permission = yield checkForPermission(PERMISSIONS.IOS.PHOTO_LIBRARY);
47 | }
48 | return getBooleanForPermission(permission);
49 | });
50 | export const getPhotoPermission = () => __awaiter(void 0, void 0, void 0, function* () {
51 | let permission;
52 | if (!isIOS) {
53 | if (Number(Platform.Version) >= 30) {
54 | permission = yield checkForPermission(PERMISSIONS.ANDROID.READ_MEDIA_IMAGES);
55 | }
56 | else {
57 | permission = yield checkForPermission(PERMISSIONS.ANDROID.READ_EXTERNAL_STORAGE);
58 | }
59 | }
60 | else {
61 | permission = yield checkForPermission(PERMISSIONS.IOS.CAMERA);
62 | }
63 | return getBooleanForPermission(permission);
64 | });
65 | export const getVideoPermission = () => __awaiter(void 0, void 0, void 0, function* () {
66 | let permission;
67 | if (!isIOS) {
68 | if (Number(Platform.Version) >= 30) {
69 | permission = yield checkForPermission(PERMISSIONS.ANDROID.READ_MEDIA_VIDEO);
70 | }
71 | else {
72 | permission = yield checkForPermission(PERMISSIONS.ANDROID.READ_EXTERNAL_STORAGE);
73 | }
74 | }
75 | else {
76 | permission = yield checkForPermission(PERMISSIONS.IOS.CAMERA);
77 | }
78 | return getBooleanForPermission(permission);
79 | });
80 | export const getMicrophonePermission = () => __awaiter(void 0, void 0, void 0, function* () {
81 | let permission;
82 | if (!isIOS) {
83 | permission = yield checkForPermission(PERMISSIONS.ANDROID.RECORD_AUDIO);
84 | }
85 | else {
86 | permission = yield checkForPermission(PERMISSIONS.IOS.MICROPHONE);
87 | }
88 | return getBooleanForPermission(permission);
89 | });
90 | export const getCameraPermission = () => __awaiter(void 0, void 0, void 0, function* () {
91 | let permission;
92 | if (!isIOS) {
93 | permission = yield checkForPermission(PERMISSIONS.ANDROID.CAMERA);
94 | }
95 | else {
96 | permission = yield checkForPermission(PERMISSIONS.IOS.CAMERA);
97 | }
98 | return getBooleanForPermission(permission);
99 | });
100 | //# sourceMappingURL=Permissions.js.map
--------------------------------------------------------------------------------
/dist/Permissions.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"Permissions.js","sourceRoot":"","sources":["../lib/Permissions.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EACL,KAAK,EACL,OAAO,EACP,OAAO,EAGP,WAAW,GAGZ,MAAM,0BAA0B,CAAC;AAElC,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAC;AAE3C,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,YAA+C,EAC/C,EAAE;IACF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,YAAY,CAAC,CAAC;IAC3C,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,OAAO,CAAC,WAAW,CAAC;QACzB,KAAK,OAAO,CAAC,OAAO,CAAC;QACrB,KAAK,OAAO,CAAC,OAAO,CAAC;QACrB,KAAK,OAAO,CAAC,OAAO;YAClB,OAAO,QAAQ,CAAC;QAClB,KAAK,OAAO,CAAC,MAAM;YACjB,OAAO,MAAM,oBAAoB,CAAC,YAAY,CAAC,CAAC;IACpD,CAAC;AACH,CAAC,CAAA,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAO,YAAwB,EAAE,EAAE,kDACrE,OAAA,MAAM,OAAO,CAAC,YAAY,CAAC,CAAA,GAAA,CAAC;AAE9B,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,gBAAkC,EAAE,EAAE;IAC5E,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,IACE,gBAAgB,KAAK,OAAO,CAAC,OAAO;YACpC,gBAAgB,KAAK,OAAO,CAAC,OAAO,EACpC,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;SAAM,CAAC;QACN,IAAI,gBAAgB,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC;YACzC,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAS,EAAE;IACtD,IAAI,UAA4B,CAAC;IACjC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,UAAU,GAAG,MAAM,kBAAkB,CACnC,WAAW,CAAC,OAAO,CAAC,sBAAsB,CAC3C,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,UAAU,GAAG,MAAM,kBAAkB,CAAC,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,uBAAuB,CAAC,UAAU,CAAC,CAAC;AAC7C,CAAC,CAAA,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAS,EAAE;IAC3C,IAAI,UAA4B,CAAC;IACjC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;YACnC,UAAU,GAAG,MAAM,kBAAkB,CACnC,WAAW,CAAC,OAAO,CAAC,iBAAiB,CACtC,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,UAAU,GAAG,MAAM,kBAAkB,CACnC,WAAW,CAAC,OAAO,CAAC,qBAAqB,CAC1C,CAAC;QACJ,CAAC;IACH,CAAC;SAAM,CAAC;QACN,UAAU,GAAG,MAAM,kBAAkB,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,uBAAuB,CAAC,UAAU,CAAC,CAAC;AAC7C,CAAC,CAAA,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAS,EAAE;IAC3C,IAAI,UAA4B,CAAC;IACjC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;YACnC,UAAU,GAAG,MAAM,kBAAkB,CACnC,WAAW,CAAC,OAAO,CAAC,gBAAgB,CACrC,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,UAAU,GAAG,MAAM,kBAAkB,CACnC,WAAW,CAAC,OAAO,CAAC,qBAAqB,CAC1C,CAAC;QACJ,CAAC;IACH,CAAC;SAAM,CAAC;QACN,UAAU,GAAG,MAAM,kBAAkB,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,uBAAuB,CAAC,UAAU,CAAC,CAAC;AAC7C,CAAC,CAAA,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAS,EAAE;IAChD,IAAI,UAA4B,CAAC;IACjC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,UAAU,GAAG,MAAM,kBAAkB,CAAC,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAC1E,CAAC;SAAM,CAAC;QACN,UAAU,GAAG,MAAM,kBAAkB,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,uBAAuB,CAAC,UAAU,CAAC,CAAC;AAC7C,CAAC,CAAA,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAS,EAAE;IAC5C,IAAI,UAA4B,CAAC;IACjC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,UAAU,GAAG,MAAM,kBAAkB,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACpE,CAAC;SAAM,CAAC;QACN,UAAU,GAAG,MAAM,kBAAkB,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,uBAAuB,CAAC,UAAU,CAAC,CAAC;AAC7C,CAAC,CAAA,CAAC"}
--------------------------------------------------------------------------------
/dist/index.d.ts:
--------------------------------------------------------------------------------
1 | import AwesomeCamera from './AwesomeCamera';
2 | export default AwesomeCamera;
3 |
--------------------------------------------------------------------------------
/dist/index.js:
--------------------------------------------------------------------------------
1 | import AwesomeCamera from './AwesomeCamera';
2 | export default AwesomeCamera;
3 | //# sourceMappingURL=index.js.map
--------------------------------------------------------------------------------
/dist/index.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,eAAe,aAAa,CAAA"}
--------------------------------------------------------------------------------
/example/.bundle/config:
--------------------------------------------------------------------------------
1 | BUNDLE_PATH: "vendor/bundle"
2 | BUNDLE_FORCE_RUBY_PLATFORM: 1
3 |
--------------------------------------------------------------------------------
/example/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: '@react-native',
4 | };
5 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | ios/.xcode.env.local
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 | *.hprof
33 | .cxx/
34 | *.keystore
35 | !debug.keystore
36 |
37 | # node.js
38 | #
39 | node_modules/
40 | npm-debug.log
41 | yarn-error.log
42 |
43 | # fastlane
44 | #
45 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
46 | # screenshots whenever they are needed.
47 | # For more information about the recommended setup visit:
48 | # https://docs.fastlane.tools/best-practices/source-control/
49 |
50 | **/fastlane/report.xml
51 | **/fastlane/Preview.html
52 | **/fastlane/screenshots
53 | **/fastlane/test_output
54 |
55 | # Bundle artifact
56 | *.jsbundle
57 |
58 | # Ruby / CocoaPods
59 | /ios/Pods/
60 | /vendor/bundle/
61 |
62 | # Temporary files created by Metro to check the health of the file watcher
63 | .metro-health-check*
64 |
65 | # testing
66 | /coverage
67 |
--------------------------------------------------------------------------------
/example/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | arrowParens: 'avoid',
3 | bracketSameLine: true,
4 | bracketSpacing: false,
5 | singleQuote: true,
6 | trailingComma: 'all',
7 | };
8 |
--------------------------------------------------------------------------------
/example/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/example/App.tsx:
--------------------------------------------------------------------------------
1 | import React, {useState} from 'react';
2 | import {Button, SafeAreaView, StyleSheet} from 'react-native';
3 | import AwesomeCamera from 'react-native-awesome-camera';
4 |
5 | const App = () => {
6 | const {container} = styles;
7 | const [isOpen, setIsOpen] = useState(false);
8 |
9 | const getData = (data: any) => {
10 | console.log({data});
11 | };
12 |
13 | return (
14 |
15 | {(!isOpen && (
16 | {
19 | setIsOpen(true);
20 | }}
21 | />
22 | )) || }
23 |
24 | );
25 | };
26 |
27 | const styles = StyleSheet.create({
28 | container: {
29 | flex: 1,
30 | justifyContent: 'center',
31 | alignItems: 'center',
32 | },
33 | });
34 |
35 | export default App;
36 |
--------------------------------------------------------------------------------
/example/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4 | ruby ">= 2.6.10"
5 |
6 | gem 'cocoapods', '~> 1.13'
7 | gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
8 |
--------------------------------------------------------------------------------
/example/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | CFPropertyList (3.0.6)
5 | rexml
6 | activesupport (7.0.8)
7 | concurrent-ruby (~> 1.0, >= 1.0.2)
8 | i18n (>= 1.6, < 2)
9 | minitest (>= 5.1)
10 | tzinfo (~> 2.0)
11 | addressable (2.8.5)
12 | public_suffix (>= 2.0.2, < 6.0)
13 | algoliasearch (1.27.5)
14 | httpclient (~> 2.8, >= 2.8.3)
15 | json (>= 1.5.1)
16 | atomos (0.1.3)
17 | claide (1.1.0)
18 | cocoapods (1.14.3)
19 | addressable (~> 2.8)
20 | claide (>= 1.0.2, < 2.0)
21 | cocoapods-core (= 1.14.3)
22 | cocoapods-deintegrate (>= 1.0.3, < 2.0)
23 | cocoapods-downloader (>= 2.1, < 3.0)
24 | cocoapods-plugins (>= 1.0.0, < 2.0)
25 | cocoapods-search (>= 1.0.0, < 2.0)
26 | cocoapods-trunk (>= 1.6.0, < 2.0)
27 | cocoapods-try (>= 1.1.0, < 2.0)
28 | colored2 (~> 3.1)
29 | escape (~> 0.0.4)
30 | fourflusher (>= 2.3.0, < 3.0)
31 | gh_inspector (~> 1.0)
32 | molinillo (~> 0.8.0)
33 | nap (~> 1.0)
34 | ruby-macho (>= 2.3.0, < 3.0)
35 | xcodeproj (>= 1.23.0, < 2.0)
36 | cocoapods-core (1.14.3)
37 | activesupport (>= 5.0, < 8)
38 | addressable (~> 2.8)
39 | algoliasearch (~> 1.0)
40 | concurrent-ruby (~> 1.1)
41 | fuzzy_match (~> 2.0.4)
42 | nap (~> 1.0)
43 | netrc (~> 0.11)
44 | public_suffix (~> 4.0)
45 | typhoeus (~> 1.0)
46 | cocoapods-deintegrate (1.0.5)
47 | cocoapods-downloader (2.1)
48 | cocoapods-plugins (1.0.0)
49 | nap
50 | cocoapods-search (1.0.1)
51 | cocoapods-trunk (1.6.0)
52 | nap (>= 0.8, < 2.0)
53 | netrc (~> 0.11)
54 | cocoapods-try (1.2.0)
55 | colored2 (3.1.2)
56 | concurrent-ruby (1.2.2)
57 | escape (0.0.4)
58 | ethon (0.16.0)
59 | ffi (>= 1.15.0)
60 | ffi (1.16.3)
61 | fourflusher (2.3.1)
62 | fuzzy_match (2.0.4)
63 | gh_inspector (1.1.3)
64 | httpclient (2.8.3)
65 | i18n (1.14.1)
66 | concurrent-ruby (~> 1.0)
67 | json (2.6.3)
68 | minitest (5.20.0)
69 | molinillo (0.8.0)
70 | nanaimo (0.3.0)
71 | nap (1.1.0)
72 | netrc (0.11.0)
73 | public_suffix (4.0.7)
74 | rexml (3.2.6)
75 | ruby-macho (2.5.1)
76 | typhoeus (1.4.1)
77 | ethon (>= 0.9.0)
78 | tzinfo (2.0.6)
79 | concurrent-ruby (~> 1.0)
80 | xcodeproj (1.23.0)
81 | CFPropertyList (>= 2.3.3, < 4.0)
82 | atomos (~> 0.1.3)
83 | claide (>= 1.0.2, < 2.0)
84 | colored2 (~> 3.1)
85 | nanaimo (~> 0.3.0)
86 | rexml (~> 3.2.4)
87 |
88 | PLATFORMS
89 | ruby
90 |
91 | DEPENDENCIES
92 | activesupport (>= 6.1.7.3, < 7.1.0)
93 | cocoapods (~> 1.13)
94 |
95 | RUBY VERSION
96 | ruby 3.2.2p53
97 |
98 | BUNDLED WITH
99 | 2.4.10
100 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).
2 |
3 | # Getting Started
4 |
5 | >**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
6 |
7 | ## Step 1: Start the Metro Server
8 |
9 | First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native.
10 |
11 | To start Metro, run the following command from the _root_ of your React Native project:
12 |
13 | ```bash
14 | # using npm
15 | npm start
16 |
17 | # OR using Yarn
18 | yarn start
19 | ```
20 |
21 | ## Step 2: Start your Application
22 |
23 | Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app:
24 |
25 | ### For Android
26 |
27 | ```bash
28 | # using npm
29 | npm run android
30 |
31 | # OR using Yarn
32 | yarn android
33 | ```
34 |
35 | ### For iOS
36 |
37 | ```bash
38 | # using npm
39 | npm run ios
40 |
41 | # OR using Yarn
42 | yarn ios
43 | ```
44 |
45 | If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly.
46 |
47 | This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
48 |
49 | ## Step 3: Modifying your App
50 |
51 | Now that you have successfully run the app, let's modify it.
52 |
53 | 1. Open `App.tsx` in your text editor of choice and edit some lines.
54 | 2. For **Android**: Press the R key twice or select **"Reload"** from the **Developer Menu** (Ctrl + M (on Window and Linux) or Cmd ⌘ + M (on macOS)) to see your changes!
55 |
56 | For **iOS**: Hit Cmd ⌘ + R in your iOS Simulator to reload the app and see your changes!
57 |
58 | ## Congratulations! :tada:
59 |
60 | You've successfully run and modified your React Native App. :partying_face:
61 |
62 | ### Now what?
63 |
64 | - If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).
65 | - If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started).
66 |
67 | # Troubleshooting
68 |
69 | If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.
70 |
71 | # Learn More
72 |
73 | To learn more about React Native, take a look at the following resources:
74 |
75 | - [React Native Website](https://reactnative.dev) - learn more about React Native.
76 | - [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.
77 | - [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.
78 | - [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.
79 | - [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.
80 |
--------------------------------------------------------------------------------
/example/__tests__/App.test.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import 'react-native';
6 | import React from 'react';
7 | import App from '../App';
8 |
9 | // Note: import explicitly to use the types shiped with jest.
10 | import {it} from '@jest/globals';
11 |
12 | // Note: test renderer must be required after react-native.
13 | import renderer from 'react-test-renderer';
14 |
15 | it('renders correctly', () => {
16 | renderer.create( );
17 | });
18 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 | apply plugin: "com.facebook.react"
3 |
4 | /**
5 | * This is the configuration block to customize your React Native Android app.
6 | * By default you don't need to apply any configuration, just uncomment the lines you need.
7 | */
8 | react {
9 | /* Folders */
10 | // The root of your project, i.e. where "package.json" lives. Default is '..'
11 | // root = file("../")
12 | // The folder where the react-native NPM package is. Default is ../node_modules/react-native
13 | // reactNativeDir = file("../node_modules/react-native")
14 | // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
15 | // codegenDir = file("../node_modules/@react-native/codegen")
16 | // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
17 | // cliFile = file("../node_modules/react-native/cli.js")
18 |
19 | /* Variants */
20 | // The list of variants to that are debuggable. For those we're going to
21 | // skip the bundling of the JS bundle and the assets. By default is just 'debug'.
22 | // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
23 | // debuggableVariants = ["liteDebug", "prodDebug"]
24 |
25 | /* Bundling */
26 | // A list containing the node command and its flags. Default is just 'node'.
27 | // nodeExecutableAndArgs = ["node"]
28 | //
29 | // The command to run when bundling. By default is 'bundle'
30 | // bundleCommand = "ram-bundle"
31 | //
32 | // The path to the CLI configuration file. Default is empty.
33 | // bundleConfig = file(../rn-cli.config.js)
34 | //
35 | // The name of the generated asset file containing your JS bundle
36 | // bundleAssetName = "MyApplication.android.bundle"
37 | //
38 | // The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
39 | // entryFile = file("../js/MyApplication.android.js")
40 | //
41 | // A list of extra flags to pass to the 'bundle' commands.
42 | // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
43 | // extraPackagerArgs = []
44 |
45 | /* Hermes Commands */
46 | // The hermes compiler command to run. By default it is 'hermesc'
47 | // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
48 | //
49 | // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
50 | // hermesFlags = ["-O", "-output-source-map"]
51 | }
52 |
53 | /**
54 | * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
55 | */
56 | def enableProguardInReleaseBuilds = false
57 |
58 | /**
59 | * The preferred build flavor of JavaScriptCore (JSC)
60 | *
61 | * For example, to use the international variant, you can use:
62 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
63 | *
64 | * The international variant includes ICU i18n library and necessary data
65 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
66 | * give correct results when using with locales other than en-US. Note that
67 | * this variant is about 6MiB larger per architecture than default.
68 | */
69 | def jscFlavor = 'org.webkit:android-jsc:+'
70 |
71 | android {
72 | ndkVersion rootProject.ext.ndkVersion
73 |
74 | compileSdkVersion rootProject.ext.compileSdkVersion
75 |
76 | namespace "com.example"
77 | defaultConfig {
78 | applicationId "com.example"
79 | minSdkVersion rootProject.ext.minSdkVersion
80 | targetSdkVersion rootProject.ext.targetSdkVersion
81 | versionCode 1
82 | versionName "1.0"
83 | }
84 | signingConfigs {
85 | debug {
86 | storeFile file('debug.keystore')
87 | storePassword 'android'
88 | keyAlias 'androiddebugkey'
89 | keyPassword 'android'
90 | }
91 | }
92 | buildTypes {
93 | debug {
94 | signingConfig signingConfigs.debug
95 | }
96 | release {
97 | // Caution! In production, you need to generate your own keystore file.
98 | // see https://reactnative.dev/docs/signed-apk-android.
99 | signingConfig signingConfigs.debug
100 | minifyEnabled enableProguardInReleaseBuilds
101 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
102 | }
103 | }
104 | }
105 |
106 | dependencies {
107 | // The version of react-native is set by the React Native Gradle Plugin
108 | implementation("com.facebook.react:react-android")
109 |
110 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
111 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
112 | exclude group:'com.squareup.okhttp3', module:'okhttp'
113 | }
114 |
115 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
116 | if (hermesEnabled.toBoolean()) {
117 | implementation("com.facebook.react:hermes-android")
118 | } else {
119 | implementation jscFlavor
120 | }
121 | }
122 |
123 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
124 |
--------------------------------------------------------------------------------
/example/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krinish291/react-native-awesome-camera/edfff9f7258ae6a665d2e63daf1ad07e0862328e/example/android/app/debug.keystore
--------------------------------------------------------------------------------
/example/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/java/com/example/ReactNativeFlipper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the LICENSE file in the root
5 | * directory of this source tree.
6 | */
7 | package com.example;
8 |
9 | import android.content.Context;
10 | import com.facebook.flipper.android.AndroidFlipperClient;
11 | import com.facebook.flipper.android.utils.FlipperUtils;
12 | import com.facebook.flipper.core.FlipperClient;
13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping;
17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
20 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
21 | import com.facebook.react.ReactInstanceEventListener;
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 | /**
28 | * Class responsible of loading Flipper inside your React Native application. This is the debug
29 | * flavor of it. Here you can add your own plugins and customize the Flipper setup.
30 | */
31 | public class ReactNativeFlipper {
32 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
33 | if (FlipperUtils.shouldEnableFlipper(context)) {
34 | final FlipperClient client = AndroidFlipperClient.getInstance(context);
35 |
36 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
37 | client.addPlugin(new DatabasesFlipperPlugin(context));
38 | client.addPlugin(new SharedPreferencesFlipperPlugin(context));
39 | client.addPlugin(CrashReporterPlugin.getInstance());
40 |
41 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
42 | NetworkingModule.setCustomClientBuilder(
43 | new NetworkingModule.CustomClientBuilder() {
44 | @Override
45 | public void apply(OkHttpClient.Builder builder) {
46 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
47 | }
48 | });
49 | client.addPlugin(networkFlipperPlugin);
50 | client.start();
51 |
52 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
53 | // Hence we run if after all native modules have been initialized
54 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
55 | if (reactContext == null) {
56 | reactInstanceManager.addReactInstanceEventListener(
57 | new ReactInstanceEventListener() {
58 | @Override
59 | public void onReactContextInitialized(ReactContext reactContext) {
60 | reactInstanceManager.removeReactInstanceEventListener(this);
61 | reactContext.runOnNativeModulesQueueThread(
62 | new Runnable() {
63 | @Override
64 | public void run() {
65 | client.addPlugin(new FrescoFlipperPlugin());
66 | }
67 | });
68 | }
69 | });
70 | } else {
71 | client.addPlugin(new FrescoFlipperPlugin());
72 | }
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
18 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/example/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example;
2 |
3 | import com.facebook.react.ReactActivity;
4 | import com.facebook.react.ReactActivityDelegate;
5 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
6 | import com.facebook.react.defaults.DefaultReactActivityDelegate;
7 |
8 | public class MainActivity extends ReactActivity {
9 |
10 | /**
11 | * Returns the name of the main component registered from JavaScript. This is used to schedule
12 | * rendering of the component.
13 | */
14 | @Override
15 | protected String getMainComponentName() {
16 | return "example";
17 | }
18 |
19 | /**
20 | * Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
21 | * DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
22 | * (aka React 18) with two boolean flags.
23 | */
24 | @Override
25 | protected ReactActivityDelegate createReactActivityDelegate() {
26 | return new DefaultReactActivityDelegate(
27 | this,
28 | getMainComponentName(),
29 | // If you opted-in for the New Architecture, we enable the Fabric Renderer.
30 | DefaultNewArchitectureEntryPoint.getFabricEnabled());
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/example/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.example;
2 |
3 | import android.app.Application;
4 | import com.facebook.react.PackageList;
5 | import com.facebook.react.ReactApplication;
6 | import com.facebook.react.ReactNativeHost;
7 | import com.facebook.react.ReactPackage;
8 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
9 | import com.facebook.react.defaults.DefaultReactNativeHost;
10 | import com.facebook.soloader.SoLoader;
11 | import java.util.List;
12 |
13 | public class MainApplication extends Application implements ReactApplication {
14 |
15 | private final ReactNativeHost mReactNativeHost =
16 | new DefaultReactNativeHost(this) {
17 | @Override
18 | public boolean getUseDeveloperSupport() {
19 | return BuildConfig.DEBUG;
20 | }
21 |
22 | @Override
23 | protected List getPackages() {
24 | @SuppressWarnings("UnnecessaryLocalVariable")
25 | List packages = new PackageList(this).getPackages();
26 | // Packages that cannot be autolinked yet can be added manually here, for example:
27 | // packages.add(new MyReactNativePackage());
28 | return packages;
29 | }
30 |
31 | @Override
32 | protected String getJSMainModuleName() {
33 | return "index";
34 | }
35 |
36 | @Override
37 | protected boolean isNewArchEnabled() {
38 | return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
39 | }
40 |
41 | @Override
42 | protected Boolean isHermesEnabled() {
43 | return BuildConfig.IS_HERMES_ENABLED;
44 | }
45 | };
46 |
47 | @Override
48 | public ReactNativeHost getReactNativeHost() {
49 | return mReactNativeHost;
50 | }
51 |
52 | @Override
53 | public void onCreate() {
54 | super.onCreate();
55 | SoLoader.init(this, /* native exopackage */ false);
56 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
57 | // If you opted-in for the New Architecture, we load the native entry point for this app.
58 | DefaultNewArchitectureEntryPoint.load();
59 | }
60 | ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/rn_edit_text_material.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
21 |
22 |
23 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krinish291/react-native-awesome-camera/edfff9f7258ae6a665d2e63daf1ad07e0862328e/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/krinish291/react-native-awesome-camera/edfff9f7258ae6a665d2e63daf1ad07e0862328e/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/krinish291/react-native-awesome-camera/edfff9f7258ae6a665d2e63daf1ad07e0862328e/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/krinish291/react-native-awesome-camera/edfff9f7258ae6a665d2e63daf1ad07e0862328e/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/krinish291/react-native-awesome-camera/edfff9f7258ae6a665d2e63daf1ad07e0862328e/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/krinish291/react-native-awesome-camera/edfff9f7258ae6a665d2e63daf1ad07e0862328e/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/krinish291/react-native-awesome-camera/edfff9f7258ae6a665d2e63daf1ad07e0862328e/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/krinish291/react-native-awesome-camera/edfff9f7258ae6a665d2e63daf1ad07e0862328e/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/krinish291/react-native-awesome-camera/edfff9f7258ae6a665d2e63daf1ad07e0862328e/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/krinish291/react-native-awesome-camera/edfff9f7258ae6a665d2e63daf1ad07e0862328e/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | example
3 |
4 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/example/android/app/src/release/java/com/example/ReactNativeFlipper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the LICENSE file in the root
5 | * directory of this source tree.
6 | */
7 | package com.example;
8 |
9 | import android.content.Context;
10 | import com.facebook.react.ReactInstanceManager;
11 |
12 | /**
13 | * Class responsible of loading Flipper inside your React Native application. This is the release
14 | * flavor of it so it's empty as we don't want to load Flipper.
15 | */
16 | public class ReactNativeFlipper {
17 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
18 | // Do nothing as we don't want to initialize Flipper on Release.
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | buildToolsVersion = "33.0.0"
6 | minSdkVersion = 21
7 | compileSdkVersion = 33
8 | targetSdkVersion = 33
9 |
10 | // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
11 | ndkVersion = "23.1.7779620"
12 | }
13 | repositories {
14 | google()
15 | mavenCentral()
16 | }
17 | dependencies {
18 | classpath("com.android.tools.build:gradle")
19 | classpath("com.facebook.react:react-native-gradle-plugin")
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/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: -Xmx512m -XX:MaxMetaspaceSize=256m
13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | # AndroidX package structure to make it clearer which packages are bundled with the
21 | # Android operating system, and which are packaged with your app's APK
22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
23 | android.useAndroidX=true
24 | # Automatically convert third-party libraries to use AndroidX
25 | android.enableJetifier=true
26 |
27 | # Version of flipper SDK to use with React Native
28 | FLIPPER_VERSION=0.182.0
29 |
30 | # Use this property to specify which architecture you want to build.
31 | # You can also override it from the CLI using
32 | # ./gradlew -PreactNativeArchitectures=x86_64
33 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
34 |
35 | # Use this property to enable support to the new architecture.
36 | # This will allow you to use TurboModules and the Fabric render in
37 | # your application. You should enable this flag either if you want
38 | # to write custom TurboModules/Fabric components OR use libraries that
39 | # are providing them.
40 | newArchEnabled=false
41 |
42 | # Use this property to enable or disable the Hermes JS engine.
43 | # If set to false, you will be using JSC instead.
44 | hermesEnabled=true
45 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krinish291/react-native-awesome-camera/edfff9f7258ae6a665d2e63daf1ad07e0862328e/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-8.0.1-all.zip
4 | networkTimeout=10000
5 | zipStoreBase=GRADLE_USER_HOME
6 | zipStorePath=wrapper/dists
7 |
--------------------------------------------------------------------------------
/example/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # Copyright © 2015-2021 the original 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 POSIX generated by Gradle.
22 | #
23 | # Important for running:
24 | #
25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26 | # noncompliant, but you have some other compliant shell such as ksh or
27 | # bash, then to run this script, type that shell name before the whole
28 | # command line, like:
29 | #
30 | # ksh Gradle
31 | #
32 | # Busybox and similar reduced shells will NOT work, because this script
33 | # requires all of these POSIX shell features:
34 | # * functions;
35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37 | # * compound commands having a testable exit status, especially «case»;
38 | # * various built-in commands including «command», «set», and «ulimit».
39 | #
40 | # Important for patching:
41 | #
42 | # (2) This script targets any POSIX shell, so it avoids extensions provided
43 | # by Bash, Ksh, etc; in particular arrays are avoided.
44 | #
45 | # The "traditional" practice of packing multiple parameters into a
46 | # space-separated string is a well documented source of bugs and security
47 | # problems, so this is (mostly) avoided, by progressively accumulating
48 | # options in "$@", and eventually passing that to Java.
49 | #
50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52 | # see the in-line comments for details.
53 | #
54 | # There are tweaks for specific operating systems such as AIX, CygWin,
55 | # Darwin, MinGW, and NonStop.
56 | #
57 | # (3) This script is generated from the Groovy template
58 | # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59 | # within the Gradle project.
60 | #
61 | # You can find Gradle at https://github.com/gradle/gradle/.
62 | #
63 | ##############################################################################
64 |
65 | # Attempt to set APP_HOME
66 |
67 | # Resolve links: $0 may be a link
68 | app_path=$0
69 |
70 | # Need this for daisy-chained symlinks.
71 | while
72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73 | [ -h "$app_path" ]
74 | do
75 | ls=$( ls -ld "$app_path" )
76 | link=${ls#*' -> '}
77 | case $link in #(
78 | /*) app_path=$link ;; #(
79 | *) app_path=$APP_HOME$link ;;
80 | esac
81 | done
82 |
83 | # This is normally unused
84 | # shellcheck disable=SC2034
85 | APP_BASE_NAME=${0##*/}
86 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
87 |
88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90 |
91 | # Use the maximum available, or set MAX_FD != -1 to use that value.
92 | MAX_FD=maximum
93 |
94 | warn () {
95 | echo "$*"
96 | } >&2
97 |
98 | die () {
99 | echo
100 | echo "$*"
101 | echo
102 | exit 1
103 | } >&2
104 |
105 | # OS specific support (must be 'true' or 'false').
106 | cygwin=false
107 | msys=false
108 | darwin=false
109 | nonstop=false
110 | case "$( uname )" in #(
111 | CYGWIN* ) cygwin=true ;; #(
112 | Darwin* ) darwin=true ;; #(
113 | MSYS* | MINGW* ) msys=true ;; #(
114 | NONSTOP* ) nonstop=true ;;
115 | esac
116 |
117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118 |
119 |
120 | # Determine the Java command to use to start the JVM.
121 | if [ -n "$JAVA_HOME" ] ; then
122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
123 | # IBM's JDK on AIX uses strange locations for the executables
124 | JAVACMD=$JAVA_HOME/jre/sh/java
125 | else
126 | JAVACMD=$JAVA_HOME/bin/java
127 | fi
128 | if [ ! -x "$JAVACMD" ] ; then
129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
130 |
131 | Please set the JAVA_HOME variable in your environment to match the
132 | location of your Java installation."
133 | fi
134 | else
135 | JAVACMD=java
136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137 |
138 | Please set the JAVA_HOME variable in your environment to match the
139 | location of your Java installation."
140 | fi
141 |
142 | # Increase the maximum file descriptors if we can.
143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144 | case $MAX_FD in #(
145 | max*)
146 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147 | # shellcheck disable=SC3045
148 | MAX_FD=$( ulimit -H -n ) ||
149 | warn "Could not query maximum file descriptor limit"
150 | esac
151 | case $MAX_FD in #(
152 | '' | soft) :;; #(
153 | *)
154 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155 | # shellcheck disable=SC3045
156 | ulimit -n "$MAX_FD" ||
157 | warn "Could not set maximum file descriptor limit to $MAX_FD"
158 | esac
159 | fi
160 |
161 | # Collect all arguments for the java command, stacking in reverse order:
162 | # * args from the command line
163 | # * the main class name
164 | # * -classpath
165 | # * -D...appname settings
166 | # * --module-path (only if needed)
167 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
168 |
169 | # For Cygwin or MSYS, switch paths to Windows format before running java
170 | if "$cygwin" || "$msys" ; then
171 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
172 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
173 |
174 | JAVACMD=$( cygpath --unix "$JAVACMD" )
175 |
176 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
177 | for arg do
178 | if
179 | case $arg in #(
180 | -*) false ;; # don't mess with options #(
181 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
182 | [ -e "$t" ] ;; #(
183 | *) false ;;
184 | esac
185 | then
186 | arg=$( cygpath --path --ignore --mixed "$arg" )
187 | fi
188 | # Roll the args list around exactly as many times as the number of
189 | # args, so each arg winds up back in the position where it started, but
190 | # possibly modified.
191 | #
192 | # NB: a `for` loop captures its iteration list before it begins, so
193 | # changing the positional parameters here affects neither the number of
194 | # iterations, nor the values presented in `arg`.
195 | shift # remove old arg
196 | set -- "$@" "$arg" # push replacement arg
197 | done
198 | fi
199 |
200 | # Collect all arguments for the java command;
201 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202 | # shell script including quotes and variable substitutions, so put them in
203 | # double quotes to make sure that they get re-expanded; and
204 | # * put everything else in single quotes, so that it's not re-expanded.
205 |
206 | set -- \
207 | "-Dorg.gradle.appname=$APP_BASE_NAME" \
208 | -classpath "$CLASSPATH" \
209 | org.gradle.wrapper.GradleWrapperMain \
210 | "$@"
211 |
212 | # Stop when "xargs" is not available.
213 | if ! command -v xargs >/dev/null 2>&1
214 | then
215 | die "xargs is not available"
216 | fi
217 |
218 | # Use "xargs" to parse quoted args.
219 | #
220 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
221 | #
222 | # In Bash we could simply go:
223 | #
224 | # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
225 | # set -- "${ARGS[@]}" "$@"
226 | #
227 | # but POSIX shell has neither arrays nor command substitution, so instead we
228 | # post-process each arg (as a line of input to sed) to backslash-escape any
229 | # character that might be a shell metacharacter, then use eval to reverse
230 | # that process (while maintaining the separation between arguments), and wrap
231 | # the whole thing up as a single "set" statement.
232 | #
233 | # This will of course break if any of these variables contains a newline or
234 | # an unmatched quote.
235 | #
236 |
237 | eval "set -- $(
238 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
239 | xargs -n1 |
240 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
241 | tr '\n' ' '
242 | )" '"$@"'
243 |
244 | exec "$JAVACMD" "$@"
245 |
--------------------------------------------------------------------------------
/example/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%"=="" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%"=="" set DIRNAME=.
29 | @rem This is normally unused
30 | set APP_BASE_NAME=%~n0
31 | set APP_HOME=%DIRNAME%
32 |
33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
35 |
36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
38 |
39 | @rem Find java.exe
40 | if defined JAVA_HOME goto findJavaFromJavaHome
41 |
42 | set JAVA_EXE=java.exe
43 | %JAVA_EXE% -version >NUL 2>&1
44 | if %ERRORLEVEL% equ 0 goto execute
45 |
46 | echo.
47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48 | echo.
49 | echo Please set the JAVA_HOME variable in your environment to match the
50 | echo location of your Java installation.
51 |
52 | goto fail
53 |
54 | :findJavaFromJavaHome
55 | set JAVA_HOME=%JAVA_HOME:"=%
56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
57 |
58 | if exist "%JAVA_EXE%" goto execute
59 |
60 | echo.
61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62 | echo.
63 | echo Please set the JAVA_HOME variable in your environment to match the
64 | echo location of your Java installation.
65 |
66 | goto fail
67 |
68 | :execute
69 | @rem Setup the command line
70 |
71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
72 |
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if %ERRORLEVEL% equ 0 goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | set EXIT_CODE=%ERRORLEVEL%
85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1
86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87 | exit /b %EXIT_CODE%
88 |
89 | :mainEnd
90 | if "%OS%"=="Windows_NT" endlocal
91 |
92 | :omega
93 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'example'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 | includeBuild('../node_modules/@react-native/gradle-plugin')
5 |
--------------------------------------------------------------------------------
/example/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example",
3 | "displayName": "example"
4 | }
5 |
--------------------------------------------------------------------------------
/example/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/example/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import {AppRegistry} from 'react-native';
6 | import App from './App';
7 | import {name as appName} from './app.json';
8 |
9 | AppRegistry.registerComponent(appName, () => App);
10 |
--------------------------------------------------------------------------------
/example/ios/.xcode.env:
--------------------------------------------------------------------------------
1 | # This `.xcode.env` file is versioned and is used to source the environment
2 | # used when running script phases inside Xcode.
3 | # To customize your local environment, you can create an `.xcode.env.local`
4 | # file that is not versioned.
5 |
6 | # NODE_BINARY variable contains the PATH to the node executable.
7 | #
8 | # Customize the NODE_BINARY variable here.
9 | # For example, to use nvm with brew, add the following line
10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use
11 | export NODE_BINARY=$(command -v node)
12 |
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Resolve react_native_pods.rb with node to allow for hoisting
2 | def node_require(script)
3 | # Resolve script with node to allow for hoisting
4 | require Pod::Executable.execute_command('node', ['-p',
5 | "require.resolve(
6 | '#{script}',
7 | {paths: [process.argv[1]]},
8 | )", __dir__]).strip
9 | end
10 | node_require('react-native/scripts/react_native_pods.rb')
11 | node_require('react-native-permissions/scripts/setup.rb')
12 |
13 | platform :ios, min_ios_version_supported
14 | prepare_react_native_project!
15 |
16 | # ⬇️ uncomment wanted permissions
17 | setup_permissions([
18 | # 'AppTrackingTransparency',
19 | # 'BluetoothPeripheral',
20 | # 'Calendars',
21 | 'Camera',
22 | # 'Contacts',
23 | # 'FaceID',
24 | # 'LocationAccuracy',
25 | # 'LocationAlways',
26 | # 'LocationWhenInUse',
27 | # 'MediaLibrary',
28 | 'Microphone',
29 | # 'Motion',
30 | # 'Notifications',
31 | 'PhotoLibrary',
32 | # 'PhotoLibraryAddOnly',
33 | # 'Reminders',
34 | # 'Siri',
35 | # 'SpeechRecognition',
36 | # 'StoreKit',
37 | ])
38 |
39 | # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
40 | # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
41 | #
42 | # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
43 | # ```js
44 | # module.exports = {
45 | # dependencies: {
46 | # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
47 | # ```
48 | flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
49 |
50 | linkage = ENV['USE_FRAMEWORKS']
51 | if linkage != nil
52 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
53 | use_frameworks! :linkage => linkage.to_sym
54 | end
55 |
56 | target 'example' do
57 | config = use_native_modules!
58 |
59 | # Flags change depending on the env values.
60 | flags = get_default_flags()
61 |
62 | use_react_native!(
63 | :path => config[:reactNativePath],
64 | # Hermes is now enabled by default. Disable by setting this flag to false.
65 | :hermes_enabled => flags[:hermes_enabled],
66 | :fabric_enabled => flags[:fabric_enabled],
67 | # Enables Flipper.
68 | #
69 | # Note that if you have use_frameworks! enabled, Flipper will not work and
70 | # you should disable the next line.
71 | :flipper_configuration => flipper_config,
72 | # An absolute path to your application root.
73 | :app_path => "#{Pod::Config.instance.installation_root}/.."
74 | )
75 |
76 | target 'exampleTests' do
77 | inherit! :complete
78 | # Pods for testing
79 | end
80 |
81 | post_install do |installer|
82 | # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
83 | react_native_post_install(
84 | installer,
85 | config[:reactNativePath],
86 | :mac_catalyst_enabled => false
87 | )
88 | __apply_Xcode_12_5_M1_post_install_workaround(installer)
89 | end
90 | end
91 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - boost (1.76.0)
3 | - CocoaAsyncSocket (7.6.5)
4 | - DoubleConversion (1.1.6)
5 | - FBLazyVector (0.72.7)
6 | - FBReactNativeSpec (0.72.7):
7 | - RCT-Folly (= 2021.07.22.00)
8 | - RCTRequired (= 0.72.7)
9 | - RCTTypeSafety (= 0.72.7)
10 | - React-Core (= 0.72.7)
11 | - React-jsi (= 0.72.7)
12 | - ReactCommon/turbomodule/core (= 0.72.7)
13 | - Flipper (0.182.0):
14 | - Flipper-Folly (~> 2.6)
15 | - Flipper-Boost-iOSX (1.76.0.1.11)
16 | - Flipper-DoubleConversion (3.2.0.1)
17 | - Flipper-Fmt (7.1.7)
18 | - Flipper-Folly (2.6.10):
19 | - Flipper-Boost-iOSX
20 | - Flipper-DoubleConversion
21 | - Flipper-Fmt (= 7.1.7)
22 | - Flipper-Glog
23 | - libevent (~> 2.1.12)
24 | - OpenSSL-Universal (= 1.1.1100)
25 | - Flipper-Glog (0.5.0.5)
26 | - Flipper-PeerTalk (0.0.4)
27 | - FlipperKit (0.182.0):
28 | - FlipperKit/Core (= 0.182.0)
29 | - FlipperKit/Core (0.182.0):
30 | - Flipper (~> 0.182.0)
31 | - FlipperKit/CppBridge
32 | - FlipperKit/FBCxxFollyDynamicConvert
33 | - FlipperKit/FBDefines
34 | - FlipperKit/FKPortForwarding
35 | - SocketRocket (~> 0.6.0)
36 | - FlipperKit/CppBridge (0.182.0):
37 | - Flipper (~> 0.182.0)
38 | - FlipperKit/FBCxxFollyDynamicConvert (0.182.0):
39 | - Flipper-Folly (~> 2.6)
40 | - FlipperKit/FBDefines (0.182.0)
41 | - FlipperKit/FKPortForwarding (0.182.0):
42 | - CocoaAsyncSocket (~> 7.6)
43 | - Flipper-PeerTalk (~> 0.0.4)
44 | - FlipperKit/FlipperKitHighlightOverlay (0.182.0)
45 | - FlipperKit/FlipperKitLayoutHelpers (0.182.0):
46 | - FlipperKit/Core
47 | - FlipperKit/FlipperKitHighlightOverlay
48 | - FlipperKit/FlipperKitLayoutTextSearchable
49 | - FlipperKit/FlipperKitLayoutIOSDescriptors (0.182.0):
50 | - FlipperKit/Core
51 | - FlipperKit/FlipperKitHighlightOverlay
52 | - FlipperKit/FlipperKitLayoutHelpers
53 | - YogaKit (~> 1.18)
54 | - FlipperKit/FlipperKitLayoutPlugin (0.182.0):
55 | - FlipperKit/Core
56 | - FlipperKit/FlipperKitHighlightOverlay
57 | - FlipperKit/FlipperKitLayoutHelpers
58 | - FlipperKit/FlipperKitLayoutIOSDescriptors
59 | - FlipperKit/FlipperKitLayoutTextSearchable
60 | - YogaKit (~> 1.18)
61 | - FlipperKit/FlipperKitLayoutTextSearchable (0.182.0)
62 | - FlipperKit/FlipperKitNetworkPlugin (0.182.0):
63 | - FlipperKit/Core
64 | - FlipperKit/FlipperKitReactPlugin (0.182.0):
65 | - FlipperKit/Core
66 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.182.0):
67 | - FlipperKit/Core
68 | - FlipperKit/SKIOSNetworkPlugin (0.182.0):
69 | - FlipperKit/Core
70 | - FlipperKit/FlipperKitNetworkPlugin
71 | - fmt (6.2.1)
72 | - glog (0.3.5)
73 | - hermes-engine (0.72.7):
74 | - hermes-engine/Pre-built (= 0.72.7)
75 | - hermes-engine/Pre-built (0.72.7)
76 | - libevent (2.1.12)
77 | - OpenSSL-Universal (1.1.1100)
78 | - RCT-Folly (2021.07.22.00):
79 | - boost
80 | - DoubleConversion
81 | - fmt (~> 6.2.1)
82 | - glog
83 | - RCT-Folly/Default (= 2021.07.22.00)
84 | - RCT-Folly/Default (2021.07.22.00):
85 | - boost
86 | - DoubleConversion
87 | - fmt (~> 6.2.1)
88 | - glog
89 | - RCT-Folly/Futures (2021.07.22.00):
90 | - boost
91 | - DoubleConversion
92 | - fmt (~> 6.2.1)
93 | - glog
94 | - libevent
95 | - RCTRequired (0.72.7)
96 | - RCTTypeSafety (0.72.7):
97 | - FBLazyVector (= 0.72.7)
98 | - RCTRequired (= 0.72.7)
99 | - React-Core (= 0.72.7)
100 | - React (0.72.7):
101 | - React-Core (= 0.72.7)
102 | - React-Core/DevSupport (= 0.72.7)
103 | - React-Core/RCTWebSocket (= 0.72.7)
104 | - React-RCTActionSheet (= 0.72.7)
105 | - React-RCTAnimation (= 0.72.7)
106 | - React-RCTBlob (= 0.72.7)
107 | - React-RCTImage (= 0.72.7)
108 | - React-RCTLinking (= 0.72.7)
109 | - React-RCTNetwork (= 0.72.7)
110 | - React-RCTSettings (= 0.72.7)
111 | - React-RCTText (= 0.72.7)
112 | - React-RCTVibration (= 0.72.7)
113 | - React-callinvoker (0.72.7)
114 | - React-Codegen (0.72.7):
115 | - DoubleConversion
116 | - FBReactNativeSpec
117 | - glog
118 | - hermes-engine
119 | - RCT-Folly
120 | - RCTRequired
121 | - RCTTypeSafety
122 | - React-Core
123 | - React-jsi
124 | - React-jsiexecutor
125 | - React-NativeModulesApple
126 | - React-rncore
127 | - ReactCommon/turbomodule/bridging
128 | - ReactCommon/turbomodule/core
129 | - React-Core (0.72.7):
130 | - glog
131 | - hermes-engine
132 | - RCT-Folly (= 2021.07.22.00)
133 | - React-Core/Default (= 0.72.7)
134 | - React-cxxreact
135 | - React-hermes
136 | - React-jsi
137 | - React-jsiexecutor
138 | - React-perflogger
139 | - React-runtimeexecutor
140 | - React-utils
141 | - SocketRocket (= 0.6.1)
142 | - Yoga
143 | - React-Core/CoreModulesHeaders (0.72.7):
144 | - glog
145 | - hermes-engine
146 | - RCT-Folly (= 2021.07.22.00)
147 | - React-Core/Default
148 | - React-cxxreact
149 | - React-hermes
150 | - React-jsi
151 | - React-jsiexecutor
152 | - React-perflogger
153 | - React-runtimeexecutor
154 | - React-utils
155 | - SocketRocket (= 0.6.1)
156 | - Yoga
157 | - React-Core/Default (0.72.7):
158 | - glog
159 | - hermes-engine
160 | - RCT-Folly (= 2021.07.22.00)
161 | - React-cxxreact
162 | - React-hermes
163 | - React-jsi
164 | - React-jsiexecutor
165 | - React-perflogger
166 | - React-runtimeexecutor
167 | - React-utils
168 | - SocketRocket (= 0.6.1)
169 | - Yoga
170 | - React-Core/DevSupport (0.72.7):
171 | - glog
172 | - hermes-engine
173 | - RCT-Folly (= 2021.07.22.00)
174 | - React-Core/Default (= 0.72.7)
175 | - React-Core/RCTWebSocket (= 0.72.7)
176 | - React-cxxreact
177 | - React-hermes
178 | - React-jsi
179 | - React-jsiexecutor
180 | - React-jsinspector (= 0.72.7)
181 | - React-perflogger
182 | - React-runtimeexecutor
183 | - React-utils
184 | - SocketRocket (= 0.6.1)
185 | - Yoga
186 | - React-Core/RCTActionSheetHeaders (0.72.7):
187 | - glog
188 | - hermes-engine
189 | - RCT-Folly (= 2021.07.22.00)
190 | - React-Core/Default
191 | - React-cxxreact
192 | - React-hermes
193 | - React-jsi
194 | - React-jsiexecutor
195 | - React-perflogger
196 | - React-runtimeexecutor
197 | - React-utils
198 | - SocketRocket (= 0.6.1)
199 | - Yoga
200 | - React-Core/RCTAnimationHeaders (0.72.7):
201 | - glog
202 | - hermes-engine
203 | - RCT-Folly (= 2021.07.22.00)
204 | - React-Core/Default
205 | - React-cxxreact
206 | - React-hermes
207 | - React-jsi
208 | - React-jsiexecutor
209 | - React-perflogger
210 | - React-runtimeexecutor
211 | - React-utils
212 | - SocketRocket (= 0.6.1)
213 | - Yoga
214 | - React-Core/RCTBlobHeaders (0.72.7):
215 | - glog
216 | - hermes-engine
217 | - RCT-Folly (= 2021.07.22.00)
218 | - React-Core/Default
219 | - React-cxxreact
220 | - React-hermes
221 | - React-jsi
222 | - React-jsiexecutor
223 | - React-perflogger
224 | - React-runtimeexecutor
225 | - React-utils
226 | - SocketRocket (= 0.6.1)
227 | - Yoga
228 | - React-Core/RCTImageHeaders (0.72.7):
229 | - glog
230 | - hermes-engine
231 | - RCT-Folly (= 2021.07.22.00)
232 | - React-Core/Default
233 | - React-cxxreact
234 | - React-hermes
235 | - React-jsi
236 | - React-jsiexecutor
237 | - React-perflogger
238 | - React-runtimeexecutor
239 | - React-utils
240 | - SocketRocket (= 0.6.1)
241 | - Yoga
242 | - React-Core/RCTLinkingHeaders (0.72.7):
243 | - glog
244 | - hermes-engine
245 | - RCT-Folly (= 2021.07.22.00)
246 | - React-Core/Default
247 | - React-cxxreact
248 | - React-hermes
249 | - React-jsi
250 | - React-jsiexecutor
251 | - React-perflogger
252 | - React-runtimeexecutor
253 | - React-utils
254 | - SocketRocket (= 0.6.1)
255 | - Yoga
256 | - React-Core/RCTNetworkHeaders (0.72.7):
257 | - glog
258 | - hermes-engine
259 | - RCT-Folly (= 2021.07.22.00)
260 | - React-Core/Default
261 | - React-cxxreact
262 | - React-hermes
263 | - React-jsi
264 | - React-jsiexecutor
265 | - React-perflogger
266 | - React-runtimeexecutor
267 | - React-utils
268 | - SocketRocket (= 0.6.1)
269 | - Yoga
270 | - React-Core/RCTSettingsHeaders (0.72.7):
271 | - glog
272 | - hermes-engine
273 | - RCT-Folly (= 2021.07.22.00)
274 | - React-Core/Default
275 | - React-cxxreact
276 | - React-hermes
277 | - React-jsi
278 | - React-jsiexecutor
279 | - React-perflogger
280 | - React-runtimeexecutor
281 | - React-utils
282 | - SocketRocket (= 0.6.1)
283 | - Yoga
284 | - React-Core/RCTTextHeaders (0.72.7):
285 | - glog
286 | - hermes-engine
287 | - RCT-Folly (= 2021.07.22.00)
288 | - React-Core/Default
289 | - React-cxxreact
290 | - React-hermes
291 | - React-jsi
292 | - React-jsiexecutor
293 | - React-perflogger
294 | - React-runtimeexecutor
295 | - React-utils
296 | - SocketRocket (= 0.6.1)
297 | - Yoga
298 | - React-Core/RCTVibrationHeaders (0.72.7):
299 | - glog
300 | - hermes-engine
301 | - RCT-Folly (= 2021.07.22.00)
302 | - React-Core/Default
303 | - React-cxxreact
304 | - React-hermes
305 | - React-jsi
306 | - React-jsiexecutor
307 | - React-perflogger
308 | - React-runtimeexecutor
309 | - React-utils
310 | - SocketRocket (= 0.6.1)
311 | - Yoga
312 | - React-Core/RCTWebSocket (0.72.7):
313 | - glog
314 | - hermes-engine
315 | - RCT-Folly (= 2021.07.22.00)
316 | - React-Core/Default (= 0.72.7)
317 | - React-cxxreact
318 | - React-hermes
319 | - React-jsi
320 | - React-jsiexecutor
321 | - React-perflogger
322 | - React-runtimeexecutor
323 | - React-utils
324 | - SocketRocket (= 0.6.1)
325 | - Yoga
326 | - React-CoreModules (0.72.7):
327 | - RCT-Folly (= 2021.07.22.00)
328 | - RCTTypeSafety (= 0.72.7)
329 | - React-Codegen (= 0.72.7)
330 | - React-Core/CoreModulesHeaders (= 0.72.7)
331 | - React-jsi (= 0.72.7)
332 | - React-RCTBlob
333 | - React-RCTImage (= 0.72.7)
334 | - ReactCommon/turbomodule/core (= 0.72.7)
335 | - SocketRocket (= 0.6.1)
336 | - React-cxxreact (0.72.7):
337 | - boost (= 1.76.0)
338 | - DoubleConversion
339 | - glog
340 | - hermes-engine
341 | - RCT-Folly (= 2021.07.22.00)
342 | - React-callinvoker (= 0.72.7)
343 | - React-debug (= 0.72.7)
344 | - React-jsi (= 0.72.7)
345 | - React-jsinspector (= 0.72.7)
346 | - React-logger (= 0.72.7)
347 | - React-perflogger (= 0.72.7)
348 | - React-runtimeexecutor (= 0.72.7)
349 | - React-debug (0.72.7)
350 | - React-hermes (0.72.7):
351 | - DoubleConversion
352 | - glog
353 | - hermes-engine
354 | - RCT-Folly (= 2021.07.22.00)
355 | - RCT-Folly/Futures (= 2021.07.22.00)
356 | - React-cxxreact (= 0.72.7)
357 | - React-jsi
358 | - React-jsiexecutor (= 0.72.7)
359 | - React-jsinspector (= 0.72.7)
360 | - React-perflogger (= 0.72.7)
361 | - React-jsi (0.72.7):
362 | - boost (= 1.76.0)
363 | - DoubleConversion
364 | - glog
365 | - hermes-engine
366 | - RCT-Folly (= 2021.07.22.00)
367 | - React-jsiexecutor (0.72.7):
368 | - DoubleConversion
369 | - glog
370 | - hermes-engine
371 | - RCT-Folly (= 2021.07.22.00)
372 | - React-cxxreact (= 0.72.7)
373 | - React-jsi (= 0.72.7)
374 | - React-perflogger (= 0.72.7)
375 | - React-jsinspector (0.72.7)
376 | - React-logger (0.72.7):
377 | - glog
378 | - react-native-cameraroll (7.1.0):
379 | - React-Core
380 | - React-NativeModulesApple (0.72.7):
381 | - hermes-engine
382 | - React-callinvoker
383 | - React-Core
384 | - React-cxxreact
385 | - React-jsi
386 | - React-runtimeexecutor
387 | - ReactCommon/turbomodule/bridging
388 | - ReactCommon/turbomodule/core
389 | - React-perflogger (0.72.7)
390 | - React-RCTActionSheet (0.72.7):
391 | - React-Core/RCTActionSheetHeaders (= 0.72.7)
392 | - React-RCTAnimation (0.72.7):
393 | - RCT-Folly (= 2021.07.22.00)
394 | - RCTTypeSafety (= 0.72.7)
395 | - React-Codegen (= 0.72.7)
396 | - React-Core/RCTAnimationHeaders (= 0.72.7)
397 | - React-jsi (= 0.72.7)
398 | - ReactCommon/turbomodule/core (= 0.72.7)
399 | - React-RCTAppDelegate (0.72.7):
400 | - RCT-Folly
401 | - RCTRequired
402 | - RCTTypeSafety
403 | - React-Core
404 | - React-CoreModules
405 | - React-hermes
406 | - React-NativeModulesApple
407 | - React-RCTImage
408 | - React-RCTNetwork
409 | - React-runtimescheduler
410 | - ReactCommon/turbomodule/core
411 | - React-RCTBlob (0.72.7):
412 | - hermes-engine
413 | - RCT-Folly (= 2021.07.22.00)
414 | - React-Codegen (= 0.72.7)
415 | - React-Core/RCTBlobHeaders (= 0.72.7)
416 | - React-Core/RCTWebSocket (= 0.72.7)
417 | - React-jsi (= 0.72.7)
418 | - React-RCTNetwork (= 0.72.7)
419 | - ReactCommon/turbomodule/core (= 0.72.7)
420 | - React-RCTImage (0.72.7):
421 | - RCT-Folly (= 2021.07.22.00)
422 | - RCTTypeSafety (= 0.72.7)
423 | - React-Codegen (= 0.72.7)
424 | - React-Core/RCTImageHeaders (= 0.72.7)
425 | - React-jsi (= 0.72.7)
426 | - React-RCTNetwork (= 0.72.7)
427 | - ReactCommon/turbomodule/core (= 0.72.7)
428 | - React-RCTLinking (0.72.7):
429 | - React-Codegen (= 0.72.7)
430 | - React-Core/RCTLinkingHeaders (= 0.72.7)
431 | - React-jsi (= 0.72.7)
432 | - ReactCommon/turbomodule/core (= 0.72.7)
433 | - React-RCTNetwork (0.72.7):
434 | - RCT-Folly (= 2021.07.22.00)
435 | - RCTTypeSafety (= 0.72.7)
436 | - React-Codegen (= 0.72.7)
437 | - React-Core/RCTNetworkHeaders (= 0.72.7)
438 | - React-jsi (= 0.72.7)
439 | - ReactCommon/turbomodule/core (= 0.72.7)
440 | - React-RCTSettings (0.72.7):
441 | - RCT-Folly (= 2021.07.22.00)
442 | - RCTTypeSafety (= 0.72.7)
443 | - React-Codegen (= 0.72.7)
444 | - React-Core/RCTSettingsHeaders (= 0.72.7)
445 | - React-jsi (= 0.72.7)
446 | - ReactCommon/turbomodule/core (= 0.72.7)
447 | - React-RCTText (0.72.7):
448 | - React-Core/RCTTextHeaders (= 0.72.7)
449 | - React-RCTVibration (0.72.7):
450 | - RCT-Folly (= 2021.07.22.00)
451 | - React-Codegen (= 0.72.7)
452 | - React-Core/RCTVibrationHeaders (= 0.72.7)
453 | - React-jsi (= 0.72.7)
454 | - ReactCommon/turbomodule/core (= 0.72.7)
455 | - React-rncore (0.72.7)
456 | - React-runtimeexecutor (0.72.7):
457 | - React-jsi (= 0.72.7)
458 | - React-runtimescheduler (0.72.7):
459 | - glog
460 | - hermes-engine
461 | - RCT-Folly (= 2021.07.22.00)
462 | - React-callinvoker
463 | - React-debug
464 | - React-jsi
465 | - React-runtimeexecutor
466 | - React-utils (0.72.7):
467 | - glog
468 | - RCT-Folly (= 2021.07.22.00)
469 | - React-debug
470 | - ReactCommon/turbomodule/bridging (0.72.7):
471 | - DoubleConversion
472 | - glog
473 | - hermes-engine
474 | - RCT-Folly (= 2021.07.22.00)
475 | - React-callinvoker (= 0.72.7)
476 | - React-cxxreact (= 0.72.7)
477 | - React-jsi (= 0.72.7)
478 | - React-logger (= 0.72.7)
479 | - React-perflogger (= 0.72.7)
480 | - ReactCommon/turbomodule/core (0.72.7):
481 | - DoubleConversion
482 | - glog
483 | - hermes-engine
484 | - RCT-Folly (= 2021.07.22.00)
485 | - React-callinvoker (= 0.72.7)
486 | - React-cxxreact (= 0.72.7)
487 | - React-jsi (= 0.72.7)
488 | - React-logger (= 0.72.7)
489 | - React-perflogger (= 0.72.7)
490 | - RNGestureHandler (2.14.0):
491 | - RCT-Folly (= 2021.07.22.00)
492 | - React-Core
493 | - RNPermissions (3.10.1):
494 | - React-Core
495 | - SocketRocket (0.6.1)
496 | - VisionCamera (2.16.5):
497 | - React
498 | - React-callinvoker
499 | - React-Core
500 | - Yoga (1.14.0)
501 | - YogaKit (1.18.1):
502 | - Yoga (~> 1.14)
503 |
504 | DEPENDENCIES:
505 | - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
506 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
507 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
508 | - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
509 | - Flipper (= 0.182.0)
510 | - Flipper-Boost-iOSX (= 1.76.0.1.11)
511 | - Flipper-DoubleConversion (= 3.2.0.1)
512 | - Flipper-Fmt (= 7.1.7)
513 | - Flipper-Folly (= 2.6.10)
514 | - Flipper-Glog (= 0.5.0.5)
515 | - Flipper-PeerTalk (= 0.0.4)
516 | - FlipperKit (= 0.182.0)
517 | - FlipperKit/Core (= 0.182.0)
518 | - FlipperKit/CppBridge (= 0.182.0)
519 | - FlipperKit/FBCxxFollyDynamicConvert (= 0.182.0)
520 | - FlipperKit/FBDefines (= 0.182.0)
521 | - FlipperKit/FKPortForwarding (= 0.182.0)
522 | - FlipperKit/FlipperKitHighlightOverlay (= 0.182.0)
523 | - FlipperKit/FlipperKitLayoutPlugin (= 0.182.0)
524 | - FlipperKit/FlipperKitLayoutTextSearchable (= 0.182.0)
525 | - FlipperKit/FlipperKitNetworkPlugin (= 0.182.0)
526 | - FlipperKit/FlipperKitReactPlugin (= 0.182.0)
527 | - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.182.0)
528 | - FlipperKit/SKIOSNetworkPlugin (= 0.182.0)
529 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
530 | - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
531 | - libevent (~> 2.1.12)
532 | - OpenSSL-Universal (= 1.1.1100)
533 | - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
534 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
535 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
536 | - React (from `../node_modules/react-native/`)
537 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`)
538 | - React-Codegen (from `build/generated/ios`)
539 | - React-Core (from `../node_modules/react-native/`)
540 | - React-Core/DevSupport (from `../node_modules/react-native/`)
541 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`)
542 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
543 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
544 | - React-debug (from `../node_modules/react-native/ReactCommon/react/debug`)
545 | - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`)
546 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
547 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
548 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
549 | - React-logger (from `../node_modules/react-native/ReactCommon/logger`)
550 | - "react-native-cameraroll (from `../node_modules/@react-native-camera-roll/camera-roll`)"
551 | - React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
552 | - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
553 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
554 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
555 | - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`)
556 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
557 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
558 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
559 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
560 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
561 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`)
562 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
563 | - React-rncore (from `../node_modules/react-native/ReactCommon`)
564 | - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`)
565 | - React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`)
566 | - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`)
567 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
568 | - RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
569 | - RNPermissions (from `../node_modules/react-native-permissions`)
570 | - VisionCamera (from `../node_modules/react-native-vision-camera`)
571 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
572 |
573 | SPEC REPOS:
574 | trunk:
575 | - CocoaAsyncSocket
576 | - Flipper
577 | - Flipper-Boost-iOSX
578 | - Flipper-DoubleConversion
579 | - Flipper-Fmt
580 | - Flipper-Folly
581 | - Flipper-Glog
582 | - Flipper-PeerTalk
583 | - FlipperKit
584 | - fmt
585 | - libevent
586 | - OpenSSL-Universal
587 | - SocketRocket
588 | - YogaKit
589 |
590 | EXTERNAL SOURCES:
591 | boost:
592 | :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
593 | DoubleConversion:
594 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
595 | FBLazyVector:
596 | :path: "../node_modules/react-native/Libraries/FBLazyVector"
597 | FBReactNativeSpec:
598 | :path: "../node_modules/react-native/React/FBReactNativeSpec"
599 | glog:
600 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
601 | hermes-engine:
602 | :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec"
603 | :tag: hermes-2023-08-07-RNv0.72.4-813b2def12bc9df02654b3e3653ae4a68d0572e0
604 | RCT-Folly:
605 | :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
606 | RCTRequired:
607 | :path: "../node_modules/react-native/Libraries/RCTRequired"
608 | RCTTypeSafety:
609 | :path: "../node_modules/react-native/Libraries/TypeSafety"
610 | React:
611 | :path: "../node_modules/react-native/"
612 | React-callinvoker:
613 | :path: "../node_modules/react-native/ReactCommon/callinvoker"
614 | React-Codegen:
615 | :path: build/generated/ios
616 | React-Core:
617 | :path: "../node_modules/react-native/"
618 | React-CoreModules:
619 | :path: "../node_modules/react-native/React/CoreModules"
620 | React-cxxreact:
621 | :path: "../node_modules/react-native/ReactCommon/cxxreact"
622 | React-debug:
623 | :path: "../node_modules/react-native/ReactCommon/react/debug"
624 | React-hermes:
625 | :path: "../node_modules/react-native/ReactCommon/hermes"
626 | React-jsi:
627 | :path: "../node_modules/react-native/ReactCommon/jsi"
628 | React-jsiexecutor:
629 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor"
630 | React-jsinspector:
631 | :path: "../node_modules/react-native/ReactCommon/jsinspector"
632 | React-logger:
633 | :path: "../node_modules/react-native/ReactCommon/logger"
634 | react-native-cameraroll:
635 | :path: "../node_modules/@react-native-camera-roll/camera-roll"
636 | React-NativeModulesApple:
637 | :path: "../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios"
638 | React-perflogger:
639 | :path: "../node_modules/react-native/ReactCommon/reactperflogger"
640 | React-RCTActionSheet:
641 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS"
642 | React-RCTAnimation:
643 | :path: "../node_modules/react-native/Libraries/NativeAnimation"
644 | React-RCTAppDelegate:
645 | :path: "../node_modules/react-native/Libraries/AppDelegate"
646 | React-RCTBlob:
647 | :path: "../node_modules/react-native/Libraries/Blob"
648 | React-RCTImage:
649 | :path: "../node_modules/react-native/Libraries/Image"
650 | React-RCTLinking:
651 | :path: "../node_modules/react-native/Libraries/LinkingIOS"
652 | React-RCTNetwork:
653 | :path: "../node_modules/react-native/Libraries/Network"
654 | React-RCTSettings:
655 | :path: "../node_modules/react-native/Libraries/Settings"
656 | React-RCTText:
657 | :path: "../node_modules/react-native/Libraries/Text"
658 | React-RCTVibration:
659 | :path: "../node_modules/react-native/Libraries/Vibration"
660 | React-rncore:
661 | :path: "../node_modules/react-native/ReactCommon"
662 | React-runtimeexecutor:
663 | :path: "../node_modules/react-native/ReactCommon/runtimeexecutor"
664 | React-runtimescheduler:
665 | :path: "../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler"
666 | React-utils:
667 | :path: "../node_modules/react-native/ReactCommon/react/utils"
668 | ReactCommon:
669 | :path: "../node_modules/react-native/ReactCommon"
670 | RNGestureHandler:
671 | :path: "../node_modules/react-native-gesture-handler"
672 | RNPermissions:
673 | :path: "../node_modules/react-native-permissions"
674 | VisionCamera:
675 | :path: "../node_modules/react-native-vision-camera"
676 | Yoga:
677 | :path: "../node_modules/react-native/ReactCommon/yoga"
678 |
679 | SPEC CHECKSUMS:
680 | boost: 57d2868c099736d80fcd648bf211b4431e51a558
681 | CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
682 | DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
683 | FBLazyVector: 5fbbff1d7734827299274638deb8ba3024f6c597
684 | FBReactNativeSpec: 638095fe8a01506634d77b260ef8a322019ac671
685 | Flipper: 6edb735e6c3e332975d1b17956bcc584eccf5818
686 | Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
687 | Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30
688 | Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b
689 | Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3
690 | Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446
691 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
692 | FlipperKit: 2efad7007d6745a3f95e4034d547be637f89d3f6
693 | fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
694 | glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
695 | hermes-engine: 9180d43df05c1ed658a87cc733dc3044cf90c00a
696 | libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
697 | OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
698 | RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
699 | RCTRequired: 83bca1c184feb4d2e51c72c8369b83d641443f95
700 | RCTTypeSafety: 13c4a87a16d7db6cd66006ce9759f073402ef85b
701 | React: e67aa9f99957c7611c392b5e49355d877d6525e2
702 | React-callinvoker: 2790c09d964c2e5404b5410cde91b152e3746b7b
703 | React-Codegen: e6e05e105ca7cdb990f4d609985a2a689d8d0653
704 | React-Core: 9283f1e7d0d5e3d33ad298547547b1b43912534c
705 | React-CoreModules: 6312c9b2fec4329d9ae6a2b8c350032d1664c51b
706 | React-cxxreact: 7da72565656c8ac7f97c9a031d0b199bbdec0640
707 | React-debug: 4accb2b9dc09b575206d2c42f4082990a52ae436
708 | React-hermes: 1299a94f255f59a72d5baa54a2ca2e1eee104947
709 | React-jsi: 2208de64c3a41714ac04e86975386fc49116ea13
710 | React-jsiexecutor: c49502e5d02112247ee4526bc3ccfc891ae3eb9b
711 | React-jsinspector: 8baadae51f01d867c3921213a25ab78ab4fbcd91
712 | React-logger: 8edc785c47c8686c7962199a307015e2ce9a0e4f
713 | react-native-cameraroll: c1b206b3d623d0122783b8b3181700d38b6696fb
714 | React-NativeModulesApple: b6868ee904013a7923128892ee4a032498a1024a
715 | React-perflogger: 31ea61077185eb1428baf60c0db6e2886f141a5a
716 | React-RCTActionSheet: 392090a3abc8992eb269ef0eaa561750588fc39d
717 | React-RCTAnimation: 4b3cc6a29474bc0d78c4f04b52ab59bf760e8a9b
718 | React-RCTAppDelegate: 89b015b29885109addcabecdf3b2e833905437c7
719 | React-RCTBlob: 3e23dcbe6638897b5605e46d0d62955d78e8d27b
720 | React-RCTImage: 8a5d339d614a90a183fc1b8b6a7eb44e2e703943
721 | React-RCTLinking: b37dfbf646d77c326f9eae094b1fcd575b1c24c7
722 | React-RCTNetwork: 8bed9b2461c7d8a7d14e63df9b16181c448beebc
723 | React-RCTSettings: 506a5f09a455123a8873801b70aa7b4010b76b01
724 | React-RCTText: 3c71ecaad8ee010b79632ea2590f86c02f5cce17
725 | React-RCTVibration: d1b78ca38f61ea4b3e9ebb2ddbd0b5662631d99b
726 | React-rncore: bfc2f6568b6fecbae6f2f774e95c60c3c9e95bf2
727 | React-runtimeexecutor: 47b0a2d5bbb416db65ef881a6f7bdcfefa0001ab
728 | React-runtimescheduler: 7649c3b46c8dee1853691ecf60146a16ae59253c
729 | React-utils: 56838edeaaf651220d1e53cd0b8934fb8ce68415
730 | ReactCommon: 5f704096ccf7733b390f59043b6fa9cc180ee4f6
731 | RNGestureHandler: 32a01c29ecc9bb0b5bf7bc0a33547f61b4dc2741
732 | RNPermissions: 9aa3aa9cc0328f94ef8241b47d7390f8b13fda1c
733 | SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
734 | VisionCamera: 6b28a5d94ea591d17a8b2da6cf1fcdb52c39aa67
735 | Yoga: 4c3aa327e4a6a23eeacd71f61c81df1bcdf677d5
736 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
737 |
738 | PODFILE CHECKSUM: 3108a0264339a112f6ce13c549a188b074236cbd
739 |
740 | COCOAPODS: 1.13.0
741 |
--------------------------------------------------------------------------------
/example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
53 |
55 |
61 |
62 |
63 |
64 |
70 |
72 |
78 |
79 |
80 |
81 |
83 |
84 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/example/ios/example.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/ios/example/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : RCTAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/example/ios/example/AppDelegate.mm:
--------------------------------------------------------------------------------
1 | #import "AppDelegate.h"
2 |
3 | #import
4 |
5 | @implementation AppDelegate
6 |
7 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
8 | {
9 | self.moduleName = @"example";
10 | // You can add your custom initial props in the dictionary below.
11 | // They will be passed down to the ViewController used by React Native.
12 | self.initialProps = @{};
13 |
14 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
15 | }
16 |
17 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
18 | {
19 | #if DEBUG
20 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
21 | #else
22 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
23 | #endif
24 | }
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ios-marketing",
45 | "scale" : "1x",
46 | "size" : "1024x1024"
47 | }
48 | ],
49 | "info" : {
50 | "author" : "xcode",
51 | "version" : 1
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/example/ios/example/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/example/ios/example/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | example
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(MARKETING_VERSION)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(CURRENT_PROJECT_VERSION)
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSExceptionDomains
30 |
31 | localhost
32 |
33 | NSExceptionAllowsInsecureHTTPLoads
34 |
35 |
36 |
37 |
38 | NSLocationWhenInUseUsageDescription
39 |
40 | UILaunchStoryboardName
41 | LaunchScreen
42 | UIRequiredDeviceCapabilities
43 |
44 | armv7
45 |
46 | UISupportedInterfaceOrientations
47 |
48 | UIInterfaceOrientationPortrait
49 | UIInterfaceOrientationLandscapeLeft
50 | UIInterfaceOrientationLandscapeRight
51 |
52 | UIViewControllerBasedStatusBarAppearance
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/example/ios/example/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/example/ios/example/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char *argv[])
6 | {
7 | @autoreleasepool {
8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/example/ios/exampleTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/example/ios/exampleTests/exampleTests.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #import
5 | #import
6 |
7 | #define TIMEOUT_SECONDS 600
8 | #define TEXT_TO_LOOK_FOR @"Welcome to React"
9 |
10 | @interface exampleTests : XCTestCase
11 |
12 | @end
13 |
14 | @implementation exampleTests
15 |
16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
17 | {
18 | if (test(view)) {
19 | return YES;
20 | }
21 | for (UIView *subview in [view subviews]) {
22 | if ([self findSubviewInView:subview matching:test]) {
23 | return YES;
24 | }
25 | }
26 | return NO;
27 | }
28 |
29 | - (void)testRendersWelcomeScreen
30 | {
31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33 | BOOL foundElement = NO;
34 |
35 | __block NSString *redboxError = nil;
36 | #ifdef DEBUG
37 | RCTSetLogFunction(
38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
39 | if (level >= RCTLogLevelError) {
40 | redboxError = message;
41 | }
42 | });
43 | #endif
44 |
45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
48 |
49 | foundElement = [self findSubviewInView:vc.view
50 | matching:^BOOL(UIView *view) {
51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
52 | return YES;
53 | }
54 | return NO;
55 | }];
56 | }
57 |
58 | #ifdef DEBUG
59 | RCTSetLogFunction(RCTDefaultLogFunction);
60 | #endif
61 |
62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
64 | }
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/example/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: 'react-native',
3 | };
4 |
--------------------------------------------------------------------------------
/example/metro.config.js:
--------------------------------------------------------------------------------
1 | const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
2 |
3 | /**
4 | * Metro configuration
5 | * https://facebook.github.io/metro/docs/configuration
6 | *
7 | * @type {import('metro-config').MetroConfig}
8 | */
9 | const config = {};
10 |
11 | module.exports = mergeConfig(getDefaultConfig(__dirname), config);
12 |
--------------------------------------------------------------------------------
/example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "example",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "lint": "eslint .",
9 | "start": "react-native start",
10 | "test": "jest"
11 | },
12 | "dependencies": {
13 | "@react-native-camera-roll/camera-roll": "^7.1.0",
14 | "react": "18.2.0",
15 | "react-native": "0.72.7",
16 | "react-native-awesome-camera": "^1.0.9",
17 | "react-native-gesture-handler": "^2.14.0",
18 | "react-native-permissions": "^3.10.1",
19 | "react-native-vision-camera": "2.16.5"
20 | },
21 | "devDependencies": {
22 | "@babel/core": "^7.20.0",
23 | "@babel/preset-env": "^7.20.0",
24 | "@babel/runtime": "^7.20.0",
25 | "@react-native/eslint-config": "^0.72.2",
26 | "@react-native/metro-config": "^0.72.11",
27 | "@tsconfig/react-native": "^3.0.0",
28 | "@types/react": "^18.0.24",
29 | "@types/react-test-renderer": "^18.0.0",
30 | "babel-jest": "^29.2.1",
31 | "eslint": "^8.19.0",
32 | "jest": "^29.2.1",
33 | "metro-react-native-babel-preset": "0.76.8",
34 | "prettier": "^2.4.1",
35 | "react-test-renderer": "18.2.0",
36 | "typescript": "4.8.4"
37 | },
38 | "engines": {
39 | "node": ">=16"
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/example/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@tsconfig/react-native/tsconfig.json"
3 | }
4 |
--------------------------------------------------------------------------------
/lib/AwesomeCamera.tsx:
--------------------------------------------------------------------------------
1 | /* eslint-disable react-hooks/exhaustive-deps */
2 | import React, {useEffect, useRef, useState} from 'react';
3 | import {
4 | Pressable,
5 | StyleSheet,
6 | View,
7 | FlatList,
8 | Text,
9 | Image,
10 | GestureResponderEvent,
11 | Platform,
12 | StyleProp,
13 | ViewStyle,
14 | ImageStyle,
15 | ImageSourcePropType,
16 | Alert,
17 | Linking,
18 | } from 'react-native';
19 | import {
20 | Camera,
21 | CameraProps as VisionCameraProps,
22 | PhotoFile,
23 | Point,
24 | RecordVideoOptions as VisionRecordVideoOptions,
25 | TakePhotoOptions as VisionTakePhotoOptions,
26 | VideoFile,
27 | useCameraDevice,
28 | } from 'react-native-vision-camera';
29 | import {
30 | CameraRoll,
31 | PhotoIdentifier,
32 | PhotoIdentifiersPage,
33 | } from '@react-native-camera-roll/camera-roll';
34 | import {
35 | GestureHandlerRootView,
36 | PanGestureHandler,
37 | } from 'react-native-gesture-handler';
38 | import {
39 | getCameraPermission,
40 | getMicrophonePermission,
41 | getPhotoPermission,
42 | getStorageOrLibraryPermission,
43 | getVideoPermission,
44 | } from './Permissions';
45 | import {Media} from './Media';
46 |
47 | const white = 'white';
48 | const yellow = 'yellow';
49 | const black = 'black';
50 |
51 | interface CameraProps
52 | extends Omit<
53 | VisionCameraProps,
54 | 'device' | 'isActive' | 'photo' | 'video' | 'audio'
55 | > {
56 | isActive?: boolean;
57 | }
58 |
59 | type RecordVideoOptions = Pick;
60 |
61 | type TakePhotoOptions = Omit;
62 |
63 | interface AwesomeCameraProps {
64 | setIsOpen: Function;
65 | getData: (data: (PhotoIdentifier | PhotoFile | VideoFile)[]) => void;
66 | themeColor?: string;
67 | secondaryColor?: string;
68 | cameraProps?: CameraProps;
69 | multiSelect?: boolean;
70 | takePhotoOptions?: TakePhotoOptions;
71 | recordVideoOptions?: RecordVideoOptions;
72 | showGallery?: boolean;
73 | photo?: boolean;
74 | video?: boolean;
75 | closeContainerStyle?: StyleProp;
76 | closeIconStyle?: StyleProp;
77 | closeIcon?: ImageSourcePropType;
78 | renderCloseComponent?: () => React.ReactComponentElement;
79 | videoContainerStyle?: StyleProp;
80 | videoIconStyle?: StyleProp;
81 | videoIcon?: ImageSourcePropType;
82 | renderVideoComponent?: () => React.ReactComponentElement;
83 | flashContainerStyle?: StyleProp;
84 | flashIconStyle?: StyleProp;
85 | flashIcon?: ImageSourcePropType;
86 | renderFlashComponent?: () => React.ReactComponentElement;
87 | changeCameraContainerStyle?: StyleProp;
88 | changeCameraIconStyle?: StyleProp;
89 | changeCameraIcon?: ImageSourcePropType;
90 | renderChangeCameraComponent?: () => React.ReactComponentElement;
91 | }
92 |
93 | const AwesomeCamera = (props: AwesomeCameraProps) => {
94 | const {
95 | setIsOpen,
96 | getData,
97 | cameraProps,
98 | themeColor = yellow,
99 | secondaryColor = black,
100 | multiSelect = true,
101 | takePhotoOptions,
102 | recordVideoOptions,
103 | showGallery = true,
104 | photo = true,
105 | video = true,
106 | closeContainerStyle,
107 | closeIconStyle,
108 | closeIcon,
109 | renderCloseComponent,
110 | videoContainerStyle,
111 | videoIconStyle,
112 | videoIcon,
113 | renderVideoComponent,
114 | flashContainerStyle,
115 | flashIconStyle,
116 | flashIcon,
117 | renderFlashComponent,
118 | changeCameraContainerStyle,
119 | changeCameraIconStyle,
120 | changeCameraIcon,
121 | renderChangeCameraComponent,
122 | } = props;
123 |
124 | const {
125 | photoButton,
126 | bottomOuter,
127 | videoStyle,
128 | imageStyle,
129 | bottomInner,
130 | flashStyle,
131 | changeCamStyle,
132 | isVideoStyle,
133 | flexDirection,
134 | borderWidth,
135 | closeButtonStyle,
136 | focus,
137 | centerText,
138 | } = styles;
139 |
140 | const [isRecording, setIsRecording] = useState(false);
141 | const [isTorch, setIsTorch] = useState(false);
142 | const [hasStoragePermission, setHasStoragePermission] =
143 | useState(false);
144 | const [hasCameraPermission, setHasCameraPermission] =
145 | useState(false);
146 | const [hasMicrophonePermission, setHasMicrophonePermission] =
147 | useState(false);
148 | const [photos, setPhotos] = useState();
149 | const [selectedImage, setSelectedImage] = useState<
150 | (PhotoFile | VideoFile | PhotoIdentifier)[]
151 | >([]);
152 | const [media, setMedia] = useState<(PhotoFile | VideoFile)[]>([]);
153 | const [focused, setFocused] = useState();
154 | const [frontCamera, setIsFrontCamera] = useState(false);
155 |
156 | const getIsPhotos = () => {
157 | let isPhoto = true;
158 | if (photo && video) {
159 | isPhoto = true;
160 | } else if (video) {
161 | isPhoto = false;
162 | } else if (photo) {
163 | isPhoto = true;
164 | }
165 | return isPhoto;
166 | };
167 |
168 | const [isPhotos, setIsPhotos] = useState(getIsPhotos());
169 |
170 | const backCameraDevice = useCameraDevice('back');
171 | const frontCameraDevice = useCameraDevice('front');
172 | const camera = useRef(null);
173 |
174 | useEffect(() => {
175 | managePermissions();
176 | }, []);
177 |
178 | useEffect(() => {
179 | if (hasStoragePermission) {
180 | getPhotosDetails();
181 | }
182 | }, [hasStoragePermission]);
183 |
184 | useEffect(() => {
185 | if (frontCameraDevice === undefined || backCameraDevice === undefined) {
186 | Alert.alert('No Camera Found.', 'Please check your device.', [
187 | {text: 'OK', onPress: () => setIsOpen(false)},
188 | ]);
189 | }
190 | }, [frontCameraDevice, backCameraDevice]);
191 |
192 | const getPhotosDetails = async () => {
193 | if (showGallery) {
194 | const items = await CameraRoll.getPhotos({
195 | first: 20,
196 | assetType: (photo && video && 'All') || (video && 'Videos') || 'Photos',
197 | });
198 | setPhotos(items);
199 | }
200 | };
201 |
202 | const managePermissions = async () => {
203 | try {
204 | if (showGallery) {
205 | const isStoragePermission = await getStorageOrLibraryPermission();
206 | let videoPermission = false;
207 | let photoPermission = false;
208 | if (Number(Platform.Version) >= 33) {
209 | if (photo) {
210 | photoPermission = await getPhotoPermission();
211 | }
212 | if (video) {
213 | videoPermission = await getVideoPermission();
214 | }
215 | }
216 |
217 | setHasStoragePermission(
218 | (Number(Platform.Version) < 33 && isStoragePermission) ||
219 | (photo && video && photoPermission && videoPermission) ||
220 | (photo && !video && photoPermission) ||
221 | (!photo && video && videoPermission),
222 | );
223 |
224 | if (
225 | !(
226 | (Number(Platform.Version) < 33 && isStoragePermission) ||
227 | (photo && video && photoPermission && videoPermission) ||
228 | (photo && !video && photoPermission) ||
229 | (!photo && video && videoPermission)
230 | )
231 | ) {
232 | Alert.alert(
233 | 'No Storage Permission Found.',
234 | 'Please provide storage permission to select images from gallery.',
235 | [
236 | {
237 | text: 'OK',
238 | onPress: () => {
239 | Linking.openSettings();
240 | },
241 | },
242 | {
243 | text: 'Cancel',
244 | onPress: () => {
245 | setIsOpen(false);
246 | },
247 | },
248 | ],
249 | );
250 | }
251 | }
252 | if (!hasMicrophonePermission && video) {
253 | const microphonePermission = await getMicrophonePermission();
254 | setHasMicrophonePermission(microphonePermission);
255 | if (!microphonePermission) {
256 | Alert.alert(
257 | 'No Microphone Permission Found.',
258 | 'Please provide microphone permission to use camera.',
259 | [
260 | {
261 | text: 'OK',
262 | onPress: () => {
263 | Linking.openSettings();
264 | },
265 | },
266 | {
267 | text: 'Cancel',
268 | onPress: () => {
269 | setIsOpen(false);
270 | },
271 | },
272 | ],
273 | );
274 | }
275 | }
276 | if (!hasCameraPermission) {
277 | const cameraPermission = await getCameraPermission();
278 | setHasCameraPermission(cameraPermission);
279 | if (!cameraPermission) {
280 | Alert.alert(
281 | 'No Camera Permission Found.',
282 | 'Please provide camera permission to use camera.',
283 | [
284 | {
285 | text: 'OK',
286 | onPress: () => {
287 | Linking.openSettings();
288 | },
289 | },
290 | {
291 | text: 'Cancel',
292 | onPress: () => {
293 | setIsOpen(false);
294 | },
295 | },
296 | ],
297 | );
298 | }
299 | }
300 | } catch (error) {
301 | console.log(error);
302 | }
303 | };
304 |
305 | const getMorePhotos = async () => {
306 | try {
307 | if (photos?.page_info.has_next_page && showGallery) {
308 | const items = await CameraRoll.getPhotos({
309 | first: 20,
310 | assetType:
311 | (photo && video && 'All') || (video && 'Videos') || 'Photos',
312 | after: photos?.page_info.end_cursor,
313 | });
314 | setPhotos({
315 | edges: [...photos?.edges, ...items.edges],
316 | page_info: items.page_info,
317 | });
318 | }
319 | } catch (error) {}
320 | };
321 |
322 | const takePicture = async () => {
323 | try {
324 | if (camera.current && photo) {
325 | const snapshot = await camera?.current.takePhoto({
326 | ...takePhotoOptions,
327 | flash: (isTorch && 'on') || 'off',
328 | });
329 | snapshot.path = `file:///${snapshot.path}`;
330 | const newMedia = [snapshot, ...media];
331 | setMedia(newMedia);
332 |
333 | if (!multiSelect) {
334 | setSelectedImage([snapshot]);
335 | } else {
336 | setSelectedImage([...selectedImage, snapshot]);
337 | }
338 | }
339 | } catch (e) {
340 | console.log(e);
341 | }
342 | };
343 |
344 | const startRecording = () => {
345 | try {
346 | if (!video) {
347 | return;
348 | }
349 | if (!hasMicrophonePermission) {
350 | throw new Error('No Microphone Permission Found.');
351 | }
352 |
353 | if (camera.current) {
354 | setIsRecording(true);
355 | camera.current.startRecording({
356 | ...recordVideoOptions,
357 | flash: (isTorch && 'on') || 'off',
358 |
359 | onRecordingFinished: (v: VideoFile) => {
360 | const newMedia = [v, ...media];
361 | setMedia(newMedia);
362 |
363 | if (!multiSelect) {
364 | setSelectedImage([v]);
365 | } else {
366 | setSelectedImage([...selectedImage, v]);
367 | }
368 | },
369 |
370 | onRecordingError: error => console.error(error),
371 | });
372 | }
373 | } catch (e) {
374 | console.log(e);
375 | }
376 | };
377 |
378 | const checkOut = () => {
379 | getData(selectedImage);
380 | setIsOpen(false);
381 | };
382 |
383 | const stopRecording = async () => {
384 | setIsRecording(false);
385 | if (camera.current && isRecording) {
386 | await camera.current.stopRecording();
387 | }
388 | };
389 |
390 | const onFocus = async (e: GestureResponderEvent) => {
391 | try {
392 | if (
393 | (!frontCamera && backCameraDevice?.supportsFocus) ||
394 | (frontCamera && frontCameraDevice?.supportsFocus)
395 | ) {
396 | e.persist();
397 | const event = e.nativeEvent;
398 | let point: Point = {
399 | x: Math.round(event.pageX - 25),
400 | y: Math.round(event.pageY - 25),
401 | };
402 | setFocused({x: point.x - 25, y: point.y - 25});
403 | await camera?.current?.focus(point);
404 | }
405 | } catch (error: any) {
406 | } finally {
407 | setFocused(undefined);
408 | }
409 | };
410 |
411 | const onPressItem = (obj: PhotoFile | VideoFile | PhotoIdentifier) => {
412 | if (multiSelect) {
413 | let selected = [...selectedImage];
414 | const index = selected.indexOf(obj);
415 | (index === -1 && selected.push(obj)) || selected.splice(index, 1);
416 | setSelectedImage(selected);
417 | } else {
418 | setSelectedImage([obj]);
419 | }
420 | };
421 |
422 | const onPressChangeCamera = () => {
423 | setIsFrontCamera(!frontCamera);
424 | setIsTorch(false);
425 | };
426 |
427 | const identifyVideo = (obj: VideoFile) => {
428 | if (obj.duration) {
429 | return (
430 | <>
431 | {(renderVideoComponent !== undefined && renderVideoComponent()) || (
432 |
433 |
437 |
438 | )}
439 | >
440 | );
441 | } else {
442 | return null;
443 | }
444 | };
445 |
446 | const renderHeader = () => (
447 |
448 | {(media.length &&
449 | media.map((obj: PhotoFile | VideoFile, index: number) => {
450 | const isSelected = selectedImage.includes(obj);
451 | return (
452 | onPressItem(obj)}>
456 | console.log(e)}
458 | source={{uri: `${obj.path}`}}
459 | style={[
460 | imageStyle,
461 | borderWidth,
462 | {borderColor: (isSelected && themeColor) || 'transparent'},
463 | ]}
464 | />
465 | {identifyVideo(obj as VideoFile)}
466 |
467 | );
468 | })) ||
469 | null}
470 |
471 | );
472 |
473 | const focusedView = () =>
474 | focused && ;
475 |
476 | const renderItem = ({item}: {item: PhotoIdentifier}) => {
477 | const selectedImages = selectedImage as PhotoIdentifier[];
478 | const index = selectedImages.indexOf(item);
479 | return (
480 |
490 | );
491 | };
492 |
493 | const getBottomView = () => {
494 | return (
495 |
496 | setIsPhotos(false)}
498 | style={[
499 | styles.videoText,
500 | {
501 | backgroundColor: (isPhotos && 'transparent') || themeColor,
502 | },
503 | ]}>
504 | {'Video'}
505 |
506 | setIsPhotos(true)}
508 | style={[
509 | styles.photoText,
510 | {
511 | backgroundColor: (isPhotos && themeColor) || 'transparent',
512 | },
513 | ]}>
514 | {'Photo'}
515 |
516 |
517 | );
518 | };
519 |
520 | if (!hasCameraPermission) {
521 | return (
522 | setIsOpen(false)}>
523 | No Camera Permission Found. Click here to close camera
524 |
525 | );
526 | }
527 |
528 | return (
529 | <>
530 | {(hasCameraPermission &&
531 | ((frontCamera && frontCameraDevice !== undefined) ||
532 | backCameraDevice !== undefined) && (
533 | console.log(error)}
537 | style={[StyleSheet.absoluteFill, cameraProps?.style]}
538 | device={(frontCamera && frontCameraDevice!) || backCameraDevice!}
539 | isActive
540 | photo={photo}
541 | video={video}
542 | focusable
543 | audio
544 | enableZoomGesture
545 | />
546 | )) ||
547 | null}
548 |
549 | {(photo && video && (
550 |
551 | {
553 | if (isPhotos && e.nativeEvent.translationX > 0) {
554 | setIsPhotos(false);
555 | } else if (!isPhotos && e.nativeEvent.translationX < 0) {
556 | setIsPhotos(true);
557 | }
558 | }}>
559 |
562 | (frontCameraDevice?.supportsFocus ||
563 | backCameraDevice?.supportsFocus) &&
564 | onFocus(e)
565 | }
566 | />
567 |
568 |
569 | )) ||
570 | null}
571 |
572 | setIsOpen(false)}>
575 | {(renderCloseComponent !== undefined && renderCloseComponent()) || (
576 |
580 | )}
581 |
582 |
583 |
584 | index.toString()}
591 | onEndReached={getMorePhotos}
592 | />
593 |
594 |
600 |
601 |
602 | setIsTorch(prev => !prev)}
604 | disabled={frontCamera}
605 | style={[
606 | flashStyle,
607 | {backgroundColor: (isTorch && white) || 'transparent'},
608 | flashContainerStyle,
609 | ]}>
610 | {(renderFlashComponent !== undefined && renderFlashComponent()) || (
611 |
615 | )}
616 |
617 |
618 | {
620 | if (isPhotos) {
621 | takePicture();
622 | } else {
623 | if (isRecording) {
624 | stopRecording();
625 | } else {
626 | startRecording();
627 | }
628 | }
629 | }}
630 | style={photoButton}>
631 |
632 |
633 |
634 |
637 | {(renderChangeCameraComponent !== undefined &&
638 | renderChangeCameraComponent()) || (
639 |
643 | )}
644 |
645 |
646 |
647 | {(photo && video && getBottomView()) || null}
648 |
649 |
650 | {focusedView()}
651 | >
652 | );
653 | };
654 |
655 | const CheckoutBtn = (props: {
656 | selectedImage: (PhotoFile | VideoFile | PhotoIdentifier)[];
657 | themeColor: string;
658 | secondaryColor: string;
659 | onPressCheckout: () => void;
660 | }) => {
661 | const {selectedImage, themeColor, secondaryColor, onPressCheckout} = props;
662 | const {checkButtonStyle, selectedLength, tick} = styles;
663 |
664 | if (!selectedImage.length) {
665 | return null;
666 | }
667 |
668 | return (
669 |
672 |
673 | {selectedImage.length}
674 |
675 | {' ✓'}
676 |
677 | );
678 | };
679 |
680 | const styles = StyleSheet.create({
681 | photoButton: {
682 | height: 80,
683 | width: 80,
684 | borderWidth: 3,
685 | borderColor: '#fff',
686 | borderRadius: 40,
687 | alignSelf: 'center',
688 | justifyContent: 'center',
689 | alignItems: 'center',
690 | },
691 | videoStyle: {
692 | backgroundColor: 'red',
693 | height: 60,
694 | width: 60,
695 | alignSelf: 'center',
696 | borderRadius: 30,
697 | },
698 | bottomOuter: {
699 | position: 'absolute',
700 | width: '100%',
701 | bottom: 10,
702 | },
703 | imageStyle: {
704 | height: 80,
705 | width: 80,
706 | margin: 2,
707 | },
708 | bottomInner: {
709 | flex: 1,
710 | marginBottom: 7,
711 | marginTop: 10,
712 | flexDirection: 'row',
713 | justifyContent: 'space-around',
714 | alignItems: 'center',
715 | },
716 | flashStyle: {
717 | borderColor: white,
718 | height: 40,
719 | width: 40,
720 | borderRadius: 20,
721 | borderWidth: 1,
722 | justifyContent: 'center',
723 | alignItems: 'center',
724 | },
725 | changeCamStyle: {
726 | height: 40,
727 | width: 40,
728 | justifyContent: 'center',
729 | alignItems: 'center',
730 | },
731 | checkButtonStyle: {
732 | width: 50,
733 | height: 50,
734 | borderRadius: 25,
735 | justifyContent: 'center',
736 | alignItems: 'center',
737 | position: 'absolute',
738 | right: 20,
739 | top: -20,
740 | flexDirection: 'row',
741 | },
742 | isVideoStyle: {
743 | position: 'absolute',
744 | alignSelf: 'center',
745 | padding: 5,
746 | borderRadius: 20,
747 | backgroundColor: '#ffffff90',
748 | },
749 | flexDirection: {flexDirection: 'row'},
750 | borderWidth: {borderWidth: 1},
751 | centerStyle: {
752 | flex: 1,
753 | justifyContent: 'center',
754 | alignItems: 'center',
755 | },
756 | closeButtonStyle: {
757 | top: 50,
758 | position: 'absolute',
759 | left: 50,
760 | },
761 | focus: {
762 | position: 'absolute',
763 | width: 50,
764 | height: 50,
765 | borderRadius: 25,
766 | borderWidth: 1,
767 | borderColor: white,
768 | },
769 | center: {justifyContent: 'center', alignItems: 'center'},
770 | tick: {
771 | fontSize: 20,
772 | },
773 | selectedLength: {
774 | fontSize: 17,
775 | },
776 | changeCameraIconStyle: {
777 | height: 20,
778 | width: 20,
779 | tintColor: 'white',
780 | },
781 | flashIconStyle: {
782 | height: 20,
783 | width: 20,
784 | },
785 | blackColor: {
786 | color: 'black',
787 | },
788 | bottomViewContainer: {
789 | flexDirection: 'row',
790 | alignSelf: 'center',
791 | marginTop: 5,
792 | },
793 | videoText: {
794 | paddingVertical: 5,
795 | paddingHorizontal: 10,
796 | borderRadius: 15,
797 | },
798 | photoText: {
799 | paddingVertical: 5,
800 | paddingHorizontal: 10,
801 | marginLeft: 5,
802 | borderRadius: 15,
803 | },
804 | centerText: {
805 | flex: 1,
806 | justifyContent: 'center',
807 | alignItems: 'center',
808 | },
809 | });
810 |
811 | export default AwesomeCamera;
812 |
--------------------------------------------------------------------------------
/lib/Images/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krinish291/react-native-awesome-camera/edfff9f7258ae6a665d2e63daf1ad07e0862328e/lib/Images/close.png
--------------------------------------------------------------------------------
/lib/Images/flash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krinish291/react-native-awesome-camera/edfff9f7258ae6a665d2e63daf1ad07e0862328e/lib/Images/flash.png
--------------------------------------------------------------------------------
/lib/Images/swap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krinish291/react-native-awesome-camera/edfff9f7258ae6a665d2e63daf1ad07e0862328e/lib/Images/swap.png
--------------------------------------------------------------------------------
/lib/Images/video.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/krinish291/react-native-awesome-camera/edfff9f7258ae6a665d2e63daf1ad07e0862328e/lib/Images/video.png
--------------------------------------------------------------------------------
/lib/Media.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import {
3 | Image,
4 | ImageSourcePropType,
5 | ImageStyle,
6 | Pressable,
7 | StyleProp,
8 | StyleSheet,
9 | View,
10 | ViewStyle,
11 | } from "react-native";
12 | import { PhotoIdentifier } from "@react-native-camera-roll/camera-roll";
13 | import { PhotoFile, VideoFile } from "react-native-vision-camera";
14 |
15 | interface MediaProps {
16 | index?: number;
17 | item: PhotoIdentifier;
18 | themeColor: string;
19 | onPressItem: (obj: PhotoFile | VideoFile | PhotoIdentifier) => void;
20 | videoContainerStyle?: StyleProp;
21 | videoIconStyle?: StyleProp;
22 | videoIcon?: ImageSourcePropType;
23 | renderVideoComponent?: () => React.ReactComponentElement;
24 | }
25 |
26 | const Media = (MediaProps: MediaProps) => {
27 | const {
28 | item,
29 | index,
30 | themeColor,
31 | onPressItem,
32 | videoContainerStyle,
33 | videoIconStyle,
34 | videoIcon,
35 | renderVideoComponent,
36 | } = MediaProps;
37 | const { imageStyle, isVideoStyle, videoIconStyles } = styles;
38 | const isVideo = item.node.type.split("/")?.[0] === "video";
39 |
40 | const renderVideo = () => {
41 | if (!isVideo) {
42 | return null;
43 | } else {
44 | return (
45 | <>
46 | {(renderVideoComponent !== undefined && renderVideoComponent()) || (
47 |
48 |
52 |
53 | ) ||
54 | null}
55 | >
56 | );
57 | }
58 | };
59 |
60 | return (
61 | onPressItem(item)}>
62 | = 0 && 1) || 0,
68 | borderColor: themeColor,
69 | },
70 | ]}
71 | />
72 | {renderVideo()}
73 |
74 | );
75 | };
76 |
77 | export { Media };
78 |
79 | const styles = StyleSheet.create({
80 | imageStyle: {
81 | height: 80,
82 | width: 80,
83 | margin: 2,
84 | },
85 | isVideoStyle: {
86 | position: "absolute",
87 | alignSelf: "center",
88 | padding: 5,
89 | borderRadius: 20,
90 | backgroundColor: "#ffffff90",
91 | },
92 | center: { justifyContent: "center", alignItems: "center" },
93 | videoIconStyles: { height: 20, width: 20 },
94 | });
95 |
96 |
--------------------------------------------------------------------------------
/lib/Permissions.ts:
--------------------------------------------------------------------------------
1 | import { Platform } from "react-native";
2 | import {
3 | check,
4 | RESULTS,
5 | request,
6 | PermissionStatus,
7 | Permission,
8 | PERMISSIONS,
9 | IOSPermission,
10 | AndroidPermission,
11 | } from "react-native-permissions";
12 |
13 | export const isIOS = Platform.OS === "ios";
14 |
15 | export const checkForPermission = async (
16 | permissionOf: AndroidPermission | IOSPermission
17 | ) => {
18 | const response = await check(permissionOf);
19 | switch (response) {
20 | case RESULTS.UNAVAILABLE:
21 | case RESULTS.LIMITED:
22 | case RESULTS.GRANTED:
23 | case RESULTS.BLOCKED:
24 | return response;
25 | case RESULTS.DENIED:
26 | return await requestForPermission(permissionOf);
27 | }
28 | };
29 |
30 | export const requestForPermission = async (permissionOf: Permission) =>
31 | await request(permissionOf);
32 |
33 | export const getBooleanForPermission = (permissionStatus: PermissionStatus) => {
34 | if (!isIOS) {
35 | if (
36 | permissionStatus === RESULTS.GRANTED ||
37 | permissionStatus === RESULTS.LIMITED
38 | ) {
39 | return true;
40 | }
41 | } else {
42 | if (permissionStatus === RESULTS.GRANTED) {
43 | return true;
44 | }
45 | }
46 | return false;
47 | };
48 |
49 | export const getStorageOrLibraryPermission = async () => {
50 | let permission: PermissionStatus;
51 | if (!isIOS) {
52 | permission = await checkForPermission(
53 | PERMISSIONS.ANDROID.WRITE_EXTERNAL_STORAGE
54 | );
55 | } else {
56 | permission = await checkForPermission(PERMISSIONS.IOS.PHOTO_LIBRARY);
57 | }
58 | return getBooleanForPermission(permission);
59 | };
60 |
61 | export const getPhotoPermission = async () => {
62 | let permission: PermissionStatus;
63 | if (!isIOS) {
64 | if (Number(Platform.Version) >= 30) {
65 | permission = await checkForPermission(
66 | PERMISSIONS.ANDROID.READ_MEDIA_IMAGES
67 | );
68 | } else {
69 | permission = await checkForPermission(
70 | PERMISSIONS.ANDROID.READ_EXTERNAL_STORAGE
71 | );
72 | }
73 | } else {
74 | permission = await checkForPermission(PERMISSIONS.IOS.CAMERA);
75 | }
76 | return getBooleanForPermission(permission);
77 | };
78 |
79 | export const getVideoPermission = async () => {
80 | let permission: PermissionStatus;
81 | if (!isIOS) {
82 | if (Number(Platform.Version) >= 30) {
83 | permission = await checkForPermission(
84 | PERMISSIONS.ANDROID.READ_MEDIA_VIDEO
85 | );
86 | } else {
87 | permission = await checkForPermission(
88 | PERMISSIONS.ANDROID.READ_EXTERNAL_STORAGE
89 | );
90 | }
91 | } else {
92 | permission = await checkForPermission(PERMISSIONS.IOS.CAMERA);
93 | }
94 | return getBooleanForPermission(permission);
95 | };
96 |
97 | export const getMicrophonePermission = async () => {
98 | let permission: PermissionStatus;
99 | if (!isIOS) {
100 | permission = await checkForPermission(PERMISSIONS.ANDROID.RECORD_AUDIO);
101 | } else {
102 | permission = await checkForPermission(PERMISSIONS.IOS.MICROPHONE);
103 | }
104 | return getBooleanForPermission(permission);
105 | };
106 |
107 | export const getCameraPermission = async () => {
108 | let permission: PermissionStatus;
109 | if (!isIOS) {
110 | permission = await checkForPermission(PERMISSIONS.ANDROID.CAMERA);
111 | } else {
112 | permission = await checkForPermission(PERMISSIONS.IOS.CAMERA);
113 | }
114 | return getBooleanForPermission(permission);
115 | };
116 |
117 |
--------------------------------------------------------------------------------
/lib/index.ts:
--------------------------------------------------------------------------------
1 | import AwesomeCamera from './AwesomeCamera';
2 |
3 | export default AwesomeCamera
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-awesome-camera",
3 | "version": "1.0.13",
4 | "description": "A React Native package that allows you to select a photo/video from the device library or camera.",
5 | "main": "dist/index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "git@github.com:krinish291/react-native-awesome-camera.git"
12 | },
13 | "bugs": {
14 | "url": "https://github.com/krinish291/react-native-awesome-camera/issues"
15 | },
16 | "homepage": "https://github.com/krinish291/react-native-awesome-camera#readme",
17 | "license": "MIT",
18 | "typings": "dist/index.d.ts",
19 | "dependencies": {
20 | "@react-native-camera-roll/camera-roll": "7.1.0",
21 | "fbjs": "^3.0.4",
22 | "react-native-gesture-handler": "^2.14.0",
23 | "react-native-permissions": "^3.10.1",
24 | "react-native-vision-camera": "^3.6.12"
25 | },
26 | "author": "radadiyakrinish1999@gmail.com",
27 | "devDependencies": {
28 | "@types/react-native": "^0.69.1",
29 | "typescript": "^4.7.4"
30 | },
31 | "keywords": [
32 | "react-native",
33 | "ios",
34 | "android",
35 | "camera",
36 | "cameraroll",
37 | "photo gallery",
38 | "vision",
39 | "react-native-camera",
40 | "photo",
41 | "video",
42 | "typescript",
43 | "react-native-permissions",
44 | "native",
45 | "image",
46 | "picker"
47 | ]
48 | }
49 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "declaration": true,
4 | "suppressImplicitAnyIndexErrors": true,
5 | "target": "es2015",
6 | "module": "es2015",
7 | "outDir": "dist",
8 | "sourceMap": true,
9 | "experimentalDecorators": true,
10 | "jsx": "react-native",
11 | "lib": ["dom", "es2015", "es2016"],
12 | "allowSyntheticDefaultImports": true,
13 | "moduleResolution": "node",
14 | "noEmitHelpers": false,
15 | "importHelpers": false,
16 | "strict": true,
17 | "noImplicitReturns": true,
18 | "skipLibCheck": true,
19 | "ignoreDeprecations": "5.0"
20 | },
21 | "files": ["lib/index.ts"],
22 | "exclude": ["build", "dist", "node_modules"]
23 | }
24 |
--------------------------------------------------------------------------------
/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | "@egjs/hammerjs@^2.0.17":
6 | version "2.0.17"
7 | resolved "https://registry.yarnpkg.com/@egjs/hammerjs/-/hammerjs-2.0.17.tgz#5dc02af75a6a06e4c2db0202cae38c9263895124"
8 | integrity sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==
9 | dependencies:
10 | "@types/hammerjs" "^2.0.36"
11 |
12 | "@react-native-camera-roll/camera-roll@7.1.0":
13 | version "7.1.0"
14 | resolved "https://registry.yarnpkg.com/@react-native-camera-roll/camera-roll/-/camera-roll-7.1.0.tgz#ffecc32fc93a029a64ae042968443c65d07ebee9"
15 | integrity sha512-AnwqcAlCcsSEEs9E8H8MvFD9D5/pwCBm5iESp1NEOdlv5YmwLIGdmssoz5IlPivFScUs4p4isaapvUQRfetbBw==
16 |
17 | "@types/hammerjs@^2.0.36":
18 | version "2.0.41"
19 | resolved "https://registry.yarnpkg.com/@types/hammerjs/-/hammerjs-2.0.41.tgz#f6ecf57d1b12d2befcce00e928a6a097c22980aa"
20 | integrity sha512-ewXv/ceBaJprikMcxCmWU1FKyMAQ2X7a9Gtmzw8fcg2kIePI1crERDM818W+XYrxqdBBOdlf2rm137bU+BltCA==
21 |
22 | "@types/prop-types@*":
23 | version "15.7.5"
24 | resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf"
25 | integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==
26 |
27 | "@types/react-native@^0.69.1":
28 | version "0.69.1"
29 | resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.69.1.tgz#580ee9ab6557c8f5ad76bf5ab915689ca0faecfe"
30 | integrity sha512-Vy8yvbR2bdUXTZ3u4DBFUGxo26h7p71Cdv7JtO6ZEXD4mpediuRMbRqyoWirlQB/p9Vh3lYVVViNyt8JK/05NA==
31 | dependencies:
32 | "@types/react" "*"
33 |
34 | "@types/react@*":
35 | version "18.0.14"
36 | resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.14.tgz#e016616ffff51dba01b04945610fe3671fdbe06d"
37 | integrity sha512-x4gGuASSiWmo0xjDLpm5mPb52syZHJx02VKbqUKdLmKtAwIh63XClGsiTI1K6DO5q7ox4xAsQrU+Gl3+gGXF9Q==
38 | dependencies:
39 | "@types/prop-types" "*"
40 | "@types/scheduler" "*"
41 | csstype "^3.0.2"
42 |
43 | "@types/scheduler@*":
44 | version "0.16.2"
45 | resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39"
46 | integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==
47 |
48 | asap@~2.0.3:
49 | version "2.0.6"
50 | resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
51 | integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==
52 |
53 | cross-fetch@^3.1.5:
54 | version "3.1.8"
55 | resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82"
56 | integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==
57 | dependencies:
58 | node-fetch "^2.6.12"
59 |
60 | csstype@^3.0.2:
61 | version "3.1.0"
62 | resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.0.tgz#4ddcac3718d787cf9df0d1b7d15033925c8f29f2"
63 | integrity sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==
64 |
65 | fbjs-css-vars@^1.0.0:
66 | version "1.0.2"
67 | resolved "https://registry.yarnpkg.com/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz#216551136ae02fe255932c3ec8775f18e2c078b8"
68 | integrity sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ==
69 |
70 | fbjs@^3.0.4:
71 | version "3.0.5"
72 | resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-3.0.5.tgz#aa0edb7d5caa6340011790bd9249dbef8a81128d"
73 | integrity sha512-ztsSx77JBtkuMrEypfhgc3cI0+0h+svqeie7xHbh1k/IKdcydnvadp/mUaGgjAOXQmQSxsqgaRhS3q9fy+1kxg==
74 | dependencies:
75 | cross-fetch "^3.1.5"
76 | fbjs-css-vars "^1.0.0"
77 | loose-envify "^1.0.0"
78 | object-assign "^4.1.0"
79 | promise "^7.1.1"
80 | setimmediate "^1.0.5"
81 | ua-parser-js "^1.0.35"
82 |
83 | hoist-non-react-statics@^3.3.0:
84 | version "3.3.2"
85 | resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
86 | integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==
87 | dependencies:
88 | react-is "^16.7.0"
89 |
90 | invariant@^2.2.4:
91 | version "2.2.4"
92 | resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
93 | integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==
94 | dependencies:
95 | loose-envify "^1.0.0"
96 |
97 | "js-tokens@^3.0.0 || ^4.0.0":
98 | version "4.0.0"
99 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
100 | integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
101 |
102 | lodash@^4.17.21:
103 | version "4.17.21"
104 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
105 | integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
106 |
107 | loose-envify@^1.0.0, loose-envify@^1.4.0:
108 | version "1.4.0"
109 | resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
110 | integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
111 | dependencies:
112 | js-tokens "^3.0.0 || ^4.0.0"
113 |
114 | node-fetch@^2.6.12:
115 | version "2.6.12"
116 | resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.12.tgz#02eb8e22074018e3d5a83016649d04df0e348fba"
117 | integrity sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==
118 | dependencies:
119 | whatwg-url "^5.0.0"
120 |
121 | object-assign@^4.1.0, object-assign@^4.1.1:
122 | version "4.1.1"
123 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
124 | integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
125 |
126 | promise@^7.1.1:
127 | version "7.3.1"
128 | resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf"
129 | integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==
130 | dependencies:
131 | asap "~2.0.3"
132 |
133 | prop-types@^15.7.2:
134 | version "15.8.1"
135 | resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
136 | integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
137 | dependencies:
138 | loose-envify "^1.4.0"
139 | object-assign "^4.1.1"
140 | react-is "^16.13.1"
141 |
142 | react-is@^16.13.1, react-is@^16.7.0:
143 | version "16.13.1"
144 | resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
145 | integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
146 |
147 | react-native-gesture-handler@^2.14.0:
148 | version "2.14.0"
149 | resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-2.14.0.tgz#d6aec0d8b2e55c67557fd6107e828c0a1a248be8"
150 | integrity sha512-cOmdaqbpzjWrOLUpX3hdSjsMby5wq3PIEdMq7okJeg9DmCzanysHSrktw1cXWNc/B5MAgxAn9J7Km0/4UIqKAQ==
151 | dependencies:
152 | "@egjs/hammerjs" "^2.0.17"
153 | hoist-non-react-statics "^3.3.0"
154 | invariant "^2.2.4"
155 | lodash "^4.17.21"
156 | prop-types "^15.7.2"
157 |
158 | react-native-permissions@^3.10.1:
159 | version "3.10.1"
160 | resolved "https://registry.yarnpkg.com/react-native-permissions/-/react-native-permissions-3.10.1.tgz#cb0171c8d12113869deaabbdfb979aad1a44752b"
161 | integrity sha512-Gc5BxxpjZn4QNUDiVeHOO0vXh3AH7ToolmwTJozqC6DsxV7NAf3ttap+8BSmzDR8WxuAM3Cror+YNiBhHJx7/w==
162 |
163 | react-native-vision-camera@^3.6.12:
164 | version "3.6.12"
165 | resolved "https://registry.yarnpkg.com/react-native-vision-camera/-/react-native-vision-camera-3.6.12.tgz#254701aa5cad8a55eda1f23d9bca3ed63d5af8f5"
166 | integrity sha512-+AmBmuy1toNpyZvHGyE5kdrJGP3b1LwfFBqrwoW8VG1NJPzO5bXHf7XC2vVdGcEZf3TxBkGNPO0sy7B9j7t3ww==
167 |
168 | setimmediate@^1.0.5:
169 | version "1.0.5"
170 | resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
171 | integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==
172 |
173 | tr46@~0.0.3:
174 | version "0.0.3"
175 | resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
176 | integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==
177 |
178 | typescript@^4.7.4:
179 | version "4.7.4"
180 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
181 | integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==
182 |
183 | ua-parser-js@^1.0.35:
184 | version "1.0.35"
185 | resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.35.tgz#c4ef44343bc3db0a3cbefdf21822f1b1fc1ab011"
186 | integrity sha512-fKnGuqmTBnIE+/KXSzCn4db8RTigUzw1AN0DmdU6hJovUTbYJKyqj+8Mt1c4VfRDnOVJnENmfYkIPZ946UrSAA==
187 |
188 | webidl-conversions@^3.0.0:
189 | version "3.0.1"
190 | resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
191 | integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==
192 |
193 | whatwg-url@^5.0.0:
194 | version "5.0.0"
195 | resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d"
196 | integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==
197 | dependencies:
198 | tr46 "~0.0.3"
199 | webidl-conversions "^3.0.0"
200 |
--------------------------------------------------------------------------------