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];
}

View File

@ -24,7 +24,7 @@ Pod::Spec.new do |s|
s.frameworks = 'CoreText', 'QuartzCore', 'SystemConfiguration', 'CoreGraphics', 'UIKit', 'Security'
s.ios.vendored_frameworks = 'Vendor/CrashReporter.framework'
s.xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => %{$(inherited) BITHOCKEY_VERSION="@\\"#{s.version}\\"" BITHOCKEY_BUILD="@\\"27\\""} }
s.xcconfig = {'GCC_PREPROCESSOR_DEFINITIONS' => %{$(inherited) BITHOCKEY_VERSION="@\\"#{s.version}\\"" BITHOCKEY_C_VERSION="\\"#{s.version}\\"" BITHOCKEY_BUILD="@\\"27\\"" BITHOCKEY_C_BUILD="\\"27\\""} }
s.resource_bundle = { 'HockeySDKResources' => ['Resources/*.png', 'Resources/*.lproj'] }
s.preserve_paths = 'Resources', 'Support'

View File

@ -2,7 +2,7 @@
BUILD_NUMBER = 27
VERSION_STRING = 3.5.4
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) BITHOCKEY_VERSION="@\""$(VERSION_STRING)"\"" BITHOCKEY_BUILD="@\""$(BUILD_NUMBER)"\""
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) BITHOCKEY_VERSION="@\""$(VERSION_STRING)"\"" BITHOCKEY_BUILD="@\""$(BUILD_NUMBER)"\"" BITHOCKEY_C_VERSION="\""$(VERSION_STRING)"\"" BITHOCKEY_C_BUILD="\""$(BUILD_NUMBER)"\""
BIT_ARM_ARCHS = armv7 armv7s arm64
BIT_SIM_ARCHS = x86_64 i386
ARCHS = $(BIT_ARM_ARCHS)