how to send data from iphone over wifi to application, to print message

前端 未结 2 1171
长发绾君心
长发绾君心 2021-01-31 12:15

i would like to know how to do the following:

step 1: how to send the following string from the iphone to a mac computer via WIFI when a user presses a

2条回答
  •  盖世英雄少女心
    2021-01-31 12:51

    If by "wifi", you mean "local network", this blog post has some sample code that has an iPhone app and Mac application communicating via Bonjour. It does a bit more that what you're asking for, but it's something that will get you started.

    If by "wifi", you mean "the Internet", you're going to need your own server sitting between the two devices. This is significantly more complex, but still doable, and you'll need to implement the server portion in whatever you're preferred server side technology is.

提交回复
热议问题