how to develop app for visionos use objective c

i dont like swift or swiftUI,i want use objective c only

i want use objective c only

You are going to face some challenges here, and it’s not a path I recommend. Apple generally doesn’t talk about The Future™, but in this case we’ve made our direction very clear. I recommend that you watch WWDC 2022 Session 102 Platforms State of the Union, and specifically Josh’s section starting at 3:43.

Having said that, you should be able to do this…

UIKit is present on visionOS, and that’s accessible from Objective-C. To get started you can create a new app from the iOS > App template and choose Storyboard as the interface and Objective-C as the language. Then, in the General tab of the target editor, add Apple Vision to the Supported Destinations list.

If you do this, you’ll note that Xcode complains that Compiling Interface Builder products for visionOS will not be supported in a future version of Xcode. Storyboards are effectively deprecated on visionOS, so to continue down this path you’ll need to break your dependencies on them, creating your UI programmatically.

However, that’s not the only challenge. Many APIs that make visionOS ‘fly’ are either only available in Swift, or significantly easier to use in Swift. If you want to build an Objective-C only app then you will have to live with these limits.

And, to reiterate, I don’t think this is a good idea. I’ve been through many transitions like this — frankly, I’m still grumpy about the move from Pascal to C — and my experience is that:

  • It’s fine to not live on the bleeding edge. Some folks love being an early adopter, but there are good reasons to take your time and carefully plan your path forward.

  • But do make a plan to move forward. That’s important because, at some point, the work required to stay with the old technology starts to be more than the work required to adopt the new one.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

 if (platform.noUIKitOnlySwiftUIAvailable)
 {
      abort();
 }
how to develop app for visionos use objective c
 
 
Q