Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network Discovery Example not connecting (iOS <> Mac) #226

Open
antiero opened this issue May 31, 2023 · 5 comments
Open

Network Discovery Example not connecting (iOS <> Mac) #226

antiero opened this issue May 31, 2023 · 5 comments

Comments

@antiero
Copy link

antiero commented May 31, 2023

Unity 2021.3.25f1, macOS Ventura 13.4, Xcode 14.3.1, iOS 16.5.
Netcode for GameObjects 1.4.0 + com.community.netcode.extensions from main

I am using the example NetworkDiscovery code listed in the docs here

Building out the App for iPhone and Mac (and also tested on the Mac in Unity Editor)

I have tried using a local WiFi network, creating an Ad-Hoc network from Mac, and also connecting to the iPhone network via Personal Hotspot (WiFi) + and also via USB.

Using the Example Network Discovery HUD I do the following:

  • On one device (mac OR iPhone), Click the Server Button.
  • On the Other device, click Discover Servers.

Result: No servers are listed and I cannot connect a device either way. Does anyone have a working example which uses Network Discovery with iOS+Mac device (versions listed above)

testApp
@PaulUsul
Copy link

Hey I'm running into the same issue, did you ever find a solution/workaround?

I'm on an iPad and I've got permission in Settings -> Privacy & Security -> Local Network

@antiero
Copy link
Author

antiero commented Oct 30, 2023

No I never managed to resolve this, but I'm wondering whether this "fix" could be related?... (albeit for Mirror, but the same iOS entitlement/permission thing might hold true?...) MirrorNetworking/Mirror#3433 (comment)

@antiero
Copy link
Author

antiero commented Oct 30, 2023

The pertinent bit from the Mirror link above:

"iOS AppStore LAN Broadcasting

Follow the Xcode instructions to get the multicast networking permission from Apple.
Add it to the app provisioning, then add the capability to the app itself, making sure you've properly added the entitlement to your app in Xcode.
This should get Network Discovery features working, Kudos to overmatch-iman for reporting back the working steps."

@PaulUsul
Copy link

Yeah I think that's the case. I've applied for com.apple.developer.networking.multicast, let's hope that helps

an info thread here:
https://developer.apple.com/forums/thread/714211

Local Network Privacy FAQ:
https://developer.apple.com/forums/thread/663858

Using the Multicast Networking Additional Capability:
https://developer.apple.com/forums/thread/663271

How to enable capabilities
https://developer.apple.com/help/account/manage-identifiers/enable-app-capabilities

@PaulUsul
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants