OSC UDP messages can't be send on iOS14+

Hi guys,

I am trying to get my on Unreal Engine based iOS app running with OSC (https://de.wikipedia.org/wiki/Open_Sound_Control). OSC uses UDP as base to send network messages that can be used to interact with DAWs (like Ableton or Logic Pro). It works fine on MacOS (and all other platforms, except latest iOS). I can RECEIVE OSC messages within the iOS app, but can't SEND some.

Meanwhile I know this is related to privacy system around com.apple.developer.networking.multicast entitlement. I learned a lot from that posts: *https://developer.apple.com/forums/thread/663271 and https://forum.unity.com/threads/ios-14-5-can-not-send-udp-broadcast.1116352/.

So far I did the following:

  1. Got the com.apple.developer.networking.multicast approval - yeah
  2. Enabled it in my provisioning file
  3. Changed my info.plist to include NSLocalNetworkUsageDescription and the Bonjour services
<key>NSLocalNetworkUsageDescription</key>
    <string>Exchange OSC messages with nearby devices.</string>
    <key>NSBonjourServices</key>
    <array>
      <string>_APP_NAME._tcp</string>
      <string>_APP_NAME._udp</string>
    </array>
  1. Add entitlement to my Xcode project
  2. Confirmed that, after build and signing app includes entitlement (as described in link *)

But still, I never see a request for access to local network nor does it SEND messages, which is kind of frustrating. It seems iOS never "sees" an access to local network that triggers ask for permission, which is weird because in log I can see LogSocket warning about using IP4 instead of IP6:

LogSockets: Warning: Destination protocol of 'IPv4' does not match protocol: 'IPv6' for address: '192.168.172.32:1338'

Assumptions: My OSC implementation uses plugin from UE (which is based on C++) and is not using Bonjour service. Do I still have to add *._tcp and *._udp keys to *.plist file? I used name of my app, but I think it should be name of the actual used service, shouldn't it? How can I get this? Is there a way to trace or log the services?

I can't see any blocking message for my socket connection in the logs, is there a way to do "deeper" traces?

Any other suggestions, I am really stuck a bit with ideas to get it running.

All the best, Max

I learned a lot from that posts:

You should also read the Local Network Privacy FAQ.

Changed my Info.plist to include … the Bonjour services

Are you actually using Bonjour? Because if you were just using Bonjour you wouldn’t need the multicast entitlement. And if you’re not using Bonjour, NSBonjourServices is irrelevant.

It seems iOS never "sees" an access to local network that triggers ask for permission, which is weird because in log I can see LogSocket warning about using IP4 instead of IP6:

It sounds like your BSD Sockets code is mishandling the very dynamic TCP/IP environment that you typically find on iOS. I see this all the time, largely because BSD Sockets is such a horribly API )-: I talk about these issues extensively in the various post hanging off Extra-ordinary Networking.

Realistically, the only way to get to the bottom of this is to step in to the library you’re using to figure out why it’s making the choices that it’s making. If you can come back with that info, I should be able to advise you on how to make better choices (-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks for that feedback, indeed very helpful links and advises. I will check the BSD network library and come back to you once I have an idea if and how I can tweak that one.

OSC UDP messages can't be send on iOS14+
 
 
Q