Skip to content

Enable module stability. Now can't use with Swift 5.3.2. #102

Open
@hlung

Description

Description

Currently, I can't include it with Swift 5.3.2.
Screenshot 2021-02-22 at 6 10 26 PM

Since Swift 5.1, Apple provide module stability feature in Xcode. This enables a framework to be able to be included in targets with newer Swift versions. But BUILD_LIBRARY_FOR_DISTRIBUTION build setting has to be enabled.
Screenshot 2021-02-22 at 5 59 38 PM

Screenshot 2021-02-22 at 5 53 34 PM

My current workaround is to add a Podfile post_install script to do so:

post_install do | installer |
  installer.pods_project.targets.each do |target|
    if target.name == 'mamba-iOS' || target.name == 'mamba-tvOS'
      target.build_configurations.each do |config|
        config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
      end
    end
  end
end

Tasks

  • Set BUILD_LIBRARY_FOR_DISTRIBUTION build setting to Yes

References

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions