@revenuecat/purchases-capacitor-ui 11.2.17 → 11.3.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/Package.swift ADDED
@@ -0,0 +1,26 @@
1
+ // swift-tools-version: 5.9
2
+ import PackageDescription
3
+
4
+ let package = Package(
5
+ name: "RevenuecatPurchasesCapacitorUi",
6
+ platforms: [.iOS(.v14)],
7
+ products: [
8
+ .library(
9
+ name: "RevenuecatPurchasesCapacitorUi",
10
+ targets: ["RevenuecatPurchasesCapacitorUi"])
11
+ ],
12
+ dependencies: [
13
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0"),
14
+ .package(url: "https://github.com/RevenueCat/purchases-hybrid-common.git", exact: "17.21.0")
15
+ ],
16
+ targets: [
17
+ .target(
18
+ name: "RevenuecatPurchasesCapacitorUi",
19
+ dependencies: [
20
+ .product(name: "Capacitor", package: "capacitor-swift-pm"),
21
+ .product(name: "Cordova", package: "capacitor-swift-pm"),
22
+ .product(name: "PurchasesHybridCommonUI", package: "purchases-hybrid-common")
23
+ ],
24
+ path: "ios/Sources/RevenuecatPurchasesCapacitorUI")
25
+ ]
26
+ )
@@ -10,9 +10,9 @@ Pod::Spec.new do |s|
10
10
  s.homepage = package['repository']['url']
11
11
  s.author = package['author']
12
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}'
13
+ s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
14
14
  s.ios.deployment_target = '15.0'
15
15
  s.dependency 'Capacitor'
16
- s.dependency 'PurchasesHybridCommonUI', '17.21.2'
16
+ s.dependency 'PurchasesHybridCommonUI', '17.24.0'
17
17
  s.swift_version = '5.1'
18
18
  end
@@ -8,7 +8,7 @@ buildscript {
8
8
  mavenCentral()
9
9
  }
10
10
  dependencies {
11
- classpath 'com.android.tools.build:gradle:8.13.1'
11
+ classpath 'com.android.tools.build:gradle:8.13.2'
12
12
  classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.20'
13
13
  }
14
14
  }
@@ -51,6 +51,6 @@ repositories {
51
51
  dependencies {
52
52
  implementation project(':capacitor-android')
53
53
  implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
54
- implementation 'com.revenuecat.purchases:purchases-hybrid-common-ui:17.21.2'
54
+ implementation 'com.revenuecat.purchases:purchases-hybrid-common-ui:17.24.0'
55
55
  implementation "org.jetbrains.kotlin:kotlin-stdlib:1.8.20"
56
56
  }
@@ -7,7 +7,14 @@ import PurchasesHybridCommonUI
7
7
  * Based on the official RevenueCat Flutter UI SDK approach
8
8
  */
9
9
  @objc(RevenueCatUIPlugin)
10
- public class RevenueCatUIPlugin: CAPPlugin {
10
+ public class RevenueCatUIPlugin: CAPPlugin, CAPBridgedPlugin {
11
+ public let identifier = "RevenueCatUIPlugin"
12
+ public let jsName = "RevenueCatUI"
13
+ public let pluginMethods: [CAPPluginMethod] = [
14
+ CAPPluginMethod(name: "presentPaywall", returnType: CAPPluginReturnPromise),
15
+ CAPPluginMethod(name: "presentPaywallIfNeeded", returnType: CAPPluginReturnPromise),
16
+ CAPPluginMethod(name: "presentCustomerCenter", returnType: CAPPluginReturnPromise),
17
+ ]
11
18
 
12
19
  // MARK: - Properties
13
20
 
@@ -141,6 +148,7 @@ public class RevenueCatUIPlugin: CAPPlugin {
141
148
  }
142
149
  }
143
150
 
151
+ @available(iOS 15.0, *)
144
152
  private extension RevenueCatUIPlugin {
145
153
 
146
154
  func processOfferingOptions(_ call: CAPPluginCall) -> [String: Any]? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revenuecat/purchases-capacitor-ui",
3
- "version": "11.2.17",
3
+ "version": "11.3.1",
4
4
  "description": "UI components for RevenueCat Capacitor SDK",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -10,8 +10,9 @@
10
10
  "android/src/main/",
11
11
  "android/build.gradle",
12
12
  "dist/",
13
- "ios/Plugin/",
14
- "RevenuecatPurchasesCapacitorUI.podspec"
13
+ "RevenuecatPurchasesCapacitorUI.podspec",
14
+ "ios/Sources",
15
+ "Package.swift"
15
16
  ],
16
17
  "author": "RevenueCat, Inc.",
17
18
  "license": "MIT",
@@ -45,7 +46,8 @@
45
46
  },
46
47
  "scripts": {
47
48
  "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
48
- "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
49
+ "verify:ios": "xcodebuild -scheme RevenuecatPurchasesCapacitorUi -destination generic/platform=iOS && npm run verify:ios:cocoapods",
50
+ "verify:ios:cocoapods": "cd ios/CocoapodsInstallationTest && pod install && xcodebuild -workspace CocoapodsInstallationTest.xcworkspace -scheme CocoapodsInstallationTest -destination 'generic/platform=iOS' CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=\"\" build",
49
51
  "verify:android": "cd android && ./gradlew clean build test && cd ..",
50
52
  "verify:web": "npm run build",
51
53
  "lint": "npm run eslint && npm run prettier -- --check",
@@ -61,7 +63,7 @@
61
63
  "dependencies": {
62
64
  "@capacitor/core": "^7.0.0",
63
65
  "@revenuecat/purchases-capacitor": "^10.2.4",
64
- "@revenuecat/purchases-typescript-internal-esm": "17.21.2"
66
+ "@revenuecat/purchases-typescript-internal-esm": "17.24.0"
65
67
  },
66
68
  "peerDependencies": {
67
69
  "@capacitor/core": "^7.0.0"
@@ -1,10 +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(RevenueCatUIPlugin, "RevenueCatUI",
7
- CAP_PLUGIN_METHOD(presentPaywall, CAPPluginReturnPromise);
8
- CAP_PLUGIN_METHOD(presentPaywallIfNeeded, CAPPluginReturnPromise);
9
- CAP_PLUGIN_METHOD(presentCustomerCenter, CAPPluginReturnPromise);
10
- )