I have created a SwiftUI app for iOS. Under deployment info, I have only Iphone and Ipad checked off.
I have plugged in my iOS physical device.
When I click the run (triangle play button) it launches a macOs desktop app instead of on my iOS device.
How do I change the configuration to run on my iOS device?
CodePudding user response:
I'm guessing that this is occurring because you have one of the newer Macs with an Apple Silicon processor. These computers allow you to run your iOS apps as Mac apps (you can even download some iOS/iPadOS apps on the Mac App Store.
To make it run on a Simulator or on your physical iOS device, select the device from the devices/simulators dropdown at the top of Xcode. If your iOS device is connected to your Mac, you can select it in this dropdown, or you can select a device.