metamap-capacitor-plugin 1.0.0 → 1.0.3

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/README.md CHANGED
@@ -1,5 +1,76 @@
1
- # MetaMap for Capacitor
1
+ ## Install MetaMap for Capacitor
2
2
 
3
- The MetaMap for Capacitor usage guide can be found in the following location:
4
- * [MetaMap for Capacitor Usage Guide](docs/metaMap-capacitor.md)
3
+ Use the following CLI to install MetaMap for your Capacitor project.
5
4
 
5
+ 1. Install the SDK:
6
+ ```bash
7
+ npm i metamap-capacitor-plugin
8
+ ```
9
+
10
+ 2. Build your application.
11
+ ```bash
12
+ ionic build
13
+ ```
14
+ 3. Update the Capacitor files.
15
+ ```bash
16
+ npx cap sync
17
+ ```
18
+
19
+ 4. Add the MetaMap button to your application's HTML and JavaScript files.
20
+
21
+ `your_index.html`
22
+
23
+ ```bash
24
+ <ion-content>
25
+ <ion-button className="metaMapButtonCss" (click)="showMetaMapFlow()">Show MetaMapFlow
26
+ </ion-button>
27
+ </ion-content>
28
+ ```
29
+
30
+ `your_index.ts`
31
+
32
+ ```bash
33
+ import { Component } from '@angular/core';
34
+
35
+ import { MetaMapCapacitor } from "@avo121/mati-capacitor-plugin";
36
+
37
+ @Component({
38
+ selector: 'app-home',
39
+ templateUrl: 'home.page.html',
40
+ styleUrls: ['home.page.scss'],
41
+ })
42
+ export class HomePage {
43
+ constructor() {}
44
+
45
+ showMetaMapFlow() {
46
+ let metadataParams = { param1: "value1" };
47
+ let registerParams = { clientId: "YOUR_CLIENT_ID", flowId: "YOUR_FLOW_ID", metadata: metadataParams};
48
+
49
+ MetaMapCapacitor.showMetaMapFlow(registerParams)
50
+ .then( verification => console.log("verification success:" + verification.verificationId))
51
+ .catch(() => console.log("verification cancelled"))
52
+ }
53
+ }
54
+ ```
55
+
56
+ ## Launch for Android
57
+
58
+ Run the following command to launch the application for Android:
59
+ ```bash
60
+ ionic capacitor run android
61
+ ```
62
+
63
+ # Launch for iOS
64
+ To launch the application for iOS, you need to do the following:
65
+
66
+ 1. Set minimum iOS version in `capacitor.config.json`
67
+ ```bash
68
+ "ios": {
69
+ "minVersion": "12.0"
70
+ }
71
+ ```
72
+
73
+ 1. Launch the application for iOS
74
+ ```bash
75
+ ionic capacitor run ios
76
+ ```
@@ -51,7 +51,7 @@ dependencies {
51
51
  implementation fileTree(dir: 'libs', include: ['*.jar'])
52
52
  implementation project(':capacitor-android')
53
53
  implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
54
- implementation ('com.metamap:android-sdk:3.19.1'){
54
+ implementation ('com.metamap:android-sdk:3.20.0'){
55
55
  exclude group: 'org.json', module: 'json'
56
56
  }
57
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "metamap-capacitor-plugin",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "Capacitor plugin for MetaMapSDK",
5
5
  "main": "dist/plugin.js",
6
6
  "module": "dist/esm/index.js",