Skip to content

Move to newer keyring fork (fixes iOS builds)#460

Closed
gBasil wants to merge 1 commit intomajd:mainfrom
gBasil:build/ios
Closed

Move to newer keyring fork (fixes iOS builds)#460
gBasil wants to merge 1 commit intomajd:mainfrom
gBasil:build/ios

Conversation

@gBasil
Copy link
Copy Markdown
Contributor

@gBasil gBasil commented Mar 25, 2026

This moves from https://github.com/99designs/keyring to a maintained fork of it, https://github.com/ByteNess/keyring. I contributed support for iOS builds to it, and this PR makes ipatool buildable for iOS.

Resolves #136.

Note that:

  1. The GitHub Actions workflows need updating, which I haven't done, because I'm not sure what resources are available on the macOS runners.
  2. The Go version in go.mod was bumped. I'm not sure if you want it to stay at 1.23.0.
  3. I've been only able to get it build for newer iOS versions (specifically 15.0+, for reasons I've outlined here), but I'm reasonably certain that you could get it to work for older versions.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates ipatool’s keyring dependency from 99designs/keyring to the maintained byteness/keyring fork to enable iOS builds (resolving #136).

Changes:

  • Replaced github.com/99designs/keyring imports with github.com/byteness/keyring across command and keychain packages/tests.
  • Updated module dependencies to github.com/byteness/keyring v1.9.0 and refreshed go.sum.
  • Bumped the go.mod Go version directive to go 1.25.0 (and removed the toolchain directive).

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pkg/keychain/keyring.go Updates keyring import to the new fork for the keyring interface types.
pkg/keychain/keychain_set.go Updates keyring import used by Set implementation.
pkg/keychain/keychain_set_test.go Updates keyring import used in mocks/tests.
pkg/keychain/keychain_get_test.go Updates keyring import used in mocks/tests.
cmd/common.go Updates keyring import for runtime keyring initialization.
go.mod Swaps keyring dependency, bumps Go version, and brings in new indirect deps.
go.sum Updates checksums for the new dependency graph.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread go.mod
Comment thread go.mod
Comment thread go.mod
@majd
Copy link
Copy Markdown
Owner

majd commented Apr 5, 2026

Thanks, @gBasil! Let's address the Go version bump and retain the current version to ensure the current workflows do not break.

@majd
Copy link
Copy Markdown
Owner

majd commented Apr 14, 2026

@cubic-dev-ai address the feedback from the comments on this PR.

@cubic-dev-ai
Copy link
Copy Markdown

cubic-dev-ai bot commented Apr 14, 2026

I addressed the review feedback about the Go version mismatch between go.mod and the CI workflows.

Key finding: The byteness/keyring v1.9.0 dependency requires go >= 1.25.0, which means we cannot revert the go directive back to 1.23.0go mod tidy automatically bumps it back since the dependency enforces this minimum. This is a hard constraint of Go's module system.

What I did: Updated all 5 GitHub Actions workflow files to use Go 1.25.0 (matching the go.mod requirement), so CI will no longer fail with a "go.mod requires go >= 1.25.0" error:

  • .github/workflows/dry-build.yml (3 occurrences)
  • .github/workflows/lint.yml
  • .github/workflows/release.yml (2 occurrences)
  • .github/workflows/unit-tests.yml
  • .github/workflows/integration-tests.yml

Re: toolchain directive: The toolchain directive was removed by the original PR, and go mod tidy in Go 1.25 intentionally omits it when the toolchain version matches the go directive (it's redundant). This is correct behavior.

Re: indirect dependencies: The expanded dependency tree (Extism/Wazero, OpenTelemetry/Jaeger, 1Password SDKs, etc.) comes from byteness/keyring v1.9.0 and its backends. This is worth being aware of but is inherent to using this fork.

✅ All tests passing (128/128 specs across 7 test suites)

diff --git a/.github/workflows/dry-build.yml b/.github/workflows/dry-build.yml
index af3969b..27d8f62 100644
--- a/.github/workflows/dry-build.yml
+++ b/.github/workflows/dry-build.yml
@@ -17,7 +17,7 @@ jobs:
       - uses: actions/checkout@v2
       - uses: actions/setup-go@v3
         with:
-          go-version: "1.23.0"
+          go-version: "1.25.0"
           cache: true
       - run: go build -o ipatool-$GOOS-$GOARCH.exe
         env:
@@ -34,7 +34,7 @@ jobs:
       - uses: actions/checkout@v2
       - uses: actions/setup-go@v3
         with:
-          go-version: "1.23.0"
+          go-version: "1.25.0"
           cache: true
       - run: go build -o ipatool-$GOOS-$GOARCH
         env:
@@ -51,7 +51,7 @@ jobs:
       - uses: actions/checkout@v2
       - uses: actions/setup-go@v3
         with:
-          go-version: "1.23.0"
+          go-version: "1.25.0"
           cache: true
       - run: go build -o ipatool-$GOOS-$GOARCH
         env:
diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
index 18dba4d..3cde628 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -13,7 +13,7 @@ jobs:
       - uses: actions/checkout@v2
       - uses: actions/setup-go@v3
         with:
-          go-version: "1.23.0"
+          go-version: "1.25.0"
           cache: true
       - run: go build -o ipatool
         env:
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 38db8d4..653056b 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -13,7 +13,7 @@ jobs:
       - uses: actions/checkout@v2
       - uses: actions/setup-go@v3
         with:
-          go-version: "1.23.0"
+          go-version: "1.25.0"
           cache: true
       - run: go generate github.com/majd/ipatool/...
       - uses: golangci/golangci-lint-action@v8
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 72a51fe..0ed637d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -21,7 +21,7 @@ jobs:
       - uses: actions/checkout@v2
       - uses: actions/setup-go@v3
         with:
-          go-version: "1.23.0"
+          go-version: "1.25.0"
           cache: true
       - run: go generate github.com/majd/ipatool/...
       - run: go test -v github.com/majd/ipatool/...
@@ -33,7 +33,7 @@ jobs:
       - uses: actions/checkout@v2
       - uses: actions/setup-go@v3
         with:
-          go-version: "1.23.0"
+          go-version: "1.25.0"
           cache: true
       - run: go build -ldflags="-X github.com/majd/ipatool/v2/cmd.version=$VERSION" -o ipatool-$VERSION-windows-arm64.exe
         env:
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
index 4d4cab4..3e278ce 100644
--- a/.github/workflows/unit-tests.yml
+++ b/.github/workflows/unit-tests.yml
@@ -13,7 +13,7 @@ jobs:
       - uses: actions/checkout@v2
       - uses: actions/setup-go@v3
         with:
-          go-version: "1.23.0"
+          go-version: "1.25.0"
           cache: true
       - run: go generate github.com/majd/ipatool/...
       - run: go test -v github.com/majd/ipatool/...

Files changed:

  • .github/workflows/dry-build.yml — Bumped go-version from 1.23.0 to 1.25.0 (3 jobs)

  • .github/workflows/lint.yml — Bumped go-version from 1.23.0 to 1.25.0

  • .github/workflows/release.yml — Bumped go-version from 1.23.0 to 1.25.0 (2 jobs)

  • .github/workflows/unit-tests.yml — Bumped go-version from 1.23.0 to 1.25.0

  • .github/workflows/integration-tests.yml — Bumped go-version from 1.23.0 to 1.25.0

This fixes iOS builds
@majd
Copy link
Copy Markdown
Owner

majd commented Apr 14, 2026

Moved here: #466

@majd majd closed this Apr 14, 2026
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.

2.0 iOS build

3 participants