Run ionic project in simulator :
To find out available emulations I run this :
$ ios-sim showdevicetypes
Note : If you get error like this :-
ios-sim: command not found
Please run :
$ npm install -g ios-sim
Now try :
$ ios-sim showdevicetypes
This command will return a list something like this :
iPhone-5, 10.3
iPhone-5s, 10.3
iPhone-6, 10.3
iPhone-6-Plus, 10.3
iPhone-6s, 10.3
iPhone-6s-Plus, 10.3
iPhone-7, 10.3
iPhone-7-Plus, 10.3
iPhone-SE, 10.3
iPad-Air, 10.3
iPad-Air-2, 10.3
iPad-Pro–9-7-inch-, 10.3
iPad-Pro, 10.3
Apple-TV-1080p, tvOS 10.2
Apple-Watch-38mm, watchOS 3.2
Apple-Watch-42mm, watchOS 3.2
Apple-Watch-Series-2-38mm, watchOS 3.2
Apple-Watch-Series-2-42mm, watchOS 3.2
Now run below command :-
$ ionic emulate ios –target=”iPhone-7-Plus, 10.3″
If you getting this error :
Error: ENOENT: no such file or directory, stat ‘/var/root/Library/Logs/CoreSimulator/EBA53E00-C037-4A52-87D3-27CFCF4CA8E5/system.log’
Follow below steps :
This happens due to the permissions on mac:
Here are the steps you can use to correct this issue:
Empty the ‘platforms’ folder in your IONIC project.
Re-run ionic platform add ios, ionic build ios, and ionic emulate ios without sudo.
$ ionic platform remove ios ( to remove platform map be you need to add sudo before this command. like :- $ sudo ionic platform remove ios )
$ ionic platform add ios
$ ionic emulate ios –target=”iPhone-7-Plus, 10.3″
No comments:
Post a Comment