@appboxo/capacitor-boxo-sdk 0.7.1 → 0.8.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/CapacitorBoxoSdk.podspec +2 -2
- package/Package.swift +2 -2
- package/android/build.gradle +12 -15
- package/dist/plugin.cjs.js +0 -2
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +0 -2
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/AppboxoPlugin/AppboxoPlugin.swift +10 -10
- package/package.json +15 -15
package/CapacitorBoxoSdk.podspec
CHANGED
|
@@ -11,8 +11,8 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
13
|
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
-
s.ios.deployment_target
|
|
14
|
+
s.ios.deployment_target = '14.0'
|
|
15
15
|
s.dependency 'Capacitor'
|
|
16
|
-
s.dependency '
|
|
16
|
+
s.dependency 'BoxoSDK', '1.10.2'
|
|
17
17
|
s.swift_version = '5.1'
|
|
18
18
|
end
|
package/Package.swift
CHANGED
|
@@ -3,14 +3,14 @@ import PackageDescription
|
|
|
3
3
|
|
|
4
4
|
let package = Package(
|
|
5
5
|
name: "CapacitorBoxoSdk",
|
|
6
|
-
platforms: [.iOS(.
|
|
6
|
+
platforms: [.iOS(.v14)],
|
|
7
7
|
products: [
|
|
8
8
|
.library(
|
|
9
9
|
name: "CapacitorBoxoSdk",
|
|
10
10
|
targets: ["AppboxoPlugin"])
|
|
11
11
|
],
|
|
12
12
|
dependencies: [
|
|
13
|
-
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git",
|
|
13
|
+
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0")
|
|
14
14
|
],
|
|
15
15
|
targets: [
|
|
16
16
|
.target(
|
package/android/build.gradle
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
ext {
|
|
2
2
|
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
|
-
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.
|
|
4
|
-
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1
|
|
5
|
-
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.
|
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
9
9
|
ext {
|
|
10
|
-
kotlin_version = '1.9.
|
|
10
|
+
kotlin_version = '1.9.25'
|
|
11
11
|
}
|
|
12
12
|
repositories {
|
|
13
13
|
google()
|
|
14
14
|
mavenCentral()
|
|
15
15
|
}
|
|
16
16
|
dependencies {
|
|
17
|
-
classpath 'com.android.tools.build:gradle:8.
|
|
17
|
+
classpath 'com.android.tools.build:gradle:8.7.2'
|
|
18
18
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -24,10 +24,10 @@ apply plugin: 'kotlin-android'
|
|
|
24
24
|
|
|
25
25
|
android {
|
|
26
26
|
namespace "io.boxo.sdk.capacitor"
|
|
27
|
-
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion :
|
|
27
|
+
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
|
|
28
28
|
defaultConfig {
|
|
29
|
-
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion :
|
|
30
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion :
|
|
29
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
|
|
30
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
|
|
31
31
|
versionCode 1
|
|
32
32
|
versionName "1.0"
|
|
33
33
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
@@ -42,11 +42,8 @@ android {
|
|
|
42
42
|
abortOnError false
|
|
43
43
|
}
|
|
44
44
|
compileOptions {
|
|
45
|
-
sourceCompatibility JavaVersion.
|
|
46
|
-
targetCompatibility JavaVersion.
|
|
47
|
-
}
|
|
48
|
-
kotlinOptions {
|
|
49
|
-
jvmTarget = '17'
|
|
45
|
+
sourceCompatibility JavaVersion.VERSION_21
|
|
46
|
+
targetCompatibility JavaVersion.VERSION_21
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
49
|
|
|
@@ -57,9 +54,9 @@ repositories {
|
|
|
57
54
|
|
|
58
55
|
dependencies {
|
|
59
56
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
60
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib
|
|
57
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
61
58
|
implementation project(':capacitor-android')
|
|
62
|
-
implementation('io.boxo.sdk:boxo-android:1.
|
|
59
|
+
implementation('io.boxo.sdk:boxo-android:1.28.0') {
|
|
63
60
|
exclude group: 'com.google.android.gms', module: 'play-services-location'
|
|
64
61
|
}
|
|
65
62
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
package/dist/plugin.cjs.js
CHANGED
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Boxo = registerPlugin('Appboxo');\nconst Appboxo = registerPlugin('Appboxo');\nexport * from './definitions';\nexport { Appboxo };\nexport { Boxo };\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Boxo = registerPlugin('Appboxo');\nconst Appboxo = registerPlugin('Appboxo');\nexport * from './definitions';\nexport { Appboxo };\nexport { Boxo };\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":";;;;AACK,MAAC,IAAI,GAAGA,mBAAc,CAAC,SAAS;AAChC,MAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS;;;;;"}
|
package/dist/plugin.js
CHANGED
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Boxo = registerPlugin('Appboxo');\nconst Appboxo = registerPlugin('Appboxo');\nexport * from './definitions';\nexport { Appboxo };\nexport { Boxo };\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":";;;AACK,OAAC,IAAI,GAAGA,mBAAc,CAAC,SAAS
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Boxo = registerPlugin('Appboxo');\nconst Appboxo = registerPlugin('Appboxo');\nexport * from './definitions';\nexport { Appboxo };\nexport { Boxo };\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":";;;AACK,OAAC,IAAI,GAAGA,mBAAc,CAAC,SAAS;AAChC,OAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Foundation
|
|
2
2
|
import Capacitor
|
|
3
|
-
import
|
|
3
|
+
import BoxoSDK
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Please read the Capacitor iOS Plugin Development Guide
|
|
@@ -55,7 +55,7 @@ public class AppboxoPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
55
55
|
config.setUserId(id: userId)
|
|
56
56
|
config.miniappSettingsExpirationTime = miniappSettingsExpirationTime
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
Boxo.shared.setConfig(config: config)
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
@objc func openMiniapp(_ call: CAPPluginCall) {
|
|
@@ -69,7 +69,7 @@ public class AppboxoPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
69
69
|
let urlSuffix = call.getString("urlSuffix", "")
|
|
70
70
|
let pageAnimation = call.getString("pageAnimation", "")
|
|
71
71
|
|
|
72
|
-
let miniApp =
|
|
72
|
+
let miniApp = Boxo.shared.getMiniapp(appId: appId)
|
|
73
73
|
miniApp.setData(data: data)
|
|
74
74
|
miniApp.delegate = self
|
|
75
75
|
|
|
@@ -131,14 +131,14 @@ public class AppboxoPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
131
131
|
let authCode = call.getString("authCode") ?? ""
|
|
132
132
|
|
|
133
133
|
DispatchQueue.main.async {
|
|
134
|
-
|
|
134
|
+
Boxo.shared.getMiniapp(appId: appId).setAuthCode(authCode: authCode)
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
@objc func closeMiniapp(_ call: CAPPluginCall) {
|
|
139
139
|
let appId = call.getString("appId") ?? ""
|
|
140
140
|
|
|
141
|
-
if let miniapp =
|
|
141
|
+
if let miniapp = Boxo.shared.getExistingMiniapp(appId: appId) {
|
|
142
142
|
DispatchQueue.main.async {
|
|
143
143
|
miniapp.close()
|
|
144
144
|
}
|
|
@@ -155,7 +155,7 @@ public class AppboxoPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
155
155
|
customEvent.payload = call.getObject("payload")?.toMap()
|
|
156
156
|
|
|
157
157
|
DispatchQueue.main.async {
|
|
158
|
-
|
|
158
|
+
Boxo.shared.getMiniapp(appId: appId).sendCustomEvent(customEvent: customEvent)
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
|
|
@@ -172,12 +172,12 @@ public class AppboxoPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
172
172
|
paymentData.extraParams = call.getObject("extraParams")?.toMap()
|
|
173
173
|
|
|
174
174
|
DispatchQueue.main.async {
|
|
175
|
-
|
|
175
|
+
Boxo.shared.getMiniapp(appId: appId).sendPaymentEvent(paymentData: paymentData)
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
@objc func getMiniapps(_ call: CAPPluginCall) {
|
|
180
|
-
|
|
180
|
+
Boxo.shared.getMiniapps { miniapps, error in
|
|
181
181
|
if let error = error {
|
|
182
182
|
call.reject(error)
|
|
183
183
|
} else {
|
|
@@ -199,13 +199,13 @@ public class AppboxoPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
199
199
|
|
|
200
200
|
@objc func hideMiniapps(_ call: CAPPluginCall) {
|
|
201
201
|
DispatchQueue.main.async {
|
|
202
|
-
|
|
202
|
+
Boxo.shared.hideMiniapps()
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
@objc func logout(_ call: CAPPluginCall) {
|
|
207
207
|
DispatchQueue.main.async {
|
|
208
|
-
|
|
208
|
+
Boxo.shared.logout()
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appboxo/capacitor-boxo-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "A capacitor wrapper over Appboxo SDK for IOS and Android.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -37,32 +37,32 @@
|
|
|
37
37
|
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
38
38
|
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
|
|
39
39
|
"eslint": "eslint . --ext ts",
|
|
40
|
-
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
|
|
40
|
+
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
|
41
41
|
"swiftlint": "node-swiftlint",
|
|
42
42
|
"docgen": "docgen --api AppboxoPlugin --output-readme README.md --output-json dist/docs.json",
|
|
43
|
-
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.
|
|
43
|
+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
44
44
|
"clean": "rimraf ./dist",
|
|
45
45
|
"watch": "tsc --watch",
|
|
46
46
|
"prepublishOnly": "npm run build"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@capacitor/android": "^
|
|
50
|
-
"@capacitor/core": "^
|
|
51
|
-
"@capacitor/docgen": "^0.
|
|
52
|
-
"@capacitor/ios": "^
|
|
49
|
+
"@capacitor/android": "^7.0.0",
|
|
50
|
+
"@capacitor/core": "^7.0.0",
|
|
51
|
+
"@capacitor/docgen": "^0.3.0",
|
|
52
|
+
"@capacitor/ios": "^7.0.0",
|
|
53
53
|
"@ionic/eslint-config": "^0.4.0",
|
|
54
|
-
"@ionic/prettier-config": "^
|
|
55
|
-
"@ionic/swiftlint-config": "^
|
|
54
|
+
"@ionic/prettier-config": "^4.0.0",
|
|
55
|
+
"@ionic/swiftlint-config": "^2.0.0",
|
|
56
56
|
"eslint": "^8.57.0",
|
|
57
|
-
"prettier": "
|
|
58
|
-
"prettier-plugin-java": "
|
|
59
|
-
"rimraf": "^
|
|
60
|
-
"rollup": "^
|
|
61
|
-
"swiftlint": "^
|
|
57
|
+
"prettier": "^3.4.2",
|
|
58
|
+
"prettier-plugin-java": "^2.6.6",
|
|
59
|
+
"rimraf": "^6.0.1",
|
|
60
|
+
"rollup": "^4.30.1",
|
|
61
|
+
"swiftlint": "^2.0.0",
|
|
62
62
|
"typescript": "~4.1.5"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@capacitor/core": "
|
|
65
|
+
"@capacitor/core": ">=7.0.0"
|
|
66
66
|
},
|
|
67
67
|
"prettier": "@ionic/prettier-config",
|
|
68
68
|
"swiftlint": "@ionic/swiftlint-config",
|