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

Swift-tools-version bump to 5.0 #140

Closed
wants to merge 1 commit into from
Closed

Conversation

vvghost1
Copy link

This fixes minimum deployment target version error when project generated in Xcode 12

@evgenyneu
Copy link
Owner

@vvghost1 thanks for the fix. What are the steps to reproduce the "deployment target version error" in Xcode 12? I just want to check that the bug exists locally and confirm that it goes away with your update. Thanks 👍

@vvghost1
Copy link
Author

vvghost1 commented Feb 3, 2021

@evgenyneu sorry for delayed answer. Steps to reproduce (using Xcode 12, swift-tools-version:5.x):

  • create empty package, swift package init
  • add KeychainSwift as package and target dependency
  • add import KeychainSwift to any source file (template one is ok)
  • generate Xcode project using swift package generate-xcodeproj

Now, if you will try to build generated project for iOS Simulator, you will have error "Compiling for iOS 9.0, but module 'KeychainSwift' has a minimum deployment target of iOS 14.x"

@evgenyneu
Copy link
Owner

evgenyneu commented Feb 6, 2021

Thanks for instructions, yes I can reproduce the issue. The recommended way of adding KeychainSwift package to an Xcode project is by using the menu File > Packages > Add Package Dependency. This does not result in any errors for me, I just tested in Xcode 12.3, both for a Mac and iOS app, see project attached. Do you think you can use this approach, or do you still need to create Xcode project from command line?

DemoKeychainSwift.zip

@vvghost1
Copy link
Author

@evgenyneu thank you for attention to this issue! I have already found a workaround, and, moreover, I had investigated that generate-xcodeproj is being deprecated: swiftlang/swift-package-manager#3062
However, I still think that bumping swift-tools-version is a good thing to reduce possible bugs in the future. Maybe you could do it with some additional changes later, it's up to you

@bdolewski
Copy link

Hello! What about current status with Xcode 13.2.1?

@ChrisMarshallNY
Copy link

ChrisMarshallNY commented Dec 26, 2021

It'sI'm using it in a native Swift (UIKit) app (version 19.0.0 -SPM).

It works fine (latest Xcode/Swift 5.5).

Have you encountered any issues?

I generally don't run prerelease Xcode, unless there's an explicit reason.

@bdolewski
Copy link

It'sI'm using it in a native Swift (UIKit) app (version 19.0.0 -SPM).

That's also the problem because SPM sees this lib as version 19.0.0 which is wrong because on GitHub there is a release 2.0.1. The mismatch is because 19 it's a tag in git and SPM cares only about tags. However this is different issue addressed here: #148

It works fine (latest Xcode/Swift 5.5).

Yeah, it works fine but Xcode displays a yellow warning because it wants to update this package into Swift 5. It's just outdated.

I generally don't run prerelease Xcode, unless there's an explicit reason.

I see but Xcode 13.2.1 was released on AppStore about 1 week ago.

@ChrisMarshallNY
Copy link

Ah. I see. I have 13.2.1. I was wondering if there was an issue with a prerelease.

I see that stupid warning. I was wondering what caused it.

That release is a few years old, and very much out of date. It should probably be deleted, or a bunch of new releases, set to various tags, should be added (at least the 19.0.0 tag).

Thanks!

@evgenyneu
Copy link
Owner

Done

@evgenyneu evgenyneu closed this Jan 4, 2022
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

Successfully merging this pull request may close these issues.

4 participants