Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go1.15 does not support darwin/arm anymore for iOS #1497

Closed
MagicalTux opened this issue Nov 3, 2020 · 12 comments
Closed

Go1.15 does not support darwin/arm anymore for iOS #1497

MagicalTux opened this issue Nov 3, 2020 · 12 comments
Labels
blocker Items that would block a forthcoming release bug Something isn't working

Comments

@MagicalTux
Copy link
Contributor

Describe the bug:

Building for iOS with go1.15+ will fail with:

go [-e -json -compiled=true -test=false -export=false -deps=false -find=true -tags=ios -- .]: exit status 2: cmd/go: unsupported GOOS/GOARCH pair darwin/arm

To Reproduce:

Steps to reproduce the behaviour:

  1. build with -os ios with go1.15+

Device (please complete the following information):

  • OS: MacOS
  • Version: 10.15.7
  • Go version: 1.15.3
  • Fyne version: 1.4.0

Solving the issue

In file cmd/fyne/internal/mobile/build.go on line 155:

targetArchs = []string{"arm", "arm64"}

Could be replaced with:

targetArchs = []string{"arm64"}

If 32bit support is still required, adding a command line flag to enable it or define the target archs would be nice.

@andydotxyz andydotxyz added blocker Items that would block a forthcoming release bug Something isn't working labels Nov 3, 2020
@andydotxyz
Copy link
Member

Thanks for reporting this. I had not upgraded to Go 1.15 on my mobile test rig and see the problem now.

@andydotxyz
Copy link
Member

If possible can you try PR #1502?

Go modules should not be an issue as it's just a command line utility - apply the patch to your checkout of fyne and "go install" in cmd/fyne directory. You should then be able to build for iOS correctly.

@MagicalTux
Copy link
Contributor Author

Tested PR #1502 and confirmed it works with Go1.15.3.

main is only arm64 as expected: Mach-O universal binary with 1 architecture: [arm64:Mach-O 64-bit executable arm64]

@MagicalTux
Copy link
Contributor Author

MagicalTux commented Nov 3, 2020

Tested further with the fix to #1498 and attempted to call xcrun altool --upload-app, got the following error:

ERROR ITMS-90502: "Invalid Bundle. Your binary, '...', has a 64-bit architecture slice, so you must include the "arm64" value for the UIRequiredDeviceCapabilities key in your Xcode project. Learn more (https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW3)."

@andydotxyz
Copy link
Member

Oh, great catch thanks for that. Fixed on the PR, that should work for you now.

@andydotxyz
Copy link
Member

Agh, there was a typo.
Testing again locally for a final fix

@MagicalTux
Copy link
Contributor Author

Apple servers are not complaining anymore, looking good.

@andydotxyz
Copy link
Member

Thanks for your help. Now I just need a team PR review, and for the Travis servers to catch up. Probably will land tomorrow.

@MagicalTux
Copy link
Contributor Author

MagicalTux commented Nov 3, 2020

Btw got a separate issue from Apple after the upload succeeded (by email):

ITMS-90713: Missing Info.plist value - A value for the Info.plist key 'CFBundleIconName' is missing in the bundle '...'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key. For more information see http://help.apple.com/xcode/mac/current/#/dev10510b1f7.

@andydotxyz
Copy link
Member

Oh I have not seen that one before. But I have had an issue that Apple is failing my upload with no error - so maybe this is what I was missing and for some reason the emails are lost for me.
Are you able to look into this further for another PR? It is possible that we need to make the asset catalog and that's not something I am familiar with.

@MagicalTux
Copy link
Contributor Author

I'll open a new issue for now and gather information

andydotxyz added a commit that referenced this issue Nov 4, 2020
Also this was stopped by Apple many years ago (iPhone 5s)
Fixes #1497
@andydotxyz
Copy link
Member

On develop and release/v1.4.x branches ready for more testing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Items that would block a forthcoming release bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants