
Introduction - Parts search app
I was working on an app for one of my clients that would allow the users to search for parts. Nothing fancy, nothing complicated. It was supposed to be a quick project. And it was, for most parts.
The Problem - Search not working
When the project moved to UAT, users started reporting unexpected behavior. The app was showing no results when they were searching for parts with characters like ' or ".

Investigating the search issue
I did the following in order to find out what the issue was:
- Tested on desktop and it worked fine
- then, I tested on my Android phone and it worked fine
- Because I was then told that the users were using iPhones, I tested on my wife's iPhone and it worked fine
- And finally, to rule out any access issue, I tested with one of the UAT user's account on my wife's iPhone and it worked fine
To summarize, the app worked just fine with the same account on my Android phone and my wife's iPhone but not on the user's iPhone.

The Unexpected Solution
After exhausting every potential variable, for some reason, I decided to focus on the keyboard settings. There were a few settings that were different on the user's iPhone vs my wife's iPhone. After a few attempts, I narrowed it down to this weird setting called "Smart punctuation". As soon as that setting was turned off, the search started working on all iPhones!

Summary
Smart punctuation on iPhones automatically formats quotation marks, apostrophes, and hyphens/dashes for a more polished look, converting them to their "curly" or "em dash" equivalents. There are several posts online where users are complaining about this feature. The worst example is if a password has some of the punctuations that get formatted because of this feature, users run into login issues and end up changing passwords unnecessarily. I honestly don't know why anyone would have this feature enabled. I would highly recommend all iPhone users to turn this feature off.
2 thoughts on “When a simple search didn’t work in my mobile app!”