Skip to content

Commit 3111c80

Browse files
release/54.6.0 (#188)
release/54.6.0
1 parent 8a9d6ef commit 3111c80

File tree

14 files changed

+158
-134
lines changed

14 files changed

+158
-134
lines changed

example/RNExampleApp/ReadMe.md

+33-14
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88

99
## Getting Started
1010

11-
- clone Repo
1211
- `cd example/RNExampleApp`
13-
- `npm/yarn install`
14-
- `npm/yarn run reinstall`
15-
- `cd ios`
16-
- `pod update`
12+
- `npm install` or `yarn install`
13+
- `npm run reinstall` or `yarn reinstall`
14+
- `npm run <PLATFORM>` or `yarn <PLATFORM>`, where PLATFORM is one of 'ios' or 'android'
1715

1816
### Set the License Key
1917

@@ -53,16 +51,37 @@ npx react-native bundle --platform android --dev false --entry-file index.js --b
5351

5452
#### Troubleshooting
5553

56-
* Make sure you have the latest/correct version of node installed
54+
* Make sure you have the latest/correct version of node installed.
5755
* If you get stuck completely on Android, go into the "android" directory and do a gradle clean: `cd example/RNExampleApp/android/`, then `./gradlew clean`.
58-
* Examples app won't build or run correctly on iOS? Execute these commands from `example/RNExampleApp`:
59-
* `rm -rf node_modules package-lock.json ios/Pods ios/Podfile.lock ios/RNExampleApp.xcworkspace`
60-
* `yarn cache clean`
61-
* `yarn reinstall`
62-
* `yarn ios` (this does `expo run:ios --device`)
63-
64-
TIP: when debugging issues, try and build and run the examples app with the xcworkspace on Xcode. If there are issues, they will have more actionable steps.
6556

6657
### iOS
6758

68-
Open `example/RNExampleApp/iOS/RNExampleApp.xcworkspace` with XCode and build/deploy to device.
59+
Run `yarn ios` from `example/RNExampleApp` to build and deploy the developer examples app to a device.
60+
61+
Alternatively, you can open `example/RNExampleApp/iOS/RNExampleApp.xcworkspace` with Xcode.
62+
63+
TIP: when debugging certain issues, when possible, try to build and run the examples app from Xcode by opening the `ios/*.xcworkspace file`. Xcode can usually present the issues more clearly and provide better actionable steps.
64+
65+
66+
#### Troubleshooting
67+
68+
To do a fresh build and install of the developer examples app on iOS, execute the following commands from `example/RNExampleApp`:
69+
70+
```
71+
rm -rf node_modules package-lock.json
72+
rm -rf ios/Pods ios/Podfile.lock ios/RNExampleApp.xcworkspace
73+
npm cache clean --force
74+
npm install
75+
npm run reinstall
76+
```
77+
78+
Doing this may help resolve up some issues with NPM dependencies.
79+
80+
81+
NOTE: If you're running on iOS, recent versions of the developer examples app may require [patch-package](https://github.com/ds300/patch-package) to be installed beforehand:
82+
83+
```
84+
npm install --save-dev patch-package postinstall-postinstall
85+
```
86+
87+
For additional information, read on for more details: [Verification checksum was incorrect](https://github.com/boostorg/boost/issues/843)

example/RNExampleApp/android/app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ android {
8787
minSdkVersion rootProject.ext.minSdkVersion
8888
targetSdkVersion rootProject.ext.targetSdkVersion
8989
versionCode 5
90-
versionName "54.5.1"
90+
versionName "54.6.0"
9191
multiDexEnabled true
9292

9393
buildConfigField("boolean", "REACT_NATIVE_UNSTABLE_USE_RUNTIME_SCHEDULER_ALWAYS", (findProperty("reactNative.unstable_useRuntimeSchedulerAlways") ?: true).toString())

example/RNExampleApp/ios/RNExampleApp.xcodeproj/project.pbxproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
inputPaths = (
273273
"${PODS_ROOT}/Target Support Files/Pods-RNExampleApp/Pods-RNExampleApp-resources.sh",
274274
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
275-
"${PODS_ROOT}/Anyline/AnylineSDK_iOS_54.5.0/Framework/AnylineResources.bundle",
275+
"${PODS_ROOT}/Anyline/AnylineSDK_iOS_54.6.0/Framework/AnylineResources.bundle",
276276
);
277277
name = "[CP] Copy Pods Resources";
278278
outputPaths = (
@@ -347,7 +347,7 @@
347347
INFOPLIST_FILE = RNExampleApp/Info.plist;
348348
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
349349
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
350-
MARKETING_VERSION = 54.5.1;
350+
MARKETING_VERSION = 54.6.0;
351351
OTHER_LDFLAGS = (
352352
"$(inherited)",
353353
"-ObjC",
@@ -380,7 +380,7 @@
380380
INFOPLIST_FILE = RNExampleApp/Info.plist;
381381
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
382382
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
383-
MARKETING_VERSION = 54.5.1;
383+
MARKETING_VERSION = 54.6.0;
384384
OTHER_LDFLAGS = (
385385
"$(inherited)",
386386
"-ObjC",

example/RNExampleApp/package.json

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"name": "react-native-example-app",
3-
"version": "54.5.1",
3+
"version": "54.6.0",
44
"private": true,
55
"scripts": {
66
"initProject": "yarn add expo && yarn add ../../plugin",
77
"reinstall": "yarn remove anyline-ocr-react-native-module && yarn add ../../plugin",
88
"start": "expo start",
99
"android": "expo run:android",
1010
"ios": "expo run:ios --device",
11-
"web": "expo start --web"
11+
"web": "expo start --web",
12+
"postinstall": "patch-package"
1213
},
1314
"dependencies": {
1415
"@babel/core": "^7.22.9",
@@ -26,5 +27,9 @@
2627
},
2728
"description": "React Native example app",
2829
"main": "index.js",
29-
"license": "MIT"
30+
"license": "MIT",
31+
"devDependencies": {
32+
"patch-package": "^8.0.0",
33+
"postinstall-postinstall": "^2.1.0"
34+
}
3035
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/node_modules/react-native/third-party-podspecs/boost.podspec b/node_modules/react-native/third-party-podspecs/boost.podspec
2+
index 3d9331c..bbbb738 100644
3+
--- a/node_modules/react-native/third-party-podspecs/boost.podspec
4+
+++ b/node_modules/react-native/third-party-podspecs/boost.podspec
5+
@@ -10,7 +10,7 @@ Pod::Spec.new do |spec|
6+
spec.homepage = 'http://www.boost.org'
7+
spec.summary = 'Boost provides free peer-reviewed portable C++ source libraries.'
8+
spec.authors = 'Rene Rivera'
9+
- spec.source = { :http => 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2',
10+
+ spec.source = { :http => 'https://archives.boost.io/release/1.76.0/source/boost_1_76_0.tar.bz2',
11+
:sha256 => 'f0397ba6e982c4450f27bf32a2a83292aba035b827a5623a14636ea583318c41' }
12+
13+
# Pinning to the same version as React.podspec.

example/RNExampleApp/src/Overview.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ import React from 'react';
55
import PropTypes from 'prop-types';
66
import { Button, Platform, StyleSheet, Text, View, ScrollView } from 'react-native';
77

8-
export default function Overview({ updateAnyline, checkCameraPermissionAndOpen, disabled }) {
8+
export default function Overview({ updateAnyline, disabled }) {
99

1010
Overview.propTypes = {
1111
updateAnyline: PropTypes.func.isRequired,
12-
checkCameraPermissionAndOpen: PropTypes.func.isRequired,
1312
disabled: PropTypes.bool.isRequired
1413
};
1514

16-
const platformPermissionCheck = (Platform.OS === 'android') ? checkCameraPermissionAndOpen : updateAnyline;
15+
const platformPermissionCheck = updateAnyline;
1716

1817
const iOS = Platform.OS === 'ios';
1918

example/RNExampleApp/src/index.js

-44
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
BackHandler,
55
LayoutAnimation,
66
LogBox,
7-
PermissionsAndroid,
87
ScrollView,
98
StyleSheet,
109
Text,
@@ -298,48 +297,6 @@ class Anyline extends Component {
298297
this._openAnyline = value;
299298
}
300299

301-
requestCameraPermission = async type => {
302-
try {
303-
const granted = await PermissionsAndroid.request(
304-
PermissionsAndroid.PERMISSIONS.CAMERA,
305-
{
306-
title: 'Anyline Camera Permissions',
307-
message: 'Allow Anyline to access your camera?',
308-
},
309-
);
310-
if (granted === PermissionsAndroid.RESULTS.GRANTED) {
311-
console.log('Camera permission allowed');
312-
this.updateAnyline(type);
313-
} else {
314-
console.log('Camera permission denied');
315-
}
316-
} catch (err) {
317-
console.warn(err);
318-
}
319-
};
320-
321-
hasCameraPermission = async () => {
322-
try {
323-
return await PermissionsAndroid.check(
324-
PermissionsAndroid.PERMISSIONS.CAMERA,
325-
);
326-
} catch (err) {
327-
console.warn(err, 'PERMISSION CHECK');
328-
}
329-
};
330-
331-
checkCameraPermissionAndOpen = type => {
332-
this.hasCameraPermission().then(hasCameraPermission => {
333-
console.log('hasCameraPermission result is ' + hasCameraPermission);
334-
if (hasCameraPermission) {
335-
console.log('Opening OCR directly');
336-
this.updateAnyline(type);
337-
} else {
338-
this.requestCameraPermission(type);
339-
}
340-
});
341-
};
342-
343300
emptyResult = () => {
344301
this.setState({
345302
hasScanned: false,
@@ -414,7 +371,6 @@ class Anyline extends Component {
414371
<Overview
415372
key="OverView"
416373
updateAnyline={this.updateAnyline}
417-
checkCameraPermissionAndOpen={this.checkCameraPermissionAndOpen}
418374
disabled={buttonsDisabled}
419375
/>
420376
)}

exportOptions.plist

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>destination</key>
6+
<string>upload</string>
7+
<key>manageAppVersionAndBuildNumber</key>
8+
<true/>
9+
<key>uploadSymbols</key>
10+
<true/>
11+
<key>method</key>
12+
<string>app-store-connect</string>
13+
<key>signingStyle</key>
14+
<string>manual</string>
15+
<key>provisioningProfiles</key>
16+
<dict>
17+
<key>com.anyline.examples.reactnative</key>
18+
<string>Anyline ReactNative Examples - Distribution</string>
19+
</dict>
20+
<key>signingCertificate</key>
21+
<string>Apple Distribution</string>
22+
<key>stripSwiftSymbols</key>
23+
<true/>
24+
<key>teamID</key>
25+
<string>35RHL53WRE</string>
26+
</dict>
27+
</plist>

plugin/android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ repositories {
6161

6262
dependencies {
6363
implementation fileTree(dir: "libs", include: ["*.jar"])
64-
implementation 'io.anyline:anylinesdk:54.5.1'
64+
implementation 'io.anyline:anylinesdk:54.6.0'
6565
implementation "com.facebook.react:react-native:+"
6666
implementation("com.google.android.material:material:1.9.0")
6767
implementation 'androidx.multidex:multidex:2.0.1'

0 commit comments

Comments
 (0)