Link to the iPhone Configuration Utility
Here is some simple code that allows you to validate email addresses that have been entered by a user on an iPhone. It does use NSPredicate, which is only available on OS 3.0 and above;
NSString *email = [newEmailAddress.text lowercaseString];
NSString *emailRegEx =
@"(?:[a-z0-9!#$%\\&'*+/=?\\^_`{|}~-]+(?:\\.[a-z0-9!#$%\\&'*+/=?\\^_`{|}"
@"~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\"
@"x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-"
@"z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5"
@"]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-"
@"9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21"
@"-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])";
NSPredicate *regExPredicate =[NSPredicate predicateWithFormat:@"SELF MATCHES %@", emailRegEx];
BOOL myStringMatchesRegEx = [regExPredicate evaluateWithObject:email];
if(!myStringMatchesRegEx){
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Correct Email" message:@"Please enter a valid email address" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}
The code is based on this article which describes this in a lot more detail.
If you are using a switch case similar to the one below:
switch (row) {
case 0:
int i;
i = row + 10;
NSLog(@"%d",i);
break;
default:
break;
}
You’ll get a compile error, “Expected expression before ‘int’”. If you need to declare a variable enclose the code in curly braces and the error goes away….
switch (row) {
case 0:
{
int i;
i = row + 10;
NSLog(@"%d",i);
break;
}
default:
break;
}
Note that the error only occurs if the variable declaration is the first statement in the code block.
Used OmniGraffle to produce mockups for my latest iPhone project, its pretty easy yo use and there are a number of good stencils that allow for most of the UI Kit controls and even the iPad!
Found a useful tool Doxygen that will scan through your source code and generate documentation in an HTML format.
A project I’m working on contains an alert that uses the addTextFieldWithValue:label: private API, this approach has been popular/recommended by a number of developers/blogs, but now that Apple have their automated checking for Private API’s any apps using this technique will be rejected….
“3.3.1 Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs.”
The following non-public APIs are included in your application:
addTextFieldWithValue:label:
textFieldAtIndex:
Jeff LaMarche has a great article that shows an alternative, that doesn’t use any Private API’s and therefore shouldn’t get you rejected.
If you can’t see the column to the left of project files that shows the SVN status of a file, right-click the “Groups & files” title and select SCM

The template that creates your .h and .m files within Xcode by default sets the company name to __MyCompanyName__
To correct perform the following…
1) Start up the program Terminal Utilities/Terminal
2) Enter the following where XXXXXXXXXXXXX is what you want to appear in place of __MyCompanyName__:
defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions ‘{“ORGANISATIONNAME” = “XXXXXXXXXXXXX”;}’
3) Press enter
4) Shut down and restart Xcode.