Nested settings pages crash in iOS13
Asked Answered
P

1

2

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 Xcode 10, or newly compiled in Xcode 11.

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.

Pentagrid answered 21/9, 2019 at 21:7 Comment(3)
I have found an unanswered question about exactly the same problem: https://mcmap.net/q/882514/-ios13-settings-bundle-with-child-pane-crashes-settings-app-on-real-device/8289095Pentagrid
Does this still happen on 13.1 beta? For me, it seems to be resolved there.Irksome
@Irksome Yoire right. I have just installed the iOS 13.1 public release and the problem is solved there.Pentagrid
P
0

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.

Pentagrid answered 25/9, 2019 at 7:6 Comment(6)
ChildPane work, but if I Set Environment and then I tap on back -> crashHerder
@neo999 same problemOberland
@MohamedElBasyouni What do you mean by set environment?Pentagrid
@neo999 Did you get a solution?Pentagrid
@Pentagrid I didn't mean to use the exact term neo999 used. I'm using LicensePlist and this pod is creating a nested acknowledgement organized per installed pod. When I tap back from pod acknowledgement to the nested "view", settings crash.Oberland
@MohamedElBasyouni Ah I see. Thanks for clarifying. I’m afraid I’m not familiar with that pod.Pentagrid

© 2022 - 2024 — McMap. All rights reserved.