O'Reilly logo

iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK by Joe Keeley, Kyle Richter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tying It All Together

Return to the iOS project. The first thing you need to do is update the URL for the server, so your device knows where to make the network calls. There is an NSString constant called kShoutOutServerURLString in the ShoutOut-Prefix.pch file to identify the server on the local network:

#define kShoutOutServerURLString     @"http://twiki.local:3000"

Replace twiki in that address with the name of your computer that is running the Rails server—if it has Bonjour networking that address will work.

Note

Check to be sure your computer and wireless network are not set up to block port 3000.

You need to add logic to tell the server about the user’s device. In the ICFMainViewController, there is a method ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required