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

x/mobile: enable building frameworks for Catalyst #36856

Open
losh11 opened this issue Jan 29, 2020 · 2 comments
Open

x/mobile: enable building frameworks for Catalyst #36856

losh11 opened this issue Jan 29, 2020 · 2 comments

Comments

@losh11
Copy link

@losh11 losh11 commented Jan 29, 2020

As of macOS 10.15, users can build iPad apps to run on macOS using Catalyst. However if you build a framework using gomobile, even though the framework has support for x86_64, Xcode will display an error.

To fix this, all you need to do is target clang for the macOS sdk & add a cflag with -target x86_64-apple-ios13.0-macabi. Fully tested example below.

Gomobile should support specifying a target catalyst. In x/mobile/cmd/gomobile/env.go, add a new case "catalyst" for function envInit which looks like this:

case "catalyst":
    clang, cflags, err = envClang('macosx')
    cflags += " -target x86_64-apple-ios13.0-macabi"
@gopherbot gopherbot added this to the Unreleased milestone Jan 29, 2020
@gopherbot gopherbot added the mobile label Jan 29, 2020
@hyangah hyangah added the help wanted label Jan 30, 2020
@losh11

This comment has been minimized.

Copy link
Author

@losh11 losh11 commented Feb 1, 2020

@hyangah if y'all are okay with this, I can implement?

@agnivade

This comment has been minimized.

Copy link
Contributor

@agnivade agnivade commented Feb 2, 2020

All yours !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.