简体   繁体   中英

How to solve “”_OBJC_CLASS_$_FIRApp“, referenced from” with Firebase in Xcode

I can't solve the error ""_OBJC_CLASS_$_FIRApp", referenced from:" in Xcode when I added Firebase (ver.3.12.0).

I found the solution to add "$(inherited)" in Other Linker Flags and I did it, but it didn't work.

How can I solve it?

其他链接器标志的图像

Update (Podfile) podfile

Update2 更新了Podfile The linker error is deleted. But if I import "Firebase" by using #import "Firebase.h" or @import Firebase; or #import <Firebase/Firebase.h> , the error 'Firebase.h' file not found has occurred.

You need to chnage your POD file like this as per Google AdMob suggestted on fire base quick start

target 'BannerExample' do
  pod 'Firebase/Core'
  pod 'Firebase/AdMob'
end

it will Install all dependent SDK and will show pod install log like below :

Analyzing dependencies

Downloading dependencies

Installing Firebase (3.12.0)

Installing FirebaseAnalytics (3.6.0)

Installing FirebaseCore (3.4.7)

Installing FirebaseInstanceID (1.0.8)

Installing Google-Mobile-Ads-SDK (7.17.0)

Installing GoogleInterchangeUtilities (1.2.2)

Installing GoogleSymbolUtilities (1.1.2)

Installing GoogleToolboxForMac (2.1.1)

Generating Pods project

Integrating client project

Reference Link : https://firebase.google.com/docs/admob/ios/quick-start

Edit:

Also do one more thing uncomment use_frameworks! it will resolve your problem.

Hope this will solve your problem!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM