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

Fix wrong os in xcframework frameworks infoplist #2549

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

themz
Copy link

@themz themz commented Oct 4, 2024

This PR aims to fix an issue where the Info.plist contains an incorrect value in the xcframework multiplatform bundle.

apple_xcframework(
    ...
    ios = {
        "simulator": ["x86_64"],
        "device": ["arm64"],
    },
    ..
)

In this configuration, the Info.plist for x86_64 will contain the 'iphoneos' value for DTPlatformName, but it is supposed to be iphonesimulator.

Related to #2524

@@ -88,13 +96,26 @@ def _platform_prerequisites(
platform_type_string: The platform type for the current target as a string.
uses_swift: Boolean value to indicate if this target uses Swift.
xcode_version_config: The `apple_common.XcodeVersionConfig` provider from the current context.
environment: "device" or "simulator" environment of the current target. Optional.

Returns:
A struct representing the collected platform information.
"""
platform_type_attr = getattr(apple_common.platform_type, platform_type_string)
platform = apple_fragment.multi_arch_platform(platform_type_attr)
Copy link
Author

@themz themz Oct 4, 2024

Choose a reason for hiding this comment

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

[review-note]
Here, we don't have an option to determine the correct platform for the simulator, as platform_type can only be ios or tvos, whereas platform for ios can be both ios_simulator and ios_device.

@themz themz force-pushed the 2524_fix_wrong_info_plist_platfrom_for_xcframework branch from b26ebca to 6f31244 Compare October 8, 2024 06:00
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.

1 participant