ios - 不要使用 Cocoapods 在发布版本中集成 TestFlight SDK

标签 ios app-store cocoapods testflight

我使用 Cocoapods 将 TestFlight SDK 与以下 Podfile 集成:https://gist.github.com/fabb/8841271

我不希望在 Release 构建(构建配置,不是目标)中链接 TestFlight 库。

This article显示了使用 EXCLUDED_SOURCE_FILE_NAMES 自定义build设置从发布构建中删除 libTestFlight.a 文件的方法。

有没有办法我也可以使用 Cocoapods 来做到这一点? 请记住,Cocoapods 确实将 libTestFlight.a 链接到它的 libPods.a ,因此在应用目标中设置自定义build设置将无济于事。

另一种想法是只为我的 TestFlightRelease 构建配置包含 TestFlight SDK pod - 但似乎 Cocoapods 尚不支持。

最佳答案

有一个建议 workaround实现该功能时:

  • Create a new (empty) target of type "Static Library" named "DebugTools" in your user project

  • Link it with your application, but only in Debug, by adding -lDebugTools to the OTHER_LDFLAGS Build Setting but only for the Debug configuration (don't forget to keep $(inherited) if not present already)

Then you should be able to configure the pods needed in debug by adding them in the DebugTool target only, via your Podfile, like:

pod 'AFNetworking' # For all build configurations, Debug and Release

target 'DebugTools', :exclusive => true do
    pod 'PonyDebugger' # Debugger only needed in debug
    pod 'OHHTTPStubs' # Stubs for Network Requests only in debug too
end

执行状态在同一个线程中更新。

关于ios - 不要使用 Cocoapods 在发布版本中集成 TestFlight SDK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21599487/

相关文章:

iphone - 检测 iOS 应用的 AppStore 安装

ios - 苹果应用商店的应用商店浏览量和应用单元数是什么意思?

ios - Xcode 构建过程卡在 "Copying swiftdocs"

xcode - 使用 Cocoapods 时 Xcode 7.3 中的奇怪错误

iOS崩溃不会告诉错误发生在哪一行或文件中

ios - 使用应用程序测试数据库的下载速度和最大下载速度

ios - RestKit IOS SSL 证书无效

objective-c - 带有背景图片的 UIScrollView

cocoapods - 如何在 Podfile 中为特定 Pod 定义 swift 版本

iphone - iPhone应用程序更新由于 bundle ID而无效