Open JuanFelippo opened 4 years ago
Try using apple_framework
instead of apple_library
? apple_library
is not meant to be used as a dependency by anything but packaging / bundling rules
Yeah, what @segiddins said, also in your dependencies, don't depend on the _objc
or _swift
labels directly, just depend on ModuleA
. I suspect you had to depend on those components because you are using apple_library
instead of apple_framework
.
If you make it work we should add it to the examples since we only have a basic one with a single ios_application
rule.
@ob maybe it makes sense to hide apple_library
inside a struct so it can't be used from BUILD files?
Yeah, let's do that.
Iยดve just pushed a few changes using apple_framework ๐ Good News! Scenario 2 was fixed.
About scenario 1, in order to use a swift class (from a framework) in a objc framework. What import should i import? @ob @segiddins
+1 adding to examples if it works ๐
Try @import ModuleC;
maybe?
Excelent! It Worked!!!! ๐ !!! Will make a PR to repo as example! super clean @segiddins @ob , Thanks so much for your help!
Yeah, let's do that.
I would be interested in how to do this refactor. Is there an example in the codebase of this already?
Hi! i have 2 scenarios that fails:
Scenario1:
structure: ModuleA (mixed, objc /swift) -> depends on ModuleC (pure obc)
bazel build //MixedTest:ModuleA_swift
error: umbrella header 'ModuleC-umbrella.h' not found umbrella header "ModuleC-umbrella.h"
Scenario2:
structure: ModuleD (pure swift) -> depends on ModuleE (pure swift)
bazel build //MixedTest:ModuleD_swift
MixedTest/ModuleD/D.swift:2:8: error: cannot load underlying module for 'ModuleE' import ModuleE
Fork to reproduce error: https://github.com/JuanFelippo/rules_ios branch: feature/mixed
Any ideasss?