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

Library evolution support on cocoapods #4871

Closed
aswathr opened this issue Jul 26, 2022 · 3 comments
Closed

Library evolution support on cocoapods #4871

aswathr opened this issue Jul 26, 2022 · 3 comments
Assignees
Milestone

Comments

@aswathr
Copy link

aswathr commented Jul 26, 2022

What did you do?

  1. Added Charts as a dependency in my framework project with Cocoapods.
  2. Switched BUILD_LIBRARY_FOR_DISTRIBUTION = YES
  3. Build framework

What did you expect to happen?

Build to succeed

What happened instead?

Build fails with errors on SwiftAlgorithms
Screenshot 2022-07-26 at 2 01 21 PM

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

ChartsSampleEvolution.zip

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
Screenshot 2022-07-26 at 2 10 32 PM

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?

@pmairoldi pmairoldi self-assigned this Sep 3, 2022
@matopeto
Copy link
Contributor

I have same issue, last version that works with BUILD_LIBRARY_FOR_DISTRIBUTION was 4.0.0

@pykaso
Copy link

pykaso commented Sep 14, 2022

Same issue for me.

@pmairoldi
Copy link
Collaborator

Closed by #4912

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

No branches or pull requests

4 participants