iphone

iPhone Gamekit peer with a desktop peer

I am looking for a way to establish a wireless connection between an iPhone and a desktop client. Gamekit looks promising but all the examples / documentation only explain iPhone to iPhone. Are there examples / documentation for an Gamekit peer on the desktop (cocoa or java)? What are the alternatives without doing to much low level so...

Method calls and declarations in objective-c for cocos2d-iphone

I am an absolute objective-c, c, and openGL newbie. Hence, when I found coco2d I was pretty thankful for having a lot of stuff done for me. Regardless, I'm still having issues. After I managed to get an animated sprite moving around based on touches I decided to clean up my code a bit into a updateLogic method and than a updateDrawing ...

How to link to the page of a single author/company page on the App Store?

I would like to provide a link to all the apps of a single author/company on the App Store from my iPhone app. Let's take Ngmoco for instance. Clicking on the following link on iTunes for PC or Mac opens iTunes and redirects the user to a page with all the published apps of Ngmoco up to today: http://itunes.apple.com/WebObjects/MZStore....

Bug in MKMapView?

When I open MapView with navigationcontroller in a new view, then not waiting till map loads, and then clicking on the back button - I an exception is thrown. Can anyone confirm this? What is a work-around? ...

UITableView: deleting sections with animation

Update I have posted my solution to this problem as an answer below. It takes a different approach from my first revision. Original Question I previously asked a question on SO that I thought solved my issues: http://stackoverflow.com/questions/998603/how-to-deal-with-non-visible-rows-during-row-deletion-uitableviews However, I now...

iPhone - UITableView not calling didSelectRowAtIndexPath method in 3.0 SDK

I have an iPhone app that works fine in 2.x version of the SDK. When I upgraded to 3.0, the didSelectRowAtIndexPath method is no longer called, so the action when a user highlights a row doesn't happen. This is a custom UITableViewCell that is in a separate nib from the UITableView. Both the data source and data delegate are properly ...

Why are iPhone apps so slow?

Something I've noticed about every iPhone app I've tried is that they all have places where they seem very slow and unresponsive. It's true of the games, the free apps, the pricy, popular, "professional" apps, and even a couple of Apple's built-in apps. They all seem to have places where they take many seconds or even a minute to respond...

How to hide a section in UITableView?

There are some section in the table that does not contain any data and would like to hide that section. How to do this? ...

Checking memory allocation in Instruments

Hello, I've cleared my app of leaks using the leaks tool, but I still notice that the objectalloc tool jumps up in the number of objects allocated and footprint when I switch views. I'm especially seeing high numbers of: GeneralBlock-16 with mostly Foundation responsible with caller NSLogv and GeneralBlock-0 with mostly QuartzCore re...

How do I get the last HTTP Status Code from a UIWebView?

I would like to detect when a page load request give to a UIWebView has returned a status code in the 5xx or 4xx range. I've setup the delegate for the web view and have provided a -webView:didFailLoadWithError:error method but although it gets called fine for timeouts, it is not called for HTTP Status Code errors. Any suggestions? ...

Load data into core-data schema

I am implementing a navigation-based application. The user will drill down to the node of interest. I am using Core Data, mostly because I want to try it out. How do I load the database initially? Should I write custom code that loads the database initially, or is there some tool to do it for me ? ...

Problem with UItableview reload data using alert view with prompt on a custom cell.

I have a UItableViewController with a custom cell designed using interface builder. The custom cell has a button and a label on it. The button when click will trigger an alert view with prompt. Once the text is entered and press OK the label on the cell will display the updated info on the table. The problem is the label will not get upd...

Server Side iPhone APNS Communication

Hi. I have a quick question. For the apple push notification service, I need to have my own server, which will send out the push notifications to the apple servers, right? Can I do this with a simple PHP script on a regular webhosting account, or do I need a dedicated server with full blown admin access for that? If this is possible i...

Determining iPhone Model

How do I determine which specific model of iPhone I have? I know about [UIDevice currentDevice].model will tell me if it's an iPhone or an iPod Touch. Will this tell me if I have a 2G, a 3G, or a 3GS? Thanks. EDIT This also becomes important to me when identifying between a first gen iPod Touch, and a second gen. ...

Patterns for Server Side Authentication for mobile RIA

I'm writing a simple iphone application that brings a particular website experience onto the rich world of the iphone. The website currently doesn't talk to any clients other than browsers, so it doesn't have an API. I'm trying to design an API for consumption by my iphone app as well as other rich clients. With REST and Xml/Json form...

UIview while loading didFinishLaunchingWithOptions

I have an application in which the didFinishLaunchingWithOptions of my app delegate register for push notifications. This registration is taking little time, so at launching the app. i need to wait with a blank screen till it register. This waiting time i need to show a "please wait..." message, how can i do this? I have added a UIView b...

iPhone 3.0 SDK vs iPhone 2.0 SDK

Hi, is iPhone 3.0 SDK significantly different that I cannot use any books that were meant for iPhone 2.0 SDK? Programming is pretty much the same? ...

NSXMLParser shreds umlauts (ä, ö, ü)

Hi, I use NSXMLParser for parsing XML documents of a server. They are encoded as UTF8. My problem is, that NSXMLParser breaks at umlauts (ä, ö, ü) and starts a new element. For example: Lösen -- NSXMLParser ---> L + ösen How do I get NSXMLParser to read my umlaut words completely, as every other word. Regards ...

How to use NSEnumerator with NSMutableDictionary?

How do I use NSEnumerator with NSMutableDictionary, to print out all the keys and values? Thanks! ...

Objective-C: What's the Difference between objectForKey and valueForKey?

What is the difference between objectForKey and valueForKey? I looked both up in the documentation and they seemed the same to me. ...