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.
Post
Replies
Boosts
Views
Activity
I have found that the audioPlaybackController to be non-functional for me. Since I cold not figure out how to make it active, I just use the Entity's commands .playAudio(audioResource) and .stopAllAudio(). Too bad, I wanted to use the controller's fade method.
-mike