@capawesome/capacitor-sim 0.0.1
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/CapawesomeCapacitorSim.podspec +17 -0
- package/LICENSE +21 -0
- package/Package.swift +28 -0
- package/README.md +202 -0
- package/android/build.gradle +58 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/sim/Sim.java +126 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/sim/SimPlugin.java +77 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/sim/classes/results/GetSimCardsResult.java +29 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/sim/classes/results/SimCard.java +68 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/sim/interfaces/Callback.java +5 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/sim/interfaces/NonEmptyResultCallback.java +7 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/sim/interfaces/Result.java +7 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/docs.json +289 -0
- package/dist/esm/definitions.d.ts +127 -0
- package/dist/esm/definitions.js +2 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +7 -0
- package/dist/esm/web.js +13 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +27 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +30 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Plugin/Info.plist +24 -0
- package/ios/Plugin/SimPlugin.swift +27 -0
- package/package.json +91 -0
package/dist/docs.json
ADDED
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
{
|
|
2
|
+
"api": {
|
|
3
|
+
"name": "SimPlugin",
|
|
4
|
+
"slug": "simplugin",
|
|
5
|
+
"docs": "",
|
|
6
|
+
"tags": [],
|
|
7
|
+
"methods": [
|
|
8
|
+
{
|
|
9
|
+
"name": "checkPermissions",
|
|
10
|
+
"signature": "() => Promise<PermissionStatus>",
|
|
11
|
+
"parameters": [],
|
|
12
|
+
"returns": "Promise<PermissionStatus>",
|
|
13
|
+
"tags": [
|
|
14
|
+
{
|
|
15
|
+
"name": "since",
|
|
16
|
+
"text": "0.1.0"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"docs": "Check the permission to read the SIM cards.\n\nOnly available on Android.",
|
|
20
|
+
"complexTypes": [
|
|
21
|
+
"PermissionStatus"
|
|
22
|
+
],
|
|
23
|
+
"slug": "checkpermissions"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "getSimCards",
|
|
27
|
+
"signature": "() => Promise<GetSimCardsResult>",
|
|
28
|
+
"parameters": [],
|
|
29
|
+
"returns": "Promise<GetSimCardsResult>",
|
|
30
|
+
"tags": [
|
|
31
|
+
{
|
|
32
|
+
"name": "since",
|
|
33
|
+
"text": "0.1.0"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"docs": "Get information about the SIM cards installed on the device.\n\nOn devices with multiple SIM slots, all active SIM cards are returned.\n\nOnly available on Android.",
|
|
37
|
+
"complexTypes": [
|
|
38
|
+
"GetSimCardsResult"
|
|
39
|
+
],
|
|
40
|
+
"slug": "getsimcards"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "requestPermissions",
|
|
44
|
+
"signature": "() => Promise<PermissionStatus>",
|
|
45
|
+
"parameters": [],
|
|
46
|
+
"returns": "Promise<PermissionStatus>",
|
|
47
|
+
"tags": [
|
|
48
|
+
{
|
|
49
|
+
"name": "since",
|
|
50
|
+
"text": "0.1.0"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"docs": "Request the permission to read the SIM cards.\n\nOnly available on Android.",
|
|
54
|
+
"complexTypes": [
|
|
55
|
+
"PermissionStatus"
|
|
56
|
+
],
|
|
57
|
+
"slug": "requestpermissions"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"properties": []
|
|
61
|
+
},
|
|
62
|
+
"interfaces": [
|
|
63
|
+
{
|
|
64
|
+
"name": "PermissionStatus",
|
|
65
|
+
"slug": "permissionstatus",
|
|
66
|
+
"docs": "",
|
|
67
|
+
"tags": [
|
|
68
|
+
{
|
|
69
|
+
"text": "0.1.0",
|
|
70
|
+
"name": "since"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"methods": [],
|
|
74
|
+
"properties": [
|
|
75
|
+
{
|
|
76
|
+
"name": "readSimCards",
|
|
77
|
+
"tags": [
|
|
78
|
+
{
|
|
79
|
+
"text": "0.1.0",
|
|
80
|
+
"name": "since"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"docs": "The permission state of reading the SIM cards.",
|
|
84
|
+
"complexTypes": [
|
|
85
|
+
"PermissionState"
|
|
86
|
+
],
|
|
87
|
+
"type": "PermissionState"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "GetSimCardsResult",
|
|
93
|
+
"slug": "getsimcardsresult",
|
|
94
|
+
"docs": "",
|
|
95
|
+
"tags": [
|
|
96
|
+
{
|
|
97
|
+
"text": "0.1.0",
|
|
98
|
+
"name": "since"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"methods": [],
|
|
102
|
+
"properties": [
|
|
103
|
+
{
|
|
104
|
+
"name": "simCards",
|
|
105
|
+
"tags": [
|
|
106
|
+
{
|
|
107
|
+
"text": "0.1.0",
|
|
108
|
+
"name": "since"
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
"docs": "The SIM cards installed on the device.",
|
|
112
|
+
"complexTypes": [
|
|
113
|
+
"SimCard"
|
|
114
|
+
],
|
|
115
|
+
"type": "SimCard[]"
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "SimCard",
|
|
121
|
+
"slug": "simcard",
|
|
122
|
+
"docs": "",
|
|
123
|
+
"tags": [
|
|
124
|
+
{
|
|
125
|
+
"text": "0.1.0",
|
|
126
|
+
"name": "since"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"methods": [],
|
|
130
|
+
"properties": [
|
|
131
|
+
{
|
|
132
|
+
"name": "carrierName",
|
|
133
|
+
"tags": [
|
|
134
|
+
{
|
|
135
|
+
"text": "'T-Mobile'",
|
|
136
|
+
"name": "example"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"text": "0.1.0",
|
|
140
|
+
"name": "since"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"docs": "The name of the carrier.\n\nReturns `null` if the carrier name is not available.",
|
|
144
|
+
"complexTypes": [],
|
|
145
|
+
"type": "string | null"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "displayName",
|
|
149
|
+
"tags": [
|
|
150
|
+
{
|
|
151
|
+
"text": "'Personal'",
|
|
152
|
+
"name": "example"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"text": "0.1.0",
|
|
156
|
+
"name": "since"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"docs": "The user-editable display name of the SIM card.\n\nReturns `null` if the display name is not available.",
|
|
160
|
+
"complexTypes": [],
|
|
161
|
+
"type": "string | null"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "isEmbedded",
|
|
165
|
+
"tags": [
|
|
166
|
+
{
|
|
167
|
+
"text": "false",
|
|
168
|
+
"name": "example"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"text": "0.1.0",
|
|
172
|
+
"name": "since"
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"docs": "Whether the SIM card is an embedded SIM (eSIM).\n\nReturns `null` if the information is not available.",
|
|
176
|
+
"complexTypes": [],
|
|
177
|
+
"type": "boolean | null"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "isoCountryCode",
|
|
181
|
+
"tags": [
|
|
182
|
+
{
|
|
183
|
+
"text": "'us'",
|
|
184
|
+
"name": "example"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"text": "0.1.0",
|
|
188
|
+
"name": "since"
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"docs": "The two-letter ISO 3166-1 country code of the carrier.\n\nReturns `null` if the country code is not available.",
|
|
192
|
+
"complexTypes": [],
|
|
193
|
+
"type": "string | null"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "mobileCountryCode",
|
|
197
|
+
"tags": [
|
|
198
|
+
{
|
|
199
|
+
"text": "'310'",
|
|
200
|
+
"name": "example"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"text": "0.1.0",
|
|
204
|
+
"name": "since"
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"docs": "The Mobile Country Code (MCC) of the carrier.\n\nReturns `null` if the mobile country code is not available.",
|
|
208
|
+
"complexTypes": [],
|
|
209
|
+
"type": "string | null"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "mobileNetworkCode",
|
|
213
|
+
"tags": [
|
|
214
|
+
{
|
|
215
|
+
"text": "'260'",
|
|
216
|
+
"name": "example"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"text": "0.1.0",
|
|
220
|
+
"name": "since"
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"docs": "The Mobile Network Code (MNC) of the carrier.\n\nReturns `null` if the mobile network code is not available.",
|
|
224
|
+
"complexTypes": [],
|
|
225
|
+
"type": "string | null"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"name": "phoneNumber",
|
|
229
|
+
"tags": [
|
|
230
|
+
{
|
|
231
|
+
"text": "'+12025550123'",
|
|
232
|
+
"name": "example"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"text": "0.1.0",
|
|
236
|
+
"name": "since"
|
|
237
|
+
}
|
|
238
|
+
],
|
|
239
|
+
"docs": "The phone number associated with the SIM card.\n\nThis value is often empty because carriers do not reliably store the\nphone number on the SIM card. In that case, `null` is returned.",
|
|
240
|
+
"complexTypes": [],
|
|
241
|
+
"type": "string | null"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"name": "slotIndex",
|
|
245
|
+
"tags": [
|
|
246
|
+
{
|
|
247
|
+
"text": "0",
|
|
248
|
+
"name": "example"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"text": "0.1.0",
|
|
252
|
+
"name": "since"
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
"docs": "The index of the SIM slot on the device.",
|
|
256
|
+
"complexTypes": [],
|
|
257
|
+
"type": "number"
|
|
258
|
+
}
|
|
259
|
+
]
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
"enums": [],
|
|
263
|
+
"typeAliases": [
|
|
264
|
+
{
|
|
265
|
+
"name": "PermissionState",
|
|
266
|
+
"slug": "permissionstate",
|
|
267
|
+
"docs": "",
|
|
268
|
+
"types": [
|
|
269
|
+
{
|
|
270
|
+
"text": "'prompt'",
|
|
271
|
+
"complexTypes": []
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"text": "'prompt-with-rationale'",
|
|
275
|
+
"complexTypes": []
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"text": "'granted'",
|
|
279
|
+
"complexTypes": []
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"text": "'denied'",
|
|
283
|
+
"complexTypes": []
|
|
284
|
+
}
|
|
285
|
+
]
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
"pluginConfigs": []
|
|
289
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import type { PermissionState } from '@capacitor/core';
|
|
2
|
+
export interface SimPlugin {
|
|
3
|
+
/**
|
|
4
|
+
* Check the permission to read the SIM cards.
|
|
5
|
+
*
|
|
6
|
+
* Only available on Android.
|
|
7
|
+
*
|
|
8
|
+
* @since 0.1.0
|
|
9
|
+
*/
|
|
10
|
+
checkPermissions(): Promise<PermissionStatus>;
|
|
11
|
+
/**
|
|
12
|
+
* Get information about the SIM cards installed on the device.
|
|
13
|
+
*
|
|
14
|
+
* On devices with multiple SIM slots, all active SIM cards are returned.
|
|
15
|
+
*
|
|
16
|
+
* Only available on Android.
|
|
17
|
+
*
|
|
18
|
+
* @since 0.1.0
|
|
19
|
+
*/
|
|
20
|
+
getSimCards(): Promise<GetSimCardsResult>;
|
|
21
|
+
/**
|
|
22
|
+
* Request the permission to read the SIM cards.
|
|
23
|
+
*
|
|
24
|
+
* Only available on Android.
|
|
25
|
+
*
|
|
26
|
+
* @since 0.1.0
|
|
27
|
+
*/
|
|
28
|
+
requestPermissions(): Promise<PermissionStatus>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @since 0.1.0
|
|
32
|
+
*/
|
|
33
|
+
export interface GetSimCardsResult {
|
|
34
|
+
/**
|
|
35
|
+
* The SIM cards installed on the device.
|
|
36
|
+
*
|
|
37
|
+
* @since 0.1.0
|
|
38
|
+
*/
|
|
39
|
+
simCards: SimCard[];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @since 0.1.0
|
|
43
|
+
*/
|
|
44
|
+
export interface SimCard {
|
|
45
|
+
/**
|
|
46
|
+
* The name of the carrier.
|
|
47
|
+
*
|
|
48
|
+
* Returns `null` if the carrier name is not available.
|
|
49
|
+
*
|
|
50
|
+
* @example 'T-Mobile'
|
|
51
|
+
* @since 0.1.0
|
|
52
|
+
*/
|
|
53
|
+
carrierName: string | null;
|
|
54
|
+
/**
|
|
55
|
+
* The user-editable display name of the SIM card.
|
|
56
|
+
*
|
|
57
|
+
* Returns `null` if the display name is not available.
|
|
58
|
+
*
|
|
59
|
+
* @example 'Personal'
|
|
60
|
+
* @since 0.1.0
|
|
61
|
+
*/
|
|
62
|
+
displayName: string | null;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the SIM card is an embedded SIM (eSIM).
|
|
65
|
+
*
|
|
66
|
+
* Returns `null` if the information is not available.
|
|
67
|
+
*
|
|
68
|
+
* @example false
|
|
69
|
+
* @since 0.1.0
|
|
70
|
+
*/
|
|
71
|
+
isEmbedded: boolean | null;
|
|
72
|
+
/**
|
|
73
|
+
* The two-letter ISO 3166-1 country code of the carrier.
|
|
74
|
+
*
|
|
75
|
+
* Returns `null` if the country code is not available.
|
|
76
|
+
*
|
|
77
|
+
* @example 'us'
|
|
78
|
+
* @since 0.1.0
|
|
79
|
+
*/
|
|
80
|
+
isoCountryCode: string | null;
|
|
81
|
+
/**
|
|
82
|
+
* The Mobile Country Code (MCC) of the carrier.
|
|
83
|
+
*
|
|
84
|
+
* Returns `null` if the mobile country code is not available.
|
|
85
|
+
*
|
|
86
|
+
* @example '310'
|
|
87
|
+
* @since 0.1.0
|
|
88
|
+
*/
|
|
89
|
+
mobileCountryCode: string | null;
|
|
90
|
+
/**
|
|
91
|
+
* The Mobile Network Code (MNC) of the carrier.
|
|
92
|
+
*
|
|
93
|
+
* Returns `null` if the mobile network code is not available.
|
|
94
|
+
*
|
|
95
|
+
* @example '260'
|
|
96
|
+
* @since 0.1.0
|
|
97
|
+
*/
|
|
98
|
+
mobileNetworkCode: string | null;
|
|
99
|
+
/**
|
|
100
|
+
* The phone number associated with the SIM card.
|
|
101
|
+
*
|
|
102
|
+
* This value is often empty because carriers do not reliably store the
|
|
103
|
+
* phone number on the SIM card. In that case, `null` is returned.
|
|
104
|
+
*
|
|
105
|
+
* @example '+12025550123'
|
|
106
|
+
* @since 0.1.0
|
|
107
|
+
*/
|
|
108
|
+
phoneNumber: string | null;
|
|
109
|
+
/**
|
|
110
|
+
* The index of the SIM slot on the device.
|
|
111
|
+
*
|
|
112
|
+
* @example 0
|
|
113
|
+
* @since 0.1.0
|
|
114
|
+
*/
|
|
115
|
+
slotIndex: number;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* @since 0.1.0
|
|
119
|
+
*/
|
|
120
|
+
export interface PermissionStatus {
|
|
121
|
+
/**
|
|
122
|
+
* The permission state of reading the SIM cards.
|
|
123
|
+
*
|
|
124
|
+
* @since 0.1.0
|
|
125
|
+
*/
|
|
126
|
+
readSimCards: PermissionState;
|
|
127
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PermissionState } from '@capacitor/core';\n\nexport interface SimPlugin {\n /**\n * Check the permission to read the SIM cards.\n *\n * Only available on Android.\n *\n * @since 0.1.0\n */\n checkPermissions(): Promise<PermissionStatus>;\n /**\n * Get information about the SIM cards installed on the device.\n *\n * On devices with multiple SIM slots, all active SIM cards are returned.\n *\n * Only available on Android.\n *\n * @since 0.1.0\n */\n getSimCards(): Promise<GetSimCardsResult>;\n /**\n * Request the permission to read the SIM cards.\n *\n * Only available on Android.\n *\n * @since 0.1.0\n */\n requestPermissions(): Promise<PermissionStatus>;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface GetSimCardsResult {\n /**\n * The SIM cards installed on the device.\n *\n * @since 0.1.0\n */\n simCards: SimCard[];\n}\n\n/**\n * @since 0.1.0\n */\nexport interface SimCard {\n /**\n * The name of the carrier.\n *\n * Returns `null` if the carrier name is not available.\n *\n * @example 'T-Mobile'\n * @since 0.1.0\n */\n carrierName: string | null;\n /**\n * The user-editable display name of the SIM card.\n *\n * Returns `null` if the display name is not available.\n *\n * @example 'Personal'\n * @since 0.1.0\n */\n displayName: string | null;\n /**\n * Whether the SIM card is an embedded SIM (eSIM).\n *\n * Returns `null` if the information is not available.\n *\n * @example false\n * @since 0.1.0\n */\n isEmbedded: boolean | null;\n /**\n * The two-letter ISO 3166-1 country code of the carrier.\n *\n * Returns `null` if the country code is not available.\n *\n * @example 'us'\n * @since 0.1.0\n */\n isoCountryCode: string | null;\n /**\n * The Mobile Country Code (MCC) of the carrier.\n *\n * Returns `null` if the mobile country code is not available.\n *\n * @example '310'\n * @since 0.1.0\n */\n mobileCountryCode: string | null;\n /**\n * The Mobile Network Code (MNC) of the carrier.\n *\n * Returns `null` if the mobile network code is not available.\n *\n * @example '260'\n * @since 0.1.0\n */\n mobileNetworkCode: string | null;\n /**\n * The phone number associated with the SIM card.\n *\n * This value is often empty because carriers do not reliably store the\n * phone number on the SIM card. In that case, `null` is returned.\n *\n * @example '+12025550123'\n * @since 0.1.0\n */\n phoneNumber: string | null;\n /**\n * The index of the SIM slot on the device.\n *\n * @example 0\n * @since 0.1.0\n */\n slotIndex: number;\n}\n\n/**\n * @since 0.1.0\n */\nexport interface PermissionStatus {\n /**\n * The permission state of reading the SIM cards.\n *\n * @since 0.1.0\n */\n readSimCards: PermissionState;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,GAAG,GAAG,cAAc,CAAY,KAAK,EAAE;IAC3C,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;CACrD,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { SimPlugin } from './definitions';\n\nconst Sim = registerPlugin<SimPlugin>('Sim', {\n web: () => import('./web').then(m => new m.SimWeb()),\n});\n\nexport * from './definitions';\nexport { Sim };\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
import type { GetSimCardsResult, PermissionStatus, SimPlugin } from './definitions';
|
|
3
|
+
export declare class SimWeb extends WebPlugin implements SimPlugin {
|
|
4
|
+
checkPermissions(): Promise<PermissionStatus>;
|
|
5
|
+
getSimCards(): Promise<GetSimCardsResult>;
|
|
6
|
+
requestPermissions(): Promise<PermissionStatus>;
|
|
7
|
+
}
|
package/dist/esm/web.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WebPlugin } from '@capacitor/core';
|
|
2
|
+
export class SimWeb extends WebPlugin {
|
|
3
|
+
async checkPermissions() {
|
|
4
|
+
throw this.unimplemented('Not implemented on web.');
|
|
5
|
+
}
|
|
6
|
+
async getSimCards() {
|
|
7
|
+
throw this.unimplemented('Not implemented on web.');
|
|
8
|
+
}
|
|
9
|
+
async requestPermissions() {
|
|
10
|
+
throw this.unimplemented('Not implemented on web.');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAQ5C,MAAM,OAAO,MAAO,SAAQ,SAAS;IACnC,KAAK,CAAC,gBAAgB;QACpB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,WAAW;QACf,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,kBAAkB;QACtB,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACtD,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n GetSimCardsResult,\n PermissionStatus,\n SimPlugin,\n} from './definitions';\n\nexport class SimWeb extends WebPlugin implements SimPlugin {\n async checkPermissions(): Promise<PermissionStatus> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async getSimCards(): Promise<GetSimCardsResult> {\n throw this.unimplemented('Not implemented on web.');\n }\n\n async requestPermissions(): Promise<PermissionStatus> {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var core = require('@capacitor/core');
|
|
4
|
+
|
|
5
|
+
const Sim = core.registerPlugin('Sim', {
|
|
6
|
+
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.SimWeb()),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
class SimWeb extends core.WebPlugin {
|
|
10
|
+
async checkPermissions() {
|
|
11
|
+
throw this.unimplemented('Not implemented on web.');
|
|
12
|
+
}
|
|
13
|
+
async getSimCards() {
|
|
14
|
+
throw this.unimplemented('Not implemented on web.');
|
|
15
|
+
}
|
|
16
|
+
async requestPermissions() {
|
|
17
|
+
throw this.unimplemented('Not implemented on web.');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
22
|
+
__proto__: null,
|
|
23
|
+
SimWeb: SimWeb
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
exports.Sim = Sim;
|
|
27
|
+
//# sourceMappingURL=plugin.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Sim = registerPlugin('Sim', {\n web: () => import('./web').then(m => new m.SimWeb()),\n});\nexport * from './definitions';\nexport { Sim };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class SimWeb extends WebPlugin {\n async checkPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getSimCards() {\n throw this.unimplemented('Not implemented on web.');\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,GAAG,GAAGA,mBAAc,CAAC,KAAK,EAAE;AAClC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;AACxD,CAAC;;ACFM,MAAM,MAAM,SAASC,cAAS,CAAC;AACtC,IAAI,MAAM,gBAAgB,GAAG;AAC7B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ,IAAI,MAAM,kBAAkB,GAAG;AAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ;;;;;;;;;"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var capacitorSim = (function (exports, core) {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const Sim = core.registerPlugin('Sim', {
|
|
5
|
+
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.SimWeb()),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
class SimWeb extends core.WebPlugin {
|
|
9
|
+
async checkPermissions() {
|
|
10
|
+
throw this.unimplemented('Not implemented on web.');
|
|
11
|
+
}
|
|
12
|
+
async getSimCards() {
|
|
13
|
+
throw this.unimplemented('Not implemented on web.');
|
|
14
|
+
}
|
|
15
|
+
async requestPermissions() {
|
|
16
|
+
throw this.unimplemented('Not implemented on web.');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
var web = /*#__PURE__*/Object.freeze({
|
|
21
|
+
__proto__: null,
|
|
22
|
+
SimWeb: SimWeb
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
exports.Sim = Sim;
|
|
26
|
+
|
|
27
|
+
return exports;
|
|
28
|
+
|
|
29
|
+
})({}, capacitorExports);
|
|
30
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Sim = registerPlugin('Sim', {\n web: () => import('./web').then(m => new m.SimWeb()),\n});\nexport * from './definitions';\nexport { Sim };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class SimWeb extends WebPlugin {\n async checkPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n async getSimCards() {\n throw this.unimplemented('Not implemented on web.');\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,GAAG,GAAGA,mBAAc,CAAC,KAAK,EAAE;IAClC,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;IACxD,CAAC;;ICFM,MAAM,MAAM,SAASC,cAAS,CAAC;IACtC,IAAI,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,WAAW,GAAG;IACxB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ,IAAI,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
|
6
|
+
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
7
|
+
<key>CFBundleExecutable</key>
|
|
8
|
+
<string>$(EXECUTABLE_NAME)</string>
|
|
9
|
+
<key>CFBundleIdentifier</key>
|
|
10
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
|
12
|
+
<string>6.0</string>
|
|
13
|
+
<key>CFBundleName</key>
|
|
14
|
+
<string>$(PRODUCT_NAME)</string>
|
|
15
|
+
<key>CFBundlePackageType</key>
|
|
16
|
+
<string>FMWK</string>
|
|
17
|
+
<key>CFBundleShortVersionString</key>
|
|
18
|
+
<string>1.0</string>
|
|
19
|
+
<key>CFBundleVersion</key>
|
|
20
|
+
<string>$(CURRENT_PROJECT_VERSION)</string>
|
|
21
|
+
<key>NSPrincipalClass</key>
|
|
22
|
+
<string></string>
|
|
23
|
+
</dict>
|
|
24
|
+
</plist>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
import Capacitor
|
|
3
|
+
|
|
4
|
+
@objc(SimPlugin)
|
|
5
|
+
public class SimPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
6
|
+
public let identifier = "SimPlugin"
|
|
7
|
+
public let jsName = "Sim"
|
|
8
|
+
public let pluginMethods: [CAPPluginMethod] = [
|
|
9
|
+
CAPPluginMethod(name: "getSimCards", returnType: CAPPluginReturnPromise)
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
@objc override public func checkPermissions(_ call: CAPPluginCall) {
|
|
13
|
+
rejectCallAsUnimplemented(call)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@objc func getSimCards(_ call: CAPPluginCall) {
|
|
17
|
+
rejectCallAsUnimplemented(call)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@objc override public func requestPermissions(_ call: CAPPluginCall) {
|
|
21
|
+
rejectCallAsUnimplemented(call)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
private func rejectCallAsUnimplemented(_ call: CAPPluginCall) {
|
|
25
|
+
call.unimplemented("This method is not available on this platform.")
|
|
26
|
+
}
|
|
27
|
+
}
|