keepassium / KeePassium

KeePass-compatible password manager for iOS
https://keepassium.com
Other
1.18k stars 104 forks source link

Build failed for the `master` branch on macOS Sonoma 14.3.1 #341

Closed kniziol closed 7 months ago

kniziol commented 7 months ago

Description Build failed for the master branch

How to reproduce

  1. Clone repo using the master branch
  2. Open cloned repo in Xcode
  3. (optional if the tool hasn't been installed before) Install SwiftLint by running the brew install swiftlint command
  4. SelectProduct > Build in Xcode menu or hit the Cmd+B keys
  5. See build errors

Expected behavior Build succeeded

Screenshots

Xcode - KeePassium build errors

Environment:

Additional context I want to build KeePassium and try to run it on my device only to see/check all Premium features. I was told I could build KeePassium from the source code (https://keepassium.com/articles/is-keepassium-free) and see all the Premium features without a paid subscription.

keepassium commented 7 months ago

Wow, that was fast…

On Saturday, I decided to quickly patch KeePassium's fork of YubiKit to address https://github.com/Yubico/yubikit-ios/issues/144. Synced the fork, committed the patches, pushed them — and realized that YubiKit 4.0 had some breaking changes. OK — I thought — it will probably take a day or two to adopt the new API, nobody will notice that the project does not compile. Come Sunday, and here we are :)

So the reason of broken build is that YubiKit-ios/keepassium pointed to the newer, incompatible version of YubiKit. I have fixed this now, resetting the keepassium branch back to YubiKit v3.2.0 Make sure to File → Packages → Reset Package Caches, and it should compile.

v1-proofs.sha256 is not required for the build, just delete the broken reference from the project.

In turn, all the lint warnings are a surprise. They seem to be caused by the script that strips comments from the code before publication in master. I will get it fixed.

Anyway, now it should build.

kniziol commented 7 months ago

On Saturday, I decided to quickly patch KeePassium's fork of YubiKit to address Yubico/yubikit-ios#144. Synced the fork, committed the patches, pushed them — and realized that YubiKit 4.0 had some breaking changes. OK — I thought — it will probably take a day or two to adopt the new API, nobody will notice that the project does not compile. Come Sunday, and here we are :)

Yeah, who the hell will clone the repo and build the app on Sunday 😉

So the reason of broken build is that YubiKit-ios/keepassium pointed to the newer, incompatible version of YubiKit. I have fixed this now, resetting the keepassium branch back to YubiKit v3.2.0 Make sure to File → Packages → Reset Package Caches, and it should compile.

Still, tons of errors appeared. Most are related to linter (Trailing Whitespace Violation).

Here's what I did:

  1. File → Packages → Reset Package Caches
  2. Integrate → Pull (from origin/master)
  3. Product → Clean Build Folder
  4. Product → Build

What else do you think I should do? 🙄

keepassium commented 7 months ago

Still, tons of errors appeared. Most are related to linter

These are warnings, they do not prevent building, just complain about code formatting. This will be fixed with future commits, but for now you might want to disable SwiftLint script (project properties → Build Phases tab → delete SwiftLint phase).

kniziol commented 7 months ago

Please see the following build error:

/Users/kn/XcodeProjects/github/others/KeePassium/KeePassiumLib/KeePassiumLib/resources/licensing/v1-proofs.sha256: No such file or directory
Xcode - KeePassium v1-proofs error

Probably there is an issue with:

v1-proofs.sha256 is not required for the build, just delete the broken reference from the project.

How can I delete that?

keepassium commented 7 months ago

Still, tons of errors appeared. Most are related to linter

These are warnings, they do not prevent building

just delete the broken reference from the project.

How can I delete that?

The answer to the question is here: https://developer.apple.com/documentation/xcode/managing-files-and-folders-in-your-xcode-project#Delete-files-and-folders

On a more general note…

It sounds like you are fairly new to iOS development, but — based on your GitHub profile — are familiar with commercial software development.

I believe it is my responsibility to ensure that this repo is complete, so that any qualified iOS developer can built KeePassium from source (and they can). Bringing the expertise, however, is your side of the deal.

It looks like you are willing to dive into a quick course of iOS development, where the goal sounds like saving €15. Without the specific iOS experience, this would take you at least an hour. Is the money worth that time? Well, it's up to you — there is always the implicit benefit of learning new stuff :) But time-wise, the free trial is a much easier option for testing the premium features.

From my side, in turn, this sounds like a chance to spend a few hours converting this issue into a tutorial on "how to build KeePassium without experience". If failed, this would be wasted time. If successful, KeePassium would start losing potential customers. Admittedly, I feel rather reluctant to be part of such an endeavor…

The original build issue is fixed. The rest seems to be beyond the scope of this project.

kniziol commented 7 months ago
build

☺️

keepassium commented 7 months ago

Happy to see that, congrats! :)