# Arduino and IOS communication

**URL:** <https://forums.kodeco.com/t/arduino-and-ios-communication/43896>\
**Category:** iOS\
**Created:** [June 23, 2018, 3:49am UTC](https://forums.kodeco.com/t/arduino-and-ios-communication/43896 "2018-06-23T03:49:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![harryapps](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/harryapps/32/81494_2.png) [@harryapps](https://forums.kodeco.com/u/harryapps)\
**Post date:** [June 23, 2018, 3:49am UTC](https://forums.kodeco.com/t/arduino-and-ios-communication/43896/1 "2018-06-23T03:49:56Z")

</div>

how to read the text “XXX” from Arduino command server.send(200, “text/plain”,“XXX” ) by swift

---

<div class="post-metadata">

**Author:** ![jayantvarma](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jayantvarma/32/111768_2.png) [@jayantvarma](https://forums.kodeco.com/u/jayantvarma)\
**Post date:** [June 23, 2018, 7:33am UTC](https://forums.kodeco.com/t/arduino-and-ios-communication/43896/2 "2018-06-23T07:33:07Z")

</div>

Hi @harryapps,  
good question but how are you planning to read that? via USB, serial port, wi-fi? It will all depend on the 3rd party libraries that you will use to communicate.

cheers,

Jayant

---

<div class="post-metadata">

**Author:** ![harryapps](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/harryapps/32/81494_2.png) [@harryapps](https://forums.kodeco.com/u/harryapps)\
**Post date:** [June 25, 2018, 8:35am UTC](https://forums.kodeco.com/t/arduino-and-ios-communication/43896/3 "2018-06-25T08:35:45Z")

</div>

Dear Sir,  
I am do it via wifi, but some time they are not communicating although wifi is still available, so i need some recieve signal from ESP. My planning is:

When ESP receive the command from IOS : WebView.loadRequest(request as URLRequest)  
I need ESP respond to IOS, I using the command: server.send(200,“text/plain”,“XXX”)  
But in IOS, I don’t know how to read this text “XXX”. IF I CAN READ THIS TEXT, I WILL EASY TO POST THE WARNING, IF STRING = “XXX”, WIFI CONNECTED ESLE WIFI NOT CONNECTED.

PLS HELP ME IN THIS CASE.  
MANY THANKS

---

<div class="post-metadata">

**Author:** ![jayantvarma](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jayantvarma/32/111768_2.png) [@jayantvarma](https://forums.kodeco.com/u/jayantvarma)\
**Post date:** [June 26, 2018, 11:00am UTC](https://forums.kodeco.com/t/arduino-and-ios-communication/43896/4 "2018-06-26T11:00:20Z")

</div>

@harryapps,  
so you are running a web server on arduino and using a webview on iOS to request, is that correct?

If that is what you are after, then you need to look into URLSession ([Apple Developer Documentation](https://developer.apple.com/documentation/foundation/urlsession?changes=_3)) to get data from an URL as you mentioned.

cheers,

Jayant

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [December 6, 2018, 7:58pm UTC](https://forums.kodeco.com/t/arduino-and-ios-communication/43896/5 "2018-12-06T19:58:58Z")

</div>

This topic was automatically closed after 166 days. New replies are no longer allowed.
