Ionic Tips Weekly
Joshua Morony · 14 lessons · Free on YouTube
INTERACTING WITH IOS SIMULATORS - Ionic Tips Weekly Ep. 13
About this course
[Music] everybody welcome back to ionic tits weekly in this video I just wanted to quickly go over using the iOS simulators and just talking through a few of the
keyboard shortcuts you can use to interact with the simulator just like you would with a normal physical device and so in the editor is sort of better to use a physical device
for testing if you can because it’s a more accurate representation of it will really happen with users and some things you can’t simulate in the simulator but there’s a lot of obviously different
devices and software versions that users might be using so you can’t realistically test on all of those physically so the emulators and simulators are a really good way to test
your applications and so I have Xcode up on the screen right now and I’m specifically using a capacitor project for this you could be using a Cordova project you can open your Cordova
projects up in Xcode as well you could either run the Cordova command to launch the simulator or you could do it through Xcode as well and what you typically would do is you have your application
open here and you can choose a device to run it on through Xcode so you might have an actual real device connected to your computer and in that case you would see that there you could select that or
you can also select any of these different iPhone or iPads in the list here and then you just be able to click Play and it’s going to build your application and run it on the simulator
as well as running your application on a simulator and launching it through this play button here you can also just go into the Xcode menu up here and if you just go to open develop a tool and
select simulator that’s going to launch the simulator and this is just going to be launched just like a normal iPhone really it’s not launching application it is just it is the phone software after
all so it is just going to look like a normal i OS and can have your applications and stored on there and you can interact with them just like you would if you were testing
on a physical device so it might take a little bit to boot up so I’ll just wait for that to happen and then we’ll have a bit of a play around ok so the simulator is finished booting up now you can see
we have an iphone running here it’s iPhone XR running 12 iOS 12.1 and you can see this is just you know looks like a normal I OS device and we can interact with it I can simulate touch gestures by
just dragging the mouse along the screen and I could open up any of these applications as well so I could open up the messages up and you can see we click around in here they got some example
messages that we can go into as typically we would of course launch our own application here and we’d be testing it and if you do launch your application through this interface here it’ll open
straight to your application itself not the home screen of the iOS software and so it might not be immediately obvious how to interact with this outside of just clicking for example if you’re on a
real device you could click the home button you could do gestures you could lock the device we can’t really do that on here actually now that I think about it can you actually click these buttons
which one’s a lock screen do that yes it looks like you can actually interact with the lock button just by clicking it which I didn’t actually know until right now but you can also use keyboard
shortcuts for that I believe it would be command L you can check in this menu up in the top left if you click on Hardware you can see all the different commands we can use to interact with the
simulator here and so yeah so you can see there is a lock option here which is command lways a shortcut you could either click click on it just directly or just hit command L and it’s going to
lock the device and then we could just hit command L again I think news hit any button I’m not sure yet have to come up come on L to bring that up again and then we can just swipe up to get into
the software here you might want to go back to the home screen so you could use a simulated home button click which is shift-command H so hit shift want H that’s going to take me back to our home
screen you might also want to close that application completely when you’re testing maybe you want to close the application completely and reopen it so in that case you could just do the usual
swipe from the bottom gesture that’s going to bring up all of your active apps and then you can just swipe it away like you would on a normal device and so there’s some more options in here as
well we can rotate the device rotate left rotate right now which is just command and then even either left or right so I can just put the phone around like this and so you could use that to
test various orientations in your application can even access Siri we have keyboard and touch precious stuff here as well and so all these options just allow us
to interact with the device mostly in a way that we would with a physical device where obviously we can’t actually touch this bone we can’t move it around so it is still somewhat limited in terms of
what you could actually do with a real physical device but we can get a lot of the functionality and test it out and to see what it would be like on a real physical device keeping in mind that
although this is a pretty accurate representation of what it would be like these simulators aren’t a hundred percent accurate substitute for a physical device okay so I hope you
enjoyed this week’s tip and if you did as always please do feel free to like and subscribe and I will see you in the next video [Music]
THERE IS ALWAYS MORE