Skip to content

Merge Info.plist fails second build #1066

@dtopuzov

Description

@dtopuzov

I have Info.plist located in platform folder of the plugin:
SimpleBackgroundHttp/node_modules/nativescript-background-http/platforms/ios/Info.plist

Content of Info.plist is:

<?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>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>
</dict>
</plist>

When build iOS for first time everything is ok, but when build second time final plist looks like this:

    <key>NSAppTransportSecurity</key>
    <dict>
      <key>NSAllowsArbitraryLoads</key>
      <true/>
      <key>NSAllowsArbitraryLoads</key>
      <true/>
      <key>NSAllowsArbitraryLoads</key>
      <true/>
      <key>NSAllowsArbitraryLoads</key>
      <true/>
    </dict>
    <key>NSAppTransportSecurity</key>
    <key>NSAppTransportSecurity</key>
    <key>NSAppTransportSecurity</key>

It can be reproduced with nativescript-background-http with following steps:

  1. Clone the repo
  2. Install prerequisites
  3. Run "grunt tests --os-version 9.0 --device "iPhone 6 90" --verbose" twice

Result is:

>> ** BUILD FAILED **
>> 
>> 
>> The following build commands failed:
>> ProcessInfoPlistFile build/emulator/SimpleBackgroundHttp.app/Info.plist SimpleBackgroundHttp/SimpleBackgroundHttp-Info.plist
>> (1 failure)
>> Command xcodebuild failed with exit code 65

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions