Ableton / LinkKit

iOS SDK for Ableton Link, a new technology that synchronizes musical beat, tempo, and phase across multiple applications running on one or more devices.
http://ableton.github.io/linkkit
Other
147 stars 10 forks source link

Compiling against iOS 12 SDK – does not find devices on local network #57

Closed frogg closed 2 years ago

frogg commented 3 years ago

An interesting think I‘ve noticed with my app using LinkKit (but could also reproduce in the LinkHut sample app):

When switching to the iOS 12 SDK (or later), LinkKit fails to detect other devices on my local network. Only Links on the same device are detected. Compiled with iOS 11 or older, everything seems to work fine and Links to other devices on the same local network are detected as expected. Why is that? Related to IPv6? Or any permission or capability that might was introduced on iOS 12?

Would be grateful for any advice or feedback!

– Frederik

olympianoiseco commented 3 years ago

This sounds exactly like the issue I'm experiencing on iOS 14 : https://github.com/Ableton/LinkKit/issues/56

I haven't dug into it any deeper, mostly because I am not sure how to proceed.

frogg commented 3 years ago

This sounds exactly like the issue I'm experiencing on iOS 14 :

56

I haven't dug into it any deeper, mostly because I am not sure how to proceed.

Ohh, indeed! Have you had any success compiling against the iOS 11 SDK then? This seems to fix the issue for me…however, I have other dependencies, so the whole app needs to be compiled against the iOS 12 SDK. Thats why I need to figure out why LinkKit doesn't work on the iOS 12+ SDKs.

My guess is something like IPv6 support was enforced more strictly in iOS 12, or a new networking permission / restriction was introduced that LinkKit does not yet consider.

olympianoiseco commented 3 years ago

I didn't change the deployment target (it's set to 12.0, and has previously worked fine), but I encountered the issue once I started using the latest version of Xcode and updated my phone to iOS 14. I'll check on some other devices and see if I can narrow it down more.

designerfuzzi commented 3 years ago

did you check if NSBonjourServices entry is given for the Apps Info.plist? Pretty sure changing deployment targets to iOS14 will trigger your app to conform to newer user consent guidelines. Not sure if reinstalling or erasing and re-deployment would set back those consent entries for the device. As there is nothing mentioned for LinkKit, in short unknown port number or protocol name, its hard to trace where to look for.

frogg commented 3 years ago

did you check if NSBonjourServices entry is given for the Apps Info.plist? Pretty sure changing deployment targets to iOS14 will trigger your app to conform to newer user consent guidelines. Not sure if reinstalling or erasing and re-deployment would set back those consent entries for the device. As there is nothing mentioned for LinkKit, in short unknown port number or protocol name, its hard to trace where to look for.

Hey Frank! I just checked, but my app didn't have a NSBonjourServices entry in the Info.plist…the LinkHut example didn't have one either. So it‘s hard to tell what to put here indeed. In another comment I found out that apparently Bonjour is not used for LinkKit (it is from 2016 though, so not sure if that still applies today). But in the end, we have to ensure that port 20808 is available to the app.

designerfuzzi commented 3 years ago

We could check this out. Wrote a netservice class and netbrowserservice class for my own OSC implementation using zeroconf/bonjour lookups, so users have easy access in a local network to each other. Those classes dont use sockets directly. The sockets are opened once a connection endpoint is established. Works fine under iOS 11-12. in 13 depending on Xcode version its already different. And in iOS 14 i need the user consent to make it work. So local network access is behind a wall from app perspective.. there would be no reason why sockets on other/higher portnumbers should be accessible by default without user consent. Apart from maybe 80 which is possibly accessible on system wide level cause http is running there usually, so keeps a lot trouble from plain WKWebKit coders. Reading about goggle cast api they also changed for iOS 14 because of the needed consent. By the way i have your app(s) running, doing a heavy motion sequencer myself, using link without use of audio buffers. If you need prove of concept we could have chat on it.