All I need to do is execute one line of Swift:
let verificationResult = try await AppTransaction.shared
and look at verification result.
According to the less-than-worthless documentation here:
https://developer.apple.com/documentation/swift/importing-swift-into-objective-c
“You can work with types declared in Swift from within the Objective-C code in your project by importing an Xcode-generated header file.” Generating the header file and including it in my project and .m file doesn't make XCode recognize the types.
Theoretically you could call some C version of the above line from your .m file. Carefully following the incomplete documentation I can’t do it so Xcode will recognize the three types, verificationResult (also spelled as VerificationResult, upper case ‘V’ in the documentation), AppTransaction and its method, shared. Including AppTransaction (and verificationResult and shared) in my .m code results in a error:
Use of undeclared identifier ‘AppTransaction’ (all three types); XCode doesn't complain about the syntax, it just doesn't recognize the types.
Your advice not to try to call StoreKit’s Swift functions directly from objC is good, since it’s not really possible using the developer documentation.
The documentation here:
https://developer.apple.com/documentation/swift/migrating-your-objective-c-code-to-swift/
Tells me how to sub-class an Objective-C class in Swift to use it in an Objective-C project, but not to do what you describe “Write a short Swift function that calls StoreKit, and call that from objC”.
Maybe you know about some documentation describing how to do this?