Skip to content

ionic resources breaks <config-file> block in config.xml #983

Closed
@PhilHuot

Description

@PhilHuot

ionic resources breaks the <config-file> block in the config.xml file.

See this example where <key>anotherinsecurehttp.com</key> is moved right next to <key>insecurehttp.com</key> which becomes invalid once it gets to the .plist file.

Before ionic resources

   <config-file parent="NSAppTransportSecurity" platform="ios" target="*-Info.plist">
        <key>NSAppTransportSecurity</key>
        <dict>
            <key>NSExceptionDomains</key>
            <dict>
                <key>insecurehttp.com</key>
                <dict>
                    <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
                    <true></true>
                </dict>
                <key>anotherinsecurehttp.com</key>
                <dict>
                    <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
                    <true></true>
                </dict>
            </dict>
        </dict>
    </config-file>

After ionic resources:

   <config-file parent="NSAppTransportSecurity" platform="ios" target="*-Info.plist">
        <key>NSAppTransportSecurity</key>
        <dict>
            <key>NSExceptionDomains</key>
            <dict>
                <key>insecurehttp.com</key>
                <key>anotherinsecurehttp.com</key>
                <dict>
                    <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
                    <true></true>
                </dict>
                <dict>
                    <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
                    <true></true>
                </dict>
            </dict>
        </dict>
    </config-file>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions