cleanup JIRA_MOBILE_CONNECT_SUPPORT_ENABLED defines

* only define JIRA_MOBILE_CONNECT_SUPPORT_ENABLED if it's not already defined.
  default is to disable it
* cleanup usage of JIRA_MOBILE_CONNECT_SUPPORT_ENABLED
  it's always defined, so no need to check
This commit is contained in:
Stephan Diederich 2012-09-26 14:10:04 +02:00
parent c1b7820a09
commit 36c81ac650
2 changed files with 9 additions and 6 deletions

View File

@ -38,7 +38,7 @@
- (BOOL)shouldUseLiveIdentifier; - (BOOL)shouldUseLiveIdentifier;
#if defined(JIRA_MOBILE_CONNECT_SUPPORT_ENABLED) && JIRA_MOBILE_CONNECT_SUPPORT_ENABLED #if JIRA_MOBILE_CONNECT_SUPPORT_ENABLED
- (void)configureJMC; - (void)configureJMC;
#endif #endif
@ -172,7 +172,7 @@
// Setup UpdateManager // Setup UpdateManager
if (![self isUpdateManagerDisabled] if (![self isUpdateManagerDisabled]
#if defined(JIRA_MOBILE_CONNECT_SUPPORT_ENABLED) && JIRA_MOBILE_CONNECT_SUPPORT_ENABLED #if JIRA_MOBILE_CONNECT_SUPPORT_ENABLED
|| [[self class] isJMCPresent] || [[self class] isJMCPresent]
#endif #endif
) { ) {
@ -240,7 +240,7 @@
_updateManager = [[BITUpdateManager alloc] initWithAppIdentifier:_appIdentifier isAppStoreEnvironemt:_appStoreEnvironment]; _updateManager = [[BITUpdateManager alloc] initWithAppIdentifier:_appIdentifier isAppStoreEnvironemt:_appStoreEnvironment];
_updateManager.delegate = _delegate; _updateManager.delegate = _delegate;
#if defined(JIRA_MOBILE_CONNECT_SUPPORT_ENABLED) && JIRA_MOBILE_CONNECT_SUPPORT_ENABLED #if JIRA_MOBILE_CONNECT_SUPPORT_ENABLED
// Only if JMC is part of the project // Only if JMC is part of the project
if ([[self class] isJMCPresent]) { if ([[self class] isJMCPresent]) {
BITHockeyLog(@"INFO: Setup JMC"); BITHockeyLog(@"INFO: Setup JMC");
@ -256,7 +256,7 @@
} }
} }
#if defined(JIRA_MOBILE_CONNECT_SUPPORT_ENABLED) && JIRA_MOBILE_CONNECT_SUPPORT_ENABLED #if JIRA_MOBILE_CONNECT_SUPPORT_ENABLED
#pragma mark - JMC #pragma mark - JMC

View File

@ -50,8 +50,11 @@
#define BITHOCKEYSDK_BUNDLE @"HockeySDKResources.bundle" #define BITHOCKEYSDK_BUNDLE @"HockeySDKResources.bundle"
#define BITHOCKEYSDK_URL @"https://sdk.hockeyapp.net/" #define BITHOCKEYSDK_URL @"https://sdk.hockeyapp.net/"
/* Whether to compile in support for Jira Mobile Connect */ // Whether to compile in support for Jira Mobile Connect
#define JIRA_MOBILE_CONNECT_SUPPORT_ENABLED 0 // default is disabled
#ifndef JIRA_MOBILE_CONNECT_SUPPORT_ENABLED
#define JIRA_MOBILE_CONNECT_SUPPORT_ENABLED 0
#endif
#define BITHockeyLog(fmt, ...) do { if([BITHockeyManager sharedHockeyManager].isDebugLogEnabled && ![BITHockeyManager sharedHockeyManager].isAppStoreEnvironment) { NSLog((@"[HockeySDK] %s/%d " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); }} while(0) #define BITHockeyLog(fmt, ...) do { if([BITHockeyManager sharedHockeyManager].isDebugLogEnabled && ![BITHockeyManager sharedHockeyManager].isAppStoreEnvironment) { NSLog((@"[HockeySDK] %s/%d " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); }} while(0)