Fix for iPhone app crash when loading an external link in UIWebView

iphone-crashes
POST
mmombrea-headshot
By Matt Mombrea
Share

If you're building an iOS app and using a UIWebView control to load web pages or HTML, you may have encountered an issue where the app seems to crash randomly while loading the HTML. We found that the crashes were more frequent when loading external web pages within our apps. This was a difficult issue to debug as you don't get much information out of the crash other than a BAD_ACCESS message.

It turns out that the issue is related to a bug in the iOS SDK (at least pre SDK 5.0). If you have enabled any of the following you may be subject to this bug which we suspect is a general parsing error:

  • Phone Number Detection
  • Links Detection
  • Events Detection
  • Addresses Detection

To correct this issue and save your sanity, disable all of these features as shown below:

 

POST
mmombrea-headshot
By Matt Mombrea
Share

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Meet the Author

mmombrea-headshot
CTO / Partner

Matthew Mombrea

Matt is our Chief Technology Officer and one of the founders of our agency. He started Cypress North in 2010 with Greg Finn, and now leads our Buffalo office. As the head of our development team, Matt oversees all of our technical strategy and software and systems design efforts.

With more than 19 years of software engineering experience, Matt has the knowledge and expertise to help our clients find solutions that will solve their problems and help them reach their goals. He is dedicated to doing things the right way and finding the right custom solution for each client, all while accounting for long-term maintainability and technical debt.

Matt is a Buffalo native and graduated from St. Bonaventure University, where he studied computer science.

When he’s not at work, Matt enjoys spending time with his kids and his dog. He also likes to golf, snowboard, and roast coffee.