Tutorial: How to Redeem a Promo Code for a Free Download on the Mac App Store

Update on April 17th, 2023: The Mac App Store has been redesigned since this tutorial was written. You can read an updated version of this tutorial for macOS Ventura here.

Sometimes, Mac developers are kind enough to give promo codes out so people can download a copy of their paid applications for free. A promo code is simply a combination of characters you can use on the Mac App Store to get the app for free, but how do you use them? It’s easy. First, open up the Mac App Store application. After the window has finished loading, you will see to your right a link that says Redeem. Click it.

Screenshot of the Mac App Store  window, annotated  with an arrow pointing to the 'redeem link'.

After you click the link a sheet will pop up asking you to log in with your Apple ID to redeem your code, so go ahead and log in!

Mac App Store screenshot of login sheet.

After you log in, you will be brought to a screen with a title that says “Redeem Code”. At the bottom, you will see a text field where you can enter your redeem code. Enter it and the application will start downloading! That’s it!

Mac App Store screenshot of the "Redeem Code"  window.

How to Deprecate your Own API in Objective-C

To mark some of your own API as deprecated in Objective-C, you simply can add the following attribute to your method declaration (as seen in the snippet below):

-(void)myOldMethod __attribute((deprecated("Use the myNewMethod instead.")));

Now when you call myOldMethod in your code, the compiler will warn you that: “myOldMethod is deprecated. Use the myNewMethod instead”. You can also add the deprecated attribute to property declarations.

But what if you wanted to be more specific? For instance, if there is a better way to handle something in the iOS 8 SDK, you can mark an old method as deprecated only for projects that have iOS 8.0 or later as the deployment target.

-(void)myOldMethod NS_DEPRECATED_IOS(3_0, 8_0,"Use myNewMethod instead.");

Using the code snippet above, if you call myOldMethod the compiler will only warn you that the method is deprecated if your project’s deployment target is set to iOS 8 or later.

Deprecating your own methods can come in handy especially if you have written your own framework that is used across multiple projects. You may choose to deprecate some of your own API rather than removing the methods entirely until you get around to modifying your existing projects to use your new API.

iOS Devices: Screen Bounds List

Dimensions (in points):

*Note: Starting in iOS 8, the bounds property on UIScreen is orientation based, so for example if the bounds in portrait mode is 320×480, in the landscape orientation the bounds would be 480×320. The list below assumes that the device is in the portrait orientation.

320 x 480
-iPhone 4s and earlier models.
320 x 568
-iPhone 5
-iPhone 5S
-iPhone 5C
375 x 667
-iPhone 6
414 x 736
-iPhone 6 Plus
768 x 1024
-iPad