iPhone Simulator in Swift Playgrounds

Hello guys, I would like to run my code in a iOS simulator on Swift Playgrounds. Is it possible to add iPhone simulator there?

Replies

Is it possible to add iPhone simulator there?

As far as I know, the answer is NO.

Swift Playgrounds 4 does not have a tool to explicitly test how your app looks like in each size of devices, nor it does not have an ability to run the app on actual iPhones.

So Swift Playgrounds isn’t for building apps?

  • You can build and submit apps to App Store Connect with Swift Playgrounds 4. You can run apps using the full screen of iPad or watch super fast previews. Just that you cannot test your app on simulators or actual devices. If you want to test apps on simulators and devices, you may need to use Xcode alongside with Swift Playgrounds.

Add a Comment

So Swift Playgrounds isn’t for building apps?

It allows to build and publish apps, but there are still limits. If you want to develop complex apps, you should consider Xcode (and, IMHO, UIKit instead of SwiftUI). But Swift Playgrounds 4 is already a major step ahead…

You may find this reading interesting: h t t p s : / / w w w.theverge.com/2021/6/15/22534902/ipad-pro-apple-swift-playgrounds-4-wwdc-2021

ok, so can I use the Mac Swift Playgrounds too?

  • Swift Playgrounds 4 for Mac is just a Swift 5.5 version of Swift Playgrounds 3. It lacks many features where Swift Playgrounds 4 for iPad can do. Better use Xcode if you have a Mac capable of running it.

Add a Comment

But for creating a playground instead of an app is it ok?

Add a Comment

I thought it is possible to run the app on a real device using TestFlight. Can you please verify if this is possible I will try later this week when I buy the dev membership :) but it should be possible

But isn’t TestFlight just for publishing apps?