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

cmd/fyne: support -os iossimulator #2495

Merged
merged 6 commits into from Dec 7, 2021
Merged

Conversation

changkun
Copy link
Member

Description:

This PR adds -os iossimulator to the fyne command, and fixes the iOS simulator issue on darwin/arm64.

Fixes #1917

Checklist:

  • Tests included.
  • Lint and formatter run with no errors.
  • Tests all pass.

@andydotxyz
Copy link
Member

Do we need another target system to support this? the iOS package already includes both amd64 and arm64...
Unfortunately on my system iOS builds with or without this patch do not run on the simulator and I have not been able to figure out why.

@changkun
Copy link
Member Author

Do we need another target system to support this? the iOS package already includes both amd64 and arm64...

Yes, but only works for darwin/amd64 systems. The iOS simulator fails on M1 macs.
Packing darwin/arm64 for device and darwin/arm64 for iOS seems impossible when using xcrun lipo. As they have the same architecture. Adding a iossimulator better isolates ios targets and iossimulator targets.

@andydotxyz

This comment has been minimized.

@changkun

This comment has been minimized.

@andydotxyz

This comment has been minimized.

@changkun

This comment has been minimized.

@changkun

This comment has been minimized.

@andydotxyz

This comment has been minimized.

@changkun

This comment has been minimized.

@andydotxyz

This comment has been minimized.

@andydotxyz

This comment has been minimized.

@changkun

This comment has been minimized.

@changkun

This comment has been minimized.

@changkun

This comment has been minimized.

@changkun

This comment has been minimized.

@andydotxyz

This comment has been minimized.

@changkun

This comment has been minimized.

@changkun

This comment has been minimized.

@andydotxyz

This comment has been minimized.

Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

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

There must be a way to support this new feature without removing 32bit iOS support?

cmd/fyne/internal/mobile/build.go Outdated Show resolved Hide resolved
@changkun
Copy link
Member Author

My darwin/amd64 was broken recently and have been sent to a repair center which might take weeks to repair.

After rebase based on the latest develop branch, I could not even run fyne package -os iossimulator on darwin/arm64, and got: go: unsupported GOOS/GOARCH pair iossimulator/arm64

Looks like I have completely lost track here.

@andydotxyz

This comment has been minimized.

@changkun changkun marked this pull request as draft November 27, 2021 15:57
@changkun

This comment has been minimized.

@andydotxyz

This comment has been minimized.

@changkun

This comment has been minimized.

@andydotxyz

This comment has been minimized.

@changkun changkun marked this pull request as ready for review December 3, 2021 12:59
@changkun
Copy link
Member Author

changkun commented Dec 3, 2021

I think I've figured the problem. As I tested the latest status of this PR on two of my Macs, it has fixed the previous concerned issue. Now the code works both for ios/arm, ios/arm64, ios/amd64, iossimulator/amd64, iossimulator/arm64 on either amd64 Macs or arm64 Macs.

PTAL.

Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

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

Tested and working well thanks.
It is a shame about the duplicate file, but I guess with the import issues it is not possible to resolve another way?
We can remove the old file once we stop supporting Go 1.14 ;)

@changkun changkun merged commit 784b67d into fyne-io:develop Dec 7, 2021
@changkun changkun deleted the iossimulator branch December 7, 2021 06:46
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.

None yet

2 participants