iOS 9 Tips: Convert a Website to a PDF in Mobile Safari

I do this all the time on my Mac. I like having a PDF version of websites (as opposed to printed versions). This really comes in handy with pages like receipts. Now we can have this functionality on iOS too.

Thanks to TechCrunch for this tip!

Convert Website to PDF in Mobile Safari

Need to save a website to a PDF for some reason? You can!

It’s a bit obfuscated, but there’s a button for it in iOS 9’s build of Safari. Bring up the share sheet, then scroll the middle section over a bit until you see “Save PDF to iBooks”. Tap that, and voila! You can then share this PDF via email via the iBooks app.

How to Query Custom URL Schemes in iOS 9 (Hint: it’s different now.)

This was a new one on me and I discovered it accidentally.

In one of my apps, NineOneOne ~ One-Touch Emergency Dialer, I query for the presence of the Skype app, so that an emergency call can be placed using Skype instead of the phone app.

Why would one want to do this? Well, as it turns out, I wanted users who had an iPad or an iPod Touch to be able to use NineOneOne on those devices without the presence of the phone. The obvious candidates were Skype and Google Voice, and at the time Google did not provide a way to launch Google Voice via custom URL scheme. Therefore Skype was it.

Prior to iOS 9, this process was super easy. Just call UIApplication’s canOpenURL method:

self.skypeEnabled = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"skype://"]];

Unfortunately I noticed that this was breaking in iOS 9 and there was a little message in Xcode’s console:

This app is not allowed to query for scheme skype

…and this baffled me since I hadn’t heard of any changes to this API and it seemed like a pretty standard and common function to use.

The New Way
It turns out that, while this method still works in iOS 9, you have to take an extra step beforehand. At about the 10-minute mark in the video for Session number 703 at WWDC 2015, you will find that the presenter shows the new process going forward.

You need to open up your Info.plist file, and add a new record, LSApplicationQueriesSchemes, define it as an array, and then add the schemes that you will be querying in your app to that list:


Once I added that key and the “skype” URL scheme to the array in the Info.plist, the URL scheme querying immediately started to function again!

This strikes me as a way for Apple to keep track of who’s-querying-who’s-app by using the app’s metadata, and also for iOS 9 to deny any URL scheme queries that are not in the list, so we need to now be explicit up-front about which URL schemes we are interested in.

iOS 9 Tips: Disable Shake to Undo

One of my least favorite features of iOS is Shake to Undo. It’s one of the only ones that I just cannot understand why Apple implemented in the way it’s implemented. It’s not discoverable. It’s not intuitive (honestly). It almost always does not work correctly for me when I perform an undo.

In iOS 9, now we can disable this undesirable feature, and big thanks to TechCrunch for pointing it out.

Disable “Shake To Undo”

I’ve been using iOS on and off for years now. I think I’ve intentionally used shake to undo… maybe 5 times. I’ve accidentally brought up the shake to undo prompt probably 45,000 times. In iOS 9, you can finally disable this gesture. Find the option under Settings> General > Accessibility > Shake to Undo