Skip to content

Usage of native APIs (ExternalLinkAccount on iOS) #10031

Answered by rigor789
cdroege asked this question in Q&A
Discussion options

You must be logged in to vote

Seems like ExternalLinkAccount is currently only exposed to Swift and not ObjC. NativeScript currently generates metadata for symbols discoverable through ObjC, so in this case it can't find it.

A workaround for now would be to manually expose it to ObjC from a Swift file in App_Resources/iOS/src/StoreKitCompat.swift (or whatever name makes sense):

import Foundation
import StoreKit

@objc
@objcMembers
class StoreKitCompat: NSObject {

    @available(iOS 16.0.0, *)
    static func ExternalLinkAccountCanOpen() async -> Bool {
        return await ExternalLinkAccount.canOpen
    }

    @available(iOS 16.0.0, *)
    static func ExternalLinkAccountOpen() async {
        do {
            return t…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cdroege
Comment options

Answer selected by cdroege
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants