XcodeKit module not found, but why?

I'm working on a plugin, and that target works just fine.

I made another target so I can test some computation functions. It doesn't need much from XcodeKit, just some of the structures. I added XcodeKit and Cocoa, but the import XcodeKit just says "no such module".

If I switch to the plugin target, it's just fine. I've compared both schemes, but I don't see difference which would affect finding the framework.

Answered by DTS Engineer in 834086022

Oh hey, I know the answer to this (-:

XcodeKit isn’t part of the SDK, but rather part of Xcode. Xcode knows this, and automatically configures your extension target to be able to find the XcodeKit framework. However, other targets don’t benefit from those smarts. To get this working you have to add $(DEVELOPER_DIR)/Library/Frameworks to the Framework Search Paths build setting. For example, I needed to do this in my unit test target.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

Oh hey, I know the answer to this (-:

XcodeKit isn’t part of the SDK, but rather part of Xcode. Xcode knows this, and automatically configures your extension target to be able to find the XcodeKit framework. However, other targets don’t benefit from those smarts. To get this working you have to add $(DEVELOPER_DIR)/Library/Frameworks to the Framework Search Paths build setting. For example, I needed to do this in my unit test target.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks, Quinn!

A happy pigeon

XcodeKit module not found, but why?
 
 
Q