metamap-capacitor-plugin 3.2.0 → 3.4.0

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,42 +1,53 @@
1
1
  ---
2
2
  title: "Capacitor"
3
- excerpt: "Add the MetaMap button to your Capacitor app."
4
- slug: "capacitor-sdk"
5
- category: 61ae8e8dba577a0010791480
3
+ excerpt: "Add the Metamap button to your Capacitor app."
4
+ slug: "mobile-sdks"
5
+ category: 61141a8437375100442f3d20
6
6
  ---
7
7
 
8
- # MetaMap for Capacitor Usage Guide
8
+ # Metamap for Capacitor Usage Guide
9
9
 
10
- The following instructions use command line tools to install MetaMap for Capacitor to your existing Capacitor application.
10
+ This is a guide to implement Metamap in the [Ionic Capacitor framework](https://capacitorjs.com/docs).
11
11
 
12
- 1. Use the following CLI to install MetaMap for your Capacitor project.
12
+ ## Capacitor Demo App
13
+
14
+ You can go to GitHub to download the [Metamap Capacitor demo app](https://github.com/GetMati/mati-mobile-examples/tree/main/capacitorDemoApp).
15
+
16
+ ## Install Metamap for Capacitor
17
+
18
+ The following instructions use command line tools to install Metamap for Capacitor to your existing Capacitor application.
19
+
20
+ 1. Use the following CLI to install Metamap for your Capacitor project.
13
21
  ```bash
14
22
  npm i metamap-capacitor-plugin
15
- ```
23
+ ```
16
24
 
17
- 2. Build your application.
25
+ 1. Build your application.
18
26
  ```bash
19
27
  ionic build
20
- ```
21
- 3. Update the Capacitor files.
28
+ ```
29
+
30
+ 1. Update the Capacitor files.
22
31
  ```bash
23
32
  npx cap sync
24
- ```
33
+ ```
34
+
35
+ ## Add the Metamap Button
25
36
 
26
- 4. Add the MetaMap button to your application's HTML and JavaScript files.
37
+ Add the Metamap button to your application's HTML and JavaScript files.
27
38
 
28
39
  `your_index.html`
29
40
 
30
41
  ```html
31
42
  <ion-content>
32
- <ion-button className="metaMapButtonCss" (click)="showMetaMapFlow()">Show MetaMapFlow
33
- </ion-button>
43
+ <ion-button className="matiButtonCss" (click)="showMatiFlow()">Show MatiFlow
44
+ </ion-button>
34
45
  </ion-content>
35
46
  ```
36
47
 
37
- `your_index.ts`
48
+ `your_index.ts`
38
49
 
39
- ```bash
50
+ ```json
40
51
  import { Component } from '@angular/core';
41
52
 
42
53
  import { MetaMapCapacitor } from "metamap-capacitor-plugin";
@@ -49,11 +60,11 @@ import { MetaMapCapacitor } from "metamap-capacitor-plugin";
49
60
  export class HomePage {
50
61
  constructor() {}
51
62
 
52
- showMetaMapFlow() {
63
+ showMatiFlow() {
53
64
  let metadataParams = { param1: "value1" };
54
- let registerParams = { clientId: "YOUR_CLIENT_ID", flowId: "YOUR_FLOW_ID", metadata: metadataParams};
65
+ let registerParams = { clientId: "5c94e3c401ddc6001be83c07", flowId: "5e962a23728ddc001b5937aa", metadata: metadataParams};
55
66
 
56
- MetaMapCapacitor.showMetaMapFlow(registerParams)
67
+ MatiCapacitor.showMatiFlow(registerParams)
57
68
  .then( verification => console.log("verification success:" + verification.verificationId))
58
69
  .catch(() => console.log("verification cancelled"))
59
70
  }
@@ -62,7 +73,6 @@ export class HomePage {
62
73
 
63
74
  ## Launch for Android
64
75
 
65
- 1. Run the following command to launch the application for Android:
66
76
  ```bash
67
77
  ionic capacitor run android
68
78
  ```
@@ -70,63 +80,63 @@ ionic capacitor run android
70
80
  # Launch for iOS
71
81
 
72
82
  1. Set minimum iOS version in `capacitor.config.json`
73
- ```bash
74
- "ios": {
75
- "minVersion": "12.0"
76
- }
83
+ ```json
84
+ "ios": {
85
+ "minVersion": "12.0"
86
+ }
77
87
  ```
78
88
 
79
- 2. Add the following to info.plist:
89
+ 1. Add the following to info.plist:
80
90
  ```bash
81
- <key>NSCameraUsageDescription</key>
82
- <string>MetaMap verification SDK requires camera use</string>
91
+ <key>NSCameraUsageDescription</key>
92
+ <string>MetaMap verification SDK requires camera use</string>
83
93
 
84
- <key>NSMicrophoneUsageDescription</key>
85
- <string>MetaMap verification SDK requires microphone use</string>
94
+ <key>NSMicrophoneUsageDescription</key>
95
+ <string>MetaMap verification SDK requires microphone use</string>
86
96
 
87
- <key>NSPhotoLibraryUsageDescription</key>
88
- <string>MetaMap verification SDK requires access to media library</string>
97
+ <key>NSPhotoLibraryUsageDescription</key>
98
+ <string>MetaMap verification SDK requires access to media library</string>
89
99
 
90
- <key>NSLocationWhenInUseUsageDescription</key>
91
- <string>MetaMap will use your location information to provide best possible verification experience.</string>
100
+ <key>NSLocationWhenInUseUsageDescription</key>
101
+ <string>MetaMap will use your location information to provide best possible verification experience.</string>
92
102
 
93
- <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
94
- <string>MetaMap will use your location information to provide best possible verification experience.</string>
103
+ <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
104
+ <string>MetaMap will use your location information to provide best possible verification experience.</string>
95
105
 
96
- <key>NSLocationAlwaysUsageDescription</key>
97
- <string>MetaMap will use your location information to provide best possible verification experience.</string>
98
- ```
106
+ <key>NSLocationAlwaysUsageDescription</key>
107
+ <string>MetaMap will use your location information to provide best possible verification experience.</string>
108
+ ```
99
109
 
100
- 3. Launch the application for iOS
110
+ 1. Launch the application for iOS
101
111
  ```bash
102
112
  ionic capacitor run ios
103
- ```
104
-
105
- 3. Launch the application for android
106
- ```bash
107
- ionic capacitor run android
108
- ```
109
-
110
- 4. ## Metadata is an additional optional parameters:
113
+ ```
111
114
 
112
- 4.1. Set the Language:
115
+ ## Metadata is an additional optional parameters:
113
116
 
117
+ 1. Set the Language:
114
118
  ```bash
115
119
  metadata: {"fixedLanguage": "es"}
116
120
  ```
117
- 4.2. Set the Button Color:
118
121
 
122
+ 1. Set the Button Color:
119
123
  ```bash
120
124
  metadata: {"buttonColor": "hexColor"}
121
- ```
122
-
123
- 4.3. Set the Title color of the button:
125
+ ```
124
126
 
127
+ 1. Set the Title color of the button:
125
128
  ```bash
126
129
  metadata: {"buttonTextColor": "hexColor"}
127
130
  ```
128
-
129
- 4.4. Set identity Id as parameter for re-verification:
131
+
132
+ 1. Set identity Id as parameter for re-verification:
130
133
  ```bash
131
134
  metadata: {"identityId": "value"}
132
- ```
135
+ ```
136
+
137
+
138
+ ## Some error codes you may get during integration
139
+
140
+ `402` - MetaMap services are not paid: please contact your customer success manager
141
+
142
+ `403` - MetaMap credentials issues: please check your client id and MetaMap id
@@ -51,5 +51,5 @@ 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.22.5')
54
+ implementation ('com.metamap:android-sdk:3.22.6')
55
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "metamap-capacitor-plugin",
3
- "version": "3.2.0",
3
+ "version": "3.4.0",
4
4
  "description": "Capacitor plugin for MetaMapSDK",
5
5
  "main": "dist/plugin.js",
6
6
  "module": "dist/esm/index.js",