title: Build on Xcode 10.2.1 failing at project for tvOS and iOS
body: <p>I have a lib that has targets for tvOS and iOS on the same workspace.</p>
  
  <p>When I build for tvOS, it gives me an error saying:</p>
  
  <pre><code>The following build commands failed:
      CompileSwift normal arm64
      CompileXIB /Users/.../&lt;project_folder&gt;/Pods/Clappr/Sources/Clappr_iOS/Classes/Plugin/Core/MediaControl/Seekbar/Views/SeekbarView.xib
      CompileSwift normal arm64
  </code></pre>
  
  <p>The command Fastlane is using to run the build is:
  <code>set -o pipefail &amp;&amp; xcodebuild -workspace "&lt;project_name&gt;.xcworkspace" -scheme "&lt;scheme_name&gt;_tvOS" -configuration "Release" -sdk "appletvos" -derivedDataPath "build/tvOS-appletvos" clean build GCC_PREPROCESSOR_DEFINITIONS='${inherited}' BITCODE_GENERATION_MODE=bitcode ENABLE_BITCODE=YES</code></p>
  
  <p>And when I run it in <code>verbose</code> mode, the part that seems to be showing the error is:</p>
  
  <pre><code>CompileXIB /Users/&lt;project_folder&gt;/Pods/Clappr/Sources/Clappr_iOS/Classes/Plugin/Core/MediaControl/Seekbar/Views/SeekbarView.xib (in target: Clappr-iOS)
      cd /Users/&lt;project_folder&gt;/Pods
      export XCODE_DEVELOPER_USR_PATH=/Applications/Xcode.app/Contents/Developer/usr/bin/..
      /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --module Clappr --output-partial-info-plist /Users/&lt;project_folder&gt;/build/tvOS-appletvos/Build/Intermediates.noindex/Pods.build/Release-appletvos/Clappr-iOS.build/SeekbarView-PartialInfo.plist --auto-activate-custom-fonts --target-device tv --minimum-deployment-target 10.0 --output-format human-readable-text --compile /Users/&lt;project_folder&gt;/build/tvOS-appletvos/Build/Products/Release-appletvos/Clappr-iOS/Clappr.framework/SeekbarView.nib /Users/&lt;project_folder&gt;/Pods/Clappr/Sources/Clappr_iOS/Classes/Plugin/Core/MediaControl/Seekbar/Views/SeekbarView.xib
  /* com.apple.ibtool.errors */
  /Users/&lt;project_folder&gt;/Pods/Clappr/Sources/Clappr_iOS/Classes/Plugin/Core/MediaControl/Seekbar/Views/SeekbarView.xib: error: iOS xibs do not support target device type "tv".
  </code></pre>
  
  <p>It is selecting a xib that, at the dependency (<a href="https://github.com/clappr/clappr-ios" rel="nofollow noreferrer">Clappr</a>), doesn't belong to tvOS target.</p>
  
  <p>Also, when I try to build using the iOS target, it answers me the following:</p>
  
  <pre><code>The following build commands failed:
      CompileSwift normal armv7
      CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
      CompileSwift normal arm64
      CompileSwift normal armv7
      CompileSwift normal arm64
  </code></pre>
  
  <p>The fastlane lane used to run the build for tvOS is the following:</p>
  
  <pre class="lang-rb prettyprint-override"><code>private_lane :xc_build do |params|
    xcodebuild(
      workspace: "ProjectName.xcworkspace",
      scheme: params[:scheme],
      configuration: 'Release',
      sdk: params[:sdk],
      derivedDataPath: params[:derivedDataPath],
      clean: true,
      build: true,
      xcargs: params[:xcargs]
    )
  end
  
  lane :build_tvos do
    remove_previous_builds_of(platform: "tvOS")
  
    #It breaks on the following command
    xc_build(
      scheme: 'ProjectScheme_tvOS',
      sdk: 'appletvos',
      derivedDataPath: 'build/tvOS-appletvos',
      xcargs: "GCC_PREPROCESSOR_DEFINITIONS='${inherited}' BITCODE_GENERATION_MODE=bitcode ENABLE_BITCODE=YES"
    )
  
    xc_build(
      scheme: 'ProjectScheme_tvOS',
      sdk: 'appletvsimulator',
      derivedDataPath: 'build/tvOS-appletvsimulator',
      xcargs: "GCC_PREPROCESSOR_DEFINITIONS='${inherited}' BITCODE_GENERATION_MODE=bitcode ENABLE_BITCODE=YES"
    )
  
    #This uses lipo to build universal frameworks
    make_universal_framework(
      universal_framework_folder: "Framework/tvOS",
      device_framework_folder: "build/tvOS-appletvos/Build/Products/Release-appletvos",
      simulator_framework_folder: "build/tvOS-appletvsimulator/Build/Products/Release-appletvsimulator"
    )
  end
  </code></pre>
  
  <p>Environment info:<br>
   * iOS target has build seating <code>valid architectures</code> with the value <code>arm64 arm64e armv7 armv7s</code> and tvOS has value: <code>arm64</code><br>
   * Fastlane version 2.123.0<br>
   * Cocoapods version 1.6.1<br>
   * <code>make_universal_framework</code> uses <code>lipo</code> to build</p>