In App Purchase custom implementation using Storekit 2 for iOS 15+
- SwiftUI: The declarative UI framework from Apple.
- AppStore Connect access to create Bundle Identifier and App
- Xcode 15 and later
- iOS 15 or later
- Please make sure that the project bundle ID is the same as the bundle identifier you added while creating the app in AppStore connect.
- In your Xcode project go to File -> Add Package Dependencies then search for this repo and add -
https://github.com/nathMonisankar/IOS-IAP-store.git
- Import the package
import IosIapStore
- Add the store view anywhere you want
var body: some View {
RootStoreView(userId: "example@gmail.com", apiKey: "YOUR_API_KEY")
}
- Now the products must be visible if you have them in Ready for Submit state in AppStore connect.