Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview

Buy Now

Issue 10.6 ('Retina')
Instant purchase and download via GumRoad!


App Wrapper

Issue: 10.6 (September/October 2012)
Author: Bob Keeney
Article Description: No description available.
Article Length (in bytes): 7,059
Starting Page Number: 13
Article Number: 10602
Related Web Link(s):


Full text of article...

Ever since Apple opened the Mac App Store (MAS), Real Studio developers have been wanting tools to help them get their apps ready for it. The first step was CodeSigning your application but more recently the MAS requires new applications be sandboxed.

Sandboxing is Apple's new security requirements that is really good for end users since it promises to keep malicious code from compromising your application and thus your computer. However, they do this by cutting off access to most parts of the operating system, including the Open and Save dialogs.

That makes most applications quite useless, so the developer has to tell the operating system exactly what sorts of access it's going to do. This includes Open and Save Dialogs, but also includes access to many of the standard folders like Downloads, Pictures, Music, Movies, etc. and even whether or not your application will be using iCloud services and even hardware like the printer or a USB or Bluetooth device. Since you've told the operating system what you're going to be doing, the operating system can then grant your application Temporary Entitlements.

You could do all these settings yourself if you had a strong knowledge of command line programming and, in fact, we did Code Signing from an IDE script for a while. But as things became more complicated with the MAS our script wasn't good enough any more. So we needed a new solution.

Thankfully a number of third party utilities have arrived to help make your life easier when dealing with the Mac App Store.

App Wrapper is a simple drag and drop utility that has a number of options that you might find very useful. You start by compiling your application in Real Studio like you normally would. Then you drag the application on to the utility where upon you'll be presented with a whole host of options that you may, or may not need, for your application.

You start with the basic Property List tab where you set the Mac App Store Category for your application. You set the copyright info, the application version, and give it a high resolution icon file. (The icon Real Studio creates [at least in Real Studio 2011 R4.3] is too small for use with the MAS so you have to overwrite the Real Studio icon with one of a higher resolution.)

In one of the more interesting options in App Wrapper is that you can use a pre-made About Window, with credits in your application. This requires that you add some code to your application and recompile. The About Window is something that people spend little time on so this might be a good, quick, solution for you. However, if you are creating cross-platform applications this will be of little use to you.

If you have a Help files, you can attempt to make them Apple compatible and have them indexed before putting them into the bundle of your application.

Document handling can be kind of a pain with the UTI's. App Wrapper does a nice job of scanning the application giving you a number of options to properly create your UTI's.

The Resources tab lets you choose which resource items you want included in your application. I'm a little confused on why you would want this, though, since to get them in the Resources bundle to begin with you'd have to specifically put it there anyway. Though I could see some situations where you need to remove a few things from the MAS build (like eSellerate libraries) that you aren't controlling via Build Steps or other IDE scripting.

Finally, the Package tab is where code signing and sandboxing rules are setup. You'll need a Certificate from Apple to do these things and, if you're like us, you are doing this for multiple clients, it's possible to choose which certificate to use. In the Packages tab you enable the Sandboxing rules and tell the OS all the things that your application will do with it. This is also where you'll tell the OS what Apple Events you might be using with other applications.

Finally, there are several options when "Wrapping" your application. If you are building for the Mac App Store you have to create an Apple Package (really an installer), but you might want to test your application with all the rules enabled, or you might simply want to create a zip file to send to your beta testers.

When you've got all that done, you click the Wrap button to start the process. You're presented with a nice listing of all the things the utility is doing. The green check marks indicate things that went well but the red lines indicate things that you might need to fix before submitting your application to Apple. And that's it! Your application is wrapped using the rules you setup.

All-in-all App Wrapper is a nice utility and I can recommend it for use. Ohanaware has been using Real Studio for many years and is using it for their own applications.

In version 2.0.1 the utility now allows users to invoke App Wrapper from the command line thus letting you add it to an IDE script. While you can still do this the old fashioned way (drag and drop) doing it via an IDE script is a nice way to be a lazy programmer.

My only nitpick complaint is that the Ohanaware website doesn't have a support forum or dedicated help area for App Wrapper. While I think the utility is simple enough to learn, it's still dealing with a topic that is a bit scary for many Real Studio Developers and some might want to be handheld throughout the process. In that same light, while App Wrapper comes with a help file it's a little light on details and what the consequences are of each type of selection.

End of article.