Post

Replies

Boosts

Views

Activity

Reply to Is there a `isiOSAppOnVision` flag to check iOS app on Vision Pro at runtime?
A runtime check would be great, but the person compiling the app knows which they are targeting (a compatible iPad app, or a visionOS app), so a custom compiler flag could be set and tested in the code with #if, right? In Build Settings-> Swift Compiler - Custom Flags -> Active Compiler definitions -> add e.g. ISVISIONOS for a true visionOS app, and leave it out for iPad apps. The different Xcode targets have their own build settings. and in swift: #if ISVISIONOS Sorry if I'm missing something from your question.
Apr ’24