Unable to codesign on Mac app with Go binary

285 views
Skip to first unread message

hachi8833

unread,
Mar 17, 2016, 9:59:12 AM3/17/16
to golang-nuts
Hello,

I've been trying to create a Mac app that includes Go binary. 
It works fine so far, but unable to perform 'codesign' command against the app to upload to App Store. 

To reproduce the issue, I uploaded the unsigned/signed apps plus simplified Go code.

- 01_unsigned_works contains an app that works
- 02_signed_fails contains an app that does not work
- elec.go is just a simple http server

Environment: Mac OS X El Capitan, Go 1.6, XCode 7.2.1

I wonder some ldflag option might be required for codesigning.

Thanks,

Jakob Borg

unread,
Mar 17, 2016, 11:02:18 AM3/17/16
to hachi8833, golang-nuts
For what it's worth, I codesign a command line Go program with
success. But that's just the binary, not a containing .app folder. But
nothing special for that one, essentially just a "codesign -s binary"
on a Mac with the requisite key unlocked etc.

//jb
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

hachi8833

unread,
Mar 17, 2016, 9:43:28 PM3/17/16
to golang-nuts, hach...@gmail.com
Thank you for the checking!

After that, I found that '-f' option is redundant and causes the error on the 'bare' Go binary. 
Then I was successful to build the Mac app with the Go binary and codesigned them.

2016年3月18日金曜日 0時02分18秒 UTC+9 Jakob Borg:
Reply all
Reply to author
Forward
0 new messages