如何在 Objective C (iOS) 中打开 Install Voices 设置页面

How can I open the Install Voices settings page in Objective C (iOS)

我希望我的定制应用能够打开 iOS 本机设置页面,特别是用于在您的设备上安装新语音的设置。

如何在 Objective C 中执行此操作?

我看到你可以使用 UIApplicationOpenSettingsURLString 打开设置,但我需要转到用户当前语言的特定安装语音设置页面,如下所示:

此页面位于:设置 -> 辅助功能 -> 语音内容 -> 语音 ->(您的语言)

进入语音页面,用户必须在其中 select 语言也很好。

我想我可以尝试使用 open() objective C 函数来打开自定义 URI 方案,但我需要知道我确切需要哪个 URI 方案...

编辑:这是我目前正在尝试做的事情:

    NSString *voiceSettings = @"prefs:root=ACCESSIBILITY&path=SPEECH_TITLE#QuickSpeakAccents";
    NSString *cleanQuery = [voiceSettings stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString: [NSString stringWithFormat:cleanQuery]] options:@{} completionHandler:nil];

但是它失败了:

Failed to open URL prefs:root=ACCESSIBILITY&path=SPEECH_TITLE#QuickSpeakAccents: Error Domain=NSOSStatusErrorDomain Code=-10814 "(null)" UserInfo={_LSLine=229, _LSFunction=-[_LSDOpenClient openURL:options:completionHandler:]}

我是不是遗漏了什么?

UIApplicationOpenSettingsURLString 是唯一支持的打开内置 Settings.app 的方式。任何其他方法都是黑客攻击,并且由于私人 API 使用而存在审核被拒绝的风险。

参见例如Is it considered a private API to use App-prefs:root?