Using CloneZilla for regular hackintosh backups

If you are a macOS user you may be used to Time Machine as the standard for backups. Time Machine is fine if you want to backup your files and configuration, but if for example your disk dies or your hackintosh completely breaks with some bad update, there are better and faster ways to get it up and running again.

Requirements

Basically everything comes down to your backup requirements. These are mine

  • full backup of the macOS SSD including EFI with Clover
  • backups that can be restored without any additional configuration to the current macOS SSD or a new one in case of a disk failure
  • no need for the ability to restore single files (all work data are in Git and Dropbox)
  • reasonable backup and restore speed

Looking at different backup solutions I chose Clonezilla. It is not exactly the most user-friendly solution, but it is a very powerful one if you know what you are doing.

[Read More]

Preventing Windows drives from getting automatically mounted on macOS

If you run macOS side by side with Windows or have some drives formated with NTFS, you may not want them to get automatically mounted when you start macOS. I have a Windows 10 SSD with NFTS and a data HDD with NTFS next to my macOS SSD and I do not use any o those two drivers when booted in macOS, so I was looking for a way to have them not mounted at startup.

The main reason for this other than them not being shown in Finder is that macOS spins the data HDD from time to time for no apparent reason and I really do not want this.

In a classic Linux system you could edit /etc/fstab. This file can be also created on macOS, but Apple does not recommend editing it directly but to use sudo vifs. The drives should be addressed by their UUID as opposed to their “location” on Linux, so you first have to find that UUIDs.

When you have the drivers mounted, run diskutil info /Volumes/"Volume name" | grep 'Volume UUID' where “Volumne name” is the volume name as shown in Finder. This will get you just the UUID.

[Read More]

Using Visual Studio Code as Git merge tool

Visual Studio Code is a neat editor with many good functionalities but I especially like the way it shows Git merge conflicts. Instead of a 2-way or a 3-way split it just shows one window with both changes, nicely highlighted with colors and actions.

I like this feature so much I decided to set Visual Studio Code as my Git merge tool for both the command line and Git Tower.

Command line

Using Visual Studio Code as a merge tool for Git when using command line means editing your .gitconfig. You just need to define a new tool called code and set it as the default merge tool.

[Read More]

More readable XCode build output for CI

If you use Continuous Integration (CI) builds or build your app from the command line using xcodebuild you know that the output is not pretty and not very readable. Reading the build output is important when a CI build breaks, but it is not easy when it looks like this

Many iOS developers were not satisfied with this so the xcpretty project was created. Xcpretty is a fast and flexible formatter that turn the output from screnshot above to this neatly formatted output

[Read More]

iOS tip: Wireless debugging from XCode

One of the best XCode 9 features is the ability to deploy and debug iOS app on your device over WiFi, with no need to have the device connected to you computer by a cable. The only requirement is that the device runs iOS 11.

Setting it up is really easy. Connect the device using a cable like you normally do and go to Window | Devices and Simulators. You will see a new checkbox next to your iOS 11 devices called Connect via Network (see screenshot below), so check it. Now you can disconnect the cable and debug on your device over WiFi, the device has to be on the same network as your computer of course.

[Read More]

Fixing problems with iPhone USB tethering on macOS

When my ISP had a problem resulting in Internet outage for multiple hours and I needed to work, I wanted to tether the LTE connection from my iPhone 6S to my hackintosh running macOS Sierra. It has no Wi-Fi card so the only was was tethering over USB cable.

The whole process should be easy, just connecting the iPhone to the computer with an USB cable and turning on the Personal hotspot in the Settings. The iPhone immediately registered 1 connection, but Internet did not work on the computer, although everything looked fine in System Preferences

[Read More]

Creating animations of your apps

They say that a picture is worth a thousand words so whenever I create an issue, a pull request or write a blog post about and application or some visual stuff I include a relevant image. Sometimes an image is not enough and an animation is needed to better describe the issue, or show the content of your pull request.

There are some good tools to help you to create animations like this on both Windows and macOS.

[Read More]

My experience running a hackintosh

A few months ago I decided to take part in an iOS project. The first problem I needed to solve was to be able to run macOS Sierra and XCode. I did not really want to buy an overpriced MacBook without function keys or and underpowered Mac Mini. Especially when I own a more than 3 years old desktop computer that is still usable for all my needs. A few iOS developers I know recommended I go the Hackintosh way.

Hackintosh

Hackintosh is PC that runs macOS. This configuration is not supported by Apple but it is possible if you have the right hardware since Apple has been using a fairly standard PC hardware for the last couple of years. For example you cannot us any new GeForce 10X0 (Pascal) because there are no Apple computers with those new graphic cards so there are no drivers yet (NVIDIA has released new drivers supporting all the Pascal graphic cards). But if you have an older GeForce like me or an integrated one, you will be fine. The tonymacx86.com website, basically the central hub of all the Hackintosh information, regularly publishes a buying guide that can be useful if you want to buy a new computer and install macOS on it.

If you do not wish to install macOS directly on your hardware you can run it in a virtual machine, but the performance will never be very good. Some people do it for Xamarin development when they just need to compile their project and run the simulator, so there are a few tutorial on how to do it. There is also an interesting blog post series about a virtual hackintosh. I tried running macOS in WMWare on my Thinkpad T440s but the performance was not good.

[Read More]

Using macOS with a Windows keyboard

When you start using macOS after years of using Windows there are some things you expect to work in certain ways. One of those things is the ways the OS handles keyboard input and keyboard shortcuts. This is especially important if you still also use Windows and use a Windows keyboard with macOS. Here are a few things regarding the keyboard that help me when using macOS working on a side project.

Control, Option and Command keys

The fist thing you may notice when using macOS with a Windows keyboard is that the modifier keys are not in the right order. The order of the modifier keys on an Apple keyboard is Control, Option, Command but the Ctrl, Windows, Alt keys on a Windows keyboard map to Control, Command, Option by default. You can fix the order of the modifier keys in System Preferences | Keyboard | Modifier keys

[Read More]