嵌套设置页面在 iOS13 中崩溃
Nested settings pages crash in iOS13
我使用 iOS 设置应用程序进行我的应用程序设置。但是,自从将我的设备升级到 iOS13 后,点击本应指向子设置窗格(外观、通知或 PDF 导出)的行之一会导致 iOS 设置应用程序崩溃,没有我的调试器中的调试消息。
无论应用程序是在 XCode10 中编译的当前发行版本,还是在 XCode11 中新编译的版本,都会发生这种情况。
我有以下 root.plist
文件,其中包含三个子设置页面。我在这里将其显示为源而不是 plist。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>StringsTable</key>
<string>Root</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
<key>Title</key>
<string>Appearance</string>
<key>File</key>
<string>Appearance</string>
</dict>
<dict>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
<key>Title</key>
<string>Notifications</string>
<key>File</key>
<string>Notifications</string>
</dict>
<dict>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
<key>Title</key>
<string>PDF Export</string>
<key>File</key>
<string>Export</string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>Welcome Sequence</string>
<key>FooterText</key>
<string>Select to view the welcome sequence when you switch back to the app.</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Reset welcome sequence</string>
<key>Key</key>
<string>resetWelcome</string>
<key>DefaultValue</key>
<false/>
</dict>
</array>
</dict>
</plist>
这是一个示例子页面,Appearance.plist
:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>StringsTable</key>
<string>Appearance</string>
<key>Title</key>
<string>Appearance</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>Main Title</string>
</dict>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string>Main Title</string>
<key>Key</key>
<string>mainTitle</string>
<key>DefaultValue</key>
<string>My Data</string>
<key>KeyboardType</key>
<string>Alphabet</string>
</dict>
// Other dictionaries omitted for brevity
</array>
</dict>
</plist>
我不知道为什么这在 iOS12 中有效,但在 iOS13 中无效,而且我无法从 Apple 找到任何相关信息。
iOS 13.1 的 public 版本现已解决此问题。我不需要重新编译我的应用程序就可以工作。
我使用 iOS 设置应用程序进行我的应用程序设置。但是,自从将我的设备升级到 iOS13 后,点击本应指向子设置窗格(外观、通知或 PDF 导出)的行之一会导致 iOS 设置应用程序崩溃,没有我的调试器中的调试消息。
无论应用程序是在 XCode10 中编译的当前发行版本,还是在 XCode11 中新编译的版本,都会发生这种情况。
我有以下 root.plist
文件,其中包含三个子设置页面。我在这里将其显示为源而不是 plist。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>StringsTable</key>
<string>Root</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
<key>Title</key>
<string>Appearance</string>
<key>File</key>
<string>Appearance</string>
</dict>
<dict>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
<key>Title</key>
<string>Notifications</string>
<key>File</key>
<string>Notifications</string>
</dict>
<dict>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
<key>Title</key>
<string>PDF Export</string>
<key>File</key>
<string>Export</string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>Welcome Sequence</string>
<key>FooterText</key>
<string>Select to view the welcome sequence when you switch back to the app.</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Reset welcome sequence</string>
<key>Key</key>
<string>resetWelcome</string>
<key>DefaultValue</key>
<false/>
</dict>
</array>
</dict>
</plist>
这是一个示例子页面,Appearance.plist
:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>StringsTable</key>
<string>Appearance</string>
<key>Title</key>
<string>Appearance</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>Main Title</string>
</dict>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string>Main Title</string>
<key>Key</key>
<string>mainTitle</string>
<key>DefaultValue</key>
<string>My Data</string>
<key>KeyboardType</key>
<string>Alphabet</string>
</dict>
// Other dictionaries omitted for brevity
</array>
</dict>
</plist>
我不知道为什么这在 iOS12 中有效,但在 iOS13 中无效,而且我无法从 Apple 找到任何相关信息。
iOS 13.1 的 public 版本现已解决此问题。我不需要重新编译我的应用程序就可以工作。