Two Million Visitors

Dear Friends,

today is a very special day for me and the iOS Dev Diary. Since I’ve launched this site in 2012, over two million visitors have come to check it out and find solutions to puzzles this challenging hobby has presented to all of us.

TWO MILLION VISITORS!

That’s a phenomenal amount of people for me, and I’m thrilled that my site has helped so many interested and like-minded folks on this planet.

Keep in mind, this site is a personal note pad on all things iOS, meant as a thinking aid for myself rather than visitors. I’ve started it so that I don’t forget the solutions to intricate puzzles I found answers to. It was never meant to be anything along the lines of “presentable” or “understandable for others”.

Sometimes the best things happen when you don’t really try. This site is certainly proof of that.

To take a look at all the articles I’ve written here over the years, check out the Table of Contents. It’ll tell you that at the time of writing, there are over 400 articles to explore, featuring a total 135,000 words. That’s the equivalent of THREE WHOLE BOOKS.

I’d like to say a big THANK YOU to everyone who’s been coming over, and for those who continue to drop by, so I’ve prepared a few surprises for ya’ll’s enjoyment:

Continue reading

What’s New in iOS 12.0.1

Lew from Unbox Therapy says iOS 12.0.1 fixes that spurious random non-charging issue, appropriately dubbed ChargeGate. I’m glad the issue has been fixed, although Apple does not officially acknowledge that there even was a problem.

From the Upgrade Dialogue:

iOS 12.0.1 brings performance improvements and exciting new features to iPhone and iPad.

  • Photos introduces new features to help you rediscover and share the photos in your library
  • Memoji—a new, more customizable Animoji—make Messages more expressive and fun.
  • Screen Time helps you and your family understand and make the most of the time spent on devices
  • Siri Shortcuts deliver a faster way to get things done with the ability for any app to work with Siri
  • augmented reality becomes even more engaging with the ability for developers to create shared AR experiences
  • and new privacy features help protect you from being tracked on the web.

For information on the security content of Apple software updates, please visit this website:

ChargeGate: What’s going on with wired charging on iPhone XS?

Lew from Unbox Therapy posted a slightly shocking video a couple of days ago in which he examines what appears to be a random charging issue on the new iPhone XS models (both max and… well “non-max”). He’s appropriately dubbed it ChargeGate.

The issue was brought to the worlds attention by an Apple Forum Thread, in which user xMASTIFFSx observed that when his iPhone XS is in sleep mode (blank screen), it refuses to charge from a wired connection to a charger. However, if he wakes the phone up, then sometimes it starts to charge – at other times it does not.

Soon after the thread started, over hundred other iPhone XS users have responded that they had a similar problem. That’s never good when technology does that. We coders are used to boolean states. Random Booleans are not something we’re good at.

So Lew took out his 8 iPhones XS versions and put them all to the test. Watch the above video to see his staggering findings: MOST of the new iPhone models seem to behave in this strange way, refusing to charge when in sleep mode. But even when woken up, not all models start charging immediately. Some freeze, some start charging 10 minutes later, some never charge at all.

We can only assume at this time that Apple thoroughly tested the wireless charging option (which appears to work fine, whether the iPhone is asleep or awake), but it perhaps already hatching plans of removing that godforsaken final port on the “best iPhone ever” in the next iteration. Let’s be honest: why should they fix something if they could just REMOVE it instead? That plan worked so well with removing both the headphone jack and the home button.

This problem may or may not be related to Apple’s latest “software innovation” in iOS 12, in which a phone must be unlocked to start charging when connected to a Mac. Why they’ve implemented this ridiculous check is anyone’s guess. Security? Stupidity? We’ll never find out.

How’s your new iPhone XS doing? Does it start charging when you plug that lighting connector in?

Continue reading

iPhone XS and XR: It’s like New Coke all over again

I’m a little concerned about the recent iPhone releases. In particular, I’m not sure I like where this “experimental” Face ID thing is going.

Here’s my gripe: as of September 2018, we no longer have a choice about Face ID. At least last year, when the original iPhone X came out, we had a choice whether to adopt this new gimmick or not. The iPhone 8 still had “the button”.

But with this year’s release of Xclusive iPhone Xtravaganza (see what I did there?), I cannot help but think back at a time when Coca Cola decided to change their original loved-by-so-many default flavour with the release of New Coke. A mistake never to be made again. By any major brand.

Unless you’re Apple of course.

The issue I’m having with Face ID is not so much Face ID itself. It’s the fact that Apple have decided it’s the only way to operate my iPhone going forward. I’d like to make that decision myself – and quite frankly, I’m not ready to use it yet. I would like a button to unlock my phone. I’m the customer. I should be able to make that decision.

But I can’t. Because Apple have decided that I no longer need that button.

Continue reading

What’s New in iOS 12

Straight from the Update Dialogue that we can’t view anymore as soon as we hit “update”:

iOS 12 brings performance improvements and exciting new features to iPhone and iPad. Photos introduces new features to help you rediscover and share the photos in your library, Memoji—a new, more customizable Animoji—make Messages more expressive and fun, Screen Time helps you and your family understand and make the most of the time spent on devices, Siri Shortcuts deliver a faster way to get things done with the ability for any app to work with Siri, augmented reality becomes even more engaging with the ability for developers to create shared AR experiences, and new privacy features help protect you from being tracked on the web.

This update introduces new features and improvements to [the following areas]:

Continue reading

How to assign a variable inside a block in Objective-C

I recently tried to assign a value to a variable I had declared from inside a block. Apple’s frameworks make frequent use of blocks, and as such, I didn’t see anything wrong with this code:

Xcode 9 begged to differ though, telling me that the “Variable is not assignable (missing __block type specifier)“.

Stumped, I had a look around the web, where I found this StackOverflow article that explained it. My mistake was that when I declared the variable above the block. I had no idea this was necessary, but apparently it is.

All we need to do is add “__block” in front of the variable at the time we declare it (more or less precisely what Xcode was trying to say). The error message disappears when we amend the code like this:

Easy – if you know how 🙂

Why is Xcode getting worse with each passing year?

I’ve been using Xcode since 2011, when Xcode 4 had just been released. Those were turbulent times, with Xcode 3 and Interface Builder having previously been two different applications, and Xcode 4.0 was the first “one app does all” approach to building iOS and macOS apps.

I remember Apple bringing out incremental upgrades every few weeks, with the jump from Xcode 4.1 to 4.2 being quite a leap in regards to features and/or the way you had to do things, coinciding with the release of iOS 5 and iCloud.

I’m telling you, turbulent times.

Xcode 4.3 was the first release to be distributed via the Mac App Store instead of a ZIP file from a hidden section in the Developer Portal. Upgrading wasn’t always easy slash possible, and I had more than one new version that just didn’t want to replace the existing one. Beta versions could still be installed side by side with the “release” version from the App Store, but the latter was from now on the only way to submit apps to the App Store.

Xcode 4 stayed with us for a while and let us program anything and everything up until iOS 6.1 and macOS Lion, until June 2013 when Xcode 5 was introduced. From when on, Apple chose to increment Xcode version numbers with each passing year until now, in late 2018, when we’ll soon be submitting our apps with Xcode 10 (which I haven’t even tried out yet).

I have to be brutally honest with you when I say that Xcode 5 was probably my most favourite release out of all the versions there have been. But I kept upgrading to Xcode 6, 7 and 8, being a little underwhelmed by how much more stuff Apple were trying to cram into their IDE every year. Poor Xcode!

With Xcode 6 came a new logo as well as Swift, which changed major versions what felt like every 12 seconds, and code from last week wouldn’t work anymore when used with a minor version update a week later. What a disaster! We also got Playgrounds and some more monitoring tools to play with, and – although clunky and frustrating to this day – Apple tried their best to make those evil provisioning profiles as automated and easy as possible.

When Xcode started turning into a buggy nightmare

There came the point at which the reviews on the App Store for our favourite IDE have been getting less and less kind. I remember the first bad reviews flying in when people had issues upgrading their version of Xcode. That was the most common complaint during the Xcode 6 and 7 era. Other than that, people seemed more or less happy with their development tools. Continue reading