Skip to content

Fails to compile on iOS #76

@gBasil

Description

@gBasil

Keyring doesn't seem to compile to iOS.

When compiling the following repo, which is just the code in the README put into a module: https://github.com/gBasil/keyring-issue-reproduction
with this command:

SDKROOT=$(xcrun --sdk iphoneos --show-sdk-path) \
IPHONEOS_DEPLOYMENT_TARGET=10.0 \
GOOS=ios GOARCH=arm64 CGO_ENABLED=1 \
go build

It prints the these errors:

# github.com/noamcohen97/touchid-go
../../go/pkg/mod/github.com/noamcohen97/touchid-go@v0.3.0/local_authentication_gen.go:54:7: could not determine what C.LAErrorBiometryDisconnected refers to
../../go/pkg/mod/github.com/noamcohen97/touchid-go@v0.3.0/local_authentication_gen.go:62:7: could not determine what C.LAErrorBiometryNotPaired refers to
../../go/pkg/mod/github.com/noamcohen97/touchid-go@v0.3.0/local_authentication_gen.go:64:7: could not determine what C.LAErrorCompanionNotAvailable refers to
../../go/pkg/mod/github.com/noamcohen97/touchid-go@v0.3.0/local_authentication_gen.go:68:7: could not determine what C.LAErrorInvalidDimensions refers to
../../go/pkg/mod/github.com/noamcohen97/touchid-go@v0.3.0/local_authentication_gen.go:24:68: could not determine what C.LAPolicyDeviceOwnerAuthenticationWithBiometricsOrCompanion refers to
../../go/pkg/mod/github.com/noamcohen97/touchid-go@v0.3.0/local_authentication_gen.go:25:68: could not determine what C.LAPolicyDeviceOwnerAuthenticationWithCompanion refers to

touchid-go is a touch library for macOS, so I assume Go is unable to pull the relevant macOS-exclusive headers from the iOS SDK.

My setup is still the same as in #75. SDKROOT in the build command evaluates to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.2.sdk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions