Hello everyone,
I’m developing a hybrid app using Vue.js with Capacitor (v6.x) and need to comply with Apple’s new requirements for Reader Apps by implementing the External Link Account API (StoreKit 2) on iOS.
What I’m trying to do:
-
Show the official Apple modal (StoreKit External Link Account) before redirecting users to manage their accounts/subscriptions outside the app, as required by App Store Review Guideline 3.1.1.
-
My app is built with Vue (Nuxt 2) and Capacitor, and I am not using any third-party SDKs for authentication or payments.
What I’ve tried:
-
Created a custom Capacitor plugin in Swift that tries to use SKStoreExternalLinkAccountRequest and SKStoreExternalLinkAccountViewController as described in the Apple documentation.
-
Set the iOS Deployment Target to 16.0+ and am using Xcode 16.
-
The plugin is correctly installed and appears in Xcode, and the bridge seems to work for other plugins.
The problem:
- When I try to use the StoreKit 2 classes in my Swift plugin, Xcode gives me the error:
Cannot find ‘SKStoreExternalLinkAccountRequest’ in scope
Cannot find ‘SKStoreExternalLinkAccountViewController’ in scope
-
I have imported StoreKit and followed the documentation, but these classes are not recognized in my plugin code.
-
The plugin is correctly referenced in my Podfile and Podspec, and all Capacitor sync and pod install steps have been done.
Questions:
-
Has anyone managed to use the External Link Account API in a hybrid (Vue + Capacitor) app?
-
Is there any special configuration needed for hybrid apps to access these StoreKit 2 APIs?
-
Are there any known limitations or workarounds for using these APIs in a Capacitor plugin?
-
Any open-source example or repo would be greatly appreciated!
Environment:
-
Capacitor version: 6.2.1
-
Xcode version: 16.x
-
iOS Deployment Target: 16.0
-
Vue/Nuxt 2
-
Custom Capacitor plugin in Swift
Any help, tips, or references would be greatly appreciated!
Thank you!