title: Build error. Installing Firebase in Xcode iOS app with multiple targets and NotificationServiceExtensions
body: <p>I'm trying to integrate Firebase (for Dynamic Links) in my current Xcode iOS project but I have problems with errors in the build  (Following this documentation: <a href="https://firebase.google.com/docs/dynamic-links/ios/receive" rel="nofollow noreferrer">https://firebase.google.com/docs/dynamic-links/ios/receive</a>).</p>
  
  <p>My Podfile looks like this:</p>
  
  <pre><code># Uncomment the next line...
  # platform :ios, '9.0'
  
  
  target 'AppName1' do
      # Comment the next line if you don't want to use dynamic frameworks
  
      use_frameworks!
  
  
      # Pods for AppName1
      pod 'Firebase/Analytics'
      pod 'Firebase/DynamicLinks'
  end
  
  
  target 'NotificationServiceExtension' do
      # Comment the next line if you don't want to use dynamic frameworks
  
      use_frameworks!
  
  
      # Pods for NotificationServiceExtension
      pod 'Firebase/Analytics'
      pod 'Firebase/DynamicLinks'end
  
  
  (... With more targets ...)
  </code></pre>
  
  <p>TEST1. When I try to complile the App target, this is the errors I am getting:</p>
  
  <p><a href="https://i.stack.imgur.com/oqCnO.png" rel="nofollow noreferrer">Error1 Image</a></p>
  
  <pre><code>'FirebaseCore/FirebaseCore.h' file not found
  Firebase.h
  While building module 'Firebase' imported from */AppDelegate.h:1.1:
  In file included from &lt;module-includes&gt;:1:
  
  Could not build module 'Firebase'
  AppDelegate.h
  In the file included from */ViewControllerLogin.m:9:
  In the file included from */ViewControllerLogin.h:10:
  </code></pre>
  
  <p>TEST2. If I remove the "pod 'Firebase/ ..." lines from the NotificationServiceExtensions I get these errors:</p>
  
  <p><a href="https://i.stack.imgur.com/5wbxP.png" rel="nofollow noreferrer">Error2 Image</a></p>
  
  <pre><code>'sharedApplication' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead.
  
  'openURL:' is unavailable: not available on iOS (App Extension)
  </code></pre>
  
  <p>TEST1. If I comment the "use_frameworks!" with #, I get the first errors again.</p>
  
  <p>TEST2. If I comment everything inside the targets NotificationServiceExtensions I get:</p>
  
  <pre><code>Library not found for -lFirebaseCore
  </code></pre>
  
  <p>For every test I'm doing "pod deintegrate" and "pod install" again, open the PROJECT-NAME.xcworkspace, clean and build.</p>
  
  <p>I don't know what else to try or what I'm doing wrong... (the integration with android was super easy...)</p>
  
  <p>Thanks.</p>