bazelbuild / rules_apple

Bazel rules to build apps for Apple platforms.
Apache License 2.0
509 stars 264 forks source link

`apple_xcframework` doesn't work with `data` that has `glob` value for coredata model #2523

Open xuzhaocheng opened 3 weeks ago

xuzhaocheng commented 3 weeks ago

When I try to bundle my coredata model into my xcframework with the following spec:

apple_xcframework(
    name = "MyXcFramework",
    bundle_id = "com.my.MyXcFramework",
    bundle_name = "MyXcFramework",
    deps = [":lib"],
    minimum_os_versions = { "ios": "13.0", "tvos": "15.0", },
    ios = { "device": ["arm64"], "simulator": ["x86_64", "arm64"] },
    infoplists = [":info_plist"],
    data = glob(["path/to/*.xcdatamodeld/*.xcdatamodel"])
)

I can't get a xcframework with *.mond inside it. Even if I use a specific path for the data: glob(["path/to/model.xcdatamodeld/model.xcdatamodel"])

But it works without glob function:

apple_xcframework(
    name = "MyXcFramework",
    bundle_id = "com.my.MyXcFramework",
    bundle_name = "MyXcFramework",
    deps = [":lib"],
    minimum_os_versions = { "ios": "13.0", "tvos": "15.0", },
    ios = { "device": ["arm64"], "simulator": ["x86_64", "arm64"] },
    infoplists = [":info_plist"],
    data =["path/to/model.xcdatamodeld/model.xcdatamodel"]
)