Nested settings pages crash in iOS13

为君一笑 提交于 2019-12-11 04:05:51

问题


I use the iOS settings app for my app settings. However, since upgrading my device to iOS13, tapping on one of the rows that should lead to a child settings pane (Appearance, Notifications or PDF Export) causes the iOS settings app to crash, with no debug message in my debugger.

This happens regardless of whether the app is the current release version compiled in XCode10, or newly compiled in XCode11.

I have the following root.plist file, which contains three child settings pages. I have displayed it as source rather than a plist here.

<?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>

Here is an example child page, 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>

I have no idea why this worked in iOS12 but not in iOS13 and I cannot find any information on this from Apple.


回答1:


This issue is now resolved with the public release of iOS 13.1. I did not need to recompile my app for it to work.



来源:https://stackoverflow.com/questions/58044107/nested-settings-pages-crash-in-ios13

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!