Skip to content

Conversation

jcgruenhage
Copy link

@jcgruenhage jcgruenhage commented Jun 27, 2025

  • Fix typo in yubikey deciphering error message
  • Don't look at decryption algorithm in yubikey specific code

I'm new to the Apple Ecosystem. I've tried building this locally, but can't get past ./gomobile: -target="ios" requires Xcode, even though XCode is installed.

Corresponding issue #696

@jcgruenhage jcgruenhage changed the title Try decryption regardless of algorithm Don't look at decryption algorithm in yubikey specific code Jun 27, 2025
@jcgruenhage
Copy link
Author

@mssun can you take a look? I'd love to be able to use this app, but this keeps me from doing so right now.

@SimplyDanny
Copy link
Collaborator

SimplyDanny commented Jul 31, 2025

I'm new to the Apple Ecosystem. I've tried building this locally, but can't get past ./gomobile: -target="ios" requires Xcode, even though XCode is installed.

I can't judge the code changes, but I can probably help you with the build issue. Did you run ./scripts/gopenpgp_build.sh and it failed? Can you provide the error message?

As for Xcode, make sure that your installation is selected using xcode-select -s <path>.

@jcgruenhage
Copy link
Author

Regarding Xcode:

passforios on  misc-2025-06-27 via 💎 v2.6.10 took 10s
❯ xcode-select --install
xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updates

passforios on  misc-2025-06-27 via 💎 v2.6.10
❯ xcode-select --version
xcode-select version 2409.

passforios on  misc-2025-06-27 via 💎 v2.6.10
❯ xcode-select --print-path
/Library/Developer/CommandLineTools

The full log of that script:

+ GOPENPGP_VERSION=v2.8.1-passforios
++ pwd
+ export GOPATH=/Users/jc.gruenhage/dev/other/github.com/jcgruenhage/passforios/go
+ GOPATH=/Users/jc.gruenhage/dev/other/github.com/jcgruenhage/passforios/go
+ export PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/Users/jc.gruenhage/.cargo/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Ghostty.app/Contents/MacOS:/usr/local/bin:/Users/jc.gruenhage/.local/bin:/Users/jc.gruenhage/dev/other/github.com/jcgruenhage/passforios/go/bin
+ PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/Users/jc.gruenhage/.cargo/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Ghostty.app/Contents/MacOS:/usr/local/bin:/Users/jc.gruenhage/.local/bin:/Users/jc.gruenhage/dev/other/github.com/jcgruenhage/passforios/go/bin
+ OUTPUT_PATH=go/dist
+ CHECKOUT_PATH=go/checkout
+ GOPENPGP_PATH=go/checkout/gopenpgp
+ mkdir -p go/dist
+ mkdir -p go/checkout
+ git clone --depth 1 --branch v2.8.1-passforios https://github.com/mssun/gopenpgp.git go/checkout/gopenpgp
Cloning into 'go/checkout/gopenpgp'...
remote: Enumerating objects: 154, done.
remote: Counting objects: 100% (154/154), done.
remote: Compressing objects: 100% (149/149), done.
remote: Total 154 (delta 4), reused 88 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (154/154), 184.81 KiB | 3.49 MiB/s, done.
Resolving deltas: 100% (4/4), done.
+ pushd go/checkout/gopenpgp
~/dev/other/github.com/jcgruenhage/passforios/go/checkout/gopenpgp ~/dev/other/github.com/jcgruenhage/passforios
+ mkdir -p dist
+ go get golang.org/x/mobile/cmd/gomobile@latest
go: downloading golang.org/x/mobile v0.0.0-20250711185624-d5bb5ecc55c0
go: downloading golang.org/x/mod v0.26.0
go: downloading golang.org/x/sync v0.16.0
go: downloading golang.org/x/tools v0.35.0
go: downloading golang.org/x/sys v0.34.0
go: upgraded go 1.17 => 1.23.0
go: added toolchain go1.24.5
go: added golang.org/x/mobile v0.0.0-20250711185624-d5bb5ecc55c0
go: upgraded golang.org/x/mod v0.8.0 => v0.26.0
go: upgraded golang.org/x/sync v0.1.0 => v0.16.0
go: upgraded golang.org/x/sys v0.16.0 => v0.34.0
go: upgraded golang.org/x/tools v0.6.0 => v0.35.0
+ go get golang.org/x/mobile/cmd/gobind@latest
+ go build golang.org/x/mobile/cmd/gomobile
+ go build golang.org/x/mobile/cmd/gobind
+ go mod download github.com/ProtonMail/go-crypto
+ ./gomobile init
+ ./gomobile bind -tags mobile -target ios -iosversion 13.0 -v -x '-ldflags=-s -w' -o dist/Gopenpgp.xcframework github.com/ProtonMail/gopenpgp/v2/crypto github.com/ProtonMail/gopenpgp/v2/armor github.com/ProtonMail/gopenpgp/v2/constants github.com/ProtonMail/gopenpgp/v2/models github.com/ProtonMail/gopenpgp/v2/subtle github.com/ProtonMail/gopenpgp/v2/helper
GOMOBILE=/Users/jc.gruenhage/dev/other/github.com/jcgruenhage/passforios/go/pkg/gomobile
WORK=/var/folders/n5/kwhvyzld3tj5l3p6wkzll57r0000gp/T/gomobile-work-245275974
rm -r -f "$WORK"
./gomobile: -target="ios" requires Xcode

@SimplyDanny
Copy link
Collaborator

passforios on  misc-2025-06-27 via 💎 v2.6.10
❯ xcode-select --print-path
/Library/Developer/CommandLineTools

That's exactly the problem. CommandLineTools brings only basic tools but is not sufficient to develop apps. You need to install a full Xcode and select it.

@jcgruenhage
Copy link
Author

That was it, yes. It builds successfully, but I can't test the changes on my device: Personal development teams, including "<my name>", do not support the Siri and Near Field Communication Tag Reading capabilities. Without the ability to use NFC, I can't test the changes..

Maybe it'd be possible to get this into testflight?

@SimplyDanny
Copy link
Collaborator

Maybe it'd be possible to get this into testflight?

This is something @mssun needs to decide.

@jcgruenhage jcgruenhage marked this pull request as draft September 26, 2025 08:27
@jcgruenhage
Copy link
Author

I have gotten access to a developer team, allowing me to test this: It does not work. Instead of failing in the app, the smartcard says that the data it receives is not correct.

I haven't looked further yet, will update the PR once I do.

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 participants