0
xcconfig
ファイルが#include
dであるべきことをPodfile
に指定する方法はありますか?Cocoapodsによって生成されたファイルですか?Cocoapodsを使用するときに自分のxcconfigsを含めるにはどうすればいいですか?
#include
を追加するための公開されたメソッド/変数がありますか、または生成されたxcconfig
を読んで、追加のテキストでそれを復活させる必要がありますか?例えば
、生成されたPods-SomeTarget.[configuration].xcconfig
に、私が見てみたい:
#include "my_other_config.xcconfig" //<-- I want this to be inserted
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Crashlytics" "${PODS_ROOT}/Fabric" "${PODS_ROOT}/Google-Mobile-Ads-SDK/Frameworks" "${PODS_ROOT}/GoogleAds-IMA-iOS-SDK-For-AdMob/GoogleInteractiveMediaAds/GoogleInteractiveMediaAds-GoogleIMA3ForAdMob" "${PODS_ROOT}/NewRelicAgent/NewRelicAgent" "${PODS_ROOT}/TwitterCore/iOS" "${PODS_ROOT}/TwitterKit/iOS"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
#includeは正確に何をしますか? – Larme
@Larme例を追加しました。 – ray
あなたは 'post_install'を使ってそれをあなたのpodfileで行うことができます:(同僚は私たちのプロジェクトの1つでそれを行いました)' post_install do | installer | installer.pods_project.targets.each do | target | target.build_configurations.each do | config | xcconfig_path = config.base_configuration_reference.real_path put xcconfig_path xcconfig = File.read(xcconfig_path)common_xcconfig = '#include "my_other_config.xcconfig"' File.open(xcconfig_path、 "w"){|ファイル|ファイル<< common_xcconfig file.putsファイル<< xcconfig} end end end' – Larme