Entries in iphone (9)

3:20PM

CoreData: could not locate an NSManagedObjectModel for entity name

If you've gone through Apple's Core Data Tutorial for iOS and gotten this error message after trying to copy that functionality into your existing app:

+entityForName: could not locate an NSManagedObjectModel for entity name

you might need to modify the line of code in your application delegate where you load the managed object model.

NSString *modelPath = [[NSBundle mainBundle]      pathForResource:@"AppName"
          ofType:@"momd"];

The steps you're taken through in the tutorial put your object models in an xcdatamodeld directory, whereas if you just add a model to an existing project it goes in an xcdatamodel file. During the build process, xcdatamodeld directories get converted to momd files, but xcdatamodel files by themselves get turned into mom files.

You can fix the problem in two ways:

  1. Change the filename you're opening to be of type mom
  2. Select your model file and go to Design --> Data Model --> Add Model Version. XCode will place your model file and a new model file in a xcdatamodeld directory. Then delete the extra model version until you really need it.

 

10:20PM

An NSString category for nicely formatting NSTimeIntervals

I had an NSTimeInterval that I needed to display, and I couldn't find an easy way to do it. Luckily, Objective-C ha s categories, so it was just a matter of writing an NSString category. I posted a gist on GitHub; if you've got a better way to do it, please let me know!

6:00PM

137 / 365: Last Minute Testing

I'm off to Atlanta tomorrow, and tonight I did some last minute testing of a demo Don and I will be giving there. We'll be doing the demo using iPod touches and an HP tc4400. The tablet is kind of cool, but its shortcomings just makes me look forward to the iPad launch.

9:38PM

RE: Greed kills: Why smartphone lock-in will fail and open source win

I recommend that you read Greed kills: Why smartphone lock-in will fail and open source win yourself, but to summarize, esr predicts that iPhone OS vs. Android will play out the same way that the early PC wars played out back in the day.

There are two things I think are relevant to this argument. One is the recent Apple-HTC patent suits. The other is giving a definition of "win" and "fail". I won't comment on the patent suits because I have no expertise whatsoever there, and those I rely on to digest such things for me haven't had time to comb through the details of the patents yet. The fact that the suits exist though seems to be a significant departure from how things played out in the PC wars.

Click to read more ...

6:27PM

Re: Apple's Mistake

I've been reading a lot of blog posts during the last year about how bad it is that Apple acts as a gatekeeper to the App Store. I don't mean to suggest in this post that Apple's system is without its flaws, but I don't believe the situation is as bad as all these prominent developers make it out to be. I say this both as a user, and as an admittedly inexperienced developer. One thing that is a problem though is that it has taken this long for Apple to address the concerns of the developer community. While I think the individual problems are somewhat overblown, there clearly is a problem. I'm not so sure the solution is so easy as many developers make it out to be though. There are tens of thousands of developers, more than a hundred thousand applications, and tens of millions of users. Any changes have to satisfy lots of paying customers.

There are a number of common threads in all the discussion about how bad it is:

  1. You can get rejected for no reason whatsoever.
  2. It takes forever for an application to get approved.
  3. It is evil of Apple to act as gatekeeper -- regardless of the implementation.

Click to read more ...

12:46AM

iPhone 3G dead out of warranty

White Screen of Death

The other day I went to check my messages on my iPhone and was greeted with a white screen with vertical colored bars. The iPhone appeared to be functioning, as I could hear the sounds when swiping to unlock and receiving e-mails even though I couldn't see anything. Hard resetting and doing a factory restore failed to fix the problem, so off to AT&T I went. They informed me that if there are problems after 30 days I need to contact Apple directly. I called Apple from the AT&T store, and was informed that I activated the phone exactly one year earlier. This meant that the included one year warranty had expired :-(

Buying a new phone?

Fortunately, AT&T offered me an early upgrade, AND Apple offered to make an exception and repair / replace the iPhone. I chose the latter, shipped it off Tuesday, Apple diagnosed the problem Wednesday and FedEx estimates I'll have a replacement Friday. I'm glad that everything worked out, and thankful that both companies offered to help me out even though they were under no obligation to do so. Thanks AT&T! Thanks Apple!

Replacement iPhone 3G

This is the second time Apple has offered to repair a product out of warranty, which makes me a happy customer.

8:42PM

App Library for Facebook: Find and Share iPhone and iPod Touch Apps

I recently worked on an application for Facebook to make finding cool iPhone and iPod Touch applications easier and more fun. You can find new applications and popular applications among your friends, the Facebook community, and the iTunes Store. You can recommend apps, and add a box to your profile or info section listing your apps too. Check it out at http://apps.facebook.com/iphoneapplibrary. We've been spending most of our time on functionality so far, but if interest keeps growing we'll make it prettier too :-)

Screenshots

Recommending an iPhone app:

List of apps on Info Box:

What's Hot:

10:11PM

iPhone OS 2.2 Crashes when I Receive Calls

iPhoneAtlas.com listed some problems users were having when upgrading to iPhone OS 2.2, but I've been experiencing a problem not on their list.

I'm not sure if I'm an isolated case or not, but since installing iPhone OS 2.2 on my 3G iPhone I've experienced several crashes when receiving phone calls. The crashes occur mostly when I'm using various 3rd party applications, but also while the iPhone is sitting in my pocket. The applications will start to quit as if to handle the call, but will freeze halfway through the process. After forcing a reboot I am informed that I missed a phone call. This is pretty obnoxious since the device's primary function is to be a phone and all. I'm going to try a restore from backup and see if that resolves the issue.

5:17PM

iPhone: Efficiently loading data into memory

Intro

 I've been working on an iPhone app for awhile, and early on I ran into a few problems loading data into my app efficiently. Given Apple's recent lifting of the NDA, I thought I'd share my experiences with other new developers. The application I'm working on involves looking up words to see if they appear in the Tournament Word List (TWL) to see if it's legit, and loading, storing, and performing lookups on the data is non-trivial. That's not to say getting _something_ working was problematic; in fact Cocoa and objective-C make it very easy to get a first pass going. However I need to look up tens of thousands of words a second, so optimization was very important to me. 

Click to read more ...