Ho Van Dai
Ho Van Dai

Reputation: 11

iOS: How to search app with text different app name

App name: SmartNews With CFBundleName and CFBundleDisplayName is SmartNews But when I search with text "スマート" (which means Smart) in spotlight search, the app is displayed on result.

I have tried Core spotlight, but the results were not as expected. How to do that in Xcode, thanks

Demo

Upvotes: 0

Views: 49

Answers (1)

Rob
Rob

Reputation: 438142

FWIW, you get hits for スマートニュース because this particular app has been localized for Japanese.

To answer the basic question: If you just want to make sure that you your app has a romaji name for English-based devices and a katakana version for Japanese-based devices, you simply:

  • add Japanese localization to your app; and
  • in your localized InfoPlist.strings file (not an .xcstrings file), add entry for "CFBundleDisplayName" and/or "CFBundleName" with the katakana rendition.

When you do that, devices currently using English can search for the romaji name and devices using Japanese allow you to search for the katakana rendition.

Japanese and English app search


Now, your screen snapshot is showing a different scenario, specifically where you searched for the katakana string on a device currently using English. If that is the case, you might also consider using NSUserActivity with Japanese keywords, but I confess that I was unable to reproduce this “search for Japanese name on English-language device” behavior.

Upvotes: 0

Related Questions