Skip to content

Commit a4e2ee0

Browse files
Feature/msdk 930 license key removal (#190)
1 parent 3e8afbb commit a4e2ee0

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,4 @@ example/RNExampleApp/ios/main.jsbundle
7777
example/RNExampleApp/ios/main.jsbundle.meta
7878
example/RNExampleApp/third-party
7979
example/RNExampleApp/yarn.lock
80+
example/RNExampleApp/src/license.js
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
const fs = require('fs');
3+
const path = require('path');
4+
5+
const filePath = path.join(__dirname, 'src/license.js');
6+
7+
if (!fs.existsSync(filePath)) {
8+
// If the file doesn't exist, create it with an initial placeholder content
9+
fs.writeFileSync(filePath, `
10+
const license = '{REPLACE_YOUR_LICENSE_KEY}';
11+
12+
module.exports = { license };
13+
`);
14+
}

example/RNExampleApp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"initProject": "yarn add expo && yarn add ../../plugin",
7-
"reinstall": "yarn remove anyline-ocr-react-native-module && yarn add ../../plugin",
7+
"reinstall": "yarn remove anyline-ocr-react-native-module && yarn add ../../plugin && node add_license_key.js",
88
"start": "expo start",
99
"android": "expo run:android",
1010
"ios": "expo run:ios --device",

example/RNExampleApp/src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@ import LicensePlateConfigUS from '../config/LicensePlateConfigUS';
4444
import LicensePlateConfigAF from '../config/LicensePlateConfigAF';
4545
import TINUniversalConfig from '../config/TINUniversalConfig';
4646
import TINDOTConfig from '../config/TINDOTConfig';
47+
const { license } = require('./license.js');
4748

4849
// Disable Warnings
4950
LogBox.ignoreAllLogs(true);
5051

5152
const scrollRef = React.createRef();
5253

53-
const demoAppLicenseKey = 'REPLACE WITH VALID LICENSE KEY';
54+
const demoAppLicenseKey = license; //replace license key in license.js
5455

5556
class Anyline extends Component {
5657
overTheAirUpdateIsEnabled = false;

0 commit comments

Comments
 (0)