mobile / archive / rss Looking for iPhone, iPod Touch or iPad apps, or iOS development services?
Posted on July 22, 2010
*

We interrupt our regularly-scheduled substantive discourse to bring you 2 1/2 minutes of nerding out.

Comments
*

How To: Quickly Organize Groups in Xcode

I must have missed the bus on this one. So, one of my biggest hang-ups with Xcode is the weird disconnect between what it calls “Groups” and folders on the file system. I do my bestest to keep my code organized in Xcode as well as on the disk, which sometimes requires removing and re-adding files in the IDE. This can lead to really disorganized and cluttered groups, which makes it hard to find files.

Anyway, I was struggling to keep a 200+ file group sorted in Xcode one day, and stumbled upon, completely by accident, a really, really simple way of doing it.

Say you have a group like the following, which you’d like to get into alphabetical order:

Now, in the left panel, click on the name of the group (here, “Pill Images”), and make sure the top right files panel is pulled down. Click on a file in the top right, and hit Command-A to select all.

Now just drag that set of files back into the group in the left panel, and boom, ordered group:

Easy enough, right?

Comments
Posted on July 21, 2010
*

Looking for iPhone, Android and Blackberry developers!

Hey everybody - looking for some developers (especially iPhone) for some big projects coming up. Drop me a line if you know somebody, or even better, are somebody!

Comments
*

How Xbox Achievements Work

Xbox.com’s Engineering Blog has an interesting piece on how the Achievements system was implemented. Very interesting read, even as a non-Xbox developer.  I’ve always been curious how console development worked, and how that software has to integrate with services such as Xbox Live.

Seeing as how the iOS platform is due to get its own social gaming platform, Game Center, it will be interesting to see how the two systems compare.

Comments
Posted on July 20, 2010
*

Dear Future James: The iPhone Simulator is Case Insensitive, iPhones are Case Sensitive

July 20, 2010

Dear Future James,

If you are reading this, you have probably forgotten (again) that the iPhone Simulator is for some reason case insensitive.  As you might recall (probably not), all iOS devices are case sensitive, and are, in fact, very picky about case.

I’m writing to remind you of this, so that you don’t spend another hour tracking down a “but it works in the simulator!” type bug.  We did it today, we did it a couple months ago, and we really need to stop doing it.

Today’s bug involved a lack of a launch image, but only on the device.  This is “First Day on the Job” type stuff, Jim.  A monkey with Xcode has a good chance of getting this right. Anyway, you were clever enough to remember that the launch image needed to be a PNG file, but named it “default.png” instead of “Default.png.”  This, of course, works in the simulator, but not on the device.

So next time, be sure to engage that amazing attention-to-detail you have, and name the damn file correctly. Or even better, just set the UILaunchImageFile in the info.plist. Then you can name the file whatever you’d like!

Sincerely,
Past James 

Comments
*

Quick Thoughts on the iPhone 4 “Antennagate”

  1. I don’t care.
  2. People will still buy iPhone 4s, and all of the other iOS devices.
  3. a = The number of people who own iPhone 4s and complain about the antenna
    b = The number of people who don’t own iPhone 4s and complain about the antenna

    a < b 

Comments
Posted on July 19, 2010
* PhotoAlt

I think the Tesla is laughing at everybody…

Comments
*

Droid X Sabotages Itself If You Mod It?

I do try to stay neutral in the whole iPhone vs. Android debate, but this here article from MobileCrunch is pretty depressingly hilarious.

On the eFuse tampering system built into the Droid X:

If the eFuse failes to verify this information then the eFuse receives a command to “blow the fuse” or “trip the fuse”. This results in the booting process becoming corrupted and resulting in a permanent bricking of the Phone. This FailSafe is activated anytime the bootloader is tampered with or any of the above three parts of the phone has been tampered with.

I got to see a Droid X for the first time yesterday, and like many Android devices before it, I said to myself “that there is a beautiful phone.” It’s sad to hear about these countermeasures; the phone seems like it’d be a hackers dream to play around with.

As the article points out, can you imagine if your new MacBook Pro intentionally fried its own processor if you attempted to install Windows on it?

Comments
Posted on July 10, 2010
*

25-Minute Crash Course in iOS Multitasking (It’s a lie!)

Check out the deck I used for my presentation at BarCampSD, entitled “iOS Multitasking is a lie. And that’s totally fine.”

Get it here.

Comments
Posted on July 1, 2010
*

The 5-Minute Guide to Implementing iAd (Correctly)

Today has involved me launching Privacy for Facebook every 10 minutes, checking to see if iAd has rolled out to the app. Never in my life have I been so excited to see advertising before.

Anyway, “in honor” of iAd rolling out live today, I thought I’d give a quick walkthrough on how to implement iAd correctly.

“But James,” my lone reader asks themselves, “is it even possible in implement iAd incorrectly?” Certainly, dear reader. In fact, Apple made it very easy to do so. See, the iAd banner class (ADBannerView) is right there in the Interface Builder library, so a naive programmer (like me) might just drag that into the interface, rebuild, code sign, deploy.

Well, if you went that route, you’d very likely receive a nice little email from appreview, that, in part, says the following:

“We noticed that your app, Privacy for Facebook, is displaying an empty iAd banner when ad content is not available. The banner within the app should be hidden whenever ad content is not being served by iAd.”

Basically, displaying a blank banner is a no-no. There are a couple reasons why banners may not be displayed: they haven’t rolled out or aren’t available in a particular locale, there is no ad inventory available for your specific app, or there could just be a network issue. Apple wants you to make sure you never show blank banners.

So here’s a quick and dirty way of doing it correctly (assuming a portrait orientation, landscape is left as an exercise for the reader):

  1. Add an ADBannerView to your interface, but just off screen. In this example, the ad should be at the bottom of the interface, so the origin of the ADBannerView is 0,460.
  2. Set the view controller as the ADBannerView’s delegate.
  3. Make sure you’ve included the iAd framework in the view controller’s .h file:
    #import <iAd/iAd.h>
  4. Have the view controller implement ADBannerViewDelegate, and add a bool bannerIsVisible; to the interface
  5. Add methods like the following to the view controller’s implementation. Note these methods animate the banner up from the bottom, while at the same time resizing my other views (buttonFrame and web).
    - (void)bannerViewDidLoadAd:(ADBannerView *)banner
    {
        if (!bannerIsVisible)
        {
    		NSLog(@"bannerViewDidLoadAd");
            [UIView beginAnimations:@"animateAdBannerOn" context:NULL];
            banner.frame = CGRectOffset(banner.frame, 0, -50);
            buttonFrame.frame = CGRectOffset(buttonFrame.frame, 0, -50);
    		web.frame = CGRectMake(web.frame.origin.x,
    							   web.frame.origin.y,
    							   web.frame.size.width,
    							   web.frame.size.height-50);
            [UIView commitAnimations];
            bannerIsVisible = YES;
        }
    }
    - (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error
    {
    	if (bannerIsVisible)
    	{
    		NSLog(@"bannerView:didFailToReceiveAdWithError:");
    		[UIView beginAnimations:@"animateAdBannerOff" context:NULL];
    		// assumes the banner view is at the top of the screen.
    		banner.frame = CGRectOffset(banner.frame, 0, 50);
            buttonFrame.frame = CGRectOffset(buttonFrame.frame, 0, 50);
    		web.frame = CGRectMake(web.frame.origin.x,
    							   web.frame.origin.y,
    							   web.frame.size.width,
    							   web.frame.size.height+50);
    		[UIView commitAnimations];
    		bannerIsVisible = NO;
    	}
    
    }
  6. Test it. Note that in testing mode, Apple will occasionally return an error instead of the Test Ad, so you can make sure your logic is working correctly.

Enjoy!

Comments