@aigens/aigens-sdk-core 0.0.7 → 0.0.10
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/AigensAigensSdkCore.podspec +1 -1
- package/README.md +60 -0
- package/android/src/main/AndroidManifest.xml +9 -0
- package/android/src/main/java/com/aigens/sdk/WebContainerActivity.java +195 -7
- package/android/src/main/java/com/aigens/sdk/plugins/CorePlugin.java +120 -8
- package/dist/docs.json +58 -0
- package/dist/esm/definitions.d.ts +12 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +12 -0
- package/dist/esm/web.js +21 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +21 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +21 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/CorePlugin.m +4 -0
- package/ios/Plugin/CorePlugin.swift +69 -16
- package/ios/Plugin/WebContainer.swift +83 -0
- package/ios/Plugin/WebContainer.xib +113 -0
- package/ios/Plugin/WebContainerViewController.swift +227 -17
- package/package.json +4 -1
@@ -3,5 +3,17 @@ export interface CorePlugin {
|
|
3
3
|
dismiss(options: any): Promise<any>;
|
4
4
|
finish(options: any): Promise<any>;
|
5
5
|
getMember(options: any): Promise<any>;
|
6
|
+
getDeeplink(options: any): Promise<any>;
|
6
7
|
openBrowser(options: any): Promise<any>;
|
8
|
+
isInstalledApp(options: {
|
9
|
+
key: string;
|
10
|
+
}): Promise<{
|
11
|
+
install: boolean;
|
12
|
+
}>;
|
13
|
+
getIsProductionEnvironment(): Promise<{
|
14
|
+
isPrd: boolean;
|
15
|
+
}>;
|
16
|
+
openExternalUrl(options: {
|
17
|
+
url: string;
|
18
|
+
}): Promise<any>;
|
7
19
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface CorePlugin {\n echo(options: any): Promise<any>;\n dismiss(options: any): Promise<any>;\n finish(options: any): Promise<any>;\n getMember(options: any): Promise<any>;\n openBrowser(options: any): Promise<any>;\n\n}\n"]}
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface CorePlugin {\n echo(options: any): Promise<any>;\n dismiss(options: any): Promise<any>;\n finish(options: any): Promise<any>;\n getMember(options: any): Promise<any>;\n getDeeplink(options: any): Promise<any>;\n openBrowser(options: any): Promise<any>;\n isInstalledApp(options: { key: string }): Promise<{ install: boolean }>;\n getIsProductionEnvironment(): Promise<{ isPrd: boolean }>;\n openExternalUrl(options: { url: string }): Promise<any>;\n\n}\n"]}
|
package/dist/esm/web.d.ts
CHANGED
@@ -3,7 +3,19 @@ import type { CorePlugin } from './definitions';
|
|
3
3
|
export declare class CoreWeb extends WebPlugin implements CorePlugin {
|
4
4
|
echo(options: any): Promise<any>;
|
5
5
|
getMember(options: any): Promise<any>;
|
6
|
+
getDeeplink(options: any): Promise<any>;
|
6
7
|
dismiss(options: any): Promise<any>;
|
7
8
|
finish(options: any): Promise<any>;
|
8
9
|
openBrowser(options: any): Promise<any>;
|
10
|
+
isInstalledApp(options: {
|
11
|
+
key: string;
|
12
|
+
}): Promise<{
|
13
|
+
install: boolean;
|
14
|
+
}>;
|
15
|
+
openExternalUrl(options: {
|
16
|
+
url: string;
|
17
|
+
}): Promise<any>;
|
18
|
+
getIsProductionEnvironment(): Promise<{
|
19
|
+
isPrd: boolean;
|
20
|
+
}>;
|
9
21
|
}
|
package/dist/esm/web.js
CHANGED
@@ -12,6 +12,14 @@ export class CoreWeb extends WebPlugin {
|
|
12
12
|
result.member = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.member;
|
13
13
|
return result;
|
14
14
|
}
|
15
|
+
async getDeeplink(options) {
|
16
|
+
var _a, _b;
|
17
|
+
console.log('GET Deeplink', options);
|
18
|
+
var result = {};
|
19
|
+
var w = window;
|
20
|
+
result.deeplink = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.deeplink;
|
21
|
+
return result;
|
22
|
+
}
|
15
23
|
async dismiss(options) {
|
16
24
|
console.log('DISMISS', options);
|
17
25
|
return options;
|
@@ -24,5 +32,18 @@ export class CoreWeb extends WebPlugin {
|
|
24
32
|
console.log(options);
|
25
33
|
throw new Error('Method not implemented.');
|
26
34
|
}
|
35
|
+
async isInstalledApp(options) {
|
36
|
+
console.log(options);
|
37
|
+
throw new Error('Method not implemented.');
|
38
|
+
}
|
39
|
+
async openExternalUrl(options) {
|
40
|
+
window.open(options.url, "_blank");
|
41
|
+
return {
|
42
|
+
open: true
|
43
|
+
};
|
44
|
+
}
|
45
|
+
async getIsProductionEnvironment() {
|
46
|
+
return { isPrd: true };
|
47
|
+
}
|
27
48
|
}
|
28
49
|
//# sourceMappingURL=web.js.map
|
package/dist/esm/web.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,OAAQ,SAAQ,SAAS;IAClC,KAAK,CAAC,IAAI,CAAC,OAAY;QACnB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,OAAY;;QACxB,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACnC,IAAI,MAAM,GAAG,EAAS,CAAC;QACvB,IAAI,CAAC,GAAG,MAAa,CAAC;QACtB,MAAM,CAAC,MAAM,eAAG,CAAC,CAAC,MAAM,0CAAE,OAAO,0CAAE,MAAM,CAAC;QAC1C,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAY;QACtB,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAChC,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAY;QACrB,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC/B,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,OAAY;QAC1B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;CAGJ","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport type { CorePlugin } from './definitions';\n\n\nexport class CoreWeb extends WebPlugin implements CorePlugin {\n async echo(options: any): Promise<any> {\n console.log('ECHO', options);\n return options;\n }\n\n async getMember(options: any): Promise<any> {\n console.log('GET MEMBER', options);\n var result = {} as any;\n var w = window as any;\n result.member = w.aigens?.context?.member;\n return result;\n }\n\n async dismiss(options: any): Promise<any> {\n console.log('DISMISS', options);\n return options;\n }\n\n async finish(options: any): Promise<any> {\n console.log('FINISH', options);\n return options;\n }\n\n async openBrowser(options: any): Promise<any> {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n\n\n}\n"]}
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,OAAQ,SAAQ,SAAS;IAClC,KAAK,CAAC,IAAI,CAAC,OAAY;QACnB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,OAAY;;QACxB,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACnC,IAAI,MAAM,GA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KAAK,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CAGJ","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport type { CorePlugin } from './definitions';\n\n\nexport class CoreWeb extends WebPlugin implements CorePlugin {\n async echo(options: any): Promise<any> {\n console.log('ECHO', options);\n return options;\n }\n\n async getMember(options: any): Promise<any> {\n console.log('GET MEMBER', options);\n var result = {} as any;\n var w = window as any;\n result.member = w.aigens?.context?.member;\n return result;\n }\n async getDeeplink(options: any): Promise<any> {\n console.log('GET Deeplink', options);\n var result = {} as any;\n var w = window as any;\n result.deeplink = w.aigens?.context?.deeplink;\n return result;\n }\n\n async dismiss(options: any): Promise<any> {\n console.log('DISMISS', options);\n return options;\n }\n\n async finish(options: any): Promise<any> {\n console.log('FINISH', options);\n return options;\n }\n\n async openBrowser(options: any): Promise<any> {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n\n async isInstalledApp(options: { key: string }): Promise<{ install: boolean }> {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n\n async openExternalUrl(options: { url: string }): Promise<any> {\n window.open(options.url, \"_blank\");\n return {\n open: true\n }\n }\n\n async getIsProductionEnvironment(): Promise<{ isPrd: boolean }> {\n return { isPrd: true };\n }\n\n\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
@@ -21,6 +21,14 @@ class CoreWeb extends core.WebPlugin {
|
|
21
21
|
result.member = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.member;
|
22
22
|
return result;
|
23
23
|
}
|
24
|
+
async getDeeplink(options) {
|
25
|
+
var _a, _b;
|
26
|
+
console.log('GET Deeplink', options);
|
27
|
+
var result = {};
|
28
|
+
var w = window;
|
29
|
+
result.deeplink = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.deeplink;
|
30
|
+
return result;
|
31
|
+
}
|
24
32
|
async dismiss(options) {
|
25
33
|
console.log('DISMISS', options);
|
26
34
|
return options;
|
@@ -33,6 +41,19 @@ class CoreWeb extends core.WebPlugin {
|
|
33
41
|
console.log(options);
|
34
42
|
throw new Error('Method not implemented.');
|
35
43
|
}
|
44
|
+
async isInstalledApp(options) {
|
45
|
+
console.log(options);
|
46
|
+
throw new Error('Method not implemented.');
|
47
|
+
}
|
48
|
+
async openExternalUrl(options) {
|
49
|
+
window.open(options.url, "_blank");
|
50
|
+
return {
|
51
|
+
open: true
|
52
|
+
};
|
53
|
+
}
|
54
|
+
async getIsProductionEnvironment() {
|
55
|
+
return { isPrd: true };
|
56
|
+
}
|
36
57
|
}
|
37
58
|
|
38
59
|
var web = /*#__PURE__*/Object.freeze({
|
package/dist/plugin.cjs.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Core = registerPlugin('Core', {\n web: () => import('./web').then(m => new m.CoreWeb()),\n});\nexport * from './definitions';\nexport { Core };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CoreWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async getMember(options) {\n var _a, _b;\n console.log('GET MEMBER', options);\n var result = {};\n var w = window;\n result.member = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.member;\n return result;\n }\n async dismiss(options) {\n console.log('DISMISS', options);\n return options;\n }\n async finish(options) {\n console.log('FINISH', options);\n return options;\n }\n async openBrowser(options) {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,IAAI,GAAGA,mBAAc,CAAC,MAAM,EAAE;AACpC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;AACzD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;;;;;"}
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Core = registerPlugin('Core', {\n web: () => import('./web').then(m => new m.CoreWeb()),\n});\nexport * from './definitions';\nexport { Core };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CoreWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async getMember(options) {\n var _a, _b;\n console.log('GET MEMBER', options);\n var result = {};\n var w = window;\n result.member = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.member;\n return result;\n }\n async getDeeplink(options) {\n var _a, _b;\n console.log('GET Deeplink', options);\n var result = {};\n var w = window;\n result.deeplink = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.deeplink;\n return result;\n }\n async dismiss(options) {\n console.log('DISMISS', options);\n return options;\n }\n async finish(options) {\n console.log('FINISH', options);\n return options;\n }\n async openBrowser(options) {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n async isInstalledApp(options) {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n async openExternalUrl(options) {\n window.open(options.url, \"_blank\");\n return {\n open: true\n };\n }\n async getIsProductionEnvironment() {\n return { isPrd: true };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,IAAI,GAAGA,mBAAc,CAAC,MAAM,EAAE;AACpC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;AACzD,CAAC;;ACFM,MAAM,OAAO,SAASC,cAAS,CAAC;AACvC,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACrC,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,OAAO,CAAC,CAAC;AACxC,QAAQ,OAAO,OAAO,CAAC;AACvB,KAAK;AACL,IAAI,MAAM,MAAM,CAAC,OAAO,EAAE;AAC1B,QAAQ,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACvC,QAAQ,OAAO,OAAO,CAAC;AACvB,KAAK;AACL,IAAI,MAAM,WAAW,CAAC,OAAO,EAAE;AAC/B,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAC7B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,MAAM,cAAc,CAAC,OAAO,EAAE;AAClC,QAAQ,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAC7B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,MAAM,eAAe,CAAC,OAAO,EAAE;AACnC,QAAQ,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AAC3C,QAAQ,OAAO;AACf,YAAY,IAAI,EAAE,IAAI;AACtB,SAAS,CAAC;AACV,KAAK;AACL,IAAI,MAAM,0BAA0B,GAAG;AACvC,QAAQ,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC/B,KAAK;AACL;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
@@ -18,6 +18,14 @@ var capacitorCore = (function (exports, core) {
|
|
18
18
|
result.member = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.member;
|
19
19
|
return result;
|
20
20
|
}
|
21
|
+
async getDeeplink(options) {
|
22
|
+
var _a, _b;
|
23
|
+
console.log('GET Deeplink', options);
|
24
|
+
var result = {};
|
25
|
+
var w = window;
|
26
|
+
result.deeplink = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.deeplink;
|
27
|
+
return result;
|
28
|
+
}
|
21
29
|
async dismiss(options) {
|
22
30
|
console.log('DISMISS', options);
|
23
31
|
return options;
|
@@ -30,6 +38,19 @@ var capacitorCore = (function (exports, core) {
|
|
30
38
|
console.log(options);
|
31
39
|
throw new Error('Method not implemented.');
|
32
40
|
}
|
41
|
+
async isInstalledApp(options) {
|
42
|
+
console.log(options);
|
43
|
+
throw new Error('Method not implemented.');
|
44
|
+
}
|
45
|
+
async openExternalUrl(options) {
|
46
|
+
window.open(options.url, "_blank");
|
47
|
+
return {
|
48
|
+
open: true
|
49
|
+
};
|
50
|
+
}
|
51
|
+
async getIsProductionEnvironment() {
|
52
|
+
return { isPrd: true };
|
53
|
+
}
|
33
54
|
}
|
34
55
|
|
35
56
|
var web = /*#__PURE__*/Object.freeze({
|
package/dist/plugin.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Core = registerPlugin('Core', {\n web: () => import('./web').then(m => new m.CoreWeb()),\n});\nexport * from './definitions';\nexport { Core };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CoreWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async getMember(options) {\n var _a, _b;\n console.log('GET MEMBER', options);\n var result = {};\n var w = window;\n result.member = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.member;\n return result;\n }\n async dismiss(options) {\n console.log('DISMISS', options);\n return options;\n }\n async finish(options) {\n console.log('FINISH', options);\n return options;\n }\n async openBrowser(options) {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,IAAI,GAAGA,mBAAc,CAAC,MAAM,EAAE;IACpC,IAAI,GAAG,EAAE,MAAM,mD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7B,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Core = registerPlugin('Core', {\n web: () => import('./web').then(m => new m.CoreWeb()),\n});\nexport * from './definitions';\nexport { Core };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CoreWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async getMember(options) {\n var _a, _b;\n console.log('GET MEMBER', options);\n var result = {};\n var w = window;\n result.member = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.member;\n return result;\n }\n async getDeeplink(options) {\n var _a, _b;\n console.log('GET Deeplink', options);\n var result = {};\n var w = window;\n result.deeplink = (_b = (_a = w.aigens) === null || _a === void 0 ? void 0 : _a.context) === null || _b === void 0 ? void 0 : _b.deeplink;\n return result;\n }\n async dismiss(options) {\n console.log('DISMISS', options);\n return options;\n }\n async finish(options) {\n console.log('FINISH', options);\n return options;\n }\n async openBrowser(options) {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n async isInstalledApp(options) {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n async openExternalUrl(options) {\n window.open(options.url, \"_blank\");\n return {\n open: true\n };\n }\n async getIsProductionEnvironment() {\n return { isPrd: true };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,IAAI,GAAGA,mBAAc,CAAC,MAAM,EAAE;IACpC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;IACzD,CAAC;;ICFM,MAAM,OAAO,SAASC,cAAS,CAAC;IACvC,IAAI,MAAM,IAAI,CAAC,OAAO,EA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PPluginReturnPromise);
|
11
12
|
CAP_PLUGIN_METHOD(getMember, CAPPluginReturnPromise);
|
13
|
+
CAP_PLUGIN_METHOD(isInstalledApp, CAPPluginReturnPromise);
|
14
|
+
CAP_PLUGIN_METHOD(openExternalUrl, CAPPluginReturnPromise);
|
15
|
+
CAP_PLUGIN_METHOD(getIsProductionEnvironment, CAPPluginReturnPromise);
|
12
16
|
)
|
@@ -8,24 +8,25 @@ import UIKit
|
|
8
8
|
*/
|
9
9
|
@objc(CorePlugin)
|
10
10
|
public class CorePlugin: CAPPlugin {
|
11
|
-
|
11
|
+
|
12
12
|
private let implementation = Core()
|
13
13
|
public static var member: Dictionary<String, Any>?
|
14
|
-
|
14
|
+
public static var deeplink: Dictionary<String, Any>?
|
15
|
+
|
15
16
|
@objc func echo(_ call: CAPPluginCall) {
|
16
17
|
|
17
18
|
print("CorePlugin echo")
|
18
|
-
|
19
|
+
|
19
20
|
let value = call.getString("value") ?? ""
|
20
21
|
call.resolve([
|
21
22
|
"value": implementation.echo(value)
|
22
23
|
])
|
23
|
-
|
24
|
-
|
24
|
+
|
25
|
+
|
25
26
|
}
|
26
|
-
|
27
|
+
|
27
28
|
@objc func dismiss(_ call: CAPPluginCall) {
|
28
|
-
|
29
|
+
|
29
30
|
print("CorePlugin dismiss")
|
30
31
|
|
31
32
|
DispatchQueue.main.async {
|
@@ -38,21 +39,27 @@ public class CorePlugin: CAPPlugin {
|
|
38
39
|
"success": true
|
39
40
|
//"value": implementation.echo(value)
|
40
41
|
])
|
41
|
-
|
42
|
-
|
42
|
+
|
43
|
+
|
43
44
|
}
|
44
45
|
|
45
46
|
@objc func getMember(_ call: CAPPluginCall) {
|
46
47
|
|
47
48
|
call.resolve([
|
48
|
-
"member": CorePlugin.member
|
49
|
+
"member": CorePlugin.member ?? nil
|
50
|
+
])
|
51
|
+
}
|
52
|
+
@objc func getDeeplink(_ call: CAPPluginCall) {
|
53
|
+
|
54
|
+
call.resolve([
|
55
|
+
"deeplink": CorePlugin.deeplink ?? nil
|
49
56
|
])
|
50
57
|
}
|
51
58
|
|
52
59
|
@objc func finish(_ call: CAPPluginCall) {
|
53
60
|
|
54
61
|
print("CorePlugin finish")
|
55
|
-
|
62
|
+
|
56
63
|
DispatchQueue.main.async {
|
57
64
|
self.bridge?.viewController?.dismiss(animated: true);
|
58
65
|
}
|
@@ -69,27 +76,35 @@ public class CorePlugin: CAPPlugin {
|
|
69
76
|
@objc func openBrowser(_ call: CAPPluginCall) {
|
70
77
|
|
71
78
|
print("CorePlugin openBrowser")
|
72
|
-
|
79
|
+
|
73
80
|
let url = call.getString("url")
|
74
81
|
|
75
82
|
|
76
83
|
if(url == nil){
|
77
84
|
return
|
78
85
|
}
|
79
|
-
|
86
|
+
|
80
87
|
let member = call.getObject("member")
|
81
|
-
|
88
|
+
let deeplink = call.getObject("deeplink")
|
89
|
+
let externalProtocols = call.getArray("externalProtocols")
|
90
|
+
|
82
91
|
DispatchQueue.main.async {
|
83
92
|
|
84
93
|
let bridgeVC = WebContainerViewController()
|
85
94
|
|
86
95
|
var options = [String: AnyObject]()
|
87
96
|
options["url"] = url as AnyObject;
|
88
|
-
|
97
|
+
|
89
98
|
if(member != nil){
|
90
99
|
options["member"] = member as AnyObject;
|
91
100
|
}
|
92
|
-
|
101
|
+
if(deeplink != nil){
|
102
|
+
options["deeplink"] = deeplink as AnyObject;
|
103
|
+
}
|
104
|
+
if (externalProtocols != nil) {
|
105
|
+
options["externalProtocols"] = externalProtocols as AnyObject
|
106
|
+
}
|
107
|
+
|
93
108
|
bridgeVC.options = options;
|
94
109
|
|
95
110
|
bridgeVC.modalPresentationStyle = .fullScreen
|
@@ -104,6 +119,44 @@ public class CorePlugin: CAPPlugin {
|
|
104
119
|
])
|
105
120
|
}
|
106
121
|
|
122
|
+
@objc func isInstalledApp(_ call: CAPPluginCall) {
|
123
|
+
if let url = call.getString("key"), let URL_ = URL(string: url) {
|
124
|
+
let can = UIApplication.shared.canOpenURL(URL_)
|
125
|
+
call.resolve([
|
126
|
+
"install": can
|
127
|
+
])
|
128
|
+
}else {
|
129
|
+
call.reject("key is missing or is invaild key")
|
130
|
+
return
|
131
|
+
}
|
132
|
+
}
|
133
|
+
@objc func getIsProductionEnvironment(_ call: CAPPluginCall) {
|
134
|
+
call.resolve([
|
135
|
+
"isPrd": true
|
136
|
+
])
|
137
|
+
}
|
138
|
+
|
139
|
+
@objc func openExternalUrl(_ call: CAPPluginCall) {
|
140
|
+
if let url = call.getString("url"), let URL_ = URL(string: url) {
|
141
|
+
let can = UIApplication.shared.canOpenURL(URL_)
|
142
|
+
if !can {
|
143
|
+
call.reject("cannot open the url:\(url)")
|
144
|
+
return;
|
145
|
+
}
|
146
|
+
if #available(iOS 10.0, *) {
|
147
|
+
UIApplication.shared.open(URL_, options: [:], completionHandler: nil)
|
148
|
+
} else {
|
149
|
+
UIApplication.shared.openURL(URL_)
|
150
|
+
}
|
151
|
+
call.resolve([
|
152
|
+
"open": true
|
153
|
+
])
|
154
|
+
|
155
|
+
}else {
|
156
|
+
call.reject("url is missing or is invaild url")
|
157
|
+
return
|
158
|
+
}
|
159
|
+
}
|
107
160
|
|
108
161
|
|
109
162
|
|
@@ -0,0 +1,83 @@
|
|
1
|
+
//
|
2
|
+
// WebContainer.swift
|
3
|
+
// AigensSdkCore
|
4
|
+
//
|
5
|
+
// Created by 陈培爵 on 2022/6/7.
|
6
|
+
//
|
7
|
+
|
8
|
+
import UIKit
|
9
|
+
|
10
|
+
class WebContainer: UIView {
|
11
|
+
@IBOutlet weak var activity: UIActivityIndicatorView!
|
12
|
+
|
13
|
+
@IBOutlet weak var errorWrapper: UIView!
|
14
|
+
|
15
|
+
@IBOutlet weak var errorTextView: UITextView!
|
16
|
+
|
17
|
+
public weak var vc: WebContainerViewController?
|
18
|
+
|
19
|
+
public func setTheme(_ color: String) {
|
20
|
+
if let color = UIColor.getHex(hex: color) {
|
21
|
+
self.backgroundColor = color
|
22
|
+
}
|
23
|
+
}
|
24
|
+
override func awakeFromNib() {
|
25
|
+
super.awakeFromNib()
|
26
|
+
print("awakeFromNib")
|
27
|
+
}
|
28
|
+
|
29
|
+
private func hiddenSelf() {
|
30
|
+
self.alpha = 1.0
|
31
|
+
UIView.animate(withDuration: 0.5, animations: {
|
32
|
+
self.alpha = 0
|
33
|
+
})
|
34
|
+
}
|
35
|
+
|
36
|
+
public func showLoading(_ show: Bool) {
|
37
|
+
if show {
|
38
|
+
self.alpha = 1.0
|
39
|
+
activity.isHidden = false
|
40
|
+
activity.backgroundColor = .clear
|
41
|
+
activity.color = .darkGray
|
42
|
+
activity.alpha = 1.0
|
43
|
+
}else {
|
44
|
+
hiddenSelf()
|
45
|
+
activity?.isHidden = true
|
46
|
+
}
|
47
|
+
}
|
48
|
+
public func showError(_ show: Bool, _ error: String? = nil) {
|
49
|
+
if let e = error {
|
50
|
+
errorTextView?.text = e
|
51
|
+
}
|
52
|
+
if show {
|
53
|
+
errorWrapper?.isHidden = false
|
54
|
+
self.alpha = 1.0
|
55
|
+
}else {
|
56
|
+
errorWrapper?.isHidden = true
|
57
|
+
self.alpha = 0
|
58
|
+
}
|
59
|
+
|
60
|
+
}
|
61
|
+
|
62
|
+
/*
|
63
|
+
// Only override draw() if you perform custom drawing.
|
64
|
+
// An empty implementation adversely affects performance during animation.
|
65
|
+
override func draw(_ rect: CGRect) {
|
66
|
+
// Drawing code
|
67
|
+
}
|
68
|
+
*/
|
69
|
+
@IBAction func dismiss(_ sender: UIButton) {
|
70
|
+
self.vc?.dismiss(animated: true);
|
71
|
+
}
|
72
|
+
|
73
|
+
@IBAction func reload(_ sender: UIButton) {
|
74
|
+
self.vc?.webView?.reload()
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
extension WebContainer {
|
79
|
+
class func webContainer() -> WebContainer {
|
80
|
+
let bundle = Bundle(for: WebContainer.self)
|
81
|
+
return bundle.loadNibNamed("WebContainer", owner: self, options: nil)?.first as! WebContainer
|
82
|
+
}
|
83
|
+
}
|
@@ -0,0 +1,113 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
3
|
+
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
4
|
+
<dependencies>
|
5
|
+
<deployment identifier="iOS"/>
|
6
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
|
7
|
+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
8
|
+
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
9
|
+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
10
|
+
</dependencies>
|
11
|
+
<objects>
|
12
|
+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
13
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
14
|
+
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="WebContainer" customModule="Plugin" customModuleProvider="target">
|
15
|
+
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
16
|
+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
17
|
+
<subviews>
|
18
|
+
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" animating="YES" style="large" translatesAutoresizingMaskIntoConstraints="NO" id="QRW-cT-ZYH">
|
19
|
+
<rect key="frame" x="188.5" y="119" width="37" height="37"/>
|
20
|
+
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
21
|
+
<color key="color" systemColor="secondaryLabelColor"/>
|
22
|
+
</activityIndicatorView>
|
23
|
+
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9XO-W2-mxO" userLabel="errorWrapper">
|
24
|
+
<rect key="frame" x="0.0" y="206" width="414" height="690"/>
|
25
|
+
<subviews>
|
26
|
+
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XSc-rN-cN8">
|
27
|
+
<rect key="frame" x="206.5" y="560" width="1" height="100"/>
|
28
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
29
|
+
<constraints>
|
30
|
+
<constraint firstAttribute="width" constant="1" id="JtJ-kb-hPE"/>
|
31
|
+
<constraint firstAttribute="height" constant="100" id="SFb-3i-Gvl"/>
|
32
|
+
</constraints>
|
33
|
+
</view>
|
34
|
+
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Rie-2B-ejA" userLabel="reload">
|
35
|
+
<rect key="frame" x="237.5" y="579" width="70" height="31"/>
|
36
|
+
<color key="backgroundColor" systemColor="linkColor"/>
|
37
|
+
<state key="normal" title="Button"/>
|
38
|
+
<buttonConfiguration key="configuration" style="filled" title="Reload">
|
39
|
+
<color key="baseForegroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
40
|
+
</buttonConfiguration>
|
41
|
+
<connections>
|
42
|
+
<action selector="reload:" destination="iN0-l3-epB" eventType="touchUpInside" id="PwX-vF-t6u"/>
|
43
|
+
</connections>
|
44
|
+
</button>
|
45
|
+
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" text="Got some errors, please try again later." textAlignment="center" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8vI-mF-YrJ">
|
46
|
+
<rect key="frame" x="30" y="30" width="354" height="519"/>
|
47
|
+
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
48
|
+
<color key="textColor" systemColor="systemPinkColor"/>
|
49
|
+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
50
|
+
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
51
|
+
</textView>
|
52
|
+
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3jG-Lv-8dD" userLabel="back">
|
53
|
+
<rect key="frame" x="120.5" y="579" width="70" height="31"/>
|
54
|
+
<color key="backgroundColor" systemColor="linkColor"/>
|
55
|
+
<state key="normal" title="Button"/>
|
56
|
+
<buttonConfiguration key="configuration" style="filled" title="Back">
|
57
|
+
<color key="baseForegroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
58
|
+
</buttonConfiguration>
|
59
|
+
<connections>
|
60
|
+
<action selector="dismiss:" destination="iN0-l3-epB" eventType="touchUpInside" id="uVj-47-Wse"/>
|
61
|
+
</connections>
|
62
|
+
</button>
|
63
|
+
</subviews>
|
64
|
+
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
65
|
+
<constraints>
|
66
|
+
<constraint firstItem="8vI-mF-YrJ" firstAttribute="leading" secondItem="9XO-W2-mxO" secondAttribute="leading" constant="30" id="AS7-Ga-vyq"/>
|
67
|
+
<constraint firstItem="Rie-2B-ejA" firstAttribute="leading" secondItem="XSc-rN-cN8" secondAttribute="trailing" constant="30" id="CyI-hc-XkI"/>
|
68
|
+
<constraint firstItem="3jG-Lv-8dD" firstAttribute="bottom" secondItem="Rie-2B-ejA" secondAttribute="bottom" id="HAh-cE-mQ6"/>
|
69
|
+
<constraint firstItem="XSc-rN-cN8" firstAttribute="leading" secondItem="3jG-Lv-8dD" secondAttribute="trailing" constant="30" id="PAe-EE-twu"/>
|
70
|
+
<constraint firstAttribute="bottom" secondItem="XSc-rN-cN8" secondAttribute="bottom" constant="30" id="RPJ-VJ-HXw"/>
|
71
|
+
<constraint firstAttribute="bottom" secondItem="3jG-Lv-8dD" secondAttribute="bottom" constant="80" id="Upv-ms-zNA"/>
|
72
|
+
<constraint firstItem="8vI-mF-YrJ" firstAttribute="top" secondItem="9XO-W2-mxO" secondAttribute="top" constant="30" id="YIP-1g-G6E"/>
|
73
|
+
<constraint firstItem="3jG-Lv-8dD" firstAttribute="top" secondItem="8vI-mF-YrJ" secondAttribute="bottom" constant="30" id="aeR-w6-BjA"/>
|
74
|
+
<constraint firstItem="8vI-mF-YrJ" firstAttribute="centerX" secondItem="9XO-W2-mxO" secondAttribute="centerX" id="kmK-Va-dvk"/>
|
75
|
+
<constraint firstAttribute="trailing" secondItem="8vI-mF-YrJ" secondAttribute="trailing" constant="30" id="mUr-wg-3M2"/>
|
76
|
+
<constraint firstItem="XSc-rN-cN8" firstAttribute="centerX" secondItem="9XO-W2-mxO" secondAttribute="centerX" id="pNO-0x-6Wm"/>
|
77
|
+
</constraints>
|
78
|
+
</view>
|
79
|
+
</subviews>
|
80
|
+
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
|
81
|
+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
82
|
+
<constraints>
|
83
|
+
<constraint firstItem="QRW-cT-ZYH" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="75" id="R5H-tF-5z7"/>
|
84
|
+
<constraint firstItem="9XO-W2-mxO" firstAttribute="top" secondItem="QRW-cT-ZYH" secondAttribute="bottom" constant="50" id="X4C-yj-HyP"/>
|
85
|
+
<constraint firstAttribute="bottom" secondItem="9XO-W2-mxO" secondAttribute="bottom" id="cOL-UR-HYb"/>
|
86
|
+
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="9XO-W2-mxO" secondAttribute="trailing" id="fAe-qZ-xE4"/>
|
87
|
+
<constraint firstItem="9XO-W2-mxO" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="haw-0Q-SQQ"/>
|
88
|
+
<constraint firstItem="QRW-cT-ZYH" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="lwz-JW-uoD"/>
|
89
|
+
</constraints>
|
90
|
+
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
91
|
+
<connections>
|
92
|
+
<outlet property="activity" destination="QRW-cT-ZYH" id="fKy-zs-iDE"/>
|
93
|
+
<outlet property="errorTextView" destination="8vI-mF-YrJ" id="4uw-Iq-Axh"/>
|
94
|
+
<outlet property="errorWrapper" destination="9XO-W2-mxO" id="ipj-rF-hT1"/>
|
95
|
+
</connections>
|
96
|
+
<point key="canvasLocation" x="137.68115942028987" y="102.45535714285714"/>
|
97
|
+
</view>
|
98
|
+
</objects>
|
99
|
+
<resources>
|
100
|
+
<systemColor name="linkColor">
|
101
|
+
<color red="0.0" green="0.47843137254901963" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
102
|
+
</systemColor>
|
103
|
+
<systemColor name="secondaryLabelColor">
|
104
|
+
<color red="0.23529411764705882" green="0.23529411764705882" blue="0.2627450980392157" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
|
105
|
+
</systemColor>
|
106
|
+
<systemColor name="systemBackgroundColor">
|
107
|
+
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
108
|
+
</systemColor>
|
109
|
+
<systemColor name="systemPinkColor">
|
110
|
+
<color red="1" green="0.17647058823529413" blue="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
111
|
+
</systemColor>
|
112
|
+
</resources>
|
113
|
+
</document>
|