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

[Cocoapods] Xcode 14.3 generates an error when adding SwiftQRCodeGenerator as a dependency for macOS #5

Closed
dagronf opened this issue May 15, 2023 · 10 comments

Comments

@dagronf
Copy link
Contributor

dagronf commented May 15, 2023

Hi there!

I've noticed an unusual issue when trying to add SwiftQRCodeGenerator as a dependency in my podspec file

s.dependency                 'SwiftQRCodeGenerator'

It would appear that Xcode 14.3 has recently dropped some arc-related frameworks, which affects the minimum deployment versions that can be built with Xcode 14.3, which in turn causes pod spec lint to fail on any podspec that depends on SwiftQRCodeGenerator. If I go back to Xcode 14.2 the issue goes away - so it's definitely been introduced in a later 14.3 release. It appears that the issue only affects the mac build as far as I can tell.

    ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_macosx.a
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

I think this is relating to the 10.10 deployment target. I was wondering whether it would be possible to up the os version in the podspec file to fix this issue for Xcode 14.3?

s.osx.deployment_target     = '10.13'

Existing users who still need support for 10.10 can still link against 1.0.4, so there'd be a backwards compatibility path.

Refs: -

CocoaPods/CocoaPods#11839

and

https://developer.apple.com/forums/thread/725300

Many thanks for a great library!

@dagronf dagronf changed the title Xcode 14.3 generates an error when adding SwiftQRCodeGenerator as a dependency for macOS [Cocoapods] Xcode 14.3 generates an error when adding SwiftQRCodeGenerator as a dependency for macOS Nov 19, 2023
@fwcd
Copy link
Owner

fwcd commented Nov 20, 2023

Is this fixed by #6?

@dagronf
Copy link
Contributor Author

dagronf commented Nov 20, 2023

That's great mate. If we could tag that latest release with a v2.0.0 that would allow Cocoapods to pull the updated version when requested.

The Cocoapod's podspec file (SwiftQRCodeGenerator.podspec) defines version 2.0.0.

Pod::Spec.new do |s|
  s.name                      = 'SwiftQRCodeGenerator'
  s.version                   = '2.0.0'
  s.summary                   = 'QR code generator written

@fwcd
Copy link
Owner

fwcd commented Nov 20, 2023

Done

@dagronf
Copy link
Contributor Author

dagronf commented Nov 20, 2023

Brilliant mate. I'm just waiting for the CI to complete which should automatically push the v2.0.0 branch to Cocoapods and then I will test and let you know.

@fwcd
Copy link
Owner

fwcd commented Nov 20, 2023

Looks like we'll have to bump the deployment targets further to build with recent versions of Xcode: https://github.com/fwcd/swift-qrcode-generator/actions/runs/6924089904/job/18832847281

@dagronf
Copy link
Contributor Author

dagronf commented Nov 20, 2023

The deploy action has failed. Seems to be something relating to the authentication when pushing up to Cocoapods.

Have you got some time to check?

@fwcd
Copy link
Owner

fwcd commented Nov 20, 2023

2.0.1 is now deployed

@dagronf
Copy link
Contributor Author

dagronf commented Nov 20, 2023

Ah I'm so sorry to be a pain - but you've updated the podspec to use 2.0.2, but you've only tagged the repo with 2.0.1

Any chance of adding the 2.0.2 tag?

@fwcd
Copy link
Owner

fwcd commented Nov 20, 2023

2.0.2 is tagged and pushed (which should fix the validation check for the iOS target too). 2.0.3 on the main branch is the unreleased development version - I tend to bump version numbers immediately after releasing. I admittedly haven't worked a lot with CocoaPods yet, so if that poses an issue for consuming the pod, let me know.

@dagronf
Copy link
Contributor Author

dagronf commented Nov 20, 2023

Hey @fwcd all looks great. After jumping through some hoops with my own project to get cocoapods updated it all seems to be up and running.

Thank you so much!

@dagronf dagronf closed this as completed Nov 20, 2023
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

2 participants