Hey community,
I need you help for a little objcutil script.
I wanna use Core Spotlight to index some results in spotlight (iOS 9)
I set the attributes and the item correctly but i'm having trouble with indexing cause i don't know how to "convert" the normal objc block to objcutil correctly.
I basically have this code for initializing it:
def handlr(_cmd,error):
if error:
print error
handler= ObjCBlock(handlr,restype=None,argtypes=[c_void_p,c_void_p])
defindex = index.defaultSearchableIndex()
defindex.indexSearchableItems_completionHandler_(item,handler)
But it crashes the app ( i assume my block doesn't respect some conditions)
The docs say this for the indexing an item:
- (void)indexSearchableItems:(NSArray<CSSearchableItem *> * _Nonnull)items
completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler
Is there something i'm missing?
Thanks in advance for your help
Filippo