Learning The Swizzle & Obj-C Runtime @ Evernote

Learning The Swizzle & Obj-C Runtime @ Evernote – CocoaCoder.org (Austin, TX) – Meetup

The April 19th meeting is being hosted by Evernote. To add to the fun, some of their engineers will present on such topics as method swizzling, just to name one. If you’ve never done swizzling, it’s a big RPG, so be careful how you use it. JC will walk us through that. And more.

Evernote is the latest major iOS house to locate in Austin. So if you’ve thought of making the big jump into full-time iOS work, this might be a good chance.

Creator of Project Gutenberg and eBooks Passes Away

Michael Hart, who created the first e-book when he typed the Declaration of Independence into a computer on July 4, 1971, and created Project Gutenberg, the oldest and largest digital library, was found dead on Tuesday at his home in Urbana, Ill. He was 64.

Michael will be missed. His legacy of openly available ebooks live on. Hart’s contribution to society will be eternal.

Chameleon – Getting iOS Apps To Mac Faster

ChameleonProjectI was catching-up on my reading on furbo.org and saw two great posts that touch on issues facing iOS app creators.

The first could be a real help to those in the iOS community who wish to port their iOS apps to the Mac. While there is a great deal of commonality between Cocoa and Cocoa Touch, there are some differences. So what is an entrepid iOS to do to get a great iOS app quickly over to the Mac? One way might be Chameleon. Simply put, Chameleon is an API that allows your UIKit calls to work as AppKit calls. Or as Iconfactory puts it,

    If you’re an iOS developer, you’re already familiar with UIKit, the framework used to create apps for the iPhone, iPod and iPad. Chameleon is a drop in replacement for UIKit that runs on Mac OS X. In many cases, your iOS code doesn’t need to change at all in order to run on a Mac.”

That is pretty cool. In addition to the Chameleon library, you can pick up a really pretty t-shirt at Chameleon.

Screenshots-A Legal Way To Get Screenshots

Note: Please remember that this post is over 5-years old, is not therefore current, so code at your own risk.

Screenshot 2011 03 25 04 23 15Well, Screenshots is finally done. So, what took so long since the last post about Screenshots on March 7th?

The worst thing about having perfectionist attributes is that sometimes they are detriments. Take, for example, my initial Screenshots demo app. Yes, it worked in so much as it did demonstrate that by using Apple’s Q&A 1702, 1703, 1704, and 1714 you could get they type of screen shot, or screen image, that you could by using UIGetScreenImage(). But it was…how best to put it, so ugly that not even its coder (I) could love it. So I rewrote it. All of it. And then I added features. Yeah…like I said, a detriment.

Ok…so what took so long?

 

More…

How To Legally Replace UIGetScreenImage()

Note: Please remember that this post is over 5-years old, is not therefore current, so code at your own risk.

In the summer of 2010, Apple opened up UIGetScreenImage() as a way of taking screenshots in iOS apps. There was great joy in the land.

Then the following September, Apple decided that it was better for app developers to use either UIImagePickerController or methods from AVFoundation to capture images and present a camera view. Happiness was replaced with great sadness in the land.

To help developers, Apple’s iOS Team came out with 4 Technical Q&A’s that tried to show developers how to get around the prohibition on UIGetScreenImage() while still accomplishing the same thing. To put it simply, what had been a one-line job became a many line task.

Worse, in none of the Apple supplied Technical Q&A’s was there an elegant solution for those interested in augmented reality applications…such as I, to take a screen shot. So, in plain English, if you wanted a screenshot of your augmented reality app including its UIKit layer content, sort of like…well, a gun camera, you were out of luck. This bothered me greatly.

 

More…

When Users Try To Upgrade An App Without a Connection

Store Kit is a great API because it lets developers create one app that can be enhanced through upgrades, buying tools, or whatever feature we want to offer the user to make the application more useful. In my case, all I want users to be able to do is upgrade their copy of Flush ’em! from the free edition for 99¢. The Flush ’em! upgrade allows the user to select from three bathroom choices.

But, there will come a time when a user will try to upgrade an app when she/he doesn’t have a network connection. And it’s fairly certain that such a user will flame the app page if the app doesn’t give the user the ability to go to Settings, turn on the network capability and then continue back to where the user left-off in the app to upgrade.

 

More…

When NSString Doesn’t Create A String With A String

If one goes to the NSString documentation, one quickly realizes that there is a very nice convenience method,

+ (id)stringWithString:(NSString *)aString

Parameters
aString

    The string from which to copy characters. This value must not be nil.

Important:
Raises an NSInvalidArgumentException if aString is nil.

Return Value
A string created by copying the characters from aString.

One would be forgiven for not noticing that little note that is supposed to catch your attention by having the title, Important. And it is important. Because, let’s say that you are trying to tell your iOS user how much an app feature upgrade cost,


NSString *titleString1 = [NSString stringWithString:@"Upgrade Flush'em for "];
NSString *titleString2 = [NSString stringWithString:[PFIAPManager sharedManager].upgradePrice];
NSString *titleString3 = [titleString1 stringByAppendingString:titleString2];
NSString *titleMessage = [titleString3 stringByAppendingString:@"?"];

  More…