capacitor-gleap-plugin 17.0.0 → 18.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 +2 -2
- package/README.md +157 -0
- package/android/build.gradle +1 -1
- package/android/src/main/java/io/gleapplugins/capacitor/GleapPlugin.java +113 -0
- package/dist/docs.json +147 -0
- package/dist/esm/definitions.d.ts +72 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +35 -0
- package/dist/esm/web.js +49 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +49 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +49 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/GleapPlugin.m +7 -0
- package/ios/Plugin/GleapPlugin.swift +99 -0
- package/package.json +2 -2
|
@@ -32,6 +32,105 @@ public class GleapPlugin: CAPPlugin, GleapDelegate {
|
|
|
32
32
|
])
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
// Data region & host overrides. All of them must be called before initialize.
|
|
36
|
+
@objc func setRegion(_ call: CAPPluginCall) {
|
|
37
|
+
guard let region = call.options["region"] as? String else {
|
|
38
|
+
call.reject("No region provided")
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
Gleap.setRegion(region)
|
|
43
|
+
|
|
44
|
+
// Provide feedback that it has been success
|
|
45
|
+
call.resolve([
|
|
46
|
+
"region": region
|
|
47
|
+
])
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@objc func setApiUrl(_ call: CAPPluginCall) {
|
|
51
|
+
guard let url = call.options["url"] as? String else {
|
|
52
|
+
call.reject("No url provided")
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
Gleap.setApiUrl(url)
|
|
57
|
+
|
|
58
|
+
// Provide feedback that it has been success
|
|
59
|
+
call.resolve([
|
|
60
|
+
"url": url
|
|
61
|
+
])
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@objc func setWSApiUrl(_ call: CAPPluginCall) {
|
|
65
|
+
guard let url = call.options["url"] as? String else {
|
|
66
|
+
call.reject("No url provided")
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
Gleap.setWSApiUrl(url)
|
|
71
|
+
|
|
72
|
+
// Provide feedback that it has been success
|
|
73
|
+
call.resolve([
|
|
74
|
+
"url": url
|
|
75
|
+
])
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@objc func setRealtimeHost(_ call: CAPPluginCall) {
|
|
79
|
+
guard let host = call.options["host"] as? String else {
|
|
80
|
+
call.reject("No host provided")
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
Gleap.setRealtimeHost(host)
|
|
85
|
+
|
|
86
|
+
// Provide feedback that it has been success
|
|
87
|
+
call.resolve([
|
|
88
|
+
"host": host
|
|
89
|
+
])
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@objc func setFrameUrl(_ call: CAPPluginCall) {
|
|
93
|
+
guard let url = call.options["url"] as? String else {
|
|
94
|
+
call.reject("No url provided")
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
Gleap.setFrameUrl(url)
|
|
99
|
+
|
|
100
|
+
// Provide feedback that it has been success
|
|
101
|
+
call.resolve([
|
|
102
|
+
"url": url
|
|
103
|
+
])
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@objc func setBannerUrl(_ call: CAPPluginCall) {
|
|
107
|
+
guard let url = call.options["url"] as? String else {
|
|
108
|
+
call.reject("No url provided")
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
Gleap.setBannerUrl(url)
|
|
113
|
+
|
|
114
|
+
// Provide feedback that it has been success
|
|
115
|
+
call.resolve([
|
|
116
|
+
"url": url
|
|
117
|
+
])
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@objc func setModalUrl(_ call: CAPPluginCall) {
|
|
121
|
+
guard let url = call.options["url"] as? String else {
|
|
122
|
+
call.reject("No url provided")
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
Gleap.setModalUrl(url)
|
|
127
|
+
|
|
128
|
+
// Provide feedback that it has been success
|
|
129
|
+
call.resolve([
|
|
130
|
+
"url": url
|
|
131
|
+
])
|
|
132
|
+
}
|
|
133
|
+
|
|
35
134
|
@objc func identify(_ call: CAPPluginCall) {
|
|
36
135
|
// If userId is empty, then pass back error
|
|
37
136
|
guard let userId = call.options["userId"] as? String else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "capacitor-gleap-plugin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.0",
|
|
4
4
|
"description": "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. Many thanks to Stephan Nagel (congrapp) for his work on the Gleap capacitor plugin.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -76,6 +76,6 @@
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"gleap": "
|
|
79
|
+
"gleap": "^18.0.0"
|
|
80
80
|
}
|
|
81
81
|
}
|