Skip to content

fix(ios): keep the iap capability android-only so iOS builds - #54

Merged
ReinaldoAssis merged 1 commit into
mainfrom
fix/ios-billing-capability
Oct 27, 2026
Merged

ReinaldoAssis merged 1 commit into
mainfrom
fix/ios-billing-capability

Conversation

@ReinaldoAssis

Copy link
Copy Markdown
Owner

Why

tauri ios build failed while compiling the app build script:

Permission iap:default not found, expected one of core:default, ...
failed to compile iOS app: Failed to run `cargo build`

tauri-plugin-iap is only a dependency for Android (cfg(target_os = "android")) until the StoreKit 2 implementation exists, but capabilities/iap.json still declared platforms: ["android", "iOS"]. tauri-build validates capability permissions per target (validate_capabilities in acl.rs), so on the iOS target the plugin manifest is absent and iap:default cannot be resolved.

What

  • capabilities/iap.json: platforms now ["android"].
  • Cargo.toml, lib.rs, plan.rs: drop the iOS branches so billing/limits are Android-only (iOS is always Pro, same as desktop).
  • Info.plist: version bump to 0.4.0.

No behaviour loss on iOS

plan_status returns pro: true with limits: null outside Android, so planGated() is false and every billing.ts entry point returns early — the paywall never opens and no iap IPC is attempted.

Verification

  • cargo build --package app --target aarch64-apple-ios --lib --release ✅
  • npm run ipa → Atlas.ipa ✅
  • npm run check ✅ · npm test (284) ✅ · npm run build ✅

- `tauri-plugin-iap` is an Android-only dependency until StoreKit 2 exists,
  but `capabilities/iap.json` still listed iOS. tauri-build validates
  capability permissions per target, so the iOS build failed with
  `Permission iap:default not found` and the app build script exited 1,
  breaking `tauri ios build`.
- Declare the capability for Android only, matching the crate target gate.
- No behaviour loss on iOS: plan.rs reports Pro with no limits outside
  Android and billing.ts returns early, so the paywall never opens there.
- Refresh the iOS Info.plist version to 0.4.0.
@ReinaldoAssis
ReinaldoAssis merged commit 5fb4468 into main Oct 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant