Eseguire su simulatore e dispositivo
Compilare e avviare l'app nel simulatore iOS.
Eseguire su simulatore e dispositivo è una lezione SwiftUI Academy gratuita su CoddyKit. Questa è la lezione 4 di 4. Puoi leggere la lezione completa qui gratuitamente — poi esercitati direttamente nel browser con un editor di codice integrato e un tutor IA disponibile 24/7. Fa parte del percorso di apprendimento SwiftUI Academy, e i tuoi progressi si sincronizzano tra il web e l'app CoddyKit. Il corso SwiftUI Academy include 4 lezioni in totale.
Parti di questa lezione non sono ancora state tradotte e vengono mostrate in inglese.
Run Your App
The canvas is great, but to feel the real thing you run your app. Xcode builds it and launches it like a user would. 🚀
The iOS Simulator
The simulator is a virtual iPhone on your Mac. It lets you test your app without owning every physical device.
Pick a Device
In the toolbar, use the scheme menu to choose a simulator like iPhone 15. This sets where your app will launch when you run it.
Press Run
Click the Run button, the triangular play icon, or press Command-R. Xcode compiles your code and boots the simulator for you.
First Build Takes Time
The first build can be slow as Xcode compiles everything. Later runs are much faster because it only rebuilds what changed.
Interact With It
Once it launches, tap and swipe in the simulator like a real phone. Use your mouse or trackpad to test every interaction. 🖐️
Stop the App
The square Stop button ends the running app. Stop and run again whenever you want a fresh launch of your latest code.
Read the Console
At the bottom, the console shows logs and any print output from your app. It is the first place to look when something misbehaves.
print("App launched!")Running on a Real Device
Plug in an iPhone and pick it in the scheme menu to run on a real device. Real hardware shows true performance and gestures.
Sign In With Apple ID
For device runs, Xcode needs a free Apple ID in Settings to sign the app. This trusts your build so the iPhone will open it.
Simulator vs Device
Use the simulator for fast everyday testing, and a real device before release to catch issues only true hardware reveals.
Quick Check
What is the simulator used for during development?
Recap
You can now run your app: pick a simulator or device, press Run, interact, and watch the console. Your first app is alive! 🎉
Domande Frequenti
La lezione «Eseguire su simulatore e dispositivo» è gratuita?
Sì — il testo completo di «Eseguire su simulatore e dispositivo» è gratuito qui sul web. Per esercitarvi in modo interattivo (un editor di codice integrato e un tutor IA 24/7) e sbloccare il resto del corso SwiftUI Academy, passa a CoddyKit PRO. Il corso SwiftUI Academy include 4 lezioni in totale.
Cosa imparerò in «Eseguire su simulatore e dispositivo»?
Compilare e avviare l'app nel simulatore iOS. Eserciti SwiftUI Academy con codice pratico che esegui direttamente nel browser, e un tutor IA 24/7 risponde alle tue domande mentre lavori sulla lezione.
Ho bisogno di esperienza per iniziare SwiftUI Academy?
Non è richiesta alcuna esperienza precedente. SwiftUI Academy su CoddyKit è strutturato per principianti e studenti avanzati, quindi puoi iniziare da qui o dall'inizio e procedere al tuo ritmo. Questa è la lezione 4 di 4.
Quanto tempo richiede la lezione «Eseguire su simulatore e dispositivo»?
La maggior parte delle lezioni CoddyKit richiede circa 5–10 minuti. Ogni lezione è breve e interattiva, quindi fai progressi costanti e riprendi esattamente da dove hai lasciato su web e app.
Posso scrivere ed eseguire codice in questa lezione SwiftUI Academy?
Sì. Ogni lezione SwiftUI Academy include un editor di codice integrato, quindi scrivi ed esegui codice reale direttamente nel tuo browser e ricevi feedback istantaneo dall'IA — nessuna configurazione locale necessaria.
Tutte le lezioni di questo corso
- Installare Xcode e creare un progetto
- Anatomia di un file di app SwiftUI
- La canvas di anteprima in tempo reale
- Eseguire su simulatore e dispositivo