How do I embed CryptoSwift into WatchKit Extension target without build error?
<p>I am trying to embed CryptoSwift as an embedded framework into a Watch app (watchOS3) - I would like to be able to use AES encryption and decryption from within the Watch app.</p>

<p>I start by creating a new clean Xcode project: watchOS application using "iOS App with WatchKit App" in a local git repository.</p>

<p>To add CryptSwift, I followed the installation guidance of CryptoSwift (<a href="https://github.com/krzyzanowskim/CryptoSwift#installation" rel="nofollow noreferrer">https://github.com/krzyzanowskim/CryptoSwift#installation</a>) by adding it as a git submodule (<code>git submodule add https://github.com/krzyzanowskim/CryptoSwift.git</code>) on the top level project folder. Then I dragged the <code>CryptoSwift.xcodeproj</code> into the clean Xcode project.</p>

<p>Then, I add the <code>CryptSwift.framework</code> into the Embedded Binaries of the iOS app target. Build was successful, and I could use <code>import CryptoSwift</code>, e.g., in <code>ViewController.swift</code>.</p>

<p>But when I add the CryptSwift.framework into the Embedded Binaries of the WatchKit Extension target. Hits Build, it fails: "<code>clang: error: no such file or directory: '/Users/brian/Library/Developer/Xcode/DerivedData/TestCrypto2-bkzbizyfkacuctdwdngnvcrrewpi/Build/Products/Debug-watchsimulator/CryptoSwift.framework/CryptoSwift'</code>". And I am not able to use <code>import CryptoSwift</code> in e.g. <code>InterfaceController.swift</code> in the WatchKit Extension.</p>

<p>I have tried a number of different approaches to add the <code>CryptoSwift.framework</code> to the WatchKit Extension, but none with success.</p>

<p>Does anyone know how to add this CryptoSwift framework to the WatchKit Extension the right way, if possible?</p>

<ul>
<li>Xcode 8.1 (8B62)  </li>
<li>iOS 10.1  </li>
<li>watchOS 3.1  </li>
</ul>