leap-capacitor 2.2.5 → 2.3.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/LICENSE.md ADDED
@@ -0,0 +1,105 @@
1
+ # WHATFIX MOBILE SDK LICENSE AGREEMENT
2
+
3
+ **IMPORTANT — READ CAREFULLY:** BY DOWNLOADING, INSTALLING OR USING THE WHATFIX MOBILE SOFTWARE DEVELOPMENT KIT (THE "SDK"), YOU AGREE TO THIS AGREEMENT. IF YOU DO NOT AGREE, YOU MUST NOT DOWNLOAD, INSTALL OR USE THE SDK.
4
+
5
+ This Agreement is between you ("Licensee" or "you") and the Whatfix entity identified in your master services agreement (MSA) ("Whatfix"). If you act on behalf of a legal entity, you represent that you have authority to bind that entity, and "Licensee" means that entity.
6
+
7
+ ## 1. Definitions
8
+
9
+ **1.1 "Authorized Application"** means a mobile application owned or operated by Licensee and authorized for use with the Whatfix Platform under the MSA.
10
+
11
+ **1.2 "MSA"** means the applicable master services agreement (MSA) between Licensee and Whatfix governing the Whatfix Platform, whether accepted electronically or signed, including applicable Order Forms and the data processing addendum ("DPA").
12
+
13
+ **1.3 "Documentation"** means Whatfix's published integration guides, API references and README files for the SDK.
14
+
15
+ **1.4 "SDK"** means the Whatfix mobile software development kits, including iOS and Android components, made available to Licensee in object-code (binary) form, together with any updates supplied by Whatfix and the Documentation.
16
+
17
+ **1.5 "Whatfix Platform"** means Whatfix's hosted services with which the SDK communicates, including configuration, content-delivery and analytics endpoints.
18
+
19
+ ## 2. License Grant
20
+
21
+ **2.1** Subject to compliance with this Agreement and the MSA, Whatfix grants Licensee a non-exclusive, non-transferable (except as permitted under the MSA), non-sublicensable license, for the applicable subscription term and within the purchased usage limits, to:
22
+
23
+ (a) install and make reasonable copies of the SDK for development, integration and testing of Authorized Applications;
24
+
25
+ (b) integrate and link the SDK into Authorized Applications solely to enable their use with the Whatfix Platform;
26
+
27
+ (c) reproduce and distribute the SDK solely in binary form as embedded in Authorized Applications through public app stores or internal enterprise distribution, and permit end users to execute the embedded SDK solely as part of those applications; and
28
+
29
+ (d) use and reasonably copy the Documentation internally to support those activities.
30
+
31
+ **2.2** Licensee may permit its employees and contractors acting on its behalf to exercise these rights solely for Licensee's benefit, subject to confidentiality and use restrictions no less protective than those applicable under this Agreement. Licensee remains responsible for their compliance. End users receive no right to extract, modify or separately use the SDK.
32
+
33
+ **2.3** This Agreement does not independently grant access to the Whatfix Platform or expand any subscription entitlement.
34
+
35
+ ## 3. License Restrictions
36
+
37
+ Licensee shall not, and shall not permit any third party to:
38
+
39
+ (a) except as expressly permitted under this Agreement, copy, modify, translate or create derivative works of the SDK;
40
+
41
+ (b) reverse engineer, decompile or disassemble the SDK, or attempt to derive its source code, except to the extent applicable law prohibits this restriction;
42
+
43
+ (c) distribute, sell, rent, lease or sublicense the SDK as a standalone product, library or wrapper;
44
+
45
+ (d) remove or alter proprietary, copyright or open-source notices;
46
+
47
+ (e) use the SDK to build a competing digital adoption or in-app guidance product;
48
+
49
+ (f) include Creator components or debug variants in production releases distributed to end users; such components are solely for authorized pre-production authoring and preview use; or
50
+
51
+ (g) circumvent license restrictions, usage limits, authentication or security controls applicable to the SDK or Whatfix Platform.
52
+
53
+ These restrictions are subject to Section 6 for Third-Party Components.
54
+
55
+ ## 4. Ownership and Confidentiality
56
+
57
+ **4.1** Whatfix and its licensors retain all right, title and interest in the SDK, Documentation and Whatfix Platform, including all intellectual property rights. Licensee retains all right, title and interest in its Authorized Applications, excluding the SDK. No rights are granted except as expressly stated. Whatfix may use feedback or suggestions voluntarily provided by Licensee perpetually and without obligation, but this does not authorize disclosure of Licensee's confidential information or use of its personal data contrary to the MSA or DPA.
58
+
59
+ **4.2** Non-public SDK materials, Documentation and access credentials are Whatfix confidential information subject to the MSA's confidentiality provisions.
60
+
61
+ ## 5. Integration and Data Practices
62
+
63
+ **5.1 Integration:** Licensee shall use the SDK through its documented public APIs and in accordance with the Documentation. Licensee is responsible for its application code, integration and testing, and applicable app-store submissions and disclosures. These responsibilities do not limit Whatfix's express obligations under the MSA.
64
+
65
+ **5.2 User Data:** Licensee is responsible for determining the user identifiers and properties it supplies or configures for transmission through the SDK. The SDK may also generate or collect usage, interaction and device information as described in the applicable Documentation. Licensee shall not intentionally supply special-category personal data, government identifiers or payment card data through the SDK and shall configure the integration to prevent their collection or transmission, except to the extent expressly permitted under the MSA and DPA.
66
+
67
+ **5.3 Notices and Consents:** Licensee is responsible for providing legally required privacy notices, establishing an appropriate lawful basis, and obtaining any required consents before relevant collection or processing begins, including applicable app-store privacy disclosures. Where consent is required and is withheld or withdrawn, Licensee shall prevent or stop the relevant collection and processing through its integration and the appropriate controls described in the Documentation for the applicable SDK version.
68
+
69
+ **5.4 Processing by Whatfix:** Whatfix's processing of personal data through the SDK is governed by the MSA and applicable DPA. This Agreement does not expand Whatfix's rights to use such data.
70
+
71
+ ## 6. Third-Party Components
72
+
73
+ The SDK may include third-party components subject to separate license terms ("Third-Party Components"), identified in the accompanying third-party notices or Documentation. Those terms govern the relevant components and prevail over this Agreement to the extent of a conflict. Licensee shall preserve and reproduce attribution and license notices as required by those terms. Nothing in this Agreement restricts rights granted under the applicable third-party licenses.
74
+
75
+ ## 7. Support, Warranties and Disclaimers
76
+
77
+ **7.1** Any support, maintenance, updates, warranties and indemnities for the SDK are governed exclusively by the MSA. Supported SDK versions and technical compatibility requirements are described in the applicable Documentation or support policy, subject to the MSA. This Agreement creates no additional obligation to provide support, updates or compatibility with every application, device or operating-system version.
78
+
79
+ **7.2** EXCEPT AS EXPRESSLY PROVIDED IN THE MSA AND TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SDK IS PROVIDED "AS IS" AND "AS AVAILABLE." WHATFIX DISCLAIMS ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. WHATFIX DOES NOT WARRANT UNINTERRUPTED OR ERROR-FREE OPERATION. THE SDK IS NOT DESIGNED FOR USE IN HIGH-RISK ACTIVITIES WHERE FAILURE COULD REASONABLY RESULT IN DEATH, PERSONAL INJURY OR SERIOUS ENVIRONMENTAL DAMAGE.
80
+
81
+ ## 8. Limitation of Liability
82
+
83
+ All liability arising out of or relating to the SDK or this Agreement is subject to that MSA's limitations and exclusions of liability, including its applicable exceptions. Such liability forms part of, and does not create a separate or additional limit from, the applicable aggregate liability limits under the MSA.
84
+
85
+ ## 9. Term and Termination
86
+
87
+ **9.1** This Agreement takes effect upon Licensee's first download, installation or use of the SDK and continues for the applicable subscription term, unless terminated earlier in accordance with this Section.
88
+
89
+ **9.2** Suspension and termination rights, notices and cure periods are governed by that agreement. The SDK license ends upon expiry or termination of the subscription for which the SDK is provided, unless otherwise agreed in writing.
90
+
91
+ **9.3** Upon expiry or termination, Licensee shall cease development and new distribution using the SDK, cease access to the Whatfix Platform, and remove the SDK from development environments and production releases distributed after thirty (30) days from expiry or termination. Licensee shall take commercially reasonable steps, as soon as reasonably practicable, to disable SDK functionality in previously distributed applications and remove the SDK through application updates. Licensee need not recall or remotely delete applications from end-user devices where it lacks the technical ability to do so. Any SDK copies remaining on such devices may not be used to access the Whatfix Platform. Licensee shall destroy other SDK copies in its possession or control, except a copy required by law or retained in routine backups, which must remain protected and unused until deleted in the ordinary course. Any temporary retention permitted by this Section grants no continued production-use rights.
92
+
93
+ **9.4** Sections 3, 4, 6, 7.2, 8, 9.3, 9.4 and 10 survive expiry or termination. Section 5.4 continues to apply to any retained personal data. The MSA's survival provisions also apply.
94
+
95
+ ## 10. General
96
+
97
+ **10.1 Relationship with MSA:** The SDK forms part of the services provided under that agreement. Its provisions concerning confidentiality, data protection, warranties, indemnification, support, suspension, termination and liability apply to the SDK. This Agreement supplements that agreement solely with respect to SDK licensing and use. In the event of conflict, the MSA controls, subject to its own order-of-precedence provisions.
98
+
99
+ **10.2 Governing Law and Disputes:** The governing law and dispute-resolution provisions of the MSA apply to this Agreement.
100
+
101
+ **10.3 Notices:** Notices shall follow the MSA.
102
+
103
+ **10.4 Assignment:** Assignment is governed by the MSA.
104
+
105
+ **10.5 Entire Agreement; Other Terms:** This Agreement and the MSA constitute the entire agreement concerning the SDK. Amendments must be agreed in writing by authorized representatives, including electronically. If a provision is unenforceable, the remainder remains effective. Failure to enforce a provision is not a waiver. Neither party is the other's agent or partner.
@@ -1,19 +1,22 @@
1
- require 'json'
1
+ require "json"
2
2
 
3
- package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
3
+ # The package version and the Leap SDK versions come from package.json (see scripts/bump.js).
4
+ # Capacitor apps that use Swift Package Manager get Package.swift instead.
5
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
6
 
5
7
  Pod::Spec.new do |s|
6
- s.name = 'LeapCapacitor'
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 = '15.0'
15
- s.dependency 'Capacitor'
16
- s.swift_version = '5.1'
8
+ s.name = "LeapCapacitor"
9
+ s.version = package["version"]
10
+ s.summary = package["description"]
11
+ s.license = { :type => "Commercial", :file => "LICENSE.md" }
12
+ s.homepage = "https://leap.whatfix.com/"
13
+ s.author = package["author"]
14
+ # Installed from the npm package (Capacitor's Podfile uses :path), never from this source.
15
+ s.source = { :git => "https://github.com/whatfix/capacitor-plugin.git", :tag => s.version.to_s }
16
+ s.source_files = "ios/Sources/**/*.swift"
17
+ s.ios.deployment_target = "15.0"
18
+ s.dependency "Capacitor"
19
+ s.swift_version = "5.1"
17
20
 
18
- s.dependency "LeapSDK", "2.2.9"
21
+ s.dependency "LeapSDK", package["leapSdk"]["ios"]
19
22
  end
package/Package.swift ADDED
@@ -0,0 +1,30 @@
1
+ // swift-tools-version: 5.9
2
+ // leap-capacitor for Capacitor apps that use Swift Package Manager (Capacitor 6+); CocoaPods apps use
3
+ // LeapCapacitor.podspec. The Capacitor CLI names the package after the npm package (LeapCapacitor).
4
+ //
5
+ // The Leap iOS SDK version is set by scripts/bump.js from package.json (leapSdk.ios), and npm only
6
+ // ships this file from Leap iOS 2.2.12, the first release whose Swift package resolves.
7
+ import PackageDescription
8
+
9
+ let package = Package(
10
+ name: "LeapCapacitor",
11
+ platforms: [.iOS(.v15)],
12
+ products: [
13
+ .library(name: "LeapCapacitor", targets: ["LeapPlugin"])
14
+ ],
15
+ dependencies: [
16
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", "6.0.0"..<"9.0.0"),
17
+ .package(url: "https://github.com/Leap-Platform/leap-ios.git", exact: "2.3.0")
18
+ ],
19
+ targets: [
20
+ .target(
21
+ name: "LeapPlugin",
22
+ dependencies: [
23
+ .product(name: "Capacitor", package: "capacitor-swift-pm"),
24
+ .product(name: "Cordova", package: "capacitor-swift-pm"),
25
+ .product(name: "LeapSDK", package: "leap-ios")
26
+ ],
27
+ path: "ios/Sources/LeapPlugin"
28
+ )
29
+ ]
30
+ )
@@ -17,6 +17,9 @@ buildscript {
17
17
 
18
18
  apply plugin: 'com.android.library'
19
19
 
20
+ // The Leap Android SDK version comes from the package's package.json (leapSdk.android).
21
+ def leapSdkVersions = new groovy.json.JsonSlurper().parse(file("$projectDir/../package.json")).leapSdk
22
+
20
23
  android {
21
24
  namespace "is.leap.capacitor"
22
25
  compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
@@ -51,7 +54,7 @@ repositories {
51
54
  dependencies {
52
55
  implementation fileTree(dir: 'libs', include: ['*.jar'])
53
56
  implementation project(':capacitor-android')
54
- implementation 'is.leap.android:sdk:2.2.13'
57
+ implementation "is.leap.android:sdk:${leapSdkVersions.android}"
55
58
  implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
56
59
  testImplementation "junit:junit:$junitVersion"
57
60
  androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
@@ -22,9 +22,25 @@ let LEAP_EXCEPTION_CALLBACKS = "leapExceptionCallbacks"
22
22
  * here: https://capacitorjs.com/docs/plugins/ios
23
23
  */
24
24
  @objc(LeapPlugin)
25
+ public class LeapPlugin: CAPPlugin, CAPBridgedPlugin {
26
+ // Registers the plugin with Capacitor (6+), replacing the CAP_PLUGIN macro in LeapPlugin.m, which
27
+ // Swift Package Manager can't build. Keep in sync with LeapPluginInterface in src/definitions.ts.
28
+ public let identifier = "LeapPlugin"
29
+ public let jsName = "LeapPlugin"
30
+ public let pluginMethods: [CAPPluginMethod] = [
31
+ CAPPluginMethod(name: "start", returnType: CAPPluginReturnPromise),
32
+ CAPPluginMethod(name: "startWithSelfHostingEnabled", returnType: CAPPluginReturnPromise),
33
+ CAPPluginMethod(name: "flushProperties", returnType: CAPPluginReturnPromise),
34
+ CAPPluginMethod(name: "startProject", returnType: CAPPluginReturnPromise),
35
+ CAPPluginMethod(name: "embedProject", returnType: CAPPluginReturnPromise),
36
+ CAPPluginMethod(name: "setUniqueUserId", returnType: CAPPluginReturnPromise),
37
+ CAPPluginMethod(name: "setAppLocale", returnType: CAPPluginReturnPromise),
38
+ CAPPluginMethod(name: "offlineSync", returnType: CAPPluginReturnPromise),
39
+ CAPPluginMethod(name: "disable", returnType: CAPPluginReturnPromise),
40
+ CAPPluginMethod(name: "logout", returnType: CAPPluginReturnPromise),
41
+ CAPPluginMethod(name: "registerExceptionCallback", returnType: CAPPluginReturnPromise)
42
+ ]
25
43
 
26
- public class LeapPlugin: CAPPlugin {
27
-
28
44
  var exceptionCall:CAPPluginCall?
29
45
 
30
46
  @objc public func start(_ call: CAPPluginCall) {
package/package.json CHANGED
@@ -1,27 +1,26 @@
1
1
  {
2
2
  "name": "leap-capacitor",
3
- "version": "2.2.5",
3
+ "version": "2.3.0",
4
+ "leapSdk": {
5
+ "ios": "2.3.0",
6
+ "android": "2.3.0"
7
+ },
4
8
  "description": "Plugin for Leap",
5
9
  "main": "dist/plugin.cjs.js",
6
10
  "module": "dist/esm/index.js",
7
11
  "types": "dist/esm/index.d.ts",
8
12
  "unpkg": "dist/plugin.js",
9
13
  "files": [
14
+ "LICENSE.md",
10
15
  "android/src/main/",
11
16
  "android/build.gradle",
12
17
  "dist/",
13
- "ios/Plugin/",
14
- "LeapCapacitor.podspec"
18
+ "ios/Sources/",
19
+ "LeapCapacitor.podspec",
20
+ "Package.swift"
15
21
  ],
16
22
  "author": "Leap",
17
- "license": "Apache-2.0",
18
- "repository": {
19
- "type": "git",
20
- "url": "https://www.npmjs.com/package/leap-capacitor.git"
21
- },
22
- "bugs": {
23
- "url": "https://www.npmjs.com/package/leap-capacitor/issues"
24
- },
23
+ "license": "SEE LICENSE IN LICENSE.md",
25
24
  "keywords": [
26
25
  "capacitor",
27
26
  "plugin",
@@ -29,7 +28,7 @@
29
28
  ],
30
29
  "scripts": {
31
30
  "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
32
- "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
31
+ "verify:ios": "xcodebuild build -scheme LeapCapacitor -destination generic/platform=iOS",
33
32
  "verify:android": "cd android && ./gradlew clean build test && cd ..",
34
33
  "verify:web": "npm run build",
35
34
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
@@ -62,10 +61,10 @@
62
61
  "typescript": "^5.9.3"
63
62
  },
64
63
  "peerDependencies": {
65
- "@capacitor/core": ">=3.0.0"
64
+ "@capacitor/core": ">=6.0.0"
66
65
  },
67
66
  "prettier": "@ionic/prettier-config",
68
- "swiftlint": "@ionic/swiftlint-config",
67
+ "swiftlint": "@ionic/swiftlint-config",
69
68
  "capacitor": {
70
69
  "ios": {
71
70
  "src": "ios"
@@ -80,4 +79,4 @@
80
79
  "glob": "^10.0.0",
81
80
  "rimraf": "^5.0.0"
82
81
  }
83
- }
82
+ }
@@ -1,24 +0,0 @@
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>
@@ -1,10 +0,0 @@
1
- #import <UIKit/UIKit.h>
2
-
3
- //! Project version number for Plugin.
4
- FOUNDATION_EXPORT double PluginVersionNumber;
5
-
6
- //! Project version string for Plugin.
7
- FOUNDATION_EXPORT const unsigned char PluginVersionString[];
8
-
9
- // In this header, you should import all the public headers of your framework using statements like #import <Plugin/PublicHeader.h>
10
-
@@ -1,18 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
- #import <Capacitor/Capacitor.h>
3
-
4
- // Define the plugin using the CAP_PLUGIN Macro, and
5
- // each method the plugin supports using the CAP_PLUGIN_METHOD macro.
6
- CAP_PLUGIN(LeapPlugin, "LeapPlugin",
7
- CAP_PLUGIN_METHOD(start, CAPPluginReturnPromise);
8
- CAP_PLUGIN_METHOD(startWithSelfHostingEnabled, CAPPluginReturnPromise);
9
- CAP_PLUGIN_METHOD(flushProperties, CAPPluginReturnPromise);
10
- CAP_PLUGIN_METHOD(startProject, CAPPluginReturnPromise);
11
- CAP_PLUGIN_METHOD(embedProject, CAPPluginReturnPromise);
12
- CAP_PLUGIN_METHOD(setUniqueUserId, CAPPluginReturnPromise);
13
- CAP_PLUGIN_METHOD(setAppLocale, CAPPluginReturnPromise);
14
- CAP_PLUGIN_METHOD(offlineSync, CAPPluginReturnPromise);
15
- CAP_PLUGIN_METHOD(disable, CAPPluginReturnPromise);
16
- CAP_PLUGIN_METHOD(logout, CAPPluginReturnPromise);
17
- CAP_PLUGIN_METHOD(registerExceptionCallback, CAPPluginReturnPromise);
18
- )