LoginSignup
44
39

More than 5 years have passed since last update.

iOS Simulator での現在位置の設定をすると捗る

Posted at

位置情報系のアプリをデバックするときには、iOS Simulatorで現在位置を擬似的に設定するとデバックが捗る。

iOS Simulator Menuでの設定

simulator_settings.png

iOS Simulator > Debug > Location の一覧から選ぶことができる。

名前 説明
None 位置の指定なし
Custom Location 座標をしてして移動(下記図)
Apple アップルの本社の座標
City Bicycle Ride 自転車にのったようなスピードで徐々に位置を移動
City Run 走るスピードで徐々に位置を移動
Freeway Drive 車のスピードで徐々に位置を移動

custom.png

Xcodeからの設定

running_settings.png

Xcodeのデバックツールバーに表示されるロケーションのボタンを押下すると、現在の位置が変更できる。
デフォルトでは主要都市が設定できるが、追加で任意のGPXファイルの設定が出来る。

gpx_file.png

サンプルに利用した

44
39
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
44
39