First off, your line:
NSString *firstLetter = [codeString substringFromIndex:1];
does not get the first letter. This gives you a new string the contains all of the original string EXCEPT the first character. This is the opposite of what you want. You want:
NSString *firstLetter = [codeString ...