firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.69k stars 1.49k forks source link

Cannot find type 'GADInterstitial' in scope and SwiftUI Preview not working when add firebase product #6764

Closed phukhanhlee closed 3 years ago

phukhanhlee commented 4 years ago

Step 0: Are you in the right place?

Yes

[REQUIRED] Step 1: Describe your environment

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

Just add :
pod 'Google-Mobile-Ads-SDK'
pod 'Firebase/Analytics'

Then SwiftUI previews doesn't work anymore. I try to fix with by add : pod 'GoogleDataTransport', :git=>'https://github.com/firebase/firebase-ios-sdk.git', :commit=>'38be2cc -> seem just fix for firebase analytics.

App don't crash but working with SwiftUI without Previews UI is impossible :)

Relevant Code:

Do this bug related to Firebase product or it's also related to Xcode ? Any idea to fix this issues ?

Screen Shot 2020-10-19 at 5 33 09 PM
google-oss-bot commented 4 years ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

phukhanhlee commented 4 years ago

import Firebase //disable this code -> everything work well

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. FirebaseApp.configure() //disable this code -> everything work well
return true }

Seem the error related to Firebase

morganchen12 commented 4 years ago

Possibly related to #6219

phukhanhlee commented 4 years ago

@morganchen12 Thanks !

We can install firebase via SPM: https://github.com/firebase/firebase-ios-sdk/blob/master/SwiftPackageManager.md

But it will create another issue : duplicate object because it will confict with Admob SDK with install via cocoapods. Example : Promises, nanopb

phukhanhlee commented 4 years ago

We can have a fix like this : Add Admob sdk manually (only add necessary framework avoid duplicated) And add firebase still via cocoapod

paulb777 commented 3 years ago

Is this still an issue with Google-Mobile-Ads-SDK 8.x?

google-oss-bot commented 3 years ago

Hey @phukhanhlee. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 3 years ago

Since there haven't been any recent updates here, I am going to close this issue.

@phukhanhlee if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.