I recently updated to Xcode 6 and now the command I was using before doesn't work:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/Contents/MacOS/iPhone\ Simulator -SimulateApplication /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/Applications/MobileSafari.app/MobileSafari -u "http://google.com/"
I do a lot of front end work and responsive design and must look at the results in every browser multiple times a day. It is very painful without this command.
Also, I would like to open in IOS7 with one command and IOS8 with another.
Inspect the page. In the Safari on your Mac, on the Safari menu bar, choose the "Develop" menu. Scroll to the iOS Simulator option. Select the page for debugging.
Just type this command in Terminal: open -a Simulator. app to launch the most recent simulator. Type this command in Terminal to run the Simulator rigth from the its folder.
Open Xcode. Select the Window menu option. Choose the Devices and Simulators menu. Select the Simulators tab.
DeepLinkr comes with both a Mac and iOS app so you easily verify behavior against the iOS Simulator or your own device.
xcrun simctl openurl <Device UDID> http://www.google.com
You can determine the Device UDID by running xcrun simctl list
or on newer versions, you can use "booted" instead of the UDID to refer to the currently booted device:
xcrun simctl openurl booted http://www.google.com
Note that this requires the iOS Simulator to actually be running. Depending on the version of Xcode.app that you have, you may be able to use the "booted" alias instead of the device UDID to select the currently booted device.
You may also want to look at Xcode 6 - Launch simulator from command line for information about how to launch the iOS Simulator app and have it start a specific device.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With