的未定义符号问题

的未定义符号问题

本文介绍了GoogleMobileAds 的未定义符号问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建动态框架,我将在其中导入 GoogleMobileAds 框架(我没有将其链接为二进制文件)

I am building dynamic framework in which i am importing GoogleMobileAds framework (i am not linking it as binary)

我只是在类代码中导入它,同时将框架保留在项目路径上,而没有在构建阶段的链接二进制文件"中链接它

I am simply importing it in the class code while keeping the framework on the project path without linking it in the "Link binary" in the build phases

import GoogleMobileAds

我在尝试构建项目时收到此错误:

I am getting this error when trying to build the project:

Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GADInterstitial", referenced from:
  static VeediSDK_admob.VeediUtils.loadNewAdd (VeediSDK_admob.VeediUtils.Type)() -> __ObjC.GADInterstitial in
 VeediUtils.o
 "_OBJC_CLASS_$_GADRequest", referenced from:
  static VeediSDK_admob.VeediUtils.loadNewAdd (VeediSDK_admob.VeediUtils.Type)() -> __ObjC.GADInterstitial in VeediUtils.o
ld: symbol(s) not found for architecture arm64

由于我正在构建框架,我不想将 GoogleMobileAds 直接链接到框架.

Since i am building framework i don't want to link the GoogleMobileAds directly to the framework.

我确保我链接了 GoogleMobileAds 所需的所有系统框架,并确信这不是问题

I made sure i am linking all the system frameworks required by GoogleMobileAds and confident that this is not the issue

任何想法如何解决这个问题?

Any ideas how to solve this?

推荐答案

我遇到了同样的问题
就我而言,我删除了 pod 并从
手动导入了 adMob FrameWorkhttps://firebase.google.com/docs/admob/ios/download
只需将GoogleMobileAds.framework"拖到我的项目中,
清理并运行

i had same issue
in my case i removed pod and import adMob FrameWork manually from
https://firebase.google.com/docs/admob/ios/download
and just drag "GoogleMobileAds.framework" into my project,
clean and run

这篇关于GoogleMobileAds 的未定义符号问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 10:00