I'm trying to link up some constants to my iOS app in XCode as per the answer here. I created a Constants.h header file like this:
// Constants.h
// myApp
extern NSString * const tumblrConsumerKey;
extern NSString * const tumblrConsumerSecret;
and a Constants.m implementation file like this:
// Constants.m
// myApp
#import "Constants.h"
NSString * const tumblrConsumerKey = @"keyiskey";
NSString * const tumblrConsumerSecret = @"secret";
I then added this to the top of my myApp-Prefix.pch precompiled header:
// Prefix header for all source files of the
// 'myApp' target in the 'myApp' project
//
#import <Availability.h>
#import "Constants.h"
Now I'm getting an error in the Constants.h file at the lines that declare extern NSString * const
etc:
Expected '=', ',', ';', 'asm' or '__attribute__' before
'*' token in /Users/me/Documents/iPhone Programs/myApp/myApp/Constants.h
It looks like my Constants.m file has been added to the target for myApp. What am I doing wrong?