How I revived my old MacBook (again)

By the end of 2020 I was still rocking a mid-2012 MacBook Pro as a personal machine. Waiting on those M2 chips, really, I'm a little skeptical of the overall success of M1 considering the fact that every first generation of an Apple product is usually followed by a much better product generation. iPhone 3G outlived the original iPhone, iPad2, which I was a proud owner of for a long time, was officially supported by Apple for way more than that thick first gen iPad. Thus, it was my prediction that M1, while being a huge success for Apple, would be followed by M2, even more powerful chip. So that's my excuse.

Spoiler: I eventually bought a M2 MacBook Air for myself, while having a M1 Pro for work. M1 proved to be pretty cool actually.

But I also really like everything about mid-2021 MacBook Pros. The design, the power, the way it still holds better than any non-Apple laptop I've seen. Imagine seeing someone with a Lenovo laptop from almost 10 years ago! Yeah it's significantly slower than any modern MacBook, it doesn't hold up it's power anymore even though I've replaced the battery, it's finally got it's last officially supported macOS (Catalina 10.15.7), it's overheating like an iron and it's pretty heavy compared to a modern laptop.

But it just works! I managed to land my first iOS developer job with it, work remotely, find another job, work from the office and then quit that job because of the corporate policies.


One of those policies was denying the fact that in an IT company, where the main source of revenue comes from developing an IT-product, developers should have a decent working machine. I'm not talking about giving everyone a Cheesecutter Mac Pro, it can be a 3-year old MacBook, which is still noticeably more powerful that my 8-year old little war machine. I mean, it did it's job, I could run and build the project, I was completing my tasks and making stuff, but I had a feeling I wasted time on those builds. A clean build took about 10 minutes, and I had to clean the project sometimes, other times the build could take anything from 30 to 300 seconds, and at that time I couldn't call myself very productive. I even started collecting data on how much time I am actually wasting waiting for the builds. Came up with a shocking statistics: about 1.5 - 2 hours a day (that's an 8-hour work day) I was blocked by the long build times and could browse Reddit with a legit excuse. That sums up to about a day a week!

You can do this yourself. Important thing - this only works with the current Xcode logs, so if you quit Xcode after a hard day of work it will only have 1 item in the logs. So I did it every time I finished a day.

Firstly, install the package via Homebrew (assuming you have it. If you don't, I strongly recommend you have it installed):

brew install xclogparser

Make a JSON with all the builds:

xclogparser manifest --project MyProject --output Downloads/activity.json

Then you can convert the json to a more readable table format: http://beautifytools.com/json-to-html-table-converter.php

I addressed that to the team lead, he was shocked, but didn't respond with anything rather than "It sucks to suck". To be fair, he was using his own computer too, so that's fair I guess.

Anyway, it was a great computer when I bought it in 2012 and it was still great in 2021, just a little bit slower.

I have upgraded it a couple of times. The greatest thing anyone can do with an old laptop is to replace HDD with SSD. In 2016 SSDs were still pricey and weren't in every computer, including my MacBook. I have also added more RAM, so the whole upgrade gave another couple of years to that computer.

Everything was ok until another macOS update came, the last for this device. This resulted in the last Xcode version I could install, and that lead to an interesting situation: it turns out that the minor app version should be the same for iOS and Xcode to launch apps on the device. If I wanted to launch apps on my iPhone with iOS 14.6 I'd have to have at least Xcode 12.6. However the last version of Xcode I could have was 12.4. Which means I could no longer launch apps on this device. That was it, the end of an era. I'd have to wait until the release of a new MacBook in September to get a new computer and be able to launch apps made with Xcode on a personal computer. (I do have a work computer, but certificates and stuff, you know). And I resigned, trying to come up with a workaround including archiving apps and sending them to Test Flight on my iPhone.

But! There was a solution!

There's one weird trick Apple doesn't want you to know a simple solution:

All you need to do is find the Xcode app, show package contents and find DeviceSupport, full path:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

In there there are different iOS versions for Xcode to support. You simply need to add the iOS version you need. You can download the .zip archive from GitHub and place it alongside other folders. It works! Amazing how a laptop this old (by today's standards) is still able to do everything I need.

That's the story, thanks for reading

Fall 2023 update

Xcode 15 introduces a new way to communicate with devices - CoreDevice. It essentially means that the future iOS releases will be supported with Xcode 15 and there won't be a need to update if you want to run on a newer device. However, this means there's a hiccup if you're still using Xcode 14. There's a workaround though: You can enable CoreDevice with this command:

defaults write com.apple.dt.Xcode DVTEnableCoreDevice enabled

Then, a quick restart of Xcode should have everything operating smoothly. You can also unpair and pair your device, which helped me. Although Apple is very specific about this and the only solution they suggest is using Xcode 15, it's useful to have this enabled for older versions. You can find more information in this Apple Support thread.

Now back to the coding!

July 22, 2021