What a highly annoying issue I discovered today!
I was doing some exploratory work with the SiriKit / Intents Frameworks and was very frustrated to find out the following:
If you want to migrate to using a common framework, make sure you have ANY swift type defined in it. If you only have your .intentdefinition file in that framework, it won’t compile properly, leaving you scratching your head (in my case for HOURS). Look at target dependencies, looked at linked binaries. Wanted to look at the generated stuff, but where is it located??
It turns out that as soon as I defined a simple struct that was added to this target, suddenly the generated intents code succeeded. Until then, you’ll have no idea why.
But wait! That might have not been it either. It could also be because of the .intentdefinition file. I modified a response template and it started working.
So basically under the hood, Xcode is doing weird, buggy stuff. So it’s maddening when you’re trying to learn something only to find out that you did nothing wrong and the tools are ruining the experience.
Because it’s AUTOMAGIC!