How to simulate Ionic iOS app on specific simulator?

edited December 2021 in Ionic

1.Run the following command to get the list of available simulators

ionic cordova run ios --list


#Response will look like below text shown

[native-run]   Name                                    API        Target ID
[native-run]   ---------------------------------------------------------------------------------------
[native-run]   iPhone 12 Pro                           iOS 15.0   5903553D-3A79-4E84-80C8-6051EB53DDE1
[native-run]   iPhone 12 Pro Max                       iOS 15.0   60506054-57FD-4AD6-A6DE-3C832ABB1DB6

2.Copy the target ID of the emulator in which you want to run your app and execute the below command

ionic cordova run ios -l --target='Target ID'



That's it, now your app will be running in the selected emulator.

Tagged:
Sign In or Register to comment.