简体   繁体   中英

iOS Swift: find Macbook Computer Name/Ip Address on connected Iphone

For local development, I was hoping to programmatically get the computer name or ip address of the macbook my iphone is connected to. I've been looking at hostess ; however, it seems to only provide my iphone's ip address. Is this possible?

Thanks so much for the help! Dave

What I've experienced is that if you're building an Xcode project on an iOS device, and then run the project with the debugger attached, it routes all of the iOS device's networking through your computer. So it will only show your computer's IP address, not the device's. It looks in the debugger as if that's your iPhone's networking info, but it's really your computer's.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM