MacKuba

🍎 Kuba Suder's blog on Mac & iOS development

MacBook Pro 2016 - an iOS developer's review

Categories: Mac Comments: 0 comments

Here are some thoughts about my new MacBook Pro that I’ve been using for the last few weeks (the Santa Claus from DHL brought it to me just before Christmas), hopefully this will help someone who’s considering getting one.

Note: this is written from the perspective of a person who switched to the MBP from a 2015 13" MacBook Air (i7) and also has a 2012 21" iMac. Your experiences will obviously be different if you have e.g. a fairly recent 15" Retina MacBook Pro.

Update 3.10.2018: I’ve added some more thoughts at the end about how it looks almost two years later.

Read more »

New stuff from WWDC 2016

Categories: Cocoa, Mac, WWDC, iPhone Comments: 1 comment

WWDC 2016

Following the tradition from last year, here’s my complete list of all interesting features and updates I could find in Apple’s OSes, SDKs and developer tools that were announced at this year’s WWDC. This is based on the keynotes, the “What’s New In …” presentations and some others, Apple’s release notes, and blog posts and tweets that I came across in the last few weeks.

If for some reason you haven’t watched the talks yet, I really recommend watching at least the “State of the Union” and the “What’s New In” intros for the platforms you’re interested in. The unofficial WWDC Mac app is great way to download the videos and keep track of what you’ve already watched.

If you’re interested, here are my WWDC 2015 notes (might be useful if you’re planning to drop support for iOS 8 now and start using some iOS 9 APIs).

(This was originally posted on Gist at https://gist.github.com/mackuba/e8fb4219c7ef611f47cdb66b93986d85.)

Read more »

Testing Retina images on an older Mac

Categories: Cocoa, Mac Comments: 2 comments

Update 7.12.2020: Added info at the bottom about a UserDefaults setting you can use instead.

If you build iOS apps, you’re used to providing all icons and other images in @1x and @2x versions for older and Retina screens respectively (or rather @2x and @3x now). And it’s pretty easy to test if all those versions work or not, by starting the right iOS simulator and looking at it scaled to 100%.

If you work on Mac apps, you should also include @2x images for Retina Macs now; but if you’re like me, you might have treated that so far as something not urgent that can be done later…

When you do get around to that, if you don’t have any Retina Mac yet, you’ll quickly notice a problem: how do you test your app on a Retina screen? There’s no OSX simulator in Xcode, after all.

Read more »

Accessing user location data in iOS 8

Categories: Cocoa, iPhone Comments: 1 comment

In iOS 8 Apple made some changes to how apps are supposed to request access to location data. If you use CLLocationManager and you don’t make any changes for iOS 8 compatibility, your app might stop receiving location data at all.

Permission types

The biggest change is that apps can now ask to get location data either “Always” or “While Using”:

Read more »

How to add icons to the menu bar on Yosemite

Categories: Cocoa, Mac Comments: 4 comments

Mac applications often add their icons to the notification area on the right side of the menu bar. That way they can show you some status changes by changing the icon image, and they can also save some space in your dock by removing the icon from there while still being easily accessible.

If you’re like me, you probably have quite a lot of those there:

The menu bar controls usually display their standard (preferably dark) icon on a standard background by default, and an inverted white icon on a blue background when clicked:

Read more »

Setting up an HTTPS site on Nginx

Categories: Linux Comments: 0 comments

This is my SSL configuration guide. There are many like it, but this one is mine…

Last week I needed to set up my first HTTPS site for Hive Mac [link removed – site has been shut down since then], and I went ahead and did the same thing for my new blog domain. It took some figuring out, so I’ve written this all down, if only to save myself some time next time I need to do this.

Update 22.01.2019: I’ve now switched to Let’s Encrypt which makes the whole process much simpler. See “Setting up Let’s Encrypt”, and then jump to “Testing the certificate” when you’re ready.

Read more »

Making iOS apps compatible with iPhone 6/6+

Categories: Cocoa, iPhone Comments: 1 comment

This is the first part of a new (hopefully) longer series of tutorial-like posts. I’m planning to write shorter posts now but more often, based on specific things that I learn while working on my current projects. Let’s see how long I manage to keep this going… :)


Let’s say you have an iOS app that was build for iPhone 5S and earlier. Now that the new iPhones are out, you want to make it work on them too.

If you don’t change anything and just build your app with the latest Xcode and iOS SDK, you’ll see that the app runs on the new iPhones scaled up: the views are rendered on a standard iPhone 5S sized screen and then resized to a bigger resolution like you would resize a static image, together with the top/bottom bars and everything (which obviously doesn’t look good).

To make the app render on the new iPhones natively, you need to let iOS know that it supports them. There are two ways to do that:

Read more »