SolidSnake4444 SolidSnake4444 - 1 month ago 55
iOS Question

Undefined symbols for architecture x86_64 error when trying to build app with Admob

I just integrated google admob into my iOS app. When I compile I'm getting the following errors:

Undefined symbols for architecture x86_64:
"_CACurrentMediaTime", referenced from:
l858 in GoogleMobileAds(flat-x86_64)
"_CVBufferGetAttachment", referenced from:
l2558 in GoogleMobileAds(flat-x86_64)
"_CVOpenGLESTextureCacheCreate", referenced from:
l2560 in GoogleMobileAds(flat-x86_64)
"_CVOpenGLESTextureCacheCreateTextureFromImage", referenced from:
l2561 in GoogleMobileAds(flat-x86_64)
"_CVOpenGLESTextureCacheFlush", referenced from:
l2559 in GoogleMobileAds(flat-x86_64)
"_CVOpenGLESTextureGetName", referenced from:
l2561 in GoogleMobileAds(flat-x86_64)


There are more errors like that as well. I installed admob separately from firebase as I didn't want to use firebase, just admob. How can I fix this?

Answer

In the future, you can always Google the undefined symbol its referring to to find out which framework you are missing. In this case Google CACurrentMediaTime, which is referenced from QuartzCore. So, to fix your issue you need to import QuartzCore.