diff --git a/BazelExtensions/xcode_configuration_provider.bzl b/BazelExtensions/xcode_configuration_provider.bzl index da30fa1..a146c72 100644 --- a/BazelExtensions/xcode_configuration_provider.bzl +++ b/BazelExtensions/xcode_configuration_provider.bzl @@ -94,9 +94,8 @@ def _extract_generated_sources(target, ctx): if CcInfo in target: cc_info = target[CcInfo] files.append(cc_info.compilation_context.headers) - elif hasattr(target, "objc"): - objc = target.objc - files.append(objc.header) + elif hasattr(target, "objc") and hasattr(target.objc, "header"): + files.append(target.objc.header) if hasattr(target, "objc"): objc = target.objc