0

I have a project created with version 6.2 of XCode.

After adding indexing for CoreSpotlight (indexSearchableItems reports success), no results are found in Spotlight search.

I then recreated the same project (with, to the best of my knowledge, the same settings) on XCode 7.3.0 and it worked as expected (ie search results are found).

Anyone have an idea as to why ? Is there a setting that needs changed in the project ?

Agreensh
  • 1,305
  • 1
  • 12
  • 15
  • What device/simulator are you testing with? Are you using the same device/simulator with both versions of Xcode? – rmaddy May 04 '16 at 16:03
  • iPhone 6 (real device). Yes, using the same device with both versions. – Agreensh May 06 '16 at 15:10
  • After further investigation I've discovered the search results do not appear if you add CoreSpoltlight to apps that were already installed on your device before the CoreSpotlight update. So, in my example above, my newly created app had a different "Bundle Identifier" i.e. it was a different app. Updating the existing, installed app is what fails. So how can you add CoreSpotlight searches to an existing, installed app ? – Agreensh May 06 '16 at 15:15
  • I have this vague memory now that you might need to bump the version number of the app for it to start working. I'm trying to find a related post but no luck so far. – rmaddy May 06 '16 at 15:23
  • I have tried that. Also tried uploading a new version and installing (replacing the old one) using TestFlight internal testing. No joy, but exactly the same app code (with just a different bundle identifier) works as expected. – Agreensh May 06 '16 at 16:42
  • @Agreensh we are also facing the same issue. Spotlight indexing doesn't work when user upgrades from build not supporting spotlight indexing to the build supporting spotlight indexing. Is this an Apple bug?? – Krati Jain Apr 03 '17 at 07:45
  • @KratiJain what domain identifier are you supplying ? If my bundle identifier is "co.uk.atg.MyAppName" then the following worked (i.e. the domain identifier is not the same as the whole bundle identifier)... let item = CSSearchableItem(uniqueIdentifier: identifier, domainIdentifier: "co.uk.atg", attributeSet: attributeSet) – Agreensh Apr 04 '17 at 08:24

0 Answers0