metamap-capacitor-plugin 3.2.1 → 3.3.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
@@ -18,19 +18,19 @@ You can go to GitHub to download the [Metamap Capacitor demo app](https://github
18
18
  The following instructions use command line tools to install Metamap for Capacitor to your existing Capacitor application.
19
19
 
20
20
  1. Use the following CLI to install Metamap for your Capacitor project.
21
-
22
- ```bash
23
- npm i @aposnovmati/mati-capacitor-plugin
24
- ```
21
+ ```bash
22
+ npm i metamap-capacitor-plugin
23
+ ```
25
24
 
26
25
  1. Build your application.
27
- ```bash
28
- ionic build
29
- ```
26
+ ```bash
27
+ ionic build
28
+ ```
29
+
30
30
  1. Update the Capacitor files.
31
- ```bash
32
- npx cap sync
33
- ```
31
+ ```bash
32
+ npx cap sync
33
+ ```
34
34
 
35
35
  ## Add the Metamap Button
36
36
 
@@ -39,15 +39,15 @@ Add the Metamap button to your application's HTML and JavaScript files.
39
39
  `your_index.html`
40
40
 
41
41
  ```html
42
- <ion-content>
43
- <ion-button className="matiButtonCss" (click)="showMatiFlow()">Show MatiFlow
44
- </ion-button>
45
- </ion-content>
42
+ <ion-content>
43
+ <ion-button className="matiButtonCss" (click)="showMatiFlow()">Show MatiFlow
44
+ </ion-button>
45
+ </ion-content>
46
46
  ```
47
47
 
48
48
  `your_index.ts`
49
49
 
50
- ```typescript
50
+ ```json
51
51
  import { Component } from '@angular/core';
52
52
 
53
53
  import { MatiCapacitor } from "@aposnovmati/mati-capacitor-plugin";
@@ -69,27 +69,74 @@ export class HomePage {
69
69
  .catch(() => console.log("verification cancelled"))
70
70
  }
71
71
  }
72
-
73
72
  ```
74
73
 
75
74
  ## Launch for Android
76
75
 
77
- Run the following command to launch the application for Android:
78
76
  ```bash
79
77
  ionic capacitor run android
80
78
  ```
81
79
 
82
80
  # Launch for iOS
83
- To launch the application for iOS, you need to do the following:
84
81
 
85
82
  1. Set minimum iOS version in `capacitor.config.json`
86
- ```json
83
+ ```json
87
84
  "ios": {
88
- "minVersion": "11.4"
85
+ "minVersion": "12.0"
89
86
  }
90
- ```
87
+ ```
88
+
89
+ 1. Add the following to info.plist:
90
+ ```bash
91
+ <key>NSCameraUsageDescription</key>
92
+ <string>MetaMap verification SDK requires camera use</string>
93
+
94
+ <key>NSMicrophoneUsageDescription</key>
95
+ <string>MetaMap verification SDK requires microphone use</string>
96
+
97
+ <key>NSPhotoLibraryUsageDescription</key>
98
+ <string>MetaMap verification SDK requires access to media library</string>
99
+
100
+ <key>NSLocationWhenInUseUsageDescription</key>
101
+ <string>MetaMap will use your location information to provide best possible verification experience.</string>
102
+
103
+ <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
104
+ <string>MetaMap will use your location information to provide best possible verification experience.</string>
105
+
106
+ <key>NSLocationAlwaysUsageDescription</key>
107
+ <string>MetaMap will use your location information to provide best possible verification experience.</string>
108
+ ```
91
109
 
92
110
  1. Launch the application for iOS
93
- ```bash
94
- ionic capacitor run ios
95
- ```
111
+ ```bash
112
+ ionic capacitor run ios
113
+ ```
114
+
115
+ ## Metadata is an additional optional parameters:
116
+
117
+ 1. Set the Language:
118
+ ```bash
119
+ metadata: {"fixedLanguage": "es"}
120
+ ```
121
+
122
+ 1. Set the Button Color:
123
+ ```bash
124
+ metadata: {"buttonColor": "hexColor"}
125
+ ```
126
+
127
+ 1. Set the Title color of the button:
128
+ ```bash
129
+ metadata: {"buttonTextColor": "hexColor"}
130
+ ```
131
+
132
+ 1. Set identity Id as parameter for re-verification:
133
+ ```bash
134
+ metadata: {"identityId": "value"}
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.1",
3
+ "version": "3.3.0",
4
4
  "description": "Capacitor plugin for MetaMapSDK",
5
5
  "main": "dist/plugin.js",
6
6
  "module": "dist/esm/index.js",