-[TFLClassificationOptions copyToCOptions:error:]: unrecognized selector sent to instance 0x281157ba0’

Called in SampleHandler.h expansion

//Create a TFLObjectDetectorOptions object
TFLObjectDetectorOptions *options = [[TFLObjectDetectorOptions alloc] initWithModelPath:modelPath];
options.classificationOptions.scoreThreshold = 0.5;
options.classificationOptions.maxResults = 1;
options.baseOptions.computeSettings.cpuSettings.numThreads = 1;
// Create a TFLObjectDetector object
NSError *error;
TFLObjectDetector *ctDetector = [TFLObjectDetector objectDetectorWithOptions:options error:&error];
if(error != nil){
NSLog(@“Parser build failed: %@”, error.localizedDescription);
}

where + (nullable instancetype)objectDetectorWithOptions:(TFLObjectDetectorOptions *)options
error:(NSError **)error function reports an error:
-[TFLClassificationOptions copyToCOptions:error:]: Unrecognized selector sent to instance 0x281157ba0
*** Terminating application due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[TFLClassificationOptions copyToCOptions:error:]: unrecognized selector sent to instance 0x281157ba0’
*** First throw call stack:

libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[TFLClassificationOptions copyToCOptions:error:]: Unrecognized selector sent to instance 0x281157ba0’
Terminates with an uncaught exception of type NSException
*** Terminating application due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[TFLClassificationOptions copyToCOptions:error:]: unrecognized selector sent to instance 0x281157ba0’
Terminates with an uncaught exception of type NSException

Please help to solve it? Thanks

Remarks: The same code runs fine in the main project, but reports an error in the extension.

@HarryGao810,

Could you please share standalone to reproduce the issue reported here?

Thank you!

What do I need to do? Please let me know in detail, the above is the code I initialized and called.
Looking forward to your reply.