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

XCFramework for macOS #1475

Open
yuriyhanysh opened this issue May 16, 2022 · 5 comments · May be fixed by #2459
Open

XCFramework for macOS #1475

yuriyhanysh opened this issue May 16, 2022 · 5 comments · May be fixed by #2459

Comments

@yuriyhanysh
Copy link

Hello!
Is there a way to create XCFramework for both iOS and macOS using apple_xcframework?
minimum_deployment_os_versions and minimum_os_versions attributes don't seem to work. And ios attribute allows you to specify only ios architectures.

@yuriyhanysh
Copy link
Author

OK, I see how I can implement this. I'll work on PR.

@xiemotongye
Copy link

Is there a follow-up?
I'm now facing a same issue.

@luispadron
Copy link
Contributor

I'd also like this so if anyone is already working on this let me know otherwise I'll likely spend some time to get this working for macOS

@luispadron
Copy link
Contributor

Started looking into this a bit and I believe the issue might be in Bazel core, given:

apple_xcframework(
    name = "ios_and_macos_dynamic_xcframework",
    bundle_id = "com.google.example",
    extension_safe = True,
    infoplists = [
        "//test/starlark_tests/resources:Info.plist",
    ],
    ios = {
        "simulator": ["x86_64"],
        "device": ["arm64"],
    },
    minimum_os_versions = {
        "ios": common.min_os_ios.baseline,
        "macos": common.min_os_macos.baseline,
    },
    public_hdrs = [
        "//test/starlark_tests/resources:shared.h",
    ],
    tags = common.fixture_tags,
    deps = [":fmwk_lib"],
)

I get the following output when examining the split transition keys used here:

Error in fail: [("ios_arm64_device", <target //apple:default_cc_toolchain_forwarder>), ("ios_x86_64_simulator", <target //apple:default_cc_toolchain_forwarder>)]

@luispadron
Copy link
Contributor

I've got something in draft now that generates the expected XCFramework: #2459

@luispadron luispadron linked a pull request May 26, 2024 that will close this issue
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 a pull request may close this issue.

3 participants