How to add a framework to a BAZEL project on iOS

189 views
Skip to first unread message

While

unread,
Mar 30, 2023, 5:00:32 PM3/30/23
to bazel-discuss
Hi all,

Any body have cases how to add static framework and us in iOS projectCan anyone tell me how to properly add a static framework to the project, I have already tried different options and none of them work at all

From the Bazel docs in the BUILD file I have to do like this

load("@build_bazel_rules_apple//apple:apple.bzl", "apple_static_framework_import") apple_static_framework_import( name = "portSIPVoIPlib", framework_imports = glob(["PortSIPVoIPSDK.framework/**"]), sdk_dylibs = [ # "libc++", "libresolv", ], sdk_frameworks = [ "MetalKit", "VideoToolbox", "GLKit", ], visibility = ["//visibility:public"], )

in another module I specify

deps = [ "//submodules/portSIPVoIP:portSIPVoIPlib", ]

every time i have a lot of messeges

duplicate symbol '_I444Rotate' in:
    submodules/portSIPVoIP/PortSIPVoIPSDK.framework/PortSIPVoIPSDK(rotate.o)
    bazel-out/ios-arm64-min11.0-applebin_ios-ios_arm64-dbg-ST-2967bd56a867/bin/third-party/libyuv/liblibyuv.a(rotate.o)
duplicate symbol '_NV12ToI420Rotate' in:
    submodules/portSIPVoIP/PortSIPVoIPSDK.framework/PortSIPVoIPSDK(rotate.o)
    bazel-out/ios-arm64-min11.0-applebin_ios-ios_arm64-dbg-ST-2967bd56a867/bin/third-party/libyuv/liblibyuv.a(rotate.o)
duplicate symbol '_I420Rotate' in:
    submodules/portSIPVoIP/PortSIPVoIPSDK.framework/PortSIPVoIPSDK(rotate.o)
    bazel-out/ios-arm64-min11.0-applebin_ios-ios_arm64-dbg-ST-2967bd56a867/bin/third-party/libyuv/liblibyuv.a(rotate.o)
duplicate symbol '_RotatePlane' in:
    submodules/portSIPVoIP/PortSIPVoIPSDK.framework/PortSIPVoIPSDK(rotate.o)
    bazel-out/ios-arm64-min11.0-applebin_ios-ios_arm64-dbg-ST-2967bd56a867/bin/third-party/libyuv/liblibyuv.a(rotate.o)
duplicate symbol '_TransposePlane' in:
    submodules/portSIPVoIP/PortSIPVoIPSDK.framework/PortSIPVoIPSDK(rotate.o)
    bazel-out/ios-arm64-min11.0-applebin_ios-ios_arm64-dbg-ST-2967bd56a867/bin/third-party/libyuv/liblibyuv.a(rotate.o)
duplicate symbol '_RotatePlane90' in:
    submodules/portSIPVoIP/PortSIPVoIPSDK.framework/PortSIPVoIPSDK(rotate.o)
    bazel-out/ios-arm64-min11.0-applebin_ios-ios_arm64-dbg-ST-2967bd56a867/bin/third-party/libyuv/liblibyuv.a(rotate.o)
duplicate symbol '_RotatePlane180' in:
    submodules/portSIPVoIP/PortSIPVoIPSDK.framework/PortSIPVoIPSDK(rotate.o)
    bazel-out/ios-arm64-min11.0-applebin_ios-ios_arm64-dbg-ST-2967bd56a867/bin/third-party/libyuv/liblibyuv.a(rotate.o)

Please, help me 🙏
Reply all
Reply to author
Forward
0 new messages