Oh, Google just turned my iPod touch into a free wifi phone

Cool Stuff, Tips, What I Just Learned
Today I noticed that Google turned my iPod touch into a free wifi phone. That's nice of them. To turn your iOS device into a free wifi phone. Simply create a Google Voice #, and install the Google Voice and Google Hangouts apps on your device. You'll be able to send and receive text messages with the Google Voice app, and read your Google Voice voicemail there too. The Hangouts app will let you make and receive calls to/from real phone #s, and instant-message with your friends. I've used Google Voice for several years. It's great, because it gives you a free phone number that redirects to other numbers. I give people my Google Voice #, and when they call, it automatically rings several personal lines. Further, if I ever…
Read More

IOS 6 app store crash on your iPod touch 4? Restore.

Tips, What I Just Learned
For weeks the app store has crashed constantly on my iPod Touch 4th gen after the over-the-air IOS 6 update. Restoring the iTouch to a fresh install of 6.0 on iTunes fixed the problem and now the app store works better, not perfect, but better. Symptoms: I would search for something, and swiping left or right on the cards would crash - sometimes I would be able to see some cards if I let the app sit for a half minute and pre-fetch everything, but when I got to item 24 or so I'd be gauranteed a crash again. I'd have similar problems browsing categories of apps and trying to install them. Sometimes I'd tap the "Free" or "$1.99" button for an app, and the button label would switch to…
Read More

IOS reminds me of IE

IOS Product Development, Midnight Ramblings, Tips, What I Just Learned
Developing for IOS is exactly like developing for IE. First, you knock the easy stuff out that *just works* simply without massive confusion. In browser land that means do your work in chrome or firefox first, whereas in IOS you basically do everything except auto-rotation first. Then, for the last step, you spend as much time handling IE bugs or IOS auto rotation hell as you spent developing up to that point. edit: The trick in IOS 6+ seems to be something like this inside your view controller.. - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskAll; } - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { CGRect screenRect = [[UIScreen mainScreen] bounds]; screenRect = CGRectMake(0, 0, screenRect.size.width, screenRect.size.height); //anchor to 0,0 if (UIInterfaceOrientationIsLandscape(toInterfaceOrientation)) { //swap width & height screenRect = CGRectMake(0, 0, screenRect.size.height, screenRect.size.width); } self.view.frame = screenRect;…
Read More

Making objective-c blocks synchronous

IOS Product Development, What I Just Learned
Many IOS libraries require you to do things asynchronously. Some of the better libraries provide both asynchronous and synchronous models to work with, but some do not. IOS' ALAssetLibrary is a good example of a library providing only asynchronous processing. The ALAssetLibrary allows you to fetch images, videos, and the like from a user's camera roll, and you're required to work with things in blocks, using a forced asynchronous method. In most cases, you'll want asynchronous processing when working with the ALAssetLibrary, but sometimes that may be overkill. If you want to synchronously reason about a series of assets in the library, you'll want to wrap the async block mess in something synchronous. For example, in my case, I wanted to synchronously check if asset URLS previously stored are still…
Read More

TortoiseSVN not importing some files? Fix your permissions.

Tips, Unix, What I Just Learned
If TortoiseSVN (or SVN in general) seems to be skipping over some files when importing a project, there are a couple of causes to be careful of. First, make sure your permissions are set correctly, I just do the following in a dos box (after installing cygwin, of course..) in my project folder before import: chmod -R 777 * If you've already imported your project and the project folder is versioned, and TortoiseSVN is still giving you hell, you may have to right click on individual files it previously skipped and select tortoisesvn->add from the popup menu. Doing this at higher levels in the directory structure won't even show the permission-fixed files as addable :( If that doesnt seem to solve your problem, you may want to search for svn…
Read More

Beware zombies w/ ARC.

Tips, What I Just Learned
If you're using Automatic Reference Counting in your IOS project, make sure to turn NSZombieEnabled OFF. If you don't, parent object deallocation will never deallocate child objects. In our case, we had a project that was more than a year old, that we recently migrated to ARC. Our project targets are configured as follows: iPad project - ARC ON iPhone project - ARC ON "non arc" project (collection of third party non-arc code) - ARC OFF The following code shows an example of this in an easy test: TestArcStrong.h #import @interface InnerObject : NSObject @end @interface TestArcStrong : NSObject @property (strong) InnerObject * object; + (void) runTest; @end TestArcStrong.m #import "TestArcStrong.h" @implementation InnerObject - (void)dealloc { NSLog(@"inner dealloc"); } @end @implementation TestArcStrong @synthesize object; - (void)dealloc { NSLog(@"outer dealloc.."); }…
Read More

WIJL: IOS Memory Management Part 2

IOS Product Development, What I Just Learned
A few months ago, I posted an entry about some lessons learned in IOS Memory Management. In that entry (WIJL: IOS Memory Management), I covered a bunch of little objective-c memory management gotchas that helped us squash a few major memory leak bugs in TumbleOn. In the past few months, we've done some more work on TumbleOn, and we've learned a few more tricks of the trade, including some not-so-obvious problems, and some obvious bits that are worthwhile additions to any memory-leak-hunter's checklist. First, the not so obvious bits: Not So Obvious Memory Problem #1: UIWebView Antics It appears UIWebView is a bit quirky when it comes to memory management. Some theories maintain that the UIWebView will release properly if you load empty content into the UIWebView before deallocation, while…
Read More

WIJL: IOS Memory Management

IOS Product Development, What I Just Learned
My buddy Adam and I just emerged from a 3 evening/late-night binge of what I can only describe as hell. We were trying to fix memory problems with TumbleOn. We learned a bit on the way, and the most painful part of it all was that learning each bullet point below took more than average amounts of searching and reading and re-reading Apple docs. #1 - Double check that you use "self." in assignments When you seem to be having dealloc release problems, particularly with a bizarre error of [CALayer release] sent to deallocated instance, your problem may be that you set a property without using self., as in, you did this: myprop = [[[thing alloc] init] autorelease] When you should have done this: //note the "self." here.. self.myprop =…
Read More