StoreKit2 with C++ application. How?

Hello all!

My application written with C++ and using StoreKit1. For now my application using bridge C++/Objective-CPP/Objective-C/Swift. Since StoreKit1 declared "deprecated" got a question of how to implement correctly StoreKit2 in C++ application, mostly everything about Renewable Subscriptions. StoreKit2 have no direct API in Objective-C, it's available only in Swift. Which is the way the best and correct way:

-- for on-device writing C library and in it implement Swift? In this case how to add correctly StoreKit2 into library itself?

-- for on-device somehow write kind of wrapper for Swift StoreKit 2 within translation of all of objects in Objective-C and implement it with C++/Objective-CPP bridge? In this case how to add correctly StoreKit2 in C++ project written with CMake? Here https://github.com/compnerd/swift-cmake-examples/tree/main the one of the examples of interoperability C++/Swift with CMake. But how to use exactly with StoreKit2?

-- only using server side solution?

Additional information for the previous post:

I had the same issue.

My solution was to write about 200 lines of Swift to do the SK2 stuff, and call that from the C++ code using the Swift/C++ interop. This wasn’t too painful. Start with example code from WWDC.

Which minimal version of XCode allowing this functionality??? Trying to find any settings that mentioned in WWDC video and my XCode don't have any of it.

The XCode 15.1 15C65 on iMac x86 with Ventura 13.6.7

Could you share link on example code from WWDC? This one https://developer.apple.com/videos/play/wwdc2023/10172?

No, I was referring to a video about using StoreKit2, specifically in my case it was one about using the SubscriptionStoreView.

Which minimal version of XCode allowing this functionality???

I'm currently using xCode 15.1 and I don't recall having to change anything from the defaults to make this work.

StoreKit2 with C++ application. How?
 
 
Q