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

apple_xcframework: Invalid Info.plist generated for xcframework supporting both device and simulator #2524

Open
zavsby opened this issue Sep 9, 2024 · 0 comments

Comments

@zavsby
Copy link

zavsby commented Sep 9, 2024

I'm using apple_xcframework to generate a xcframework for ios (arm64 + arm64 simulator). But Info.plist for frameworks is always generated same for simulator and device with same value in CFBundleSupportedPlatforms, DTPlatformName and DTSDKName.
It depends what is passed to build command in --ios_multi_cpus or not passed at all, but anyway it is always either iphonesimulator or iphoneos for both ios and simulator frameworks.

apple_xcframework(
    name = "SwiftProtobuf",
    deps = [":SwiftProtobufLib"],
    bundle_id = "org.swift.protobuf.SwiftProtobuf",
    extension_safe = True,
    infoplists = [":Info.plist"],
    ios = {"device": ["arm64"], "simulator": ["arm64"]},
    minimum_os_versions = {"ios": "15.0"},
    minimum_deployment_os_versions = {"ios": "15.0"},
)

swift_library(
    name = "SwiftProtobufLib",
    srcs = glob(["*.swift"]),
    module_name = "SwiftProtobuf",
    features = [
        SWIFT_FEATURE_ENABLE_LIBRARY_EVOLUTION,
    ]
)

bazel build //Sources/SwiftProtobuf:SwiftProtobuf --apple_platform_type=ios --ios_multi_cpus=sim_arm64,arm64

I've found that issue is in platform_support.bzl in _platform_prerequisites method which returns same platform for any environment.
Maybe I'm doing something wrong in configuration and some fix already exists?

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

No branches or pull requests

1 participant