Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My app does not find sirikit intentdefinition classes in xcode 11.4

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.

like image 855
Mathias Avatar asked Mar 26 '20 07:03

Mathias


2 Answers

I've had a similar problem in mixed swift+objc project.

There is a file 'Intents.intentdefinition' in my project for a separate Siri Extentsion target. Also, this file is included in the compilation of the application target (for using generated classes in adding intents with UI).

Siri Extenstion target builds successfully.

But Application build fails with error: "'AnyIntent.h' not found", though those files were generated (I've checked).

I solved this issue only by changing the build setting of the Siri Extension target

Intent Class Generation Language (INTENTS_CODEGEN_LANGUAGE)
from Automatic to Swift

Intent Class Generation Language set to Swift

All imports of the previously generated intents header files I changed to

#import <SiriIntents-Swift.h>
like image 113
Alexander Avatar answered Sep 19 '22 12:09

Alexander


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

like image 38
jobpav1984 Avatar answered Sep 18 '22 12:09

jobpav1984