cocoapods-generate icon indicating copy to clipboard operation
cocoapods-generate copied to clipboard

--use-podfile: In podfile post_install set buildsetting, after gen workspace, buildsetting not working

Open qingni opened this issue 3 years ago • 0 comments

My Pod requires special settings to compile and I set it in the 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' config.build_settings['CLANG_WARN_DOCUMENTATION_COMMENTS'] = 'NO' end if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle" target.build_configurations.each do |config| config.build_settings['CODE_SIGN_IDENTITY[sdk=macosx*]'] = '-' end end end end

pod gen xx.podspec --gen-directory=xx --platforms=ios --use-podfile --clean --auto-open

However, the generated Xcode project use own defalult setting. In Podfile Set BUILD_LIBRARY_FOR_DISTRIBUTION & CLANG_WARN_DOCUMENTATION_COMMENTS &CODE_SIGN_IDENTITY[sdk=macosx*] not working: image

image

can someone tell me how to solve this problem?

qingni avatar Mar 21 '22 09:03 qingni