title: bundle format is ambiguous (could be app or framework) while making Archive
body: <p>I have integrated <a href="https://github.com/p2/OAuth2#git" rel="nofollow noreferrer">this OAuth Library</a> I have followed the Installation instruction, App builds fine in developing mode, while making archive I am getting this,</p>
  
  <pre><code>CodeSign /Users/shujaathaider/Library/Developer/Xcode/DerivedData/jamesAppV2-hhfnrydqoghbzpgsvepxtuzarqrc/Build/Intermediates/ArchiveIntermediates/Home\ Automation\ Sys\ Swift/IntermediateBuildFilesPath/UninstalledProducts/OAuth2.framework
      cd "/Users/shujaathaider/Desktop/Workspace_qadir/JamesApp - Development/OAuth2-master"
      export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
      export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
  
  Signing Identity:     "iPhone Developer: Ghulam Hemani (HB4LLMX2DD)"
  
      /usr/bin/codesign --force --sign C72D0E8EEBE104D1EA0AA0D15558EF38808250F3 /Users/shujaathaider/Library/Developer/Xcode/DerivedData/jamesAppV2-hhfnrydqoghbzpgsvepxtuzarqrc/Build/Intermediates/ArchiveIntermediates/Home\ Automation\ Sys\ Swift/IntermediateBuildFilesPath/UninstalledProducts/OAuth2.framework
  
  /Users/shujaathaider/Library/Developer/Xcode/DerivedData/jamesAppV2-hhfnrydqoghbzpgsvepxtuzarqrc/Build/Intermediates/ArchiveIntermediates/Home Automation Sys Swift/IntermediateBuildFilesPath/UninstalledProducts/OAuth2.framework: bundle format is ambiguous (could be app or framework)
  Command /usr/bin/codesign failed with exit code 1
  </code></pre>
  
  <p>Here is how I have integrated the library:</p>
  
  <p><img src="https://i.stack.imgur.com/8QvvE.png" alt="enter image description here"></p>