Question about the device used to be run the app

Hello, since I'm using SwiftUI and some interface should be optimized for different devices(like iPad and iPhone), so I'm curious that what device would be used to run the App? Is it iPad or iPhone?

And could I use SDKs like SiriKit?

Great question, if you are new in Xcode I would recommend to use the simulators, about using simulators for testing your SwiftUI app on different devices. When you run your app from Xcode without specifying a target device, it will typically run on the latest available iPhone simulator by default. However, to test how your interface optimizes for different devices like iPad, you can easily switch to the desired simulator. Here's how:

  • In Xcode, go to the Product menu.
  • Select 'Destination' -> 'Simulator'.
  • From the list of available simulators, choose the iPad model you want to test on.

You can run your app on multiple simulators at once to see how it looks on different devices simultaneously.

Regarding SiriKit, yes, you can definitely use it in your app to enable voice interactions with Siri. To do that:

  • Make sure your project is targeting iOS 10 or later, as SiriKit was introduced in iOS 10.
  • Add the 'SiriKit' capability to your project target in Xcode.
  • Implement the necessary SiriKit Intents and IntentsHandling classes in your Swift code.

Albert Pascual
  Worldwide Developer Relations.

Here are some resources that you might find helpful:

After you are happy with the interface, I would recommend to use a physical device to test it with.

Feel free to ask if you have any further questions! Happy coding!

Question about the device used to be run the app
 
 
Q