gpt4 book ai didi

iphone - 在使用 RestKit 的应用程序中使用 LibComponentLogging

转载 作者:行者123 更新时间:2023-12-03 21:03:21 24 4
gpt4 key购买 nike

RestKit 使用 LibComponentLogging登录 Xcode 控制台。我想在我的 iPhone 应用程序中使用相同的库,但以下两个设置失败:

  • 将 LCL 添加为我的项目的库会导致名称冲突(因为 lcl.a 已存在于复制的框架中)。

  • 使用 lcl.h来自RestKit/lcl.h导致 LCL 使用默认的 RestKit 记录器,所以我总是有 restkit我的日志中的前缀。 LCL 不考虑我的组件配置。

是否可以使用这个库或者我必须切换到另一个日志系统?

最佳答案

RestKit 0.10.x:

使用 RestKit 0.10.x,您可以使用 RestKit 中的 lcl.h 并将组件添加到 RestKit 中的 lcl_config_components.h 中,或者创建自己的配置文件并添加将其包含到 RestKit 中的 lcl_config_components.h 文件中。

另请参阅https://github.com/aharren/LibComponentLogging-Core/issues/18

RestKit 0.20.x:

RestKit 0.20.0 现在使用 LibComponentLogging 的嵌入式变体,并且 LibComponentLogging 的所有嵌入式部分都以 RestKit 的 RK 前缀为前缀。这使得 RestKit 能够在利用正常 LibComponentLogging 安装进行自己的日志记录的应用程序中使用,即使 RestKit 作为 Git 子模块安装也是如此。

与 CocoaPods 和 LibComponentLogging-pods pod 一起使用时,所有 RestKit 日志组件都将集成到正常的 lcl_ 符号空间中。这样,所有lcl_configure_...配置函数也将覆盖RestKit的日志组件。如果不使用 LibComponentLogging-pods ,则需要通过 RestKit 的 RKLogConfigure... 函数配置 RestKit 的日志组件。

参见http://0xc0.de/LibComponentLogging#CocoaPods有关 LibComponentLogging 和 CocoaPods 的更多信息。

关于iphone - 在使用 RestKit 的应用程序中使用 LibComponentLogging,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11601919/

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