iOS系统设置页面deep link实现及Messages应用特定子页面跳转问题咨询
Hey there! Great question—this is such a common frustration with iOS system setting deep links, since Apple doesn’t publicly document all the possible sub-page paths.
First, let’s recap what you already know: you can jump directly to the main Messages settings page using the URL scheme prefs:root=MESSAGES (or App-Prefs:root=MESSAGES for older iOS versions). To get one step deeper to the Unknown & Spam page, you’ll need to append a path parameter to that URL.
From what’s been tested and shared by developers in the community, the correct path for that specific sub-page is UNKNOWN_AND_SPAM. So the full deep link would be:
prefs:root=MESSAGES&path=UNKNOWN_AND_SPAM
You can test this quickly by opening Safari on your iOS device, typing that exact string into the address bar, and tapping "Go"—it should jump straight to the Unknown & Spam settings if it works for your iOS version.
A few important notes to keep in mind:
- These sub-page paths are undocumented by Apple, which means they could change or stop working in future iOS updates. Always add a fallback in your code (like catching a failed open attempt and directing users to navigate manually).
- When submitting your app to the App Store, using undocumented URL schemes carries a small risk of rejection. Some apps have gotten away with it, but it’s best to have an alternative flow ready just in case.
- For comparison, the Phone app’s Call Blocking page uses
prefs:root=PHONE&path=CALL_BLOCKING, which follows the same pattern—so this logic aligns with the example you saw.
If that URL doesn’t work for your specific iOS version, another workaround is to create a Shortcut that navigates directly to the Unknown & Spam page, then have your app trigger that Shortcut. This is a more reliable (though less direct) method since Shortcuts has native access to system settings navigation.
内容来源于stack exchange




