Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode 11 can not run successfully, ActionSheetPicker-3.0 version (2.4.0) ,use cocoaPods #454

Closed
jianjianhao opened this issue Dec 16, 2019 · 2 comments · Fixed by #455
Closed

Comments

@jianjianhao
Copy link

B99156BD-5894-4D5E-8EED-E30899883006

7ABBFD67-D17C-4D38-BBFC-B359E91260AE

@ElfSundae
Copy link

DEPLOYMENT_VERSION = '9.0'.freeze
DEPLOYMENT_TARGET_KEY = 'IPHONEOS_DEPLOYMENT_TARGET'.freeze
PODS_MIN_DEPLOYMENT_VERSION = '9.0'.freeze

platform :ios, DEPLOYMENT_VERSION

target 'xxx' do
    ...  
end

# https://github.com/CocoaPods/CocoaPods/issues/7314#issuecomment-489453484
def fix_deployment_targets(installer)
  installer.generated_projects.each do |project|
    project.targets.each do |target|
      target.build_configuration_list.build_configurations.each do |config|
        if config.build_settings[DEPLOYMENT_TARGET_KEY].to_f < PODS_MIN_DEPLOYMENT_VERSION.to_f
          config.build_settings[DEPLOYMENT_TARGET_KEY] = PODS_MIN_DEPLOYMENT_VERSION
          puts "Successfully set #{DEPLOYMENT_TARGET_KEY} of target #{target.name} for config #{config.display_name} to #{PODS_MIN_DEPLOYMENT_VERSION}"
        end
      end
    end
  end
end

post_install do |installer|
  fix_deployment_targets installer
end

CocoaPods/CocoaPods#7314 (comment)

@jianjianhao
Copy link
Author

thank you for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants