Local network permission for the App working inconsistently in iOS 17 and above

We are using and iOS version 17.4.1 and 17.5(beta) , and when are we facing the issue for local network permission in our app.

Success scenario steps:

  1. Don't allow the local network permission in our App
  2. Allow it manually in app setting for local network permission(works only in first install of the App)
  3. We are able to call the API successfully

Error scenario steps:

  1. Allow the local network permission popup to app when asked for permission
  2. Call the API successfully
  3. Uninstall the app and install the same app again and don't allow the local network permission
  4. API call fail's
  5. Manually change the local network permission to allow in app settings
  6. Still the API call fails even if we allow the local network permission

Conclusion : We are getting API error when re-install the app and if it is not allowed local network permission as well as when we allow the local network permission. Looks like caching issue.

Note: Even if uninstall and install multiple time and allow the local network permission from 2nd time onward API keeps on failing , but these scenario work perfectly fine on iOS 16 version and below. Even the existing app stopped working after updating iOS version to 17 and above.

Also we found alternatively when we uninstall the app and restart the device and install it back again it works fine for the first time as a fresh install.

Additionally : We are not calling local network permission explicitly, when the API call is happening this is native popup coming on iOS

iOS 17 should have a reasonable implementation of local network privacy, as described in the Local Network Privacy FAQ. If you’re seeing regressions in a recent iOS 17.x release, I encourage you to file a bug about that.

Please post your bug number, just for the record.

Also we found alternatively when we uninstall the app and restart the device and install it back again it works fine for the first time as a fresh install.

Yeah, that’s clearly a bug. Restarting the device shouldn’t be a factor in how the system handles local network privacy.

Share and Enjoy

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

Thanks, as you mentioned I have filed a bug using the link you had shared.

bug number: FB13765785

https://feedbackassistant.apple.com/feedback/13765785

Hello, we have exactly the same issue for our product, where we need to restart our device since local network permissions become unreliable and some connections are let through and others aren't. At the moment, we need to mention to the customer, that he needs to restart their iPad and it's not great.

Hello, How do you solve this problem now?, we have exactly the same issue

I had a similar problem after the update to iOS 17, it was more about the fact that suddenly it made a difference, whether I was launching my application with the Debug or the Release stage. The Debug stage launching stopped prompting the user for local network permission, the Release stage was still working.

After experimenting with the build settings of my XCode for hours and trying to find out the difference between the configurations, I finally managed to get it corrected: by setting the "Swift compiler - Code generation" of the Debug stage to "Optimize for speed [-O]". It is not the best solution, though, because this setting value is recommended for production, but since I need the debug stage for testing, I had to take it.

Local network permission for the App working inconsistently in iOS 17 and above
 
 
Q