keychain-swift icon indicating copy to clipboard operation
keychain-swift copied to clipboard

Error installing Swift Package

Open hiropome opened this issue 2 years ago • 8 comments

Hi, thanks for sharing this package. I tried to install via Swift Package but got the error below stating "keychain swift could not be resolved" Could you kindly help me out?

スクリーンショット 2021-11-05 11 35 46
  • Library setup method: Swift Package Manager.
  • Xcode version: 13
  • OS version: MacOS Big Sur 11.6

hiropome avatar Nov 05 '21 02:11 hiropome

I think that this may be due to Xcode now insisting on using HTTPS for everything.

I use the SSH version of the URI, and it works for me: [email protected]:evgenyneu/keychain-swift.git

ChrisMarshallNY avatar Nov 05 '21 14:11 ChrisMarshallNY

Same error for me. The error message is not visible on the image, here it is:

the manifest is missing a Swift tools version specification; consider prepending to the manifest '// swift-tools-version:5.5.0' to specify the current Swift toolch...

(the rest is emitted)

Does not matter if I use the https or the git URL version.

gklka avatar Dec 09 '21 14:12 gklka

Fixed this in the new version: https://github.com/evgenyneu/keychain-swift/blob/master/Package.swift

evgenyneu avatar Jan 04 '22 01:01 evgenyneu

Hi & thanks! Can you create a release tag for that?

Hustenbonbon avatar Apr 01 '22 10:04 Hustenbonbon

Already done, it's in version 20.0.0

evgenyneu avatar Apr 01 '22 10:04 evgenyneu

Thanks for the quick response! Weird, when adding over XCode version 9 is proposed as default. It looks like SPM is sorting the major versions alphanumeric (which sounds to strange as that I want to believe it). My personal problem is resolved though, so thanks for the quick response and the awesome helper tool! image

Hustenbonbon avatar Apr 01 '22 10:04 Hustenbonbon

Thanks, I had the exact same problem!

So in a nutshell, XCode is a baddie and shows an old version as default. To resolve this, just change the dependency rule to branch: master. In case someone else is new to swift ;)

Throvn avatar Apr 25 '22 12:04 Throvn

I don't like using master for my dependencies. I'll stick with pinned releases. I use master when debugging my own modules, or for demo test harnesses, but for releases to be included in other places (like the App Store, or as a published SPM module), I use semantic versioned releases.

My pattern is that I have Major.Minor.Fix.

Major is for breaking API changes, or major features.

Minor is for API changes that won't break things, but are worth testing. There may be some app UI changes, such as rearranged screens, and whatnot.

Fix is for bug fixes. It may include very minor API changes or app changes, if the changes fix a bug.

ChrisMarshallNY avatar Apr 25 '22 22:04 ChrisMarshallNY