I suggest you to directly write your Macro into .pch file. No need to create separate Class for defining Macro. Write as follows.
#import <Availability.h>
#ifndef __IPHONE_5_0
#warning "This project uses features only available in iOS SDK 5.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "Chartboost.h"
#endif
#define APP_ID @"dfgdf";
#define APP_SIGNATURE @"fdgfd";
OR
If you want your id and signature as member of class, then Create a singleton class. Define it as a property in header file as readonly property and define value in sharedObject method.
write as follows
Global.h
#import <Foundation/Foundation.h>
@interface Global : NSObject
@property(nonatomic, strong, readonly) NSString *appId;
@property(nonatomic, strong, readonly) NSString *appSignature;
+(instancetype)sharedInstance;
@end
Global.m
#import "Global.h"
@interface Global ()
@property(nonatomic, strong) NSString *appId;
@property(nonatomic, strong) NSString *appSignature;
@end
@implementation Global
+(instancetype)sharedInstance
{
static Global *sharedInstance;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedInstance = [Global new];
sharedInstance.appId = @"dfgdf";
sharedInstance.appSignature = @"fdgfd";
});
return sharedInstance;
}
@end
OR
If you want to access that value without class, create class as follows and import it in .pch file.
global.h
#import <Foundation/Foundation.h>
@interface Global : NSObject
extern NSString *const appId;
extern NSString *const appSignature;
@end
global.m
#import "Global.h"
@implementation Global
NSString *const appId = @"dfgdf";
NSString *const appSignature = @"fdgfd";
@end
I recommend first method to use.