I am getting this error "The operation couldn’t be completed. (CSIndexErrorDomain error -1005.)"
while running code for spotlight search on ipad.Does anyone know how to solve this error?
The CoreSpotlight is available on iOS 9 onwards.
Though your device maybe at iOS 9.x, it still may not work if it is a older device version.
From Apple docs.
Although app search is available for iOS 9 users, the search functionality of NSUserActivity and Core Spotlight is not supported on iPhone 4s, iPad 2, iPad (3rd generation), iPad mini, and iPod touch (5th generation)."
So if you are testing on any of the above devices or simulators for the same you will get the CSIndexErrorDomain error -1005.
From Corespotlight API documentation
CSIndexErrorCodeIndexingUnsupported = -1005, //Indexing isn't supported on this device
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With