Both the AuthNet and PayPal mobile payment libraries have the ENV_LIVE enumerator defined. This reults in Xcode errors like:
Redefinition of enumerator 'ENV_LIVE' ...
In cases like this where one cannot afford to simply change the source code of dependent frameworks, what are some workarounds available in objective-c syntax or xcode configuration?
INITIALLY:
#import "PayPal.h"
#import "AuthNet.h"
...
// AuthNet
[AuthNet authNetWithEnvironment:ENV_TEST];
// PayPal
if (STATUS_COMPLETED_SUCCESS == [PayPal initializationStatus]) {
[PayPal initializeWithAppID:@"APP-XXX" forEnvironment:ENV_SANDBOX];
}
UPDATE (here's what I ended up using as a workaround based on the correct answer):
#import "PayPal.h"
@class AuthNet;
#import "AuthNetWorkaround.h"
...
[AuthNet authNetWithEnvironment:AUTHNET_ENV_TEST];
extern const int AUTHNET_ENV_LIVE;
extern const int AUTHNET_ENV_TEST;
@interface AuthNetWorkaround : NSObject
@end
#import "AuthNetWorkaround.h"
#import "AuthNet.h"
@implementation AuthNetWorkaround
const int AUTHNET_ENV_LIVE = ENV_LIVE;
const int AUTHNET_ENV_TEST = ENV_TEST;
@end