Add SDK version and build strings into a non stripped struct

This commit is contained in:
Andreas Linde
2014-02-20 22:41:19 +01:00
parent 54b3c57ee2
commit ce9014f111
3 changed files with 18 additions and 4 deletions

View File

@@ -36,6 +36,20 @@
#import "BITHockeyAppClient.h"
#import "BITKeychainUtils.h"
#include <stdint.h>
typedef struct {
uint8_t info_version;
const char hockey_version[16];
const char hockey_build[16];
} bitstadium_info_t;
bitstadium_info_t bitstadium_library_info __attribute__((section("__TEXT,__bit_hockey,regular,no_dead_strip"))) = {
.info_version = 1,
.hockey_version = BITHOCKEY_C_VERSION,
.hockey_build = BITHOCKEY_C_BUILD
};
#if HOCKEYSDK_FEATURE_CRASH_REPORTER
#import "BITCrashManagerPrivate.h"
@@ -417,11 +431,11 @@
- (NSString *)version {
return BITHOCKEY_VERSION;
return [NSString stringWithUTF8String:bitstadium_library_info.hockey_version];
}
- (NSString *)build {
return BITHOCKEY_BUILD;
return [NSString stringWithUTF8String:bitstadium_library_info.hockey_build];
}