gpt4 book ai didi

ios - 类方法+setLoggingEnabled : not found

转载 作者:行者123 更新时间:2023-11-28 22:02:46 25 4
gpt4 key购买 nike

我在 iOS 上使用 Google Cloud Endpoint。我正在尝试按照 https://developers.google.com/appengine/docs/java/endpoints/consume_ios#Java_Creating_the_service_object 中的说明创建服务对象.对于代码行 [GTMHTTPFetcher setLoggingEnabled:YES]; xCode 显示警告

class method '+setLoggingEnabled:' not found (return type defaults to 'id')

但是当我查看 GTMHTTPFetcher.h 文件时,我实际上可以看到该方法为

#if STRIP_GTM_FETCH_LOGGING
// if logging is stripped, provide a stub for the main method
// for controlling logging
+ (void)setLoggingEnabled:(BOOL)flag;
#endif // STRIP_GTM_FETCH_LOGGING

.m 文件中它看起来像这样

#if STRIP_GTM_FETCH_LOGGING
+ (void)setLoggingEnabled:(BOOL)flag {
}
#endif // STRIP_GTM_FETCH_LOGGING

该类也是由 Google 生成的,所以...它应该可以工作(?)

最佳答案

设置如下:

#define STRIP_GTM_FETCH_LOGGING 1 

关于ios - 类方法+setLoggingEnabled : not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24715946/

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