Ad Hoc Wifi Connection Between iPhone & Mac - Possible?

后端 未结 3 2005
再見小時候
再見小時候 2020-12-12 00:57

I was just wondering if it is possible to set up a data transfer tunnel between an iPhone and a Mac using the Wifi hardware present on both devices? My main objective is to

相关标签:
3条回答
  • 2020-12-12 01:09

    You cannot automagically do this, yet. That is, you must manually create the ad hoc wireless network (a "computer-to-computer network" in Apple parlance) first on the Mac, then join the iPhone to it just like any other WiFi network. After this, the methods suggested above will work just fine.

    What I think you are suggesting, also known as WiFi Direct, is a very new specification that is not yet supported by the iPhone or OS X (as of this writing).

    0 讨论(0)
  • 2020-12-12 01:13

    You can make use of Bonjour, via NSNetServices and CFNetServices APIs.

    Basically:

    1. Create a server on the Mac
    2. Announce the server via Bonjour
    3. Browse Bonjour on the phone and resolve the bonjour service.
    4. Establish connection
    5. Exchange data via socket streams
    0 讨论(0)
  • 2020-12-12 01:13

    You'd probably want to look at NSNetServices/CFNetServices (Bonjour) for a common API to accomplish that sort of connection.

    0 讨论(0)
提交回复
热议问题