Guides, Hackintosh, Technology, Tip

Enable macOS Volume Controls for HDMI and DisplayPort Audio Devices

Another Hackintosh post…it’s been bothering me that I couldn’t control the volume of my Hackintosh through the use of the volume buttons on my keyboard (by default macOS won’t let you control the volume of an HDMI device and my sound is output through HDMI on my video card). After googling around a bit I managed to find a solution using Soundflower that I thought I’d share:

  1. Download this zip file (it contains two .dmgs we’ll need for the next steps)
  2. Unzip the file and open the Soundflower.dmg double click the Soundflower.pkg and follow the installation steps
  3. Repeat step 2 but with the Soundflowerbed.dmg
  4. Click the Soundflowerbed in the menu bar and set the 2ch option to point towards your HDMI/DisplayPort input:
  5. Open up Sound in System Preferences and set the Output/Input to Soundflower (2ch)

You should be able to control the audio coming through your device via your keyboard now! I’ve been using it for the better part of a day listening to music pretty much without issue. It glitched once for a few seconds, but clicking the Soundflowerbed icon in the menu bar, changing the source away from Soundflower and then immediately back fixed it instantly.

Guides, Hackintosh, Technology, Tip

Fixing iMessage on Your macOS Sierra Hackintosh

iMessage icon

I wrote a lengthy post the other day about how to build a Hackintosh, and while everything worked pretty smoothly, the one thing I was missing was iMessage. I’d tried to follow a couple of guides, and while they worked at getting iMessage running, all of them without fail stopped my GPU from responding correctly. After a bit of tinkering, though, I finally managed to get everything up and running. Here’s what I did below (MASSIVE thanks to /u/cobo10201 for getting me 99% of the way there I wouldn’t have even known where to begin without that post).

  1. Mount your EFI using EFI Mounter v3
  2. Make a copy of your config.plist and name it config-bak.plist in case something goes wrong.
  3. Open terminal and enter the following command: uuidgen
  4. Open your config.plist in Clover Configurator.
  5. Go to the SMBIOS and paste the UUID you generated in step 2 into the smUUID field.
  6. In the Board Serial Number field, copy and paste your system serial number and then add 5 random numbers and letters.
  7. In Finder go to Go > Go to Folder… and enter the following path: /Users/[Username]/Library/Caches delete all files and folders that begin with the following:

How to Use the UINavigationController Swipe Back Gesture with a UIPageViewController

I’ve been working on an app at work that’s “Snapchat-eqsue” (uses a UIPageViewController to page between a full-screen camera and a UINavigationController) when I came across this conundrum. Basically, the app is setup as follows:

Please excuse the poor lighting and shoddy sketch. It's early and I didn't feel like opening Sketch.
Please excuse the poor lighting and shoddy sketch. It’s early and I didn’t feel like opening Sketch.

So the Camera is the leftmost view in the PageViewController and the UINavigationController, along with all the views it will add to its stack, is on the right. Things got a bit tricky though when our designer wanted to avoid using physical back buttons on the navigation stack and have the traditional swipe back take you to the previous page. My first instinct was to intercept the PageController gestures, but when it’s set to scrolling, those don’t actually exist–the gesture array comes up empty. That’s when I came up with this fun little hack that’s incredibly easy to do.

The tl;dr is you disable the UIPageViewController’s UIScrollView when the NavigationController displays any view that’s not the root view controller and add a swipe gesture recognizer to each of the subviews. While this sounds like a lot of tedious work, it’s actually really easy if you just subclass UIViewController and use that app-wide (which is actually nice for a variety of reasons like themeing–but that’s for another post).


Removing Articles from an NSString

Not much to say about this one. I put this together while trying to ignore the basic articles in front of a song name in my music app. Takes a given NSString and returns a new one sans the article:

You can call it as follows: