0
0
iOS Swiftmobile~10 mins

Simulator usage in iOS Swift - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to launch the iOS Simulator from the command line.

iOS Swift
xcrun simctl [1] <device-uuid>
Drag options to blanks, or click blank then click option'
Aboot
Binstall
Clist
Dshutdown
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'shutdown' instead of 'boot' will turn off the simulator.
Using 'list' only shows devices but does not start one.
2fill in blank
medium

Complete the code to list all available simulator devices.

iOS Swift
xcrun simctl [1] devices
Drag options to blanks, or click blank then click option'
Adelete
Bboot
Ccreate
Dlist
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'boot' will try to start a device, not list them.
Using 'create' or 'delete' changes devices, not lists them.
3fill in blank
hard

Fix the error in the command to install an app on the simulator.

iOS Swift
xcrun simctl [1] <device-uuid> <path-to-app>
Drag options to blanks, or click blank then click option'
Aboot
Blaunch
Cinstall
Dcreate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'boot' tries to start the device, not install an app.
Using 'launch' requires the app to be already installed.
4fill in blank
hard

Fill both blanks to create a new simulator device with a specific name and device type.

iOS Swift
xcrun simctl create [1] [2] com.apple.CoreSimulator.SimRuntime.iOS-17-0
Drag options to blanks, or click blank then click option'
AMyTestDevice
BiPhone-14
CiPhone-13
DTestDevice
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping device name and type will cause errors.
Using invalid device types will fail to create the device.
5fill in blank
hard

Fill all three blanks to launch an app on a booted simulator device.

iOS Swift
xcrun simctl [1] [2] [3]
Drag options to blanks, or click blank then click option'
Alaunch
Bdevice-uuid
Ccom.example.MyApp
Dinstall
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'install' instead of 'launch' will only install, not run the app.
Using wrong device UUID or bundle ID will cause failure.