title: SPM dependency in different projects
body: <p>I have iOS workspace of two projects:</p>
  
  <p><code>Core</code> - is a project with framework. Also it has <code>RxSwift</code> dependency via swift package manager.</p>
  
  <p><code>App</code> - is an application that has <code>Core.framework</code> as embed dependency and <code>RxSwift</code> as swift package manager dependency.</p>
  
  <p>I get these warnings on app running:</p>
  
  <pre><code>objc[8296]: Class _TtC7RxSwiftP33_AB3B9E8806A71B46FB498A7594F5E0D919AnonymousDisposable is implemented in both /Users/andrey/Library/Developer/Xcode/DerivedData/App-dypyskhwoifkwagjjvtjblqppdnd/Build/Products/Debug-iphonesimulator/Core.framework/Core (0x10e092400) and /Users/andrey/Library/Developer/CoreSimulator/Devices/53D234F9-F917-46BA-B376-F28BA905EE9D/data/Containers/Bundle/Application/D4C69694-8515-44CF-B077-0CB3256D1F84/App.app/App (0x10bf95430). One of the two will be used. Which one is undefined.
  </code></pre>
  
  <p>But if I try to access <code>MainScheduler.instance</code> that is a static variable I will get <code>EXC_BAD_ACCESS</code> crash with stack:</p>
  
  <pre><code>#0  0x000000010e7d5c07 in swift_checkMetadataState ()
  #1  0x000000010e7d9a17 in checkTransitiveCompleteness(swift::TargetMetadata&lt;swift::InProcess&gt; const*)::$_18::operator()(swift::TargetMetadata&lt;swift::InProcess&gt; const*) const ()
  #2  0x000000010e7d97ac in bool findAnyTransitiveMetadata&lt;checkTransitiveCompleteness(swift::TargetMetadata&lt;swift::InProcess&gt; const*)::$_18&amp;&gt;(swift::TargetMetadata&lt;swift::InProcess&gt; const*, checkTransitiveCompleteness(swift::TargetMetadata&lt;swift::InProcess&gt; const*)::$_18&amp;) ()
  #3  0x000000010e7d96a6 in checkTransitiveCompleteness(swift::TargetMetadata&lt;swift::InProcess&gt; const*) ()
  #4  0x000000010e7da278 in swift::MetadataCacheEntryBase&lt;(anonymous namespace)::SingletonMetadataCacheEntry, int&gt;::doInitialization(swift::ConcurrencyControl&amp;, swift::MetadataCompletionQueueEntry*, swift::MetadataRequest) ()
  #5  0x000000010e7d0078 in swift_getSingletonMetadata ()
  #6  0x000000010b3bb9b8 in type metadata accessor for MainScheduler ()
  #7  0x000000010af4b1c5 in static RxSchedulers.mainScheduler.getter 
  </code></pre>
  
  <p>What is the possible way to fix this crash?</p>