Canvas Apps

When a simple search didn’t work in my mobile app!

Two phones - Apple iPhone 13 Pro and Samsung Galaxy Z Fold 3
Two phones - Apple iPhone 13 Pro and Samsung Galaxy Z Fold 3

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 ".

Parts search behavior for UAT users
Parts search behavior for UAT users

Investigating the search issue

I did the following in order to find out what the issue was:

  1. Tested on desktop and it worked fine
  2. then, I tested on my Android phone and it worked fine
  3. Because I was then told that the users were using iPhones, I tested on my wife's iPhone and it worked fine
  4. 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.

Parts search on my Android phone
Parts search on my Android phone

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!

Parts search behavior for UAT users after the change
Parts search behavior for UAT users after the change

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.

Recent articles

  1. Have you played Yahtzee? In Power Apps!
  2. Everything you need to know about modern controls
  3. How to use custom sorting in canvas apps

2 thoughts on “When a simple search didn’t work in my mobile app!”

Leave a Reply