Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode intermittently doesn't find xcframework

Xcode sometimes doesn't find my xcframework for incremental builds.

  • Error is ld: framework not found [framework] where [framework] is the name of my xcframework.
  • Once it fails, repeated incremental builds will also fail.
  • A clean build always fixes it.
  • The issue started when I switched from normal frameworks to xcframeworks.
  • I followed the instructions in this WWDC video to create the xcframework: https://developer.apple.com/videos/play/wwdc2019/416/

I diffed the link commands between and incremental and clean build, and there was no difference. This would seem to be an Xcode bug. I'm using Xcode 11.4.1.

like image 273
Taylor Avatar asked Aug 03 '26 21:08

Taylor


1 Answers

There are some issues with XCFrameworks that could cause that particular error, maybe you have this .xcframework in more than one target? Then you are in situation when Xcode only do one extraction of .framework from .xcframewok and report missing error if another target start building. You can look at my write up of issue that I did face in the past.

like image 53
KamilPyc Avatar answered Aug 05 '26 18:08

KamilPyc