title: Choosing Info.plist fails silently -- what can be the reason?
body: <p>We develop an iOS framework, mostly in Swift with a sprinkle of Objective-C.</p>
  
  <p>Somewhere along the line, we apparently lost the connection between the project resp. its main target and its Info.plist:</p>
  
  <p><a href="https://i.stack.imgur.com/Vw9oA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Vw9oA.png" alt="enter image description here"></a></p>
  
  <p>This is on the main target. We only noticed when the built framework did not include the Info.plist, which a quickly drawn up mock app for playing around with our framework did not like at all.</p>
  
  <p>However, choosing the file fails. I can select the file in this dialog:</p>
  
  <p><a href="https://i.stack.imgur.com/44eFs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/44eFs.png" alt="enter image description here"></a></p>
  
  <p>But confirming with "Choose" does not have any effect. In the pbxproj file, I see entries like</p>
  
  <pre><code>    &lt;hash&gt; /* Debug */ = {
          isa = XCBuildConfiguration;
          buildSettings = {
              ...
              DEFINES_MODULE = YES;
              ...
              INFOPLIST_FILE = "$(SRCROOT)/hcl/Info.plist";
              "INFOPLIST_FILE[sdk=*]" = "";
              INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
              IPHONEOS_DEPLOYMENT_TARGET = 10.2;
              ...
          };
          name = Debug;
      };
  </code></pre>
  
  <p>which seem entirely reasonable. The Info.plist file itself seems to be valid, too; XCode happily shows the table view when I open it.</p>
  
  <p>But still, the Info tab remains empty and no Info.plist ends up in the framework.
  Setting "Info.plist file" in section "Packaging" of the project settings to the same path does not help, either.</p>
  
  <p>What can be  the reason for that? How can we get Info.plist into our framework?</p>
  
  <hr>
  
  <p>"Fun" side note: I tried to work around the issue by adding Info.plist to the "Copy Bundle Resources" section of "Build phases". Sure enough, we get the Info.plist in the framework and the using app is satisfied. However, our <em>tests</em> no longer run:</p>
  
  <pre><code>xctest[7779:90709] The bundle “hclTests” couldn’t be loaded because it is damaged 
      or missing necessary resources. 
  Try reinstalling the bundle.
  
  xctest[7779:90709] (dlopen_preflight(/path/to/hclTests): 
      Library not loaded: @rpath/hcl.framework/hcl
      Referenced from: /path/to/Build/Products/Debug-iphonesimulator/hclTests.xctest/hclTests
      Reason: no suitable image found.  Did find:
          /path/to/Build/Products/Debug-iphonesimulator/hcl.framework/hcl: 
              required code signature missing for 
              '/path/to/Build/Products/Debug-iphonesimulator/hcl.framework/hcl'
  
  /path/to/Build/Products/Debug-iphonesimulator/hcl.framework/hcl: 
      required code signature missing for '/path/to/Build/Products/Debug-iphonesimulator/hcl.framework/hcl'
  
  Program ended with exit code: 82
  </code></pre>
  
  <p>Thank for this very helpful message, XCode. Took me only three hours to figure out <em>a copied file</em> caused this.</p>