Ionic native plugin indexappcontent not working


#1

i wanted to use the index-app-content plugin to index content of my app and make it available in the spotlight search of ios -> https://ionicframework.com/docs/native/index-app-content/
unfortunately, after adding the plugin, i can’t build my app anymore.

i get the following error in IndexAppContent.m

[[CSSearchableIndex defaultSearchableIndex] indexSearchableItems:@[searchableItems] completionHandler:^(NSError * _Nullable error) {
    if (error) {
        NSLog(@"%@", error);
        [self.commandDelegate sendPluginResult:[CDVPluginResult CDVCommandStatus_ERROR] callbackId:command.callbackId];
    } else {
        NSLog(@"Index saved");
        [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK] callbackId:command.callbackId];
    }
}];

the error is "No known class method for selector ‘CDVCommandStatus_ERROR’.

is this a known bug? or could it be a problem with my setup?
does anyone successfully use this plugin? are there other plugins for spotlight integration?

thank you,
nicolas


#2

@born81 Did you get this to work?


#3

hi

yes, by cloning the github repo. there seems to be a newer version in github.

greetings, nicolas


#4

Same problem, one year later. Has anyone got an update on this?