问题
My app has had support for a couple of siri shortcuts since it came out, haven't touched it in a long time. My project compiles and builds in 11.3.2 but doesn't in 11.4.
The errors i get is that the classes that are supposed to be generated from my intentdefinition file, and that i am referencing in my intenthandlers are no longer found.
For example, in my intentdefinition file i have a custom intent called "MyStatus".
I then have a MyStatusIntentHandler:
#import "MyStatusIntent.h"
@interface MyStatusIntentHandler<MyStatusIntentHandling> : NSObject
In 11.4, i get an "MyStatusIntent.h" file not found. In 11.3.1 and earlier it builds fine.
I am not super great at project config and structure, so i'm a bit at a loss as to where to start digging. If anyone has any pointers, and what in 11.4 that might be new and giving me problems, I'm all ears.
回答1:
I have this problem too. After updated XCode get build failed with "error: use of unresolved identifier" for classes from *.intentdefinition file. with terminal build I had this message:
2020-03-26 17:11:21.874 xcodebuild[28391:166707] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEIntentBuilder/IDEIntentBuilder-16029/IntentsBuildSystem/XCCompilerSpecificationIntents.m:46 Details: Code generator extension identifier unexpectedly nil for <DVTDeclaredPrimitiveFileDataType:0x7f888398b950:49:'com.apple.sirikit.intentdefinition':'Intent Definition':-*-*-------**-----*--*----*----------------------*--------------> Object: <XCCompilerSpecificationIntents: 0x7f88838a4540> Method: -createCommandsforInputs:withMacroExpansionScope: Thread: <NSThread: 0x7f8892390940>{number = 13, name = (null)} Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide. ** BUILD FAILED **
now I downgrade Xcode and add feedback to the https://feedbackassistant.apple.com/feedback/7640678
回答2:
I have dug around, and also talked to Apple Support. Turns out, it has to do with the "legacy build system".
Once i switched to the new build system in xcode project settings, i could build the project again. I would argue that if they still support the legacy system (which they do), it should work, but oh well.
Read how to switch here: https://help.apple.com/xcode/mac/current/#/dev396bc94c7
来源:https://stackoverflow.com/questions/60862481/my-app-does-not-find-sirikit-intentdefinition-classes-in-xcode-11-4