0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

iPhoneの実機からMacのlocalhostに接続する方法

Posted at

Mac上のモック化されたAPIサーバーにiPhoneの実機から接続する方法です。

手順

  • iPhoneのインターネット共有を有効にします
  • MacからiPhoneのネットワークを利用するようにネットワーク設定を変更します
  • MacのIPアドレスを調べます
  • MacのIPアドレスをコードで指定します(例: http://172.20.10.2/hoge.json )
  • iPhoneの実機からAPIなどを実行します

参考
https://ishwar-rimal.medium.com/accessing-macs-localhost-on-your-iphone-5d564a387f09

0
1
0

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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?