StoreKit in IOS 18

I have has a the Storekit working in my application previously.

It uses the a iTunes songs ID and allows the user to purchase the track from iTunes within the app using a View.

its been fine in IOS 17 but since the update to 18 Ive not been able to get this to work.

the iTunes panel loads within the app and shows the track I wish to purchase. on clicking purchase I login with my Apple ID password. that then spins for a few seconds then asks to do the purchase again.

Can you please advise.

code below

        print ("Store ID + \(self.appId)")
        let storeProductViewController = SKStoreProductViewController()
        storeProductViewController.delegate = self
        
        let parameters = [SKStoreProductParameterITunesItemIdentifier: self.appId]
        storeProductViewController.loadProduct(withParameters: parameters) { status, error -> Void in
            if status {
                self.present(storeProductViewController, animated: false, completion: nil)
                print("success: \(status.description)")
            } else {
                if let error = error {
                    print("Error: \(error.localizedDescription)")
                }
            }
        }
        
      DispatchQueue.main.async {
            self.isPresentStoreProduct.wrappedValue = false
        }
    }

if you try out this - https://github.com/daisuke-t-jp/SwiftUIPresentAppStoreProduct

this was working well. I changed the ID from

StoreProductViewControllerRepresentable(isPresentStoreProduct: self.$isPresentStoreProduct, appId: 284602850)

TO

StoreProductViewControllerRepresentable(isPresentStoreProduct: self.$isPresentStoreProduct, appId: 1713357817)

you will not that running the code opens the App Store and lets you get Texas Hold'em.

with this Texas Hold'em page you can download the app and install, with Biometric Approval.

with the app ID as the '1713357817' which relates to this track in iTunes https:\music.apple.com\gb\album\i-want-your-soul-avh-rework\1713357809?i=1713357817&itscg=30201&itsct=bglsk

the password is shown or doesn't show at all, clicking the price to purchase the track doesn't purchase it and doesn't do anything.

**is there a different want now since ios18 to load a track for a user to purchase in iTunes? **

iOS 17 worked fine.

StoreKit in IOS 18
 
 
Q