title: Can't add RealmSwift pod to a React Native project "Undefined symbol: protocol description for Swift.Identifible ... for libRealmSwift"
body: <p>I've discovered its not possible to add RealmSwift to an Xcode project which was auto-generated by React Native.</p>
  <p>If I manually create an Xcode project and then create a pod file and add the following lines to it, then everything builds successfully:</p>
  <pre><code>  pod 'Realm', :modular_headers =&gt; true
    pod 'RealmSwift', :modular_headers =&gt; true
  </code></pre>
  <p>However if these same lines are added to the existing podfile for a React Native project then when compiling there is the following error</p>
  <blockquote>
  <p>Undefined symbols for architecture arm64:   &quot;protocol descriptor for
  Swift.Identifiable&quot;, referenced from:
  l_got.$ss12IdentifiableMp in libRealmSwift.a(Combine.o) ld: symbol(s) not found for architecture arm64</p>
  </blockquote>
  <p>The full podfile is</p>
  <pre><code>require_relative '../node_modules/react-native/scripts/react_native_pods'
  require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
  
  platform :ios, '10.0'
  
  workspace 'AwesomeProject'
  
  target 'AwesomeProject' do
    config = use_native_modules!
    use_react_native!(
      :path =&gt; config[:reactNativePath],
      # to enable hermes on iOS, change `false` to `true` and then install pods
      :hermes_enabled =&gt; false
    )
  
    pod 'Realm', :modular_headers =&gt; true
    pod 'RealmSwift', :modular_headers =&gt; true
  
    # Enables Flipper.
    #
    # Note that if you have use_frameworks! enabled, Flipper will not work and
    # you should disable the next line.
    use_flipper!()
  
    post_install do |installer|
      react_native_post_install(installer)
    end
  end
  </code></pre>
  <p>How can I use RealmSwift in a React Native app?</p>
  <p>(The modular_headers qualifiers are added because without them there is the following error during pod install:</p>
  <blockquote>
  <p>[!] The following Swift pods cannot yet be integrated as static
  libraries:</p>
  <p>The Swift pod <code>RealmSwift</code> depends upon <code>Realm</code>, which does not define
  modules. To opt into those targets generating module maps (which is
  necessary to import them from Swift when building as static
  libraries), you may set <code>use_modular_headers!</code> globally in your
  Podfile, or specify <code>:modular_headers =&gt; true</code> for particular
  dependencies.)</p>
  </blockquote>
  <p>(Note: I DO NOT want to use the ReactNativeRealm component, firstly this only adds a Javascript version of Realm, secondly I only want to use Realm in the iOS version of the app, not the Android version)</p>