gpt4 book ai didi

xcode - Cocoapods 和 GGLContext 错误

转载 作者:行者123 更新时间:2023-11-28 09:03:31 27 4
gpt4 key购买 nike

我一直在通读所有的帮助和其他帖子……但我显然遗漏了一些东西。我正在为 Google API 使用 Cocoapods。我已将它们安装在我的 Mac 上,并且正在使用它为我的应用程序创建的工作区。以下代码给我一个错误:

import UIKit
import GoogleMobileAds

class InformationViewController: UIViewController {

@IBOutlet weak var bannerView: GADBannerView!


override func viewDidLoad() {
super.viewDidLoad()

self.bannerView.adUnitID = GGLContext.sharedInstance().adUnitIDForBannerTest
self.bannerView.rootViewController = self
self.bannerView.loadRequest(GADRequest())


}
}

我在 xcode 中收到一条错误消息,指出 GGLContext 是一个未解析的标识符。

pod update has setup the following Pods.xconfig:
FRAMEWORK_SEARCH_PATHS = "$(PODS_ROOT)/GoogleMobileAds/Frameworks"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/GGLAdMob/Public" "${PODS_ROOT}/Headers/Public/Google" "${PODS_ROOT}/Headers/Public/Google/Google" "${PODS_ROOT}/Headers/Public/GoogleMobileAds" "${PODS_ROOT}/Headers/Public/GoogleMobileAds/GoogleMobileAds" "${PODS_ROOT}/Headers/Public/GoogleMobileAds/GoogleMobileAds/Loading" "${PODS_ROOT}/Headers/Public/GoogleMobileAds/GoogleMobileAds/Loading/Formats" "${PODS_ROOT}/Headers/Public/GoogleMobileAds/GoogleMobileAds/Loading/Options" "${PODS_ROOT}/Headers/Public/GoogleMobileAds/GoogleMobileAds/Mediation" "${PODS_ROOT}/Headers/Public/GoogleMobileAds/GoogleMobileAds/Search" "${PODS_ROOT}/Headers/Public/GoogleNetworkingUtilities" "${PODS_ROOT}/Headers/Public/GoogleSymbolUtilities" "${PODS_ROOT}/Headers/Public/GoogleUtilities"
LIBRARY_SEARCH_PATHS = "$(PODS_ROOT)/Google/Libraries" "$(PODS_ROOT)/Google/Libraries" "$(PODS_ROOT)/GoogleNetworkingUtilities/Libraries" "$(PODS_ROOT)/GoogleNetworkingUtilities/Libraries" "$(PODS_ROOT)/GoogleSymbolUtilities/Libraries" "$(PODS_ROOT)/GoogleUtilities/Libraries" "$(PODS_ROOT)/GoogleUtilities/Libraries" "$(PODS_ROOT)/GoogleUtilities/Libraries" "$(PODS_ROOT)/GoogleUtilities/Libraries" "$(PODS_ROOT)/GoogleUtilities/Libraries" "$(PODS_ROOT)/GoogleUtilities/Libraries" "$(PODS_ROOT)/GoogleUtilities/Libraries" "$(PODS_ROOT)/GoogleUtilities/Libraries" "$(PODS_ROOT)/GoogleUtilities/Libraries" "$(PODS_ROOT)/GoogleUtilities/Libraries" "$(PODS_ROOT)/GoogleUtilities/Libraries" "$(PODS_ROOT)/GoogleUtilities/Libraries" "$(PODS_ROOT)/GoogleUtilities/Libraries" "$(PODS_ROOT)/GoogleUtilities/Libraries" "$(PODS_ROOT)/GoogleUtilities/Libraries" "$(PODS_ROOT)/GoogleUtilities/Libraries"
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Google" -isystem "${PODS_ROOT}/Headers/Public/Google/Google" -isystem "${PODS_ROOT}/Headers/Public/GoogleMobileAds" -isystem "${PODS_ROOT}/Headers/Public/GoogleMobileAds/GoogleMobileAds" -isystem "${PODS_ROOT}/Headers/Public/GoogleMobileAds/GoogleMobileAds/Loading" -isystem "${PODS_ROOT}/Headers/Public/GoogleMobileAds/GoogleMobileAds/Loading/Formats" -isystem "${PODS_ROOT}/Headers/Public/GoogleMobileAds/GoogleMobileAds/Loading/Options" -isystem "${PODS_ROOT}/Headers/Public/GoogleMobileAds/GoogleMobileAds/Mediation" -isystem "${PODS_ROOT}/Headers/Public/GoogleMobileAds/GoogleMobileAds/Search" -isystem "${PODS_ROOT}/Headers/Public/GoogleNetworkingUtilities" -isystem "${PODS_ROOT}/Headers/Public/GoogleSymbolUtilities" -isystem "${PODS_ROOT}/Headers/Public/GoogleUtilities"
OTHER_LDFLAGS = $(inherited) -ObjC -l"GGLAdMob" -l"GGLCore" -l"GSDK_Overload" -l"GTMSessionFetcher_core" -l"GTMSessionFetcher_full" -l"GTMStackTrace" -l"GTM_AddressBook" -l"GTM_DebugUtils" -l"GTM_GTMURLBuilder" -l"GTM_KVO" -l"GTM_NSDictionary+URLArguments" -l"GTM_NSScannerJSON" -l"GTM_NSStringHTML" -l"GTM_NSStringXML" -l"GTM_Regex" -l"GTM_RoundedRectPath" -l"GTM_StringEncoding" -l"GTM_SystemVersion" -l"GTM_UIFont+LineHeight" -l"GTM_core" -l"GTM_iPhone" -framework "AVFoundation" -framework "AddressBook" -framework "AudioToolbox" -framework "CoreGraphics" -framework "CoreMedia" -framework "CoreTelephony" -framework "EventKit" -framework "EventKitUI" -framework "GoogleMobileAds" -framework "MessageUI" -framework "StoreKit" -framework "SystemConfiguration" -weak_framework "AdSupport"
PODS_ROOT = ${SRCROOT}/Pods

我还设置了我的 Header Search Path 如下:

Header Search Path

如何清除此错误并让我的应用程序编译...

最佳答案

好的,关闭这个。我已经回到直接输入我的 adUnitID 并删除了对 GGLContext 的依赖。一切都编译得很好。

关于xcode - Cocoapods 和 GGLContext 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31430822/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com