[Bug]: add NSLocalNetworkUsageDescription for local-network prompt#820
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes iOS local-network connectivity to user-hosted AI servers by adding the missing NSLocalNetworkUsageDescription entry to the app target’s Info.plist, ensuring iOS presents the Local Network permission prompt instead of silently denying access.
Changes:
- Add
NSLocalNetworkUsageDescriptionwith a clear, user-facing explanation for local-network access.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
iOS users running a local AI server (Ollama, llama.cpp) on their own network could not connect from PocketPal. On iOS 18.x, when an app's Info.plist lacks
NSLocalNetworkUsageDescription, the system silently denies Local Network access: no permission prompt appears, the toggle in Settings → Privacy & Security → Local Network stays off, and requests fail with NSURLError -1009. Manually enabling the Settings toggle was the only workaround (reported by a user on r/PocketPal).The fix adds the missing usage-description key to
ios/PocketPal/Info.plist:No behavioral code changes and no new dependencies. Intentionally not added:
NSBonjourServices— the app makes only direct HTTP requests to user-configured endpoints; there is no mDNS/Bonjour/zeroconf usage (verified by grep acrosssrc/andios/).ios/PocketPal/Info.plistis the only app-target plist; App Intents compile into the main target and no extension bundles exist.InfoPlist.stringslocalization — the project does not localize its other usage-description keys, so a plain string follows the existing style.Verification
pod install— clean,Podfile.lockunchangedplutil -extract NSLocalNetworkUsageDescription rawon the builtPocketPal.app/Info.plistreturns the exact stringyarn lint/yarn typecheck— passSuggested manual QA
On a physical iOS device (especially iOS 18.x), add a local endpoint (e.g. Ollama on a Mac) and confirm the Local Network prompt appears with the new text on first connection, and that the connection succeeds after allowing.
Generated by PocketPal Dev Team