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

🐛 [iOS] server autodiscovery not working, because permission for local network scanning is not requested probably #26

Open
p0358 opened this issue Oct 16, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@p0358
Copy link

p0358 commented Oct 16, 2024

Description

On iOS being able to access any LAN addresses requires explicitly asking the user with a dialog. Currently the app keeps on spinning there and it's never gonna detect anything.

Reproduction steps

1. Open up the app
2. See it tries to detect servers, but it's never gonna work

My suggestion is that auto-discovery should occur there after some kind of button press, and only then to open that dialog. Users don't really like it UX-wise when the first thing a new app asks upon opening is to scan their LAN without explanation (and some anti-user apps that don't need this do so to spy on people, like Facebook etc, so it'd have bad connotations if not explicit).

Screenshots

No response

Logs

No response

Platform

iOS

App Version

v0.2.5-alpha

@p0358 p0358 added the bug Something isn't working label Oct 16, 2024
@PartyDonut PartyDonut modified the milestone: v0.2.6 Oct 16, 2024
@PartyDonut PartyDonut moved this to Backlog in Fladder Oct 17, 2024
@PartyDonut PartyDonut removed the status in Fladder Oct 17, 2024
@PartyDonut PartyDonut changed the title 🐛 iOS: server autodiscovery not working, because permission for local network scanning is not requested probably 🐛 [iOS] server autodiscovery not working, because permission for local network scanning is not requested probably Oct 17, 2024
@p0358
Copy link
Author

p0358 commented Oct 18, 2024

so fun fact: I was actually fiddling with making a jailbreak tweak for a random iOS app that doesn't have com.apple.security.network.client in its entitlements and apparently the app asked for local network access permission automatically when I tried to send a UDP packet to local IP after creating a DGRAM socket, very interesting

but if this meant to be done automatically, then either some entitlement that in general permits it might be missing or the app actually for some reason maybe doesn't actually even try to create such socket?

@PartyDonut
Copy link
Collaborator

Hey, just happened to run the app inside of a simulator but on that the server discovery seems to be working just fine, that makes a bit difficult to test in my case.

Not sure but I'm expecting Simulators te be even more locked down then a real device?

Something else that might be causing an issue is this? But I would still expect the simulator to throw the same error.
https://docs.flutter.dev/release/breaking-changes/network-policy-ios-android

If you have the option to debug it on a real device that would be great👍🏼

@p0358
Copy link
Author

p0358 commented Nov 13, 2024

Hmm, not sure, it's not impossible something might be filtered out in my network instead. Do you know if other clients have similar autodiscovery to test it out for comparison? As iirc most didn't have that form my memory.

Not sure but I'm expecting Simulators te be even more locked down then a real device?

That's probably not a good idea of them generally, I know stuff like simject exists to test out jailbreak tweak injection into apps there, while on a real device you need a proper jailbreak which is much harder to achieve due to hardware security features. But I'm not familiar with the specifics of iOS simulator and intricacies like this so can't really tell

@PartyDonut
Copy link
Collaborator

Hmm, not sure, it's not impossible something might be filtered out in my network instead. Do you know if other clients have similar autodiscovery to test it out for comparison? As iirc most didn't have that form my memory.

Not sure Swiftfin will probably have it considering it's a official? jellyfin client. They also advice iOS users to check these settings as well.

Just to check on iOS, go to to the Settings app -> Swiftfin and make sure Local Network is enabled

One thing I can try is this though https://developer.apple.com/forums/thread/663768 the work-around most people use is just pinging a random device on the network which causes the pop-up to appear.

So best action for iOS would be this I think?

  1. Show a button the user has to press to "start" scanning.
  2. This then tries to ping a local device. Causing the local network security pop-up to occur
  3. Success??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants