I have a private pod framework and it has some dependencies. I wanted to change BUILD_LIBRARY_FOR_DISTRIBUTION
for all dependencies in that framework.
In a Podfile, I have this post_install hook that does this work, but I wanted to know how can I do this in podspec.
Podfile:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
In podspec, I have tried this:
spec.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }
and this:
spec.xcconfig = = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }
But none of these change it for all dependencies in framework.
Also, upon searching, I found that this https://guides.cocoapods.org/syntax/podspec.html#prepare_command could be used to convert post_install hook. Unfortunately, I couldn't figure out how. Any help would be appreciated. Thanks in advance.