Jump to content
philipp.hofmann

Tethering: MacOS 11.x/iOS 14.x devices are not found with TTetheringManager.DiscoverManagers

Recommended Posts

Hi,

even after adding the new Apple Multicast-Entitlement it's not possible to use Tethering with MacOS 11.x and iOS 14.x devices on server side. This devices will not be found with the method 
TTetheringManager.DiscoverManagers
requested on client side.

It's fine with MacOS 10.x and iOS 13.x devices on server side. 

You can test this also with the samples
DesktopWallApp (server)
MobilePhotoApp (client)

 

DesktopWallApp Windows Android MacOS 10.x iOS 13.x MacOS 11.x iOS 14.x
MobilePhotoApp            
Windows OK OK OK OK not OK not OK
Android OK OK OK OK not OK not OK
MacOS 10.x OK OK OK OK not OK not OK
iOS 13.x OK OK OK OK not OK not OK
MacOS 11.x OK OK OK OK not OK not OK
iOS 14.x OK OK OK OK not OK not OK

 

The reason is that the method
TTetheringNetworkManagerCommunicationThread.DoOnReceiveData
is never reached with this OS versions.

This problem crops the usage of Tethering as the biggest part of MacOS/iOS devices are running with the newest OS-version. So Tethering is usable for Windows and Android only.

 

Do anybody knows a solution for this.

 

Best regards, Philipp

 

Activity

Share this post


Link to post

Hello Philipp,

 

I confirm for IOS 14 with Delphi 10.4.2.

But it's work fine with MacOS Big Sur 11.4 (Mac Mini  Intel 2014).

It's even work from my VMware Windows 10, where is my Delphi 10.4.2, connected to my Mac Mini.

My Mac Mini and my PC are connected throw Ethernet. I don't test connected via WIFI.

 

So It's work in every direction :

DesktopWallApp (MacOs 11.4 or Windows 10)

MobilePhotoApp (MacOs 11.4 or Windows 10)

 

I use it every day because I have developed my own Clipboard Sharing based on apptethering between my PC, Mac, Android. But it's only fail (no client/server detected) on IOS 14...

 

Share this post


Link to post

The question for me is now, why it works with your MacOS Big Sur? Is it a different setting for the Mac or a different setting in the provision profile?

Can you see that the method
TTetheringNetworkManagerCommunicationThread.DoOnReceiveData

reached if you start the app on MacOS, equal if DesktopWWallApp or MobilePhotoApp?

Share this post


Link to post

Hello Philipp,

 

Tested on IOS 14.6 with Delphi SDK updated it's style not work.

Sorry but tested with your patch and it's worst because program crash at start in a access violation at 0000000104A0014 at adresse FFFFFFFFFFFFFFF78" in line :

 procedure TTetheringNetworkServerCommUDP.BroadcastData(const AData: TBytes; const AHost: string;
  InitialPort, FinalPort: Integer);
.../...    
   FUDPServer.Bindings.Sockets[J].Broadcast(LData, I, LHost);

 

Before exception local values :

 

InitialPort = 2020

FinalPort = 2039

LHost ='255.255.255.255'

LData = 0x0000000282a00a30 "TetheringNewManager|192.168.1.56$2020|1|{4A03A28F-86DA-EB11-A88B-A1727F35E082}|TakePhotoManager|TakePhotoManager|2020~"

 

 

Edited by FabDev
Add line error

Share this post


Link to post

If there is an access violation at this line, the binding was not successful before.

 

a) Is the IP-address 192.168.1.56 correct for your test? This is the only relevant change by my patches.

b) Did your App has the permission to access local network in iOS settings?

c) Did your Provision profile has the new permission "com.apple.developer.networking.multicast"?
    https://developer.apple.com/contact/request/networking-multicast


On my devices (I've tested with three iOS devices), it works fine (with and without mobile data).

Edited by philipp.hofmann

Share this post


Link to post

I have found now the reason: 
- as long as I have a iPad connected to my MacBook via USB-C-Cable, I can't establish a Tethering connection (means I can't discover the iPad and I can't discover the MacOS device)

- as soon as I remove the cable, I can establish a Tethering connection and can discover both devices

Share this post


Link to post

In most case (to not kill the battery of my Iphone there is no problem for Ipad) I debug via WIFI and it's work fine (compilation/installation/debug not Tethering). But I have tested with USB cable without change.

Edited by FabDev

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×