Do not integrate TestFlight test suite in build release using Cocoapods

I combined TestFlight SDKusing Cocoapods with the following Podfile: https://gist.github.com/fabb/8841271

I do not want the TestFlight library to be linked in lines Release(build config, not target).

This article shows you how to remove a file libTestFlight.afrom a release assembly using a custom build setting EXCLUDED_SOURCE_FILE_NAMES.

Is there a way I can do this using Cocoapods too? Remember that Cocoapods associates libTestFlight.awith it libPods.a, so setting a custom build option in the target application program will not help.

An alternative idea would be to include only TestFlight SDKpod for my TestFlightReleasebuild configuration , but it seems this is not yet supported by Cocoapods.

+3
source share
1 answer

There is a recommended workaround when the function is implemented:

  • Create a new (empty) object of type "Static library" named "DebugTools" in your custom project

  • Associate this with your application, but only in Debug, adding Settings -lDebugToolsto OTHER_LDFLAGSBuild, but only for Debug configuration (do not forget to save $(inherited)if it is not already presented)

Then you should be able to configure the modules necessary for debugging by adding them to the DebugTool target only through your subfile, for example:

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

.

+4

All Articles