Skip to content

Commit 1bc6d5b

Browse files
committed
Merge remote-tracking branch 'upstream/master' into pull-1640
2 parents ca5a12b + 0f697d0 commit 1bc6d5b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+3185
-1769
lines changed

.eslintrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
"import/named": 0,
4949
"import/namespace": [2, { "allowComputed": true }],
5050
"no-extra-boolean-cast": 0,
51-
"import/no-duplicates": 2
51+
"import/no-duplicates": 2,
52+
"react/no-deprecated": 0
5253
},
5354
"settings": {
5455
"import/resolver": {
@@ -65,4 +66,4 @@
6566
"globals": {
6667
"__DEV__": true
6768
}
68-
}
69+
}

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
5+
---
6+
7+
# Bug Report
8+
**To Do First**
9+
- [ ] Did you try latest release?
10+
- [ ] Did you try master?
11+
- [ ] Did you look for existing matching issues?
12+
13+
**Related Modules**
14+
<!--Comment in the related ones-->
15+
<!--RNCamera-->
16+
<!--FaceDetector-->
17+
<!--RCTCamera(deprecated)-->
18+
19+
**Platforms**
20+
<!--Comment in the related ones-->
21+
<!--Android-->
22+
<!--iOS-->
23+
24+
**Versions**
25+
<!--Please add the used versions/branches or leave blank and comment in the optionals if used-->
26+
- Android:
27+
- iOS:
28+
- react-native-camera:
29+
- react-native:
30+
- react:
31+
<!---react-navigation:-->
32+
33+
**Description/Current Behaviour**
34+
<!--place your bug description below-->
35+
36+
**Expected Behaviour**
37+
<!--place your expected behaviour below-->
38+
39+
**Steps to Reproduce**
40+
<!--describe how to produce the error below-->
41+
42+
<!--**Does it work with Expo Camera?**-->
43+
<!--Check usage with Expo and comment in this section- https://github.com/react-native-community/react-native-camera/blob/master/docs/Expo_Usage.md
44+
You should open an issue there as well, so we can cooperate in a solution.-->
45+
46+
**Additionals**
47+
<!--place screenshots/suggestions and other additional infos below-->
48+
49+
> Love react-native-camera? Please consider supporting our collective: 👉 https://opencollective.com/react-native-camera/donate
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
# Feature-Request
8+
9+
**Describe the Feature**
10+
<!--describe the requested Feature-->
11+
12+
**Possible Implementations**
13+
<!--describe how to implement the feature-->
14+
15+
**Related Issues**
16+
<!--link related issues here-->
17+
18+
> Love react-native-camera? Please consider supporting our collective: 👉 https://opencollective.com/react-native-camera/donate

.github/ISSUE_TEMPLATE/question.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Question
3+
about: Ask your question
4+
5+
---
6+
7+
# Question
8+
9+
**To Do First**
10+
- [ ] Take a look in the [README](https://github.com/react-native-community/react-native-camera/blob/master/README.md)
11+
- [ ] Take a look in the [docs](https://github.com/react-native-community/react-native-camera/blob/master/docs/RNCamera.md)
12+
- [ ] Take a look in the [QA](https://github.com/react-native-community/react-native-camera/blob/master/docs/QA.md)
13+
14+
**Ask your Question**
15+
<!--ask your question-->
16+
17+
**Tags**
18+
<!--add some related tags to your question-->
19+
20+
> Love react-native-camera? Please consider supporting our collective: 👉 https://opencollective.com/react-native-camera/donate

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ buck-out/
3939
\.buckd/
4040
android/app/libs
4141
android/keystores/debug.keystore
42+
package-json.lock

CHANGELOG.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,109 @@
1+
### 1.2.0-7 (2018-08-09)
2+
3+
##### Build System / Dependencies
4+
5+
* **change-log:** v1.1.5-2 ([e49e35a0](https://github.com/react-native-community/react-native-camera/commit/e49e35a085b1793cc8692d2c1600eb2e14ffbe75))
6+
7+
##### Documentation Changes
8+
9+
* **expo:** explain how to migrate to and from expo camera module ([#1605](https://github.com/react-native-community/react-native-camera/pull/1605)) ([4a9322cb](https://github.com/react-native-community/react-native-camera/commit/4a9322cb8b7d455fc28f7e67a15bff2fd9d7ea3e))
10+
11+
##### New Features
12+
13+
* **preview:**
14+
* add android code ([497a7039](https://github.com/react-native-community/react-native-camera/commit/497a703964e925b6e3e62e39a54a9734a7ed6c40))
15+
* add new props to JS ([9bf9a2e3](https://github.com/react-native-community/react-native-camera/commit/9bf9a2e3162b919d98cab104029250394b2dd3a8))
16+
* add preview methods and more fixes ([b9fb708f](https://github.com/react-native-community/react-native-camera/commit/b9fb708ffc3fd6865191ce6e2bd0a2404a9c657c))
17+
18+
##### Bug Fixes
19+
20+
* **rn-camera:**
21+
* fix codec backwards compat ([91f5bf45](https://github.com/react-native-community/react-native-camera/commit/91f5bf45672a8b83253ed17c3f90eee64b0f07bf))
22+
* fix types, conversions and casts ([83d0618e](https://github.com/react-native-community/react-native-camera/commit/83d0618e988656dfd9a216b85394ceb5f3a05e9b))
23+
* **picture-size:**
24+
* create None default value ([ad87c8e3](https://github.com/react-native-community/react-native-camera/commit/ad87c8e3421f2ff1836674a01cb86deb619cdc4e))
25+
* export method and change default value ([9efb7f14](https://github.com/react-native-community/react-native-camera/commit/9efb7f141f8970ad160c852fa837427a79f3d0dc))
26+
27+
##### Other Changes
28+
29+
* Implement video stabilization mode property for ios ([#1606](https://github.com/react-native-community/react-native-camera/pull/1606)) ([a090faa0](https://github.com/react-native-community/react-native-camera/commit/a090faa09b417afd41af3739ec2b895de9dca6b6))
30+
31+
#### 1.1.5-2 (2018-06-14)
32+
33+
##### Build System / Dependencies
34+
35+
* **change-log:**
36+
* v1.1.4-6 ([86bf1d28](https://github.com/react-native-community/react-native-camera/commit/86bf1d284baf64caa94e3815c9ebed5b0e662369))
37+
* v1.1.3-5 ([98b18950](https://github.com/react-native-community/react-native-camera/commit/98b1895038ccf47f94d7d27811f3540d3847feb7))
38+
* v1.1.2-4 ([4f6b213d](https://github.com/react-native-community/react-native-camera/commit/4f6b213dc63e7ae96c77a1cf1627c14fcda99a94))
39+
* v1.1.1-3 ([821a1b24](https://github.com/react-native-community/react-native-camera/commit/821a1b24e6251ad2a9ba9087c9a427a3b20d0778))
40+
* v1.1.0 ([01e6c843](https://github.com/react-native-community/react-native-camera/commit/01e6c8434d87f4723feff7fec568028bfb140cb5))
41+
* v1.1.0-2 ([deb42144](https://github.com/react-native-community/react-native-camera/commit/deb42144769c3ccc2e593d5dbf586abab244f219))
42+
43+
##### Chores
44+
45+
* **cameraview:**
46+
* integrate google's cameraview directly on rncamera? ([d11ed319](https://github.com/react-native-community/react-native-camera/commit/d11ed31917c26df151b4fb46ab166d2921a9ac99))
47+
* update camera view ([501ffe83](https://github.com/react-native-community/react-native-camera/commit/501ffe8336b9d8bc9743c1ed803fe20b77f2c270))
48+
* **lint:**
49+
* more lint checks ([3bb9a648](https://github.com/react-native-community/react-native-camera/commit/3bb9a6484af306ac66083dd05ac6c46de542f3b4))
50+
* fix some warnings ([7967e2fb](https://github.com/react-native-community/react-native-camera/commit/7967e2fbce44b15a77ae0cbddf76f0b37fc530ba))
51+
* fix lint to make ci work ([919d07b1](https://github.com/react-native-community/react-native-camera/commit/919d07b162f4a39a2454bebdb387224e21a4ba7a))
52+
* **package:** enforce no errors on lint and update packages ([00f4f4c1](https://github.com/react-native-community/react-native-camera/commit/00f4f4c13714a9d4e03a2cd76f2b19de7a78cfe4))
53+
* **gms:** change default gms to 12.0.0 ([94c8968b](https://github.com/react-native-community/react-native-camera/commit/94c8968b2633cfa4e16d1e4275eb831065232014))
54+
55+
##### Documentation Changes
56+
57+
* **expo:** explain how to migrate to and from expo camera module ([#1605](https://github.com/react-native-community/react-native-camera/pull/1605)) ([4a9322cb](https://github.com/react-native-community/react-native-camera/commit/4a9322cb8b7d455fc28f7e67a15bff2fd9d7ea3e))
58+
* **recipes:** add some recipes ([ef5c2fef](https://github.com/react-native-community/react-native-camera/commit/ef5c2fef14530110b0c5aec3a044ca27dcfa8d72))
59+
60+
##### New Features
61+
62+
* **preview:**
63+
* add android code ([497a7039](https://github.com/react-native-community/react-native-camera/commit/497a703964e925b6e3e62e39a54a9734a7ed6c40))
64+
* add new props to JS ([9bf9a2e3](https://github.com/react-native-community/react-native-camera/commit/9bf9a2e3162b919d98cab104029250394b2dd3a8))
65+
* add preview methods and more fixes ([b9fb708f](https://github.com/react-native-community/react-native-camera/commit/b9fb708ffc3fd6865191ce6e2bd0a2404a9c657c))
66+
* **types:**
67+
* add types for [#1547](https://github.com/react-native-community/react-native-camera/pull/1547) ([#1548](https://github.com/react-native-community/react-native-camera/pull/1548)) ([3ce3c80d](https://github.com/react-native-community/react-native-camera/commit/3ce3c80db670cc05dead7636d70dc8fc911a2c6b))
68+
* add types for [#1523](https://github.com/react-native-community/react-native-camera/pull/1523) ([f61004de](https://github.com/react-native-community/react-native-camera/commit/f61004de623a2011e99a6a8092048b513025f5ed))
69+
* add types for [#1518](https://github.com/react-native-community/react-native-camera/pull/1518) (FaCC) ([842dc1cb](https://github.com/react-native-community/react-native-camera/commit/842dc1cb581bd28653549dee86f70c2ff5d65ee2))
70+
* add types for [#1441](https://github.com/react-native-community/react-native-camera/pull/1441) ([be3e0ebf](https://github.com/react-native-community/react-native-camera/commit/be3e0ebfb8ff42a48211b55054325548cd304694))
71+
* add types for [#1428](https://github.com/react-native-community/react-native-camera/pull/1428) ([6cc3d89b](https://github.com/react-native-community/react-native-camera/commit/6cc3d89bec2a55b31c2e7c4f0e597eafc8c31323))
72+
* add types for text detection feature ([c0ace2e9](https://github.com/react-native-community/react-native-camera/commit/c0ace2e94c47a9122a386bcbe99911182da80744))
73+
* **rn-camera:** use and export constants ([c8c6fdea](https://github.com/react-native-community/react-native-camera/commit/c8c6fdea0bf15de60c638f504f38dcb9ac80a3e4))
74+
* **rn_camera:** add function as children ([45cc8f25](https://github.com/react-native-community/react-native-camera/commit/45cc8f25d2de71b9eee29e1fe14e2f4f3d2feee9))
75+
* **ci:** add first circleci lint and check script ([ee385eec](https://github.com/react-native-community/react-native-camera/commit/ee385eec05b9be5e1f96524206e50aa96085ce19))
76+
* **android:** make android gradle check work ([1c7f231a](https://github.com/react-native-community/react-native-camera/commit/1c7f231af460127bebf1f9970367bf64987de34b))
77+
* **play-sound:** play sound on capture (android) ([69242183](https://github.com/react-native-community/react-native-camera/commit/69242183cc65460040795b866095f34090a9598d))
78+
79+
##### Bug Fixes
80+
81+
* **rn-camera:**
82+
* fix codec backwards compat ([91f5bf45](https://github.com/react-native-community/react-native-camera/commit/91f5bf45672a8b83253ed17c3f90eee64b0f07bf))
83+
* fix types, conversions and casts ([83d0618e](https://github.com/react-native-community/react-native-camera/commit/83d0618e988656dfd9a216b85394ceb5f3a05e9b))
84+
* inject correct status ([858cc4c9](https://github.com/react-native-community/react-native-camera/commit/858cc4c9c8fd456390b274ee4cfddb62fee198ee))
85+
* **picture-size:**
86+
* create None default value ([ad87c8e3](https://github.com/react-native-community/react-native-camera/commit/ad87c8e3421f2ff1836674a01cb86deb619cdc4e))
87+
* export method and change default value ([9efb7f14](https://github.com/react-native-community/react-native-camera/commit/9efb7f141f8970ad160c852fa837427a79f3d0dc))
88+
* **cache:** store video recordings in same directory as photos ([bba84a98](https://github.com/react-native-community/react-native-camera/commit/bba84a983446c25f76aa77793f49d4252cd63ea3))
89+
* **rn_camera:** improve naming ([3811d82c](https://github.com/react-native-community/react-native-camera/commit/3811d82c75ceedc27b8aa5550e352159d5daf2b8))
90+
* **search-paths:** remove unnecessary search paths and add missing one ([dee298b4](https://github.com/react-native-community/react-native-camera/commit/dee298b4fefca4659468fd43e914fd1c970ca930))
91+
* **styles:** place style sheet above everything,prevent undefined styles ([01501892](https://github.com/react-native-community/react-native-camera/commit/01501892b5711db765cc367a24ba7c3233678791))
92+
* **warnings:** remove inline styles ([716c4e38](https://github.com/react-native-community/react-native-camera/commit/716c4e389da45fd7d240a8b4acf60a620fa2c372))
93+
* **barcode:** better name google variables and correct init ([38e96ed2](https://github.com/react-native-community/react-native-camera/commit/38e96ed24d6b59e108a0ac175eefff22d7b33c27))
94+
* **Android:** image stretched instead of cropped ([73eb5fd2](https://github.com/react-native-community/react-native-camera/commit/73eb5fd272c28a6369705d30379dcabae3429301))
95+
* **barcode-prop:** fix default value and add more values ([2c87b44b](https://github.com/react-native-community/react-native-camera/commit/2c87b44b1660f44e9f2bc8e7fce207c872933806))
96+
* **docs:**
97+
* move skipProcessing to 'Supported options' ([8054200f](https://github.com/react-native-community/react-native-camera/commit/8054200f81a754ae2d29532b636f55331e996703))
98+
* Header on the wrong position ([589a0819](https://github.com/react-native-community/react-native-camera/commit/589a08192930f96aa4f7cf255aa4ac0adfd31a12))
99+
* **types:** fix types for [#1402](https://github.com/react-native-community/react-native-camera/pull/1402) ([26f9a1e5](https://github.com/react-native-community/react-native-camera/commit/26f9a1e53b3f3b21b86f28d27236849995e7baf9))
100+
* **ios:** add video output early to avoid underexposed beginning ([9ef5b29a](https://github.com/react-native-community/react-native-camera/commit/9ef5b29ad5d66f0e6d52e504dab00b862148c60f))
101+
102+
##### Other Changes
103+
104+
* Implement video stabilization mode property for ios ([#1606](https://github.com/react-native-community/react-native-camera/pull/1606)) ([a090faa0](https://github.com/react-native-community/react-native-camera/commit/a090faa09b417afd41af3739ec2b895de9dca6b6))
105+
* Fix java.lang.ArrayIndexOutOfBoundsException with image rotation ([6ce014d3](https://github.com/react-native-community/react-native-camera/commit/6ce014d3ca3805f908fbdcd30da9b982de3bc2da))
106+
1107
#### 1.1.4-6 (2018-05-21)
2108

3109
#### 1.1.3-5 (2018-05-18)

README.md

Lines changed: 64 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
# React Native Camera [![Backers on Open Collective](https://opencollective.com/react-native-camera/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/react-native-camera/sponsors/badge.svg)](#sponsors) [![npm version](https://badge.fury.io/js/react-native-camera.svg)](http://badge.fury.io/js/react-native-camera) [![npm downloads](https://img.shields.io/npm/dm/react-native-camera.svg)](https://www.npmjs.com/package/react-native-camera)
22

3-
The comprehensive camera module for React Native. Including photographs, videos, face detection, barcode scanning and text recognition (Android only)!
3+
The comprehensive camera module for React Native.
44

5-
`import { RNCamera, FaceDetector } from 'react-native-camera';`
5+
Supports:
6+
7+
- photographs.
8+
- videos
9+
- face detection
10+
- barcode scanning
11+
- text recognition (optional installation for iOS using CocoaPods)
12+
13+
14+
### Example import
15+
16+
```jsx
17+
import { RNCamera, FaceDetector } from 'react-native-camera';
18+
```
619

720
#### How to use master branch?
821
Inside your package.json, use this
@@ -78,6 +91,39 @@ pod 'react-native-camera', path: '../node_modules/react-native-camera'
7891
```
7992
3. Run `pod install`
8093

94+
*Note:* You might need to adjust your Podfile following the example below:
95+
96+
```ruby
97+
target 'yourTargetName' do
98+
# See http://facebook.github.io/react-native/docs/integration-with-existing-apps.html#configuring-cocoapods-dependencies
99+
pod 'React', :path => '../node_modules/react-native', :subspecs => [
100+
'Core',
101+
'CxxBridge', # Include this for RN >= 0.47
102+
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
103+
'RCTText',
104+
'RCTNetwork',
105+
'RCTWebSocket', # Needed for debugging
106+
'RCTAnimation', # Needed for FlatList and animations running on native UI thread
107+
# Add any other subspecs you want to use in your project
108+
]
109+
110+
# Explicitly include Yoga if you are using RN >= 0.42.0
111+
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
112+
113+
# Third party deps podspec link
114+
pod 'react-native-camera', path: '../node_modules/react-native-camera'
115+
116+
end
117+
118+
post_install do |installer|
119+
installer.pods_project.targets.each do |target|
120+
if target.name == "React"
121+
target.remove_from_project
122+
end
123+
end
124+
end
125+
```
126+
81127
### Manual install
82128
#### iOS
83129
1. `npm install react-native-camera --save`
@@ -89,7 +135,7 @@ pod 'react-native-camera', path: '../node_modules/react-native-camera'
89135

90136
### Face Detection or Text Recognition Steps
91137

92-
Face Detection is optional on iOS. If you want it, you are going to need to install Google Mobile Vision frameworks in your project, as mentioned in the next section.
138+
Face Detection/Text Recognition are optional on iOS. If you want them, you are going to need to install Google Mobile Vision frameworks in your project, as mentioned in the next section.
93139

94140
##### No Face Detection steps
95141

@@ -107,36 +153,39 @@ cp node_modules/react-native-camera/postinstall_project/projectWithoutFaceDetect
107153

108154
And add something like this to the `scripts` section in your `package.json`:
109155

110-
*Note:* The face detection code is excluded by default for the **CocoaPods** installation.
156+
*Note:* The face detection/text recognition code is excluded by default for the **CocoaPods** installation.
111157
```
112158
"postinstall": "./scripts/post.sh",
113159
```
114160

115161
##### Installing GMV frameworks
116-
GMV (Google Mobile Vision) is used for Face detection by the iOS RNCamera. You have to link the google frameworks to your project to successfully compile the RNCamera project.
162+
GMV (Google Mobile Vision) is used for Face detection/Text recognition by the iOS RNCamera. You have to link the google frameworks to your project to successfully compile the RNCamera project.
163+
164+
###### CocoaPods Path (The only option for Text Recognition)
117165

118-
###### CocoaPods Path
119-
1. Modify the dependency towards `react-native-camera` in your
166+
Modify the dependency towards `react-native-camera` in your
120167
`Podfile`, from
121168

122169
```
123170
pod 'react-native-camera', path: '../node_modules/react-native-camera'
124171
```
125172

126-
to
173+
to (for Face Detection)
127174

128175
```
129-
pod 'react-native-camera', subspecs: ['RCT', 'RN', 'FaceDetector'], path: '../node_modules/react-native-camera'
176+
pod 'react-native-camera', path: '../node_modules/react-native-camera', subspecs: [
177+
'FaceDetector'
178+
]
130179
```
131180

132-
2. Add the following to your `Podfile`:
181+
or to (for Text Recognition)
182+
133183
```
134-
pod 'GoogleMobileVision/Detector', '~> 1.1.0'
135-
pod 'GoogleMobileVision/MVDataOutput', '~> 1.1.0'
136-
pod 'GoogleMobileVision/FaceDetector', '~> 1.1.0'
184+
pod 'react-native-camera', path: '../node_modules/react-native-camera', subspecs: [
185+
'TextDetector'
186+
]
137187
```
138-
139-
3. In XCode, On your target -> Build Phases -> Link Binary with Libraries -> add AddressBook.framework
188+
*Note:* Text recognition is available only via CocoaPods Path. If you have issues with duplicate symbols you will need to enable dead code stripping option in your Xcode (Target > Build Settings > search for "Dead code stripping") see: https://github.com/firebase/quickstart-ios/issues/487#issuecomment-415313053.
140189

141190
###### Non-CocoaPods Path
142191
1. Download:

0 commit comments

Comments
 (0)