For me, UIUserInterfaceSizeClassUnspecified was much closer to what I need.
[just noticed this is redundant with prior comment ;)]
Post
Replies
Boosts
Views
Activity
For Apple Vision (Designed for iPad) there are NO solutions right now (WTF)
is visionOS available will always return true
screen bounds is... unsafe and future risky
The obvious solution doesn't work and always returns false (see SO)
#if os(visionOS)
print("We are in visionOS")
#else
print("We are NOT in visionOS")
#endif
This is frustrating... I hope to find a solution soon, but I think it's on Apple.
Thanks for posting this. Really called out a problem with offering a lifetime, non-consumable IAP along with subs.
The way I will handle this is, and note that my subs go by device (so iPad only, or iPhone only, or iPad-iPhone etc.):
To the user it will look like it's part of the subscription group
If they have an active subscription on the current device... then they can't purchase anything so that's fine.
If they have no active subscription then they can purchase from the group
If they have an active subscription but it's NOT valid for the current device, they would need to crossgrade. Show an alert explaining that they need to cancel their sub first.
"100% guaranteed we will get a lot of 1-star reviews because people won't notice/will forget/will ignore the notifications and then be angry with us over the extra charge." True. Definitely don't sell a thing contingent on some later action. Don't sell the thing until they unsubscribe.
And then you might lose them, so
If they have an active subscription but it's NOT valid for the current device, they don't see the lifetime option.
wait so my app targets iOS 16 and I cannot make a mandatory screenshot on an iOS 16 device? What in the actual f....?
Okay so it's the same aspect ratio as the SE but seriously this is broken.
Grumble!
That Person is Right
Craigaps' answer is spot on (remove class, module, etc. and put them in again).
Why?
Back in the day, Module could be "none" and everything worked.
Once you meddle with your Nib (Xib, or storyboard, or whatever you have), you can no longer do that. Your Storyboard file might still be good even in 2023 (as mine was) but once you muck with it, you have to follow that advice.
Old
Class: YourClass
Module: None (grayed out)
[not checked] inherit Module from Target
.
New
Class: YourClass
Module: Some module (still grayed out)
[checked] inherit Module from Target
.
[By the way this should be totally obvious to an AI someday, but never to a human who is not part of the Xcode team.]
In my case, everything works but Xcode reports errors anyway. In this case, moving around the order of imports in the bridging header helped.
So it's not a real problem but you can solve it anyway.