Give it a try
https://forums.developer.apple.com/forums/thread/770751?answerId=819978022#819978022
Post
Replies
Boosts
Views
Activity
https://forums.developer.apple.com/forums/thread/770751?answerId=819978022#819978022
I think I roughly understand what’s going on. If you’re using UIKit, the idiots suggest you use confirmIn(scene:), and the purchase(options:) method doesn’t throw any warnings — it works fine in UIKit. So what’s the point of all these warning messages? I haven’t seen any, or if I did, I didn’t pay attention to them. It gives the illusion that it’s related to visionOS.
The confirmIn(scene:) method is useless for apps that use AppDelegate because those apps don’t have a scene or getting access to the scene is not straightforward. Therefore, older apps that use AppDelegate + UIKit + StoreKit 2 could only use the purchase(options:) method. It seems that in iOS 18.2, these idiots realized this issue and introduced the confirmIn(viewController:) method as a workaround.
Adding this new method is fine, but they should ensure that the purchase(options:) method continues to work as expected. Instead, they just outright disabled it! I don’t think this is a bug — I believe they did this intentionally.
My problem is solved:
1 main project:
Switch to the "Build Settings" tab.
Find the "Architectures" and "Valid Architectures" settings and make sure x86_64 has been removed.
Add x86_64 to "Excluded Architectures" to ensure Xcode doesn't try to compile for this architecture.
2 Pods project:
To be in Podfile:
config.build_settings['VALID_ARCHS[sdk=iphonesimulator*]'] = 'arm64e arm64'
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'x86_64'
3 The most important:
When facing xcode, remember to clear DerivedData. This is the most very very very important thing.
I have the same issue too....
me too