Building on iOS (Network capabilities)?

I made a project using mqtt (communication with IoT devices). When testing it on unity it works fine. After I build it and installed it on my iphone, it doesnt work anymore.
Some guy said to me that I maybe need to enable networking capabilities in the Xcode Project before compiling it for the iOS device.

Does anyone has expierence with that and can tell me what to do here in Xcode? And if it is not a Xcode problem, do I need to make some settings when building in Unity?

First go look at the device logs. There’s probably an explicit complaint or exception.

Either way, as far as networking there is a setting for allow non-TLS connections. Perhaps it’s that, but start with the logs.

1 Like

Thanks, could you maybe say where exactly that option for nom-TLS is?

it’s in the Player Settings for iOS and it has moved and changed names over time. I only have an old version of Unity on this machine but here it is called:

8377122--1104396--Screen Shot 2022-08-20 at 6.20.24 AM.png

Here’s some other generic network debugging notes:

Networking, UnityWebRequest, WWW, Postman, curl, WebAPI, etc:

https://discussions.unity.com/t/831681/2

https://discussions.unity.com/t/837672/2

And setting up a proxy can be very helpful too, in order to compare traffic:

https://support.unity.com/hc/en-us/articles/115002917683-Using-Charles-Proxy-with-Unity