Skip to content

feat(ios): add settings-navigation:// support for iOS 26+ - #45

Open
yanncabral wants to merge 1 commit into
mainfrom
ios-settings-6dt1
Open

feat(ios): add settings-navigation:// support for iOS 26+#45
yanncabral wants to merge 1 commit into
mainfrom
ios-settings-6dt1

Conversation

@yanncabral

Copy link
Copy Markdown
Owner

Status

READY

Description

Add the new settings-navigation:// URL scheme introduced in iOS 26, with automatic version detection to fall back to legacy App-prefs: URLs on older versions.

What changed

Version-aware routing (5 existing methods):

  • accountSettings()App-prefs:ACCOUNT_SETTINGSsettings-navigation://com.apple.Settings.AppleAccount
  • iCloud()App-prefs:CASTLEsettings-navigation://.../ICLOUD_SERVICE
  • storageAndBackup()App-prefs:CASTLE&path=STORAGE_AND_BACKUPsettings-navigation://.../STORAGE_AND_BACKUP
  • privacy()App-prefs:Privacysettings-navigation://.../PrivacyAndSecurity
  • locationServices()App-prefs:LOCATION_SERVICESsettings-navigation://.../LOCATION

38 new methods for iOS 26+ only:

Category Methods
Apple Account contactKeyVerification, iCloudDrive, iCloudPhotos, iCloudMail, iCloudContacts, iCloudCalendar, iCloudReminders, iCloudSafari, iCloudNotes, iCloudNews, iCloudBackup, iCloudHealth, iCloudPasswordsAndKeychain, iCloudHideMyEmail, findMyDevice, appleAccountContact, appleAccountPasswordAndSecurity, appleAccountPaymentAndShipping, appleAccountSubscriptions, appleAccountFamily
Privacy & Security privacyHealth, privacyHealthData, privacyShareMyLocation, privacyContacts, privacyCalendars, privacyReminders, privacyPhotos, privacyBluetoothSharing, privacyMicrophone, privacySpeechRecognition, privacyCamera, privacyHomeKit, privacyMediaAndAppleMusic, privacyAnalytics, privacyAdvertising, privacyFilesAndFolders, privacyTracking, privacyAppPrivacyReport, privacySafetyCheck, privacyLockdownMode, privacySensitiveContent
Apps apps, safari, safariExtensions, safariBlockPopUps, safariPreventCrossSiteTracking, safariAutoFill, safariDownloads, passwords, passwordsSecurityRecommendations, notes (+ 8 sub-methods), measure, measureUnits
Standalone home, search, tvProvider

Architecture:

Dart (iOS 26+?) -> MethodChannel -> Swift: UIApplication.shared.open(url)
|-- iOS >= 26  ->  settings-navigation://com.apple.Settings.XXX
|-- iOS < 26   ->  App-prefs:XXX  (legacy)
+-- iOS-only   ->  settings-navigation:// (direct, no check)

Other changes:

  • Added getIOSVersion method channel for version detection
  • Lazy version cache with resetIOSVersionCache() for testing
  • Simplified Swift plugin (removed redundant iOS 10 availability check)
  • Test suite expanded from 6 to 54 tests

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Code refactor
  • Build configuration change
  • Documentation
  • Chore

Add the new settings-navigation:// URL scheme introduced in iOS 26,
with automatic version detection to fall back to legacy App-prefs:
URLs on older versions.

Changes:
- Add getIOSVersion method channel for iOS version detection
- Add lazy version cache with resetIOSVersionCache() for testing
- 5 existing methods now version-switch between old and new URLs:
  accountSettings, iCloud, storageAndBackup, privacy, locationServices
- 38 new methods for iOS 26+ settings-navigation:// routes:
  Apple Account (20), Privacy & Security (21), Apps (20), Home, Search, TV Provider
- Simplify Swift plugin: remove redundant iOS 10 availability check,
  return success via completion handler
- Expand test suite from 6 to 54 tests covering all iOS methods
@yanncabral yanncabral self-assigned this Sep 1, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b004147206

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

} else {
UIApplication.shared.openURL(url)
}
if let url = URL(string: argument), UIApplication.shared.canOpenURL(url) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Declare the new scheme before querying it

For host apps that do not list settings-navigation in LSApplicationQueriesSchemes—including the repository's example app—iOS rejects this canOpenURL query, so execution returns false before open is attempted. Consequently, the newly added iOS 26 routes, including the five version-switched existing APIs, do not work with the default setup; either avoid this preflight check and use the open completion result or require and document the host Info.plist entry.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T03:00:37.924962Z b004147 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Successfully merging this pull request may close these issues.

1 participant