Capacitor 7 support: peer >=7.0.0, capacitor-swift-pm 7..<9, iOS 14 deployment target, Android minSdk fallback 23; Cap 7.6.9 compile check notes

This commit is contained in:
CRTkafa 2026-10-10 05:41:32 +08:00
parent 577d50d2c9
commit 8dde08bcd9
5 changed files with 23 additions and 6 deletions

View file

@ -13,7 +13,7 @@ Pod::Spec.new do |s|
s.author = package['author'] s.author = package['author']
s.source = { :git => "#{repo}.git", :tag => "v#{s.version}" } s.source = { :git => "#{repo}.git", :tag => "v#{s.version}" }
s.source_files = 'ios/Sources/**/*.{swift,h,m}' s.source_files = 'ios/Sources/**/*.{swift,h,m}'
s.ios.deployment_target = '15.0' s.ios.deployment_target = '14.0'
s.dependency 'Capacitor' s.dependency 'Capacitor'
# Unity LevelPlay SDK (ironSource), https://cocoapods.org/pods/IronSourceSDK # Unity LevelPlay SDK (ironSource), https://cocoapods.org/pods/IronSourceSDK
s.dependency 'IronSourceSDK', '~> 9.6.1' s.dependency 'IronSourceSDK', '~> 9.6.1'

View file

@ -3,14 +3,14 @@ import PackageDescription
let package = Package( let package = Package(
name: "CapacitorLevelplay", name: "CapacitorLevelplay",
platforms: [.iOS(.v15)], platforms: [.iOS(.v14)],
products: [ products: [
.library( .library(
name: "CapacitorLevelplay", name: "CapacitorLevelplay",
targets: ["LevelPlayPlugin"]) targets: ["LevelPlayPlugin"])
], ],
dependencies: [ dependencies: [
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0"), .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", "7.0.0"..<"9.0.0"),
// Official Unity LevelPlay SDK (binary xcframework + Ad Quality), https://github.com/ironsource-mobile/LevelPlay-Swift-Package // Official Unity LevelPlay SDK (binary xcframework + Ad Quality), https://github.com/ironsource-mobile/LevelPlay-Swift-Package
.package(url: "https://github.com/ironsource-mobile/LevelPlay-Swift-Package.git", "9.6.1"..<"10.0.0") .package(url: "https://github.com/ironsource-mobile/LevelPlay-Swift-Package.git", "9.6.1"..<"10.0.0")
], ],

View file

@ -25,7 +25,7 @@ android {
namespace = "fyi.crt.capacitor.levelplay" namespace = "fyi.crt.capacitor.levelplay"
compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36 compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
defaultConfig { defaultConfig {
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24 minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36 targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"

View file

@ -385,7 +385,7 @@ constants `ERROR_BN_LOAD_NO_FILL`, `ERROR_BN_UNSUPPORTED_SIZE`, `ERROR_BN_RELOAD
`loadNativeAd`, `showNativeAd` reject `unimplemented` (they would have to return a frame or show a view; same rule as `loadNativeAd`, `showNativeAd` reject `unimplemented` (they would have to return a frame or show a view; same rule as
`initialize`). `initialize`).
## 12. Capacitor 7 compatibility (findings only; `peerDependencies` unchanged) ## 12. Capacitor 7 compatibility (applied in 0.3.0, see §17)
Plugin-facing Java and Swift API is identical between 7.6.9 and 8.5.3 for everything this plugin uses: Plugin-facing Java and Swift API is identical between 7.6.9 and 8.5.3 for everything this plugin uses:
@ -571,3 +571,20 @@ adapters, ironSource Ads filled):
logged: title truncated, media view filling the rest, CTA right-aligned, web-asset font applied). logged: title truncated, media view filling the rest, CTA right-aligned, web-asset font applied).
- Not seen: interstitial, close of the rewarded ad, rotation (adaptive recreation), `setBannerLayout`, banner - Not seen: interstitial, close of the rewarded ad, rotation (adaptive recreation), `setBannerLayout`, banner
click / expand / collapse / left-application, `nativeAdClicked`, `adInfoChanged`, Capacitor 7. Compiled only. click / expand / collapse / left-application, `nativeAdClicked`, `adInfoChanged`, Capacitor 7. Compiled only.
## 17. Capacitor 7 verification (phase 7)
Applied the §12 changes: peer `@capacitor/core >=7.0.0`; `Package.swift` `capacitor-swift-pm` `"7.0.0"..<"9.0.0"` and
`.iOS(.v14)`; podspec `14.0`; Android `minSdkVersion` fallback 23. The plugin's `buildscript` AGP classpath (8.13.0)
was left as is.
Compile check with a scratch copy of `example-app/` on Capacitor 7.6.9 (`@capacitor/core`, `cli`, `android`, `ios`),
fresh `npx cap add android` and `npx cap add ios --packagemanager SPM`:
- Android `assembleDebug`: succeeds in the Cap 7 template (AGP 8.7.2, compileSdk 35, minSdk 23, JDK 21); no
"multiple AGP versions" clash.
- iOS simulator build (`CODE_SIGNING_ALLOWED=NO`): SPM resolves `capacitor-swift-pm` 7.x with the plugin's range and
the build succeeds. The Cap 7 template's app target is iOS 14.0, which Xcode 27 rejects for any app ("supported
deployment target versions is 15.0 to 27.0"); with the app target raised to 15.0 it builds. The plugin itself only
uses iOS 14 APIs (`Logger`, ATT) but iOS 14 availability was not compiler-checked with Xcode 27.
- Not run on a device or emulator with Capacitor 7.

View file

@ -69,7 +69,7 @@
"typescript": "^5.9.3" "typescript": "^5.9.3"
}, },
"peerDependencies": { "peerDependencies": {
"@capacitor/core": ">=8.0.0" "@capacitor/core": ">=7.0.0"
}, },
"capacitor": { "capacitor": {
"ios": { "ios": {