Charts
Charts copied to clipboard
Library evolution support on cocoapods
- [✅] I've read, understood, and done my best to follow the *CONTRIBUTING guidelines.
What did you do?
- Added Charts as a dependency in my framework project with Cocoapods.
- Switched
BUILD_LIBRARY_FOR_DISTRIBUTION = YES
- Build framework
What did you expect to happen?
Build to succeed
What happened instead?
Build fails with errors on SwiftAlgorithms
Charts Environment
Charts version/Branch/Commit Number: 4.0.3 Xcode version: 13.3 Swift version: 5 Platform(s) running Charts: iOS 15 target (framework) macOS version running Xcode: 12.1
Demo Project
Possible fix
Library evolution can be disabled for SwiftAlgorithms using the post_install hook, which I did.
post_install do |installer|
installer.pods_project.targets.each do |target|
puts "#{target.name}"
if target.name == "SwiftAlgorithms"
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'NO'
end
end
end
end
but the warning that throws
can be silenced by changing import Algorithms
to @_implementationOnly import Algorithms
, which IMO shouldn't cause any issues as Charts doesn't seem to expose publicly any types of SwiftAlgorithm?
I have same issue, last version that works with BUILD_LIBRARY_FOR_DISTRIBUTION was 4.0.0
Same issue for me.
Closed by #4912