donateInteractionWithCompletion crashes with 'NSUnknownKeyException'

I am attempting to donate an Interaction for a custom intent to create a Siri Shortcut. This is resulting in an execution error as follows:

. . .
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<__NSCFString 0x2837703c0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key pronunciationHint.'

terminating with uncaught exception of type NSException

This error occurs with the invocation of the following code block:


`CreatePartsListIntent* createPartsListIntent = [[CreatePartsListIntent alloc] init];

    
    createPartsListIntent.nameOfProject = intentData.nameOfProject;
    createPartsListIntent.quantity = intentData.quantity;

    INInteraction* interaction = [[INInteraction alloc] initWithIntent:createPartsListIntent response:nil];

    [interaction donateInteractionWithCompletion:^(NSError * _Nullable error) {

        if(!error) {

            NSLog(@"CreatePartsList donation success");

        }else {

            NSLog(@"CreatePartsList donation fail %@",error.localizedDescription);

        }

    }];`

I did a search for pronunciationHint. I found this in my intents.intentsDefinition file. It is a hidden parameter, but can be found when you open the file as propertyList. It is at the end of the file under INTypes. Below is a screenshot of the INTypes content found at the end of the intents.intentsDefinition file.

If I delete Item 2 and Item 3 and delete the DerivedData, I still get the same NSException error, so I don't know where it is finding pronunciationHint and why it even cares that it is there.

I am not even sure why the pronunciationHint parameter is being created. An excerpt of my intentDefinition file is shown below where it is showing the parameter TYPE that I created called Project. The auto creation of pronunciationHint is apparently related to the creation of this Project TYPE:

Any ideas on how I can get by this error?

It turns out that this problem is a result of defining a custom parameter type. I don't know why a custom parameter type would cause the auto generation of the pronunciationHint, but by using the standard parameter types for my app, this problem goes away. While this is not a great answer, it allows me to move forward.

donateInteractionWithCompletion crashes with 'NSUnknownKeyException'
 
 
Q