Add support for excluding features at compile time

Features can be excluded/included at compile-time using #define statements, e.g. using `Preprocessor Macros`. These don't influence if the feature will actually be enabled, since that can also be done at runtime and some features are disabled automatically in the App Store or disabled by default in general.

The BITHockeyManager header file will still reference all modules, but accessing the modules will not be possible if excluded from the library.

Value of 1 includes the feature into the static library, 0 will exclude the feature from the static library.

Defaults:

Crash Reporting: HOCKEYSDK_FEATURE_CRASH_REPORTER 1
Feedback: HOCKEYSDK_FEATURE_FEEDBACK 1
App Store Updates: HOCKEYSDK_FEATURE_STORE_UPDATES 1 (This feature is disabled by default in code!)
Authenticator: HOCKEYSDK_FEATURE_AUTHENTICATOR 1
Beta Updates: HOCKEYSDK_FEATURE_UPDATES 1
Jira Mobile Connect: HOCKEYSDK_FEATURE_JIRA_MOBILE_CONNECT 0
This commit is contained in:
Andreas Linde
2013-09-11 19:18:21 +02:00
parent 0188285893
commit 11a8a14e4f
20 changed files with 238 additions and 36 deletions

View File

@@ -28,7 +28,10 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#import <UIKit/UIKit.h>
#import "HockeySDK.h"
#if HOCKEYSDK_FEATURE_UPDATES
#import "BITStoreButton.h"
typedef enum {
@@ -53,3 +56,5 @@ typedef enum {
@property (nonatomic, assign) AppStoreButtonState appStoreButtonState;
@end
#endif /* HOCKEYSDK_FEATURE_UPDATES */