我使用 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 theOTHER_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/