capacitor-gleap-plugin 7.0.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/CapacitorGleapPlugin.podspec +18 -0
- package/README.md +411 -0
- package/android/build.gradle +61 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/java/com/congrapp/b2c/plugins/gleap/GleapPlugin.java +535 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/docs.json +411 -0
- package/dist/esm/definitions.d.ts +215 -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 +117 -0
- package/dist/esm/web.js +144 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +163 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +165 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Plugin/GleapPlugin.h +10 -0
- package/ios/Plugin/GleapPlugin.m +28 -0
- package/ios/Plugin/GleapPlugin.swift +380 -0
- package/ios/Plugin/Info.plist +24 -0
- package/package.json +89 -0
|
@@ -0,0 +1,18 @@
|
|
|
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 = 'CapacitorGleapPlugin'
|
|
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 'Gleap', '7.0.9'
|
|
17
|
+
s.swift_version = '5.1'
|
|
18
|
+
end
|
package/README.md
ADDED
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
# Gleap Capacitor SDK
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
Gleap SDK for Capacitor is the easiest way to integrate Gleap into your Ionic apps! Achieve better app quality with comprehensive in-app bug reporting & customer feedback for your web-apps and websites.
|
|
6
|
+
|
|
7
|
+
Many thanks to *Stephan Nagel* (congrapp) for his work on the Gleap capacitor plugin.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install capacitor-gleap-plugin
|
|
13
|
+
npx cap sync
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## API
|
|
17
|
+
|
|
18
|
+
<docgen-index>
|
|
19
|
+
|
|
20
|
+
* [`initialize(...)`](#initialize)
|
|
21
|
+
* [`identify(...)`](#identify)
|
|
22
|
+
* [`clearIdentity()`](#clearidentity)
|
|
23
|
+
* [`log(...)`](#log)
|
|
24
|
+
* [`attachCustomData(...)`](#attachcustomdata)
|
|
25
|
+
* [`setCustomData(...)`](#setcustomdata)
|
|
26
|
+
* [`removeCustomData(...)`](#removecustomdata)
|
|
27
|
+
* [`clearCustomData()`](#clearcustomdata)
|
|
28
|
+
* [`logEvent(...)`](#logevent)
|
|
29
|
+
* [`setEventCallback(...)`](#seteventcallback)
|
|
30
|
+
* [`sendSilentCrashReport(...)`](#sendsilentcrashreport)
|
|
31
|
+
* [`preFillForm(...)`](#prefillform)
|
|
32
|
+
* [`addAttachment(...)`](#addattachment)
|
|
33
|
+
* [`removeAllAttachments()`](#removeallattachments)
|
|
34
|
+
* [`open()`](#open)
|
|
35
|
+
* [`close()`](#close)
|
|
36
|
+
* [`isOpened()`](#isopened)
|
|
37
|
+
* [`startFeedbackFlow(...)`](#startfeedbackflow)
|
|
38
|
+
* [`setLanguage(...)`](#setlanguage)
|
|
39
|
+
* [`disableConsoleLogOverwrite()`](#disableconsolelogoverwrite)
|
|
40
|
+
* [`enableDebugConsoleLog()`](#enabledebugconsolelog)
|
|
41
|
+
|
|
42
|
+
</docgen-index>
|
|
43
|
+
|
|
44
|
+
<docgen-api>
|
|
45
|
+
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
|
|
46
|
+
|
|
47
|
+
### initialize(...)
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
initialize(options: { API_KEY: string; }) => any
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Initialize Gleap with an API key
|
|
54
|
+
|
|
55
|
+
| Param | Type |
|
|
56
|
+
| ------------- | --------------------------------- |
|
|
57
|
+
| **`options`** | <code>{ API_KEY: string; }</code> |
|
|
58
|
+
|
|
59
|
+
**Returns:** <code>any</code>
|
|
60
|
+
|
|
61
|
+
**Since:** 7.0.0
|
|
62
|
+
|
|
63
|
+
--------------------
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### identify(...)
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
identify(options: { userId: string; userHash?: string; name?: string; email?: string; phone?: string; value?: number; }) => any
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Set user identity
|
|
73
|
+
|
|
74
|
+
| Param | Type |
|
|
75
|
+
| ------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
76
|
+
| **`options`** | <code>{ userId: string; userHash?: string; name?: string; email?: string; phone?: string; value?: number; }</code> |
|
|
77
|
+
|
|
78
|
+
**Returns:** <code>any</code>
|
|
79
|
+
|
|
80
|
+
**Since:** 7.0.0
|
|
81
|
+
|
|
82
|
+
--------------------
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### clearIdentity()
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
clearIdentity() => any
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Clear user identity
|
|
92
|
+
|
|
93
|
+
**Returns:** <code>any</code>
|
|
94
|
+
|
|
95
|
+
**Since:** 7.0.0
|
|
96
|
+
|
|
97
|
+
--------------------
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### log(...)
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
log(options: { message: string; logLevel?: "ERROR" | "WARNING" | "INFO"; }) => any
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Submit a custom log message with the given level
|
|
107
|
+
|
|
108
|
+
| Param | Type |
|
|
109
|
+
| ------------- | ---------------------------------------------------------------------------- |
|
|
110
|
+
| **`options`** | <code>{ message: string; logLevel?: "ERROR" \| "WARNING" \| "INFO"; }</code> |
|
|
111
|
+
|
|
112
|
+
**Returns:** <code>any</code>
|
|
113
|
+
|
|
114
|
+
**Since:** 7.0.0
|
|
115
|
+
|
|
116
|
+
--------------------
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
### attachCustomData(...)
|
|
120
|
+
|
|
121
|
+
```typescript
|
|
122
|
+
attachCustomData(options: { data: any; }) => any
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Add custom data
|
|
126
|
+
|
|
127
|
+
| Param | Type |
|
|
128
|
+
| ------------- | --------------------------- |
|
|
129
|
+
| **`options`** | <code>{ data: any; }</code> |
|
|
130
|
+
|
|
131
|
+
**Returns:** <code>any</code>
|
|
132
|
+
|
|
133
|
+
**Since:** 7.0.0
|
|
134
|
+
|
|
135
|
+
--------------------
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
### setCustomData(...)
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
setCustomData(options: { key: string; value: string; }) => any
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Set custom data
|
|
145
|
+
|
|
146
|
+
| Param | Type |
|
|
147
|
+
| ------------- | -------------------------------------------- |
|
|
148
|
+
| **`options`** | <code>{ key: string; value: string; }</code> |
|
|
149
|
+
|
|
150
|
+
**Returns:** <code>any</code>
|
|
151
|
+
|
|
152
|
+
**Since:** 7.0.0
|
|
153
|
+
|
|
154
|
+
--------------------
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### removeCustomData(...)
|
|
158
|
+
|
|
159
|
+
```typescript
|
|
160
|
+
removeCustomData(options: { key: string; }) => any
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Remove custom data by key
|
|
164
|
+
|
|
165
|
+
| Param | Type |
|
|
166
|
+
| ------------- | ----------------------------- |
|
|
167
|
+
| **`options`** | <code>{ key: string; }</code> |
|
|
168
|
+
|
|
169
|
+
**Returns:** <code>any</code>
|
|
170
|
+
|
|
171
|
+
**Since:** 7.0.0
|
|
172
|
+
|
|
173
|
+
--------------------
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
### clearCustomData()
|
|
177
|
+
|
|
178
|
+
```typescript
|
|
179
|
+
clearCustomData() => any
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Clear custom data
|
|
183
|
+
|
|
184
|
+
**Returns:** <code>any</code>
|
|
185
|
+
|
|
186
|
+
**Since:** 7.0.0
|
|
187
|
+
|
|
188
|
+
--------------------
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
### logEvent(...)
|
|
192
|
+
|
|
193
|
+
```typescript
|
|
194
|
+
logEvent(options: { name: string; data?: any; }) => any
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Log event to Gleap
|
|
198
|
+
|
|
199
|
+
| Param | Type |
|
|
200
|
+
| ------------- | ------------------------------------------ |
|
|
201
|
+
| **`options`** | <code>{ name: string; data?: any; }</code> |
|
|
202
|
+
|
|
203
|
+
**Returns:** <code>any</code>
|
|
204
|
+
|
|
205
|
+
**Since:** 7.0.0
|
|
206
|
+
|
|
207
|
+
--------------------
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
### setEventCallback(...)
|
|
211
|
+
|
|
212
|
+
```typescript
|
|
213
|
+
setEventCallback(callback: GleapEventCallback) => any
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
| Param | Type |
|
|
217
|
+
| -------------- | -------------------------------------------------- |
|
|
218
|
+
| **`callback`** | <code>(name: string, data?: any) => void</code> |
|
|
219
|
+
|
|
220
|
+
**Returns:** <code>any</code>
|
|
221
|
+
|
|
222
|
+
**Since:** 7.0.0
|
|
223
|
+
|
|
224
|
+
--------------------
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
### sendSilentCrashReport(...)
|
|
228
|
+
|
|
229
|
+
```typescript
|
|
230
|
+
sendSilentCrashReport(options: { description: string; severity?: "LOW" | "MEDIUM" | "HIGH"; dataExclusion?: { customData: Boolean; metaData: Boolean; attachments: Boolean; consoleLog: Boolean; networkLogs: Boolean; customEventLog: Boolean; screenshot: Boolean; replays: Boolean; }; }) => any
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Log event to Gleap
|
|
234
|
+
|
|
235
|
+
| Param | Type |
|
|
236
|
+
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
237
|
+
| **`options`** | <code>{ description: string; severity?: "LOW" \| "MEDIUM" \| "HIGH"; dataExclusion?: { customData: any; metaData: any; attachments: any; consoleLog: any; networkLogs: any; customEventLog: any; screenshot: any; replays: any; }; }</code> |
|
|
238
|
+
|
|
239
|
+
**Returns:** <code>any</code>
|
|
240
|
+
|
|
241
|
+
**Since:** 7.0.0
|
|
242
|
+
|
|
243
|
+
--------------------
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
### preFillForm(...)
|
|
247
|
+
|
|
248
|
+
```typescript
|
|
249
|
+
preFillForm(options: { data: any; }) => any
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Prefills the widget's form data
|
|
253
|
+
|
|
254
|
+
| Param | Type |
|
|
255
|
+
| ------------- | --------------------------- |
|
|
256
|
+
| **`options`** | <code>{ data: any; }</code> |
|
|
257
|
+
|
|
258
|
+
**Returns:** <code>any</code>
|
|
259
|
+
|
|
260
|
+
**Since:** 7.0.0
|
|
261
|
+
|
|
262
|
+
--------------------
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
### addAttachment(...)
|
|
266
|
+
|
|
267
|
+
```typescript
|
|
268
|
+
addAttachment(options: { base64data: string; name: string; }) => any
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Add attachment as bas64 string
|
|
272
|
+
|
|
273
|
+
| Param | Type |
|
|
274
|
+
| ------------- | -------------------------------------------------- |
|
|
275
|
+
| **`options`** | <code>{ base64data: string; name: string; }</code> |
|
|
276
|
+
|
|
277
|
+
**Returns:** <code>any</code>
|
|
278
|
+
|
|
279
|
+
**Since:** 7.0.0
|
|
280
|
+
|
|
281
|
+
--------------------
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
### removeAllAttachments()
|
|
285
|
+
|
|
286
|
+
```typescript
|
|
287
|
+
removeAllAttachments() => any
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
All attachments removed
|
|
291
|
+
|
|
292
|
+
**Returns:** <code>any</code>
|
|
293
|
+
|
|
294
|
+
**Since:** 7.0.0
|
|
295
|
+
|
|
296
|
+
--------------------
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
### open()
|
|
300
|
+
|
|
301
|
+
```typescript
|
|
302
|
+
open() => any
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
Open widget
|
|
306
|
+
|
|
307
|
+
**Returns:** <code>any</code>
|
|
308
|
+
|
|
309
|
+
**Since:** 7.0.0
|
|
310
|
+
|
|
311
|
+
--------------------
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
### close()
|
|
315
|
+
|
|
316
|
+
```typescript
|
|
317
|
+
close() => any
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Close widget
|
|
321
|
+
|
|
322
|
+
**Returns:** <code>any</code>
|
|
323
|
+
|
|
324
|
+
**Since:** 7.0.0
|
|
325
|
+
|
|
326
|
+
--------------------
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
### isOpened()
|
|
330
|
+
|
|
331
|
+
```typescript
|
|
332
|
+
isOpened() => any
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
Check widget status code
|
|
336
|
+
|
|
337
|
+
**Returns:** <code>any</code>
|
|
338
|
+
|
|
339
|
+
**Since:** 7.0.0
|
|
340
|
+
|
|
341
|
+
--------------------
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
### startFeedbackFlow(...)
|
|
345
|
+
|
|
346
|
+
```typescript
|
|
347
|
+
startFeedbackFlow(options: { feedbackFlow?: string; showBackButton?: boolean; }) => any
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
Start Feedback flow
|
|
351
|
+
|
|
352
|
+
| Param | Type |
|
|
353
|
+
| ------------- | ----------------------------------------------------------------- |
|
|
354
|
+
| **`options`** | <code>{ feedbackFlow?: string; showBackButton?: boolean; }</code> |
|
|
355
|
+
|
|
356
|
+
**Returns:** <code>any</code>
|
|
357
|
+
|
|
358
|
+
**Since:** 7.0.0
|
|
359
|
+
|
|
360
|
+
--------------------
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
### setLanguage(...)
|
|
364
|
+
|
|
365
|
+
```typescript
|
|
366
|
+
setLanguage(options: { languageCode: string; }) => any
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
Set Language
|
|
370
|
+
|
|
371
|
+
| Param | Type |
|
|
372
|
+
| ------------- | -------------------------------------- |
|
|
373
|
+
| **`options`** | <code>{ languageCode: string; }</code> |
|
|
374
|
+
|
|
375
|
+
**Returns:** <code>any</code>
|
|
376
|
+
|
|
377
|
+
**Since:** 7.0.0
|
|
378
|
+
|
|
379
|
+
--------------------
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
### disableConsoleLogOverwrite()
|
|
383
|
+
|
|
384
|
+
```typescript
|
|
385
|
+
disableConsoleLogOverwrite() => any
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
Disable console log overwrite
|
|
389
|
+
|
|
390
|
+
**Returns:** <code>any</code>
|
|
391
|
+
|
|
392
|
+
**Since:** 7.0.0
|
|
393
|
+
|
|
394
|
+
--------------------
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
### enableDebugConsoleLog()
|
|
398
|
+
|
|
399
|
+
```typescript
|
|
400
|
+
enableDebugConsoleLog() => any
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
Enable debug console log
|
|
404
|
+
|
|
405
|
+
**Returns:** <code>any</code>
|
|
406
|
+
|
|
407
|
+
**Since:** 7.0.0
|
|
408
|
+
|
|
409
|
+
--------------------
|
|
410
|
+
|
|
411
|
+
</docgen-api>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
ext {
|
|
2
|
+
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.1'
|
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.2.0'
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.2'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.3.0'
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
buildscript {
|
|
9
|
+
repositories {
|
|
10
|
+
google()
|
|
11
|
+
jcenter()
|
|
12
|
+
}
|
|
13
|
+
dependencies {
|
|
14
|
+
classpath 'com.android.tools.build:gradle:4.2.1'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
apply plugin: 'com.android.library'
|
|
19
|
+
|
|
20
|
+
android {
|
|
21
|
+
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 30
|
|
22
|
+
defaultConfig {
|
|
23
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 21
|
|
24
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 30
|
|
25
|
+
versionCode 1
|
|
26
|
+
versionName "1.0"
|
|
27
|
+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
28
|
+
}
|
|
29
|
+
buildTypes {
|
|
30
|
+
release {
|
|
31
|
+
minifyEnabled false
|
|
32
|
+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
lintOptions {
|
|
36
|
+
abortOnError false
|
|
37
|
+
}
|
|
38
|
+
compileOptions {
|
|
39
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
|
40
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
repositories {
|
|
45
|
+
google()
|
|
46
|
+
jcenter()
|
|
47
|
+
mavenCentral()
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
dependencies {
|
|
51
|
+
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
52
|
+
implementation project(':capacitor-android')
|
|
53
|
+
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
54
|
+
testImplementation "junit:junit:$junitVersion"
|
|
55
|
+
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
56
|
+
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
57
|
+
implementation group: 'io.gleap', name: 'gleap-android-sdk', version: '7.0.28-SDKVersion30'
|
|
58
|
+
implementation( "com.google.android.material:material:1.4.0") {
|
|
59
|
+
force = true
|
|
60
|
+
}
|
|
61
|
+
}
|