1. First I created a http_archive in my WORKSPACE file pointing at the artifact:
new_http_archive(
name = "MyApi",
url = URL + "MyApi.zip",
build_file = "framework_build.BUILD",
sha256 = "1234567891011121314151617181920",
)
2. Next I created a third party build file for the framework:
objc_framework(
name = "MyApi",
framework_imports = glob(["MyApi.framework/**"]),
is_dynamic = 1,
visibility = ["//visibility:public"],
sdk_dylibs = [
"libc++",
"libz",
"libbz2",
"libiconv",
],
sdk_frameworks = [
"SdkFramework1",
"SdkFramework2",
"SdkFramework3",
],
weak_sdk_frameworks = [
"SdkFramework4",
],
)
3. Then I added an objc_library in the BUILD file for my swift project, which my ios_application rule depends on:
objc_library(
name = "ObjcLib",
copts = [
"-isystem src/main/cc",
"-std=c++11",
],
deps = ["//third_party:MyApi"],
)
This builds the framework with my application. I can verify this by removing the SDK frameworks from my third party build file which causes a compilation error. How can I import this framework in my View Controller? When I put 'import MyApi' in my View Controller, I get the following error message: "error: no such module 'MyApi'".
Could you please advise me on how I can fix this problem.
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/538e3fea-b4b4-49aa-9195-f65634151b07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.