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

implementation_deps could cause an unexpected dynamic framework loss #2406

Open
xiemotongye opened this issue Feb 21, 2024 · 1 comment · May be fixed by #2407
Open

implementation_deps could cause an unexpected dynamic framework loss #2406

xiemotongye opened this issue Feb 21, 2024 · 1 comment · May be fixed by #2407

Comments

@xiemotongye
Copy link

Bazel 6.3 supported implementation_deps in objc_library.

We use bazel to organize & build our iOS application. All works fine while using deps.
But when I tring to replace deps to implementation_deps, I found implementation_deps could cause an unexpected dynamic framework loss.

Here is an example:

load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application")
load("@build_bazel_rules_apple//apple:apple.bzl", "apple_dynamic_xcframework_import")

ios_application(
    name = "MyApp",
    deps = ":MyLib",
    ...
)

objc_library(
    name = "MyLib",
    srcs = [
        "MyLib.m",
    ],
    implementation_deps = [
        ":FBSDKCoreKit_framework",
        ...
    ],
)

apple_dynamic_xcframework_import(
    name = "FBSDKCoreKit_framework",
    xcframework_imports = glob(["FacebookSDK/FBSDKCoreKit.xcframework/**"]),
)

The FBSDKCoreKit.framework would be lost in the final payload.

@xiemotongye
Copy link
Author

I've sent a PR to fix this. @keith Can you have a look?

#2407

This issue may not cause compilation failures, but rather cause runtime crashes. This makes the problem more difficult to detect, and may cause serious online crashes.

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.

1 participant