title: Cannot use Keychain in Xcode9 tests
body: <p>I have a few unit tests to verify that the way I work with Keychain is correct and data are in same form when I load them.</p>
  
  <p>Tests were running ok until update to XCode 9. At the moment, KeychainService return -50 (not saved). </p>
  
  <p>According to this <a href="https://forums.developer.apple.com/thread/86961" rel="noreferrer">question</a>, it was solved by adding Host to unit tests. However, my tests are in framework project and there is no app to use as a host. </p>
  
  <pre><code>let query = [
      kSecClass as String       : kSecClassGenericPassword as String,
      kSecAttrAccount as String : key,
      kSecValueData as String   : data ] as [String : Any]
  
  SecItemDelete(query as CFDictionary)
  
  SecItemAdd(query as CFDictionary, nil)
  </code></pre>
  
  <p>What is recommended solution? I expect just some configuration in XCode, moving tests into app is not a proper solution for me.</p>