@revrag-ai/embed-react-native 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +13 -382
- package/android/CMakeLists.txt +15 -0
- package/android/build.gradle +77 -25
- package/android/cpp-adapter.cpp +8 -0
- package/android/generated/java/com/revragai/embedreactnative/NativeEmbedReactNativeSpec.java +37 -0
- package/android/generated/jni/CMakeLists.txt +49 -0
- package/android/generated/jni/RNEmbedReactNativeSpec-generated.cpp +32 -0
- package/android/generated/jni/RNEmbedReactNativeSpec.h +31 -0
- package/android/generated/jni/react/renderer/components/RNEmbedReactNativeSpec/RNEmbedReactNativeSpecJSI-generated.cpp +28 -0
- package/android/generated/jni/react/renderer/components/RNEmbedReactNativeSpec/RNEmbedReactNativeSpecJSI.h +67 -0
- package/android/gradle.properties +5 -5
- package/cpp/revrag-ai-embed-react-native.cpp +7 -0
- package/cpp/revrag-ai-embed-react-native.h +8 -0
- package/ios/EmbedReactNative.h +9 -0
- package/ios/{Onwid.mm → EmbedReactNative.mm} +4 -4
- package/ios/generated/RNEmbedReactNativeSpec/RNEmbedReactNativeSpec-generated.mm +29 -0
- package/ios/generated/RNEmbedReactNativeSpec/RNEmbedReactNativeSpec.h +50 -0
- package/ios/generated/RNEmbedReactNativeSpecJSI-generated.cpp +28 -0
- package/ios/generated/RNEmbedReactNativeSpecJSI.h +67 -0
- package/lib/commonjs/NativeEmbedReactNative.js +9 -0
- package/{dist/commonjs/onwidApi → lib/commonjs/api}/api.js +84 -13
- package/lib/commonjs/api/types/embed.api.types.js +2 -0
- package/{dist/module/component/audiowave.js → lib/commonjs/components/Embed/EmbedAudioWave.js} +21 -17
- package/{dist/module/component/OnwidButton.js → lib/commonjs/components/Embed/EmbedButton.js} +65 -61
- package/{dist/module/component/voice.js → lib/commonjs/components/Embed/EmbedVoice.js} +18 -14
- package/{dist/commonjs/style/onwidButton.style.js → lib/commonjs/components/styles/EmbedButton.style.js} +14 -9
- package/{dist/module/Event/onwid.js → lib/commonjs/events/embed.event.js} +14 -10
- package/{dist → lib}/commonjs/hooks/initialize.js +18 -12
- package/{dist/commonjs/hooks/initializelivekit.js → lib/commonjs/hooks/initialize.livekit.js} +8 -5
- package/lib/commonjs/hooks/types/voiceAgent.types.js +6 -0
- package/{dist/module/hooks/voiceAgent.js → lib/commonjs/hooks/voiceagent.js} +36 -31
- package/lib/commonjs/index.js +34 -0
- package/{dist/module/index.d.js → lib/commonjs/index.types.js} +7 -7
- package/lib/commonjs/store/store.key.js +46 -0
- package/{dist/module/utils/reanimatedHelpers.js → lib/commonjs/utils/reanimated.helper.js} +23 -17
- package/lib/module/NativeEmbedReactNative.js +5 -0
- package/{dist/module/onwidApi → lib/module/api}/api.js +67 -4
- package/lib/module/api/types/embed.api.types.js +2 -0
- package/{dist/commonjs/component/audiowave.js → lib/module/components/Embed/EmbedAudioWave.js} +2 -3
- package/{dist/commonjs/component/OnwidButton.js → lib/module/components/Embed/EmbedButton.js} +10 -11
- package/{dist/commonjs/component/voice.js → lib/module/components/Embed/EmbedVoice.js} +1 -1
- package/{dist/module/style/onwidButton.style.js → lib/module/components/styles/EmbedButton.style.js} +3 -3
- package/{dist/commonjs/Event/onwid.js → lib/module/events/embed.event.js} +6 -6
- package/{dist → lib}/module/hooks/initialize.js +3 -3
- package/{dist/module/hooks/initializelivekit.js → lib/module/hooks/initialize.livekit.js} +1 -1
- package/{dist/commonjs/hooks/voiceAgent.js → lib/module/hooks/voiceagent.js} +4 -4
- package/lib/module/index.js +7 -0
- package/{dist/commonjs/index.d.js → lib/module/index.types.js} +2 -1
- package/{dist/commonjs/utils/reanimatedHelpers.js → lib/module/utils/reanimated.helper.js} +14 -14
- package/lib/typescript/module/package.json +1 -0
- package/package.json +67 -33
- package/react-native.config.js +8 -14
- package/revrag-ai-embed-react-native.podspec +41 -0
- package/Onwid.podspec +0 -20
- package/dist/commonjs/NativeOnwid.js +0 -5
- package/dist/commonjs/button.json +0 -1
- package/dist/commonjs/index.js +0 -34
- package/dist/commonjs/onwidApi/api.types.js +0 -2
- package/dist/commonjs/utils/utils.js +0 -2
- package/dist/module/NativeOnwid.js +0 -5
- package/dist/module/button.json +0 -1
- package/dist/module/hooks/voiceAgent.types.js +0 -4
- package/dist/module/index.js +0 -34
- package/dist/module/onwidApi/api.types.js +0 -2
- package/dist/module/store.key.js +0 -38
- package/dist/module/utils/utils.js +0 -2
- package/dist/typescript/Event/onwid.d.ts +0 -14
- package/dist/typescript/NativeOnwid.d.ts +0 -7
- package/dist/typescript/component/OnwidButton.d.ts +0 -29
- package/dist/typescript/component/audiowave.d.ts +0 -7
- package/dist/typescript/component/voice.d.ts +0 -16
- package/dist/typescript/hooks/initialize.d.ts +0 -3
- package/dist/typescript/hooks/initialize.types.d.ts +0 -6
- package/dist/typescript/hooks/initializelivekit.d.ts +0 -4
- package/dist/typescript/hooks/voiceAgent.d.ts +0 -3
- package/dist/typescript/hooks/voiceAgent.types.d.ts +0 -17
- package/dist/typescript/index.d.ts +0 -27
- package/dist/typescript/onwidApi/api.d.ts +0 -54
- package/dist/typescript/onwidApi/api.types.d.ts +0 -22
- package/dist/typescript/store.key.d.ts +0 -4
- package/dist/typescript/style/onwidButton.style.d.ts +0 -99
- package/dist/typescript/utils/reanimatedHelpers.d.ts +0 -30
- package/dist/typescript/utils/utils.d.ts +0 -1
- package/ios/Onwid.h +0 -5
- package/scripts/verify-setup.js +0 -90
- /package/{dist/commonjs/hooks → lib/commonjs/hooks/types}/initialize.types.js +0 -0
- /package/{dist/module/hooks → lib/module/hooks/types}/initialize.types.js +0 -0
- /package/{dist/commonjs/hooks → lib/module/hooks/types}/voiceAgent.types.js +0 -0
- /package/{dist/commonjs → lib/module/store}/store.key.js +0 -0
- /package/{dist → lib/typescript}/commonjs/package.json +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { getAgentData, setAgentData } from
|
|
4
|
-
import { APIService } from
|
|
3
|
+
import { getAgentData, setAgentData } from "../store/store.key.js";
|
|
4
|
+
import { APIService } from "../api/api.js";
|
|
5
5
|
// Predefined event keys
|
|
6
6
|
export let EventKeys = /*#__PURE__*/function (EventKeys) {
|
|
7
7
|
EventKeys["USER_DATA"] = "user_data";
|
|
8
8
|
EventKeys["SCREEN_STATE"] = "state_data";
|
|
9
9
|
return EventKeys;
|
|
10
10
|
}({});
|
|
11
|
-
class
|
|
11
|
+
class Embed {
|
|
12
12
|
events = {};
|
|
13
13
|
|
|
14
14
|
// Automatically adds a default listener if none exists
|
|
@@ -65,6 +65,6 @@ class OnWid {
|
|
|
65
65
|
this.events[eventKey]?.push(callback);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
const
|
|
69
|
-
export default
|
|
70
|
-
//# sourceMappingURL=
|
|
68
|
+
const embed = new Embed();
|
|
69
|
+
export default embed;
|
|
70
|
+
//# sourceMappingURL=embed.event.js.map
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* 2. Stores API key securely in keychain
|
|
14
14
|
* 3. Registers the device with provided details
|
|
15
15
|
*/
|
|
16
|
-
import { setAgentData } from
|
|
17
|
-
import { APIService } from
|
|
18
|
-
import registerAgent from
|
|
16
|
+
import { setAgentData } from "../store/store.key.js";
|
|
17
|
+
import { APIService } from "../api/api.js";
|
|
18
|
+
import registerAgent from "./initialize.livekit.js";
|
|
19
19
|
import { PermissionsAndroid, Platform } from 'react-native';
|
|
20
20
|
export function useInitialize({
|
|
21
21
|
apiKey,
|
|
@@ -14,4 +14,4 @@ import { registerGlobals } from '@livekit/react-native';
|
|
|
14
14
|
// which is used to set up global configurations for the LiveKit service.
|
|
15
15
|
const registerAgent = registerGlobals;
|
|
16
16
|
export default registerAgent;
|
|
17
|
-
//# sourceMappingURL=
|
|
17
|
+
//# sourceMappingURL=initialize.livekit.js.map
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { ConnectionState, Room } from 'livekit-client';
|
|
4
4
|
import { useEffect, useState } from 'react';
|
|
5
|
-
import { EventKeys } from
|
|
6
|
-
import { APIService } from
|
|
7
|
-
import { getAgentData } from
|
|
5
|
+
import { EventKeys } from "../events/embed.event.js";
|
|
6
|
+
import { APIService } from "../api/api.js";
|
|
7
|
+
import { getAgentData } from "../store/store.key.js";
|
|
8
8
|
// Create a singleton instance of Room that persists across hook instances
|
|
9
9
|
// This ensures we don't create multiple Room instances that could conflict
|
|
10
10
|
let roomInstance = null;
|
|
@@ -350,4 +350,4 @@ export const useVoiceAgent = () => {
|
|
|
350
350
|
cleanup
|
|
351
351
|
};
|
|
352
352
|
};
|
|
353
|
-
//# sourceMappingURL=
|
|
353
|
+
//# sourceMappingURL=voiceagent.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { EmbedButton } from "./components/Embed/EmbedButton.js";
|
|
4
|
+
import { useInitialize } from "./hooks/initialize.js";
|
|
5
|
+
import Embed, { EventKeys } from "./events/embed.event.js";
|
|
6
|
+
export { EmbedButton, useInitialize, Embed, EventKeys as EmbedEventKeys };
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
/* eslint-disable */
|
|
3
4
|
/**
|
|
4
5
|
* @file index.d.ts
|
|
5
6
|
* @description TypeScript declarations for the Onwid React Native library.
|
|
@@ -19,4 +20,4 @@ export let EventKeys = /*#__PURE__*/function (EventKeys) {
|
|
|
19
20
|
EventKeys["SCREEN_STATE"] = "state_data";
|
|
20
21
|
return EventKeys;
|
|
21
22
|
}({});
|
|
22
|
-
//# sourceMappingURL=index.
|
|
23
|
+
//# sourceMappingURL=index.types.js.map
|
|
@@ -77,18 +77,18 @@ export function checkReanimatedSetup() {
|
|
|
77
77
|
*/
|
|
78
78
|
export function showReanimatedSetupError() {
|
|
79
79
|
console.error(`
|
|
80
|
-
🚨 React Native Reanimated Setup Required
|
|
81
|
-
|
|
82
|
-
The OnwidButton component requires react-native-reanimated to be properly installed and configured.
|
|
83
|
-
|
|
84
|
-
Quick Fix:
|
|
85
|
-
1. Install: npm install react-native-reanimated
|
|
86
|
-
2. Add to babel.config.js:
|
|
87
|
-
|
|
88
|
-
3. Rebuild your app
|
|
89
|
-
|
|
90
|
-
For detailed setup instructions, visit:
|
|
91
|
-
https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started
|
|
92
|
-
|
|
80
|
+
🚨 React Native Reanimated Setup Required
|
|
81
|
+
|
|
82
|
+
The OnwidButton component requires react-native-reanimated to be properly installed and configured.
|
|
83
|
+
|
|
84
|
+
Quick Fix:
|
|
85
|
+
1. Install: npm install react-native-reanimated
|
|
86
|
+
2. Add to babel.config.js:
|
|
87
|
+
plugins: ['react-native-reanimated/plugin']
|
|
88
|
+
3. Rebuild your app
|
|
89
|
+
|
|
90
|
+
For detailed setup instructions, visit:
|
|
91
|
+
https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started
|
|
92
|
+
`);
|
|
93
93
|
}
|
|
94
|
-
//# sourceMappingURL=
|
|
94
|
+
//# sourceMappingURL=reanimated.helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
package/package.json
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revrag-ai/embed-react-native",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
|
+
"source": "./src/index.tsx",
|
|
4
5
|
"description": "Voice Agent SDK for React Native - AI-powered voice communication with real-time speech processing",
|
|
5
|
-
"main": "./
|
|
6
|
-
"module": "./
|
|
7
|
-
"types": "./
|
|
6
|
+
"main": "./lib/commonjs/index.js",
|
|
7
|
+
"module": "./lib/module/index.js",
|
|
8
|
+
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
8
9
|
"typesVersions": {
|
|
9
10
|
"*": {
|
|
10
|
-
"*": [
|
|
11
|
+
"*": [
|
|
12
|
+
"./lib/typescript/commonjs/src/*"
|
|
13
|
+
]
|
|
11
14
|
}
|
|
12
15
|
},
|
|
13
16
|
"exports": {
|
|
14
17
|
".": {
|
|
15
|
-
"types": "./
|
|
16
|
-
"import": "./
|
|
17
|
-
"require": "./
|
|
18
|
-
"default": "./
|
|
18
|
+
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
19
|
+
"import": "./lib/module/index.js",
|
|
20
|
+
"require": "./lib/commonjs/index.js",
|
|
21
|
+
"default": "./lib/module/index.js"
|
|
19
22
|
},
|
|
20
23
|
"./package.json": "./package.json"
|
|
21
24
|
},
|
|
22
25
|
"files": [
|
|
23
|
-
"
|
|
26
|
+
"lib",
|
|
24
27
|
"android",
|
|
25
28
|
"ios",
|
|
26
29
|
"cpp",
|
|
@@ -28,9 +31,9 @@
|
|
|
28
31
|
"scripts",
|
|
29
32
|
"*.podspec",
|
|
30
33
|
"react-native.config.js",
|
|
31
|
-
"!
|
|
32
|
-
"!
|
|
33
|
-
"!
|
|
34
|
+
"!lib/**/*.map",
|
|
35
|
+
"!lib/**/*.test.*",
|
|
36
|
+
"!lib/**/*.spec.*",
|
|
34
37
|
"!ios/build",
|
|
35
38
|
"!android/build",
|
|
36
39
|
"!android/gradle",
|
|
@@ -48,11 +51,12 @@
|
|
|
48
51
|
"test": "jest",
|
|
49
52
|
"typecheck": "tsc",
|
|
50
53
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
51
|
-
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build
|
|
54
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
52
55
|
"prepare": "bob build",
|
|
53
56
|
"build": "bob build",
|
|
54
57
|
"fix-js": "node fix-js-files.js",
|
|
55
58
|
"verify-setup": "node scripts/verify-setup.js",
|
|
59
|
+
"debug-network": "node scripts/debug-network.js",
|
|
56
60
|
"prepublishOnly": "bob build && yarn fix-js",
|
|
57
61
|
"release": "release-it --only-version",
|
|
58
62
|
"protect": "node -e \"const crypto = require('crypto'); const fs = require('fs'); const config = { hash: crypto.randomBytes(32).toString('hex'), createdAt: new Date().toISOString(), note: 'Protected build', version: require('./package.json').version }; fs.writeFileSync('.onwid-security.json', JSON.stringify(config, null, 2)); console.log('✅ Code protected');\"",
|
|
@@ -75,17 +79,16 @@
|
|
|
75
79
|
],
|
|
76
80
|
"repository": {
|
|
77
81
|
"type": "git",
|
|
78
|
-
"url": "git+https://github.com/RevRag-ai/
|
|
82
|
+
"url": "git+https://github.com/orgs/RevRag-ai/dashboard.git"
|
|
79
83
|
},
|
|
80
|
-
"author": "
|
|
84
|
+
"author": "RevragAi <contact@revrag.ai> (https://www.revrag.ai)",
|
|
81
85
|
"license": "MIT",
|
|
82
86
|
"bugs": {
|
|
83
|
-
"url": "https://github.com/RevRag-ai/
|
|
87
|
+
"url": "https://github.com/orgs/RevRag-ai/dashboard/issues"
|
|
84
88
|
},
|
|
85
|
-
"homepage": "https://github.com/RevRag-ai/
|
|
89
|
+
"homepage": "https://github.com/orgs/RevRag-ai/dashboard#readme",
|
|
86
90
|
"publishConfig": {
|
|
87
|
-
"registry": "https://registry.npmjs.org/"
|
|
88
|
-
"access": "public"
|
|
91
|
+
"registry": "https://registry.npmjs.org/"
|
|
89
92
|
},
|
|
90
93
|
"devDependencies": {
|
|
91
94
|
"@babel/core": "^7.20.0",
|
|
@@ -118,6 +121,9 @@
|
|
|
118
121
|
"release-it": "^15.0.0",
|
|
119
122
|
"typescript": "^5.2.2"
|
|
120
123
|
},
|
|
124
|
+
"resolutions": {
|
|
125
|
+
"@types/react": "^18.2.44"
|
|
126
|
+
},
|
|
121
127
|
"peerDependencies": {
|
|
122
128
|
"@livekit/react-native": "*",
|
|
123
129
|
"@livekit/react-native-webrtc": "*",
|
|
@@ -138,7 +144,7 @@
|
|
|
138
144
|
"preset": "react-native",
|
|
139
145
|
"modulePathIgnorePatterns": [
|
|
140
146
|
"<rootDir>/example/node_modules",
|
|
141
|
-
"<rootDir>/
|
|
147
|
+
"<rootDir>/lib/"
|
|
142
148
|
]
|
|
143
149
|
},
|
|
144
150
|
"commitlint": {
|
|
@@ -159,12 +165,34 @@
|
|
|
159
165
|
},
|
|
160
166
|
"plugins": {
|
|
161
167
|
"@release-it/conventional-changelog": {
|
|
162
|
-
"preset":
|
|
163
|
-
"name": "angular"
|
|
164
|
-
}
|
|
168
|
+
"preset": "angular"
|
|
165
169
|
}
|
|
166
170
|
}
|
|
167
171
|
},
|
|
172
|
+
"eslintConfig": {
|
|
173
|
+
"root": true,
|
|
174
|
+
"extends": [
|
|
175
|
+
"@react-native",
|
|
176
|
+
"prettier"
|
|
177
|
+
],
|
|
178
|
+
"rules": {
|
|
179
|
+
"react/react-in-jsx-scope": "off",
|
|
180
|
+
"prettier/prettier": [
|
|
181
|
+
"error",
|
|
182
|
+
{
|
|
183
|
+
"quoteProps": "consistent",
|
|
184
|
+
"singleQuote": true,
|
|
185
|
+
"tabWidth": 2,
|
|
186
|
+
"trailingComma": "es5",
|
|
187
|
+
"useTabs": false
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"eslintIgnore": [
|
|
193
|
+
"node_modules/",
|
|
194
|
+
"lib/"
|
|
195
|
+
],
|
|
168
196
|
"prettier": {
|
|
169
197
|
"quoteProps": "consistent",
|
|
170
198
|
"singleQuote": true,
|
|
@@ -174,41 +202,47 @@
|
|
|
174
202
|
},
|
|
175
203
|
"react-native-builder-bob": {
|
|
176
204
|
"source": "src",
|
|
177
|
-
"output": "
|
|
205
|
+
"output": "lib",
|
|
178
206
|
"targets": [
|
|
207
|
+
"codegen",
|
|
179
208
|
[
|
|
180
209
|
"commonjs",
|
|
181
210
|
{
|
|
182
|
-
"
|
|
211
|
+
"esm": true
|
|
183
212
|
}
|
|
184
213
|
],
|
|
185
214
|
[
|
|
186
215
|
"module",
|
|
187
216
|
{
|
|
188
|
-
"configFile": true,
|
|
189
217
|
"esm": true
|
|
190
218
|
}
|
|
191
219
|
],
|
|
192
220
|
[
|
|
193
221
|
"typescript",
|
|
194
222
|
{
|
|
195
|
-
"project": "tsconfig.build.json"
|
|
223
|
+
"project": "tsconfig.build.json",
|
|
224
|
+
"esm": true
|
|
196
225
|
}
|
|
197
226
|
]
|
|
198
227
|
]
|
|
199
228
|
},
|
|
200
229
|
"codegenConfig": {
|
|
201
|
-
"name": "
|
|
230
|
+
"name": "RNEmbedReactNativeSpec",
|
|
202
231
|
"type": "modules",
|
|
203
232
|
"jsSrcsDir": "src",
|
|
233
|
+
"outputDir": {
|
|
234
|
+
"ios": "ios/generated",
|
|
235
|
+
"android": "android/generated"
|
|
236
|
+
},
|
|
204
237
|
"android": {
|
|
205
|
-
"javaPackageName": "com.
|
|
206
|
-
}
|
|
238
|
+
"javaPackageName": "com.revragai.embedreactnative"
|
|
239
|
+
},
|
|
240
|
+
"includesGeneratedCode": true
|
|
207
241
|
},
|
|
208
242
|
"create-react-native-library": {
|
|
209
|
-
"languages": "kotlin-objc",
|
|
210
243
|
"type": "turbo-module",
|
|
211
|
-
"
|
|
244
|
+
"languages": "cpp",
|
|
245
|
+
"version": "0.46.0"
|
|
212
246
|
},
|
|
213
247
|
"dependencies": {
|
|
214
248
|
"livekit-client": "^2.13.1"
|
package/react-native.config.js
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* @type {import('@react-native-community/cli-types').UserDependencyConfig}
|
|
4
|
+
*/
|
|
1
5
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
android: {
|
|
7
|
-
sourceDir: './android',
|
|
8
|
-
packageImportPath: 'import com.onwid.OnwidPackage;',
|
|
9
|
-
packageInstance: 'new OnwidPackage()',
|
|
10
|
-
assets: ['./assets/'],
|
|
11
|
-
},
|
|
12
|
-
ios: {
|
|
13
|
-
podspecPath: './Onwid.podspec',
|
|
14
|
-
assets: ['./assets/'],
|
|
15
|
-
},
|
|
6
|
+
dependency: {
|
|
7
|
+
platforms: {
|
|
8
|
+
android: {
|
|
9
|
+
cmakeListsPath: 'generated/jni/CMakeLists.txt',
|
|
16
10
|
},
|
|
17
11
|
},
|
|
18
12
|
},
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
|
+
|
|
6
|
+
Pod::Spec.new do |s|
|
|
7
|
+
s.name = "revrag-ai-embed-react-native"
|
|
8
|
+
s.version = package["version"]
|
|
9
|
+
s.summary = package["description"]
|
|
10
|
+
s.homepage = package["homepage"]
|
|
11
|
+
s.license = package["license"]
|
|
12
|
+
s.authors = package["author"]
|
|
13
|
+
|
|
14
|
+
s.platforms = { :ios => min_ios_version_supported }
|
|
15
|
+
s.source = { :git => "https://github.com/orgs/RevRag-ai/dashboard.git", :tag => "#{s.version}" }
|
|
16
|
+
|
|
17
|
+
s.source_files = "ios/**/*.{h,m,mm}", "cpp/**/*.{hpp,cpp,c,h}"
|
|
18
|
+
|
|
19
|
+
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
20
|
+
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
21
|
+
if respond_to?(:install_modules_dependencies, true)
|
|
22
|
+
install_modules_dependencies(s)
|
|
23
|
+
else
|
|
24
|
+
s.dependency "React-Core"
|
|
25
|
+
|
|
26
|
+
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
27
|
+
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
28
|
+
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
29
|
+
s.pod_target_xcconfig = {
|
|
30
|
+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
31
|
+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
32
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
33
|
+
}
|
|
34
|
+
s.dependency "React-Codegen"
|
|
35
|
+
s.dependency "RCT-Folly"
|
|
36
|
+
s.dependency "RCTRequired"
|
|
37
|
+
s.dependency "RCTTypeSafety"
|
|
38
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
package/Onwid.podspec
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
require "json"
|
|
2
|
-
|
|
3
|
-
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
-
|
|
5
|
-
Pod::Spec.new do |s|
|
|
6
|
-
s.name = "Onwid"
|
|
7
|
-
s.version = package["version"]
|
|
8
|
-
s.summary = package["description"]
|
|
9
|
-
s.homepage = package["homepage"]
|
|
10
|
-
s.license = package["license"]
|
|
11
|
-
s.authors = package["author"]
|
|
12
|
-
|
|
13
|
-
s.platforms = { :ios => min_ios_version_supported }
|
|
14
|
-
s.source = { :git => "https://github.com/RevRag-ai.git", :tag => "#{s.version}" }
|
|
15
|
-
|
|
16
|
-
s.source_files = "ios/**/*.{h,m,mm,cpp}"
|
|
17
|
-
s.private_header_files = "ios/**/*.h"
|
|
18
|
-
|
|
19
|
-
install_modules_dependencies(s)
|
|
20
|
-
end
|