User Defined Settings in Package.swift

Hi, I'm moving from CocoaPods to SPM and I should replicate a custom settings currently set in a PodFile. The following settings alter the VALID_ARCHS settings in order to prevent compile failure for a library currently not supported on M1 archs.

CocoaPods's script works fine:

 post_install do |installer|
    installer.pods_project.build_configurations.each do |config|
      if config.name != 'Release'
        config.build_settings["VALID_ARCHS[sdk=iphonesimulator*]"] = "arm64, arm64e, armv7, armv6, i386, x86_64"
      end 
  end

How can I apply it to the same framework inside Package.swift?

Terms of Service

Privacy Policy

Cookie Policy