简体   繁体   English

不要使用Cocoapods在Release Build中集成TestFlight SDK

[英]Do not Integrate TestFlight SDK in Release Builds using Cocoapods

I integrated the TestFlight SDK using Cocoapods with the following Podfile : https://gist.github.com/fabb/8841271 我使用Cocoapods将TestFlight SDK与以下PodfilehttpsPodfile

I do not want the TestFlight library to be linked in Release builds (build config, not target). 我不希望TestFlight库在Release版本中链接(构建配置, 而不是目标)。

This article shows a way to remove the libTestFlight.a file from Release builds using the EXCLUDED_SOURCE_FILE_NAMES custom build setting. 本文介绍了使用EXCLUDED_SOURCE_FILE_NAMES自定义生成设置从发布版本中删除libTestFlight.a文件的方法。

Is there a way I can do this using Cocoapods too? 有没有办法可以用Cocoapods做到这一点? Remember, Cocoapods does link the libTestFlight.a into its libPods.a , so setting the custom build setting in the app target will not help. 请记住,Cocoapods确实将libTestFlight.a链接到其libPods.a ,因此在app目标中设置自定义构建设置将无济于事。

An alternative idea would be to only include the TestFlight SDK pod for my TestFlightRelease build config - but it seems this is not yet supported by Cocoapods. 另一个想法是只为我的TestFlightRelease构建配置包含TestFlight SDK pod - 但似乎Cocoapods尚不支持。

There is a suggested workaround while the feature gets implemented: 在实现该功能时,有一个建议的解决方法

  • Create a new (empty) target of type "Static Library" named "DebugTools" in your user project 在用户项目中创建一个名为“DebugTools”的“静态库”类型的新(空)目标

  • 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) 将它与您的应用程序链接,但仅在Debug中,通过将-lDebugTools添加到OTHER_LDFLAGS构建设置中,但仅用于调试配置(如果不存在则不要忘记保留$(inherited)

Then you should be able to configure the pods needed in debug by adding them in the DebugTool target only, via your Podfile, like: 然后,您应该能够通过Podfile将它们添加到DebugTool目标中来配置调试中所需的pod,如:

 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 

The implementation status is updated in the same thread. 实现状态在同一个线程中更新。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 TestFlight 不接受使用 TestFlight SDK 进行构建 - TestFlight does not accept builds with TestFlight SDK Apple TestFlight不再允许我向外部测试人员发布新版本 - Apple TestFlight No Longer Allows Me Release New Builds To External Testers iOS应用程序的AppStore版本及其在同一设备上的多个Testflight构建 - AppStore release of iOS app and its multiple Testflight builds on the same device Flutter - firebase FCM 消息根本不适用于 Testflight 发布版本 - Flutter - firebase FCM messages not working on Testflight release builds at all 通过终端或配置Testflight激活预发布版本以自动激活新版本以进行测试 - Activation of pre-release builds via terminal or Configuring Testflight to automatically activate new builds for testing 使用cocoapods升级Facebook SDK - Upgrading Facebook SDK using cocoapods 将cocoaPods用于google AdMob SDK - Using cocoaPods for google AdMob SDK 如何在TestFlight(iTunes Connect)错误中修复此多个版本? - How do I fix this multiple builds in TestFlight (iTunes Connect) bug? 如何从Xcode Bot向TestFlight部署自动构建? - How do I deploy automated builds to TestFlight from an Xcode Bot? Apple TestFlight 版本在一天中的什么时间到期? - What time of day do Apple TestFlight builds expire?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM