Skip to content

Instantly share code, notes, and snippets.

@uupaa
Last active December 25, 2015 04:39
Show Gist options
  • Save uupaa/6918509 to your computer and use it in GitHub Desktop.
Save uupaa/6918509 to your computer and use it in GitHub Desktop.
command line, ios simulator, xcode, mobilesafari, safari, open url

コマンドラインから iOS シミュレーターを起動し指定したURLをブラウザで開く

コマンドラインから iOS シミュレーターを起動し、
シミュレーター上の MobileSafari で、指定した URL (例: http://example.com/ ) を直接開くことが可能です。

/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://example.com
  • パスの途中の iPhoneSimulator7.0.sdk の部分は、インストールされている Xcode により異なる場合があります。確認の上で調整してください。
  • MobileSafari -u http://example.com で URL を指定しています。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment