config("custom_framework_config") {
frameworks = [ "CustomFramework.framework" ]
framework_dirs = [ "$absolute_path_to_framework" ]}
bundle_data("custom_framework_bundle_data") {
sources = ["$absolute_path_to_framework/CustomFramework.framework/CustomFramework","$absolute_path_to_framework/CustomFramework.framework/Info.plist",
# List all the other files, if the framework contains directories, you'll
# needs to use multiple bundle_data targets, one per sub-directory.]
outputs = [ "{{bundle_resources_dir}}/Frameworks/CustomFramework.framework/{{source_file_part}}" ]}
source_set("some_code_that_uses_the_framework") {
sources = [ ... ]
configs += [ ":custom_framework_config" ]
deps = [ ":custom_framework_bundle_data" ]
}
ios_app_bundle("my_app") {
deps = [ ":some_code_that_uses_the_framework" ]...
}
Hello Sylvian,
I am running through a similar issue, but in my case I am trying to integrate a Swift framework. This approach works for me for ObjC framework, but somehow not with Swift framework.
I do not get any compile error, and contents inside the framework seems to be in place too, but whenever I try to import the framework from the swift file using import SomeSDK (framework added as deps on the code used to call that framework) I get no such module error.
Is custom Swift framework expected to work or I am missing anything? Any help/suggestions would be great :) Thanks
- Priyonto
Hi,
Is it working now? Is the Chromium template ready to build third-party Swift code into an Objective-C framework?