metamap-capacitor-plugin 1.0.3 → 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/README.md +72 -16
- package/android/build.gradle +1 -3
- package/package.json +3 -6
- package/Avo121MatiCapacitorPlugin.podspec +0 -18
package/README.md
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
title: "Capacitor"
|
|
3
|
+
excerpt: "Add the MetaMap button to your Capacitor app."
|
|
4
|
+
slug: "capacitor-sdk"
|
|
5
|
+
category: 61ae8e8dba577a0010791480
|
|
6
|
+
---
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
# MetaMap for Capacitor Usage Guide
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
The following instructions use command line tools to install MetaMap for Capacitor to your existing Capacitor application.
|
|
11
|
+
|
|
12
|
+
1. Use the following CLI to install MetaMap for your Capacitor project.
|
|
6
13
|
```bash
|
|
7
14
|
npm i metamap-capacitor-plugin
|
|
8
15
|
```
|
|
@@ -13,18 +20,18 @@ ionic build
|
|
|
13
20
|
```
|
|
14
21
|
3. Update the Capacitor files.
|
|
15
22
|
```bash
|
|
16
|
-
|
|
23
|
+
npx cap sync
|
|
17
24
|
```
|
|
18
25
|
|
|
19
26
|
4. Add the MetaMap button to your application's HTML and JavaScript files.
|
|
20
27
|
|
|
21
28
|
`your_index.html`
|
|
22
29
|
|
|
23
|
-
```
|
|
24
|
-
|
|
30
|
+
```html
|
|
31
|
+
<ion-content>
|
|
25
32
|
<ion-button className="metaMapButtonCss" (click)="showMetaMapFlow()">Show MetaMapFlow
|
|
26
33
|
</ion-button>
|
|
27
|
-
|
|
34
|
+
</ion-content>
|
|
28
35
|
```
|
|
29
36
|
|
|
30
37
|
`your_index.ts`
|
|
@@ -32,7 +39,7 @@ ionic build
|
|
|
32
39
|
```bash
|
|
33
40
|
import { Component } from '@angular/core';
|
|
34
41
|
|
|
35
|
-
import { MetaMapCapacitor } from "
|
|
42
|
+
import { MetaMapCapacitor } from "metamap-capacitor-plugin";
|
|
36
43
|
|
|
37
44
|
@Component({
|
|
38
45
|
selector: 'app-home',
|
|
@@ -55,22 +62,71 @@ export class HomePage {
|
|
|
55
62
|
|
|
56
63
|
## Launch for Android
|
|
57
64
|
|
|
58
|
-
Run the following command to launch the application for Android:
|
|
65
|
+
1. Run the following command to launch the application for Android:
|
|
59
66
|
```bash
|
|
60
67
|
ionic capacitor run android
|
|
61
68
|
```
|
|
62
69
|
|
|
63
70
|
# Launch for iOS
|
|
64
|
-
To launch the application for iOS, you need to do the following:
|
|
65
71
|
|
|
66
72
|
1. Set minimum iOS version in `capacitor.config.json`
|
|
73
|
+
```bash
|
|
74
|
+
"ios": {
|
|
75
|
+
"minVersion": "12.0"
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
2. Add the following to info.plist:
|
|
67
80
|
```bash
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
81
|
+
<key>NSCameraUsageDescription</key>
|
|
82
|
+
<string>MetaMap verification SDK requires camera use</string>
|
|
83
|
+
|
|
84
|
+
<key>NSMicrophoneUsageDescription</key>
|
|
85
|
+
<string>MetaMap verification SDK requires microphone use</string>
|
|
86
|
+
|
|
87
|
+
<key>NSPhotoLibraryUsageDescription</key>
|
|
88
|
+
<string>MetaMap verification SDK requires access to media library</string>
|
|
72
89
|
|
|
73
|
-
|
|
90
|
+
<key>NSLocationWhenInUseUsageDescription</key>
|
|
91
|
+
<string>MetaMap will use your location information to provide best possible verification experience.</string>
|
|
92
|
+
|
|
93
|
+
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
|
|
94
|
+
<string>MetaMap will use your location information to provide best possible verification experience.</string>
|
|
95
|
+
|
|
96
|
+
<key>NSLocationAlwaysUsageDescription</key>
|
|
97
|
+
<string>MetaMap will use your location information to provide best possible verification experience.</string>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
3. Launch the application for iOS
|
|
74
101
|
```bash
|
|
75
102
|
ionic capacitor run ios
|
|
76
|
-
|
|
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:
|
|
111
|
+
|
|
112
|
+
4.1. Set the Language:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
metadata: {"fixedLanguage": "es"}
|
|
116
|
+
```
|
|
117
|
+
4.2. Set the Button Color:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
metadata: {"buttonColor": "hexColor"}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
4.3. Set the Title color of the button:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
metadata: {"buttonTextColor": "hexColor"}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
4.4. Set identity Id as parameter for re-verification:
|
|
130
|
+
```bash
|
|
131
|
+
metadata: {"identityId": "value"}
|
|
132
|
+
```
|
package/android/build.gradle
CHANGED
|
@@ -51,7 +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.
|
|
55
|
-
exclude group: 'org.json', module: 'json'
|
|
56
|
-
}
|
|
54
|
+
implementation ('com.metamap:android-sdk:3.22.5')
|
|
57
55
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "metamap-capacitor-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Capacitor plugin for MetaMapSDK",
|
|
5
5
|
"main": "dist/plugin.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -59,17 +59,14 @@
|
|
|
59
59
|
"swiftlint": "@ionic/swiftlint-config",
|
|
60
60
|
"repository": {
|
|
61
61
|
"type": "git",
|
|
62
|
-
"url": "
|
|
62
|
+
"url": "https://github.com/GetMetaMap/mati-capacitor-plugin"
|
|
63
63
|
},
|
|
64
64
|
"bugs": {
|
|
65
65
|
"url": "https://github.com/GetMetaMap/mati-capacitor-plugin/issues"
|
|
66
66
|
},
|
|
67
67
|
"homepage": "https://github.com/GetMetaMap/mati-capacitor-plugin/blob/main/docs/mati-capacitor.md",
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"metamap-capacitor-plugin": "^1.0.
|
|
69
|
+
"metamap-capacitor-plugin": "^1.0.3",
|
|
70
70
|
"@capacitor/cli": "^3.3.2"
|
|
71
|
-
},
|
|
72
|
-
"directories": {
|
|
73
|
-
"doc": "docs"
|
|
74
71
|
}
|
|
75
72
|
}
|
|
@@ -1,18 +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 = 'Avo121MatiCapacitorPlugin'
|
|
7
|
-
s.version = package['version']
|
|
8
|
-
s.summary = package['description']
|
|
9
|
-
s.license = package['license']
|
|
10
|
-
s.homepage = package['repository']['url']
|
|
11
|
-
s.author = package['author']
|
|
12
|
-
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
|
-
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
-
s.ios.deployment_target = '12.0'
|
|
15
|
-
s.dependency 'Capacitor'
|
|
16
|
-
s.dependency 'MetaMap-Global-ID-SDK'
|
|
17
|
-
s.swift_version = '5.1'
|
|
18
|
-
end
|