diff --git a/Classes/BITAppVersionMetaInfo.h b/Classes/BITAppVersionMetaInfo.h new file mode 100644 index 0000000000..f47897a890 --- /dev/null +++ b/Classes/BITAppVersionMetaInfo.h @@ -0,0 +1,53 @@ +/* + * Author: Peter Steinberger + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * Copyright (c) 2011 Andreas Linde, Peter Steinberger. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#import + +@interface BITAppVersionMetaInfo : NSObject { +} +@property (nonatomic, copy) NSString *name; +@property (nonatomic, copy) NSString *version; +@property (nonatomic, copy) NSString *shortVersion; +@property (nonatomic, copy) NSString *notes; +@property (nonatomic, copy) NSDate *date; +@property (nonatomic, copy) NSNumber *size; +@property (nonatomic, copy) NSNumber *mandatory; + +- (NSString *)nameAndVersionString; +- (NSString *)versionString; +- (NSString *)dateString; +- (NSString *)sizeInMB; +- (NSString *)notesOrEmptyString; +- (void)setDateWithTimestamp:(NSTimeInterval)timestamp; +- (BOOL)isValid; +- (BOOL)isEqualToAppVersionMetaInfo:(BITAppVersionMetaInfo *)anAppVersionMetaInfo; + ++ (BITAppVersionMetaInfo *)appVersionMetaInfoFromDict:(NSDictionary *)dict; + +@end diff --git a/Classes/BITAppVersionMetaInfo.m b/Classes/BITAppVersionMetaInfo.m new file mode 100644 index 0000000000..55594a9709 --- /dev/null +++ b/Classes/BITAppVersionMetaInfo.m @@ -0,0 +1,186 @@ +/* + * Author: Peter Steinberger + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * Copyright (c) 2011 Andreas Linde, Peter Steinberger. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#import "BITAppVersionMetaInfo.h" +#import "HockeySDKPrivate.h" + + +@implementation BITAppVersionMetaInfo + +@synthesize name = _name; +@synthesize version = _version; +@synthesize shortVersion = _shortVersion; +@synthesize notes = _notes; +@synthesize date = _date; +@synthesize size = _size; +@synthesize mandatory = _mandatory; + + +#pragma mark - Static + ++ (BITAppVersionMetaInfo *)appVersionMetaInfoFromDict:(NSDictionary *)dict { + BITAppVersionMetaInfo *appVersionMetaInfo = [[[[self class] alloc] init] autorelease]; + + if ([dict isKindOfClass:[NSDictionary class]]) { + appVersionMetaInfo.name = [dict objectForKey:@"title"]; + appVersionMetaInfo.version = [dict objectForKey:@"version"]; + appVersionMetaInfo.shortVersion = [dict objectForKey:@"shortversion"]; + [appVersionMetaInfo setDateWithTimestamp:[[dict objectForKey:@"timestamp"] doubleValue]]; + appVersionMetaInfo.size = [dict objectForKey:@"appsize"]; + appVersionMetaInfo.notes = [dict objectForKey:@"notes"]; + appVersionMetaInfo.mandatory = [dict objectForKey:@"mandatory"]; + } + + return appVersionMetaInfo; +} + + +#pragma mark - NSObject + +- (void)dealloc { + [_name release]; + [_version release]; + [_shortVersion release]; + [_notes release]; + [_date release]; + [_size release]; + [_mandatory release]; + + [super dealloc]; +} + +- (BOOL)isEqual:(id)other { + if (other == self) + return YES; + if (!other || ![other isKindOfClass:[self class]]) + return NO; + return [self isEqualToAppVersionMetaInfo:other]; +} + +- (BOOL)isEqualToAppVersionMetaInfo:(BITAppVersionMetaInfo *)anAppVersionMetaInfo { + if (self == anAppVersionMetaInfo) + return YES; + if (self.name != anAppVersionMetaInfo.name && ![self.name isEqualToString:anAppVersionMetaInfo.name]) + return NO; + if (self.version != anAppVersionMetaInfo.version && ![self.version isEqualToString:anAppVersionMetaInfo.version]) + return NO; + if (self.shortVersion != anAppVersionMetaInfo.shortVersion && ![self.shortVersion isEqualToString:anAppVersionMetaInfo.shortVersion]) + return NO; + if (self.notes != anAppVersionMetaInfo.notes && ![self.notes isEqualToString:anAppVersionMetaInfo.notes]) + return NO; + if (self.date != anAppVersionMetaInfo.date && ![self.date isEqualToDate:anAppVersionMetaInfo.date]) + return NO; + if (self.size != anAppVersionMetaInfo.size && ![self.size isEqualToNumber:anAppVersionMetaInfo.size]) + return NO; + if (self.mandatory != anAppVersionMetaInfo.mandatory && ![self.mandatory isEqualToNumber:anAppVersionMetaInfo.mandatory]) + return NO; + return YES; +} + + +#pragma mark - NSCoder + +- (void)encodeWithCoder:(NSCoder *)encoder { + [encoder encodeObject:self.name forKey:@"name"]; + [encoder encodeObject:self.version forKey:@"version"]; + [encoder encodeObject:self.shortVersion forKey:@"shortVersion"]; + [encoder encodeObject:self.notes forKey:@"notes"]; + [encoder encodeObject:self.date forKey:@"date"]; + [encoder encodeObject:self.size forKey:@"size"]; + [encoder encodeObject:self.mandatory forKey:@"mandatory"]; +} + +- (id)initWithCoder:(NSCoder *)decoder { + if ((self = [super init])) { + self.name = [decoder decodeObjectForKey:@"name"]; + self.version = [decoder decodeObjectForKey:@"version"]; + self.shortVersion = [decoder decodeObjectForKey:@"shortVersion"]; + self.notes = [decoder decodeObjectForKey:@"notes"]; + self.date = [decoder decodeObjectForKey:@"date"]; + self.size = [decoder decodeObjectForKey:@"size"]; + self.mandatory = [decoder decodeObjectForKey:@"mandatory"]; + } + return self; +} + + +#pragma mark - Properties + +- (NSString *)nameAndVersionString { + NSString *appNameAndVersion = [NSString stringWithFormat:@"%@ %@", self.name, [self versionString]]; + return appNameAndVersion; +} + +- (NSString *)versionString { + NSString *shortString = ([self.shortVersion respondsToSelector:@selector(length)] && [self.shortVersion length]) ? [NSString stringWithFormat:@"%@", self.shortVersion] : @""; + NSString *versionString = [shortString length] ? [NSString stringWithFormat:@" (%@)", self.version] : self.version; + return [NSString stringWithFormat:@"%@ %@%@", BITHockeySDKLocalizedString(@"UpdateVersion"), shortString, versionString]; +} + +- (NSString *)dateString { + NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease]; + [formatter setDateStyle:NSDateFormatterMediumStyle]; + + return [formatter stringFromDate:self.date]; +} + +- (NSString *)sizeInMB { + if ([_size isKindOfClass: [NSNumber class]] && [_size doubleValue] > 0) { + double appSizeInMB = [_size doubleValue]/(1024*1024); + NSString *appSizeString = [NSString stringWithFormat:@"%.1f MB", appSizeInMB]; + return appSizeString; + } + + return @"0 MB"; +} + +- (void)setDateWithTimestamp:(NSTimeInterval)timestamp { + if (timestamp) { + NSDate *appDate = [NSDate dateWithTimeIntervalSince1970:timestamp]; + self.date = appDate; + } else { + self.date = nil; + } +} + +- (NSString *)notesOrEmptyString { + if (self.notes) { + return self.notes; + }else { + return [NSString string]; + } +} + +// a valid app needs at least following properties: name, version, date +- (BOOL)isValid { + BOOL valid = [self.name length] && [self.version length] && self.date; + return valid; +} + +@end diff --git a/Classes/BITCrashManager.h b/Classes/BITCrashManager.h new file mode 100644 index 0000000000..3b57cca868 --- /dev/null +++ b/Classes/BITCrashManager.h @@ -0,0 +1,116 @@ +/* + * Author: Andreas Linde + * Kent Sutherland + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * Copyright (c) 2011 Andreas Linde & Kent Sutherland. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#import + + +typedef enum BITCrashAlertType { + BITCrashAlertTypeSend = 0, + BITCrashAlertTypeFeedback = 1, +} BITCrashAlertType; + +typedef enum BITCrashStatus { + BITCrashStatusQueued = -80, + BITCrashStatusUnknown = 0, + BITCrashStatusAssigned = 1, + BITCrashStatusSubmitted = 2, + BITCrashStatusAvailable = 3, +} BITCrashStatus; + + +@protocol BITCrashManagerDelegate; + +@interface BITCrashManager : NSObject { + id _delegate; + + NSString *_appIdentifier; + + NSString *_feedbackRequestID; + float _feedbackDelayInterval; + + NSMutableString *_contentOfProperty; + BITCrashStatus _serverResult; + + int _analyzerStarted; + NSString *_crashesDir; + NSFileManager *_fileManager; + + BOOL _crashIdenticalCurrentVersion; + BOOL _crashReportActivated; + + NSMutableArray *_crashFiles; + + NSMutableData *_responseData; + NSInteger _statusCode; + + NSURLConnection *_urlConnection; + + NSData *_crashData; + + BOOL _sendingInProgress; +} + +// delegate is optional +@property (nonatomic, assign) id delegate; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// settings + +/** Define the users name or userid that should be send along each crash report + */ +@property (nonatomic, copy) NSString *userName; + +/** Define the users email address that should be send along each crash report + */ +@property (nonatomic, copy) NSString *userEmail; + +// if YES, the user will get the option to choose "Always" for sending crash reports. This will cause the dialog not to show the alert description text landscape mode! (default) +// if NO, the dialog will not show a "Always" button +@property (nonatomic, assign, getter=isShowingAlwaysButton) BOOL showAlwaysButton; + +// if YES, the user will be presented with a status of the crash, if known +// if NO, the user will not see any feedback information (default) +@property (nonatomic, assign, getter=isFeedbackActivated) BOOL feedbackActivated; + +// if YES, the crash report will be submitted without asking the user +// if NO, the user will be asked if the crash report can be submitted (default) +@property (nonatomic, assign, getter=isAutoSubmitCrashReport) BOOL autoSubmitCrashReport; + +// will return YES if the last session crashed, to e.g. make sure a "rate my app" alert will not show up +@property (nonatomic, readonly) BOOL didCrashInLastSession; + +// will return the timeinterval from startup to the crash in seconds, default is -1 +@property (nonatomic, readonly) NSTimeInterval timeintervalCrashInLastSessionOccured; + +- (id)initWithAppIdentifier:(NSString *)appIdentifier; + +- (void)startManager; + +@end diff --git a/Classes/BWQuincyManager.m b/Classes/BITCrashManager.m similarity index 56% rename from Classes/BWQuincyManager.m rename to Classes/BITCrashManager.m index 9a58fb569e..1ef558cdb9 100644 --- a/Classes/BWQuincyManager.m +++ b/Classes/BITCrashManager.m @@ -2,6 +2,7 @@ * Author: Andreas Linde * Kent Sutherland * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. * Copyright (c) 2011 Andreas Linde & Kent Sutherland. * All rights reserved. * @@ -30,120 +31,60 @@ #import #import #import -#import "BWGlobal.h" -#import "BWQuincyManager.h" -#import "CNSCrashReportTextFormatter.h" +#import "HockeySDK.h" +#import "HockeySDKPrivate.h" + +#import "BITCrashReportTextFormatter.h" #include -#include //needed for PRIx64 macro - -// hockey api error domain -typedef enum { - QuincyErrorUnknown, - QuincyAPIAppVersionRejected, - QuincyAPIReceivedEmptyResponse, - QuincyAPIErrorWithStatusCode -} HockeyErrorReason; -static NSString *kQuincyErrorDomain = @"QuincyErrorDomain"; - -NSBundle *quincyBundle(void) { - static NSBundle* bundle = nil; - if (!bundle) { - NSString* path = [[[NSBundle mainBundle] resourcePath] - stringByAppendingPathComponent:kQuincyBundleName]; - bundle = [[NSBundle bundleWithPath:path] retain]; - } - return bundle; -} - -NSString *BWQuincyLocalize(NSString *stringToken) { - if ([BWQuincyManager sharedQuincyManager].languageStyle == nil) - return NSLocalizedStringFromTableInBundle(stringToken, @"Quincy", quincyBundle(), @""); - else { - NSString *alternate = [NSString stringWithFormat:@"Quincy%@", [BWQuincyManager sharedQuincyManager].languageStyle]; - return NSLocalizedStringFromTableInBundle(stringToken, alternate, quincyBundle(), @""); - } -} -@interface BWQuincyManager () +// flags if the crashlog analyzer is started. since this may theoretically crash we need to track it +#define kBITCrashAnalyzerStarted @"HockeySDKCrashAnalyzerStarted" -- (void)startManager; +// stores the set of crashreports that have been approved but aren't sent yet +#define kBITCrashApprovedReports @"HockeySDKCrashApprovedReports" -- (void)showCrashStatusMessage; +// stores the user name entered in the UI +#define kBITCrashUserName @"HockeySDKCrashUserName" -- (void)handleCrashReport; -- (void)_cleanCrashReports; +// stores the user email address entered in the UI +#define kBITCrashUserEmail @"HockeySDKCrashUserEmail" -- (void)_checkForFeedbackStatus; -- (void)_performSendingCrashReports; -- (void)_sendCrashReports; - -- (void)_postXML:(NSString*)xml toURL:(NSURL*)url; -- (NSString *)_getDevicePlatform; - -- (BOOL)hasNonApprovedCrashReports; -- (BOOL)hasPendingCrashReport; +@interface BITCrashManager () @property (nonatomic, retain) NSFileManager *fileManager; @end -@implementation BWQuincyManager +@implementation BITCrashManager @synthesize delegate = _delegate; -@synthesize submissionURL = _submissionURL; @synthesize showAlwaysButton = _showAlwaysButton; @synthesize feedbackActivated = _feedbackActivated; @synthesize autoSubmitCrashReport = _autoSubmitCrashReport; -@synthesize languageStyle = _languageStyle; @synthesize didCrashInLastSession = _didCrashInLastSession; @synthesize timeintervalCrashInLastSessionOccured = _timeintervalCrashInLastSessionOccured; -@synthesize loggingEnabled = _loggingEnabled; - -@synthesize appIdentifier = _appIdentifier; @synthesize fileManager = _fileManager; -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 40000 -+(BWQuincyManager *)sharedQuincyManager { - static BWQuincyManager *sharedInstance = nil; - static dispatch_once_t pred; - - dispatch_once(&pred, ^{ - sharedInstance = [BWQuincyManager alloc]; - sharedInstance = [sharedInstance init]; - }); - - return sharedInstance; -} -#else -+ (BWQuincyManager *)sharedQuincyManager { - static BWQuincyManager *quincyManager = nil; - - if (quincyManager == nil) { - quincyManager = [[BWQuincyManager alloc] init]; - } - - return quincyManager; -} -#endif -- (id) init { +- (id)initWithAppIdentifier:(NSString *)appIdentifier { if ((self = [super init])) { - _serverResult = CrashReportStatusUnknown; + BITHockeySDKLog(@"Initializing CrashReporter"); + + _appIdentifier = appIdentifier; + + _delegate = nil; + _serverResult = BITCrashStatusUnknown; _crashIdenticalCurrentVersion = YES; _crashData = nil; _urlConnection = nil; - _submissionURL = nil; _responseData = nil; - _appIdentifier = nil; _sendingInProgress = NO; - _languageStyle = nil; _didCrashInLastSession = NO; _timeintervalCrashInLastSessionOccured = -1; - _loggingEnabled = NO; _fileManager = [[NSFileManager alloc] init]; self.delegate = nil; @@ -151,20 +92,20 @@ NSString *BWQuincyLocalize(NSString *stringToken) { self.showAlwaysButton = NO; self.autoSubmitCrashReport = NO; - NSString *testValue = [[NSUserDefaults standardUserDefaults] stringForKey:kQuincyKitAnalyzerStarted]; + NSString *testValue = [[NSUserDefaults standardUserDefaults] stringForKey:kBITCrashAnalyzerStarted]; if (testValue) { - _analyzerStarted = [[NSUserDefaults standardUserDefaults] integerForKey:kQuincyKitAnalyzerStarted]; + _analyzerStarted = [[NSUserDefaults standardUserDefaults] integerForKey:kBITCrashAnalyzerStarted]; } else { _analyzerStarted = 0; } testValue = nil; - testValue = [[NSUserDefaults standardUserDefaults] stringForKey:kQuincyKitActivated]; + testValue = [[NSUserDefaults standardUserDefaults] stringForKey:kBITCrashActivated]; if (testValue) { - _crashReportActivated = [[NSUserDefaults standardUserDefaults] boolForKey:kQuincyKitActivated]; + _crashReportActivated = [[NSUserDefaults standardUserDefaults] boolForKey:kBITCrashActivated]; } else { _crashReportActivated = YES; - [[NSUserDefaults standardUserDefaults] setValue:[NSNumber numberWithBool:YES] forKey:kQuincyKitActivated]; + [[NSUserDefaults standardUserDefaults] setValue:[NSNumber numberWithBool:YES] forKey:kBITCrashActivated]; } if (_crashReportActivated) { @@ -192,10 +133,10 @@ NSString *BWQuincyLocalize(NSString *stringToken) { if (![crashReporter enableCrashReporterAndReturnError: &error]) NSLog(@"WARNING: Could not enable crash reporter: %@", error); - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(startManager) name:BWQuincyNetworkBecomeReachable object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(startManager) name:BITHockeyNetworkDidBecomeReachableNotification object:nil]; } - if (!quincyBundle()) { + if (!BITHockeySDKBundle()) { NSLog(@"WARNING: Quincy.bundle is missing, will send reports automatically!"); } } @@ -205,12 +146,7 @@ NSString *BWQuincyLocalize(NSString *stringToken) { - (void) dealloc { self.delegate = nil; - [[NSNotificationCenter defaultCenter] removeObserver:self name:BWQuincyNetworkBecomeReachable object:nil]; - - [_languageStyle release]; - - [_submissionURL release]; - _submissionURL = nil; + [[NSNotificationCenter defaultCenter] removeObserver:self name:BITHockeyNetworkDidBecomeReachableNotification object:nil]; [_appIdentifier release]; _appIdentifier = nil; @@ -231,35 +167,13 @@ NSString *BWQuincyLocalize(NSString *stringToken) { } -#pragma mark - -#pragma mark setter -- (void)setSubmissionURL:(NSString *)anSubmissionURL { - if (_submissionURL != anSubmissionURL) { - [_submissionURL release]; - _submissionURL = [anSubmissionURL copy]; - } - - [self performSelector:@selector(startManager) withObject:nil afterDelay:1.0f]; -} - -- (void)setAppIdentifier:(NSString *)anAppIdentifier { - if (_appIdentifier != anAppIdentifier) { - [_appIdentifier release]; - _appIdentifier = [anAppIdentifier copy]; - } - - [self setSubmissionURL:@"https://sdk.hockeyapp.net/"]; -} - - -#pragma mark - -#pragma mark private methods +#pragma mark - private methods - (BOOL)autoSendCrashReports { BOOL result = NO; if (!self.autoSubmitCrashReport) { - if (self.isShowingAlwaysButton && [[NSUserDefaults standardUserDefaults] boolForKey: kAutomaticallySendCrashReports]) { + if (self.isShowingAlwaysButton && [[NSUserDefaults standardUserDefaults] boolForKey: kBITCrashAutomaticallySendReports]) { result = YES; } } else { @@ -273,38 +187,84 @@ NSString *BWQuincyLocalize(NSString *stringToken) { - (void)startManager { if (!_sendingInProgress && [self hasPendingCrashReport]) { _sendingInProgress = YES; - if (!quincyBundle()) { - NSLog(@"WARNING: Quincy.bundle is missing, sending reports automatically!"); - [self _sendCrashReports]; + if (!BITHockeySDKBundle()) { + NSLog(@"WARNING: HockeySDKResource.bundle is missing, sending reports automatically!"); + [self sendCrashReports]; } else if (![self autoSendCrashReports] && [self hasNonApprovedCrashReports]) { - if (self.delegate != nil && [self.delegate respondsToSelector:@selector(willShowSubmitCrashReportAlert)]) { - [self.delegate willShowSubmitCrashReportAlert]; + if (self.delegate != nil && [self.delegate respondsToSelector:@selector(crashReporterWillShowSubmitCrashReportAlert:)]) { + [self.delegate crashReporterWillShowSubmitCrashReportAlert:self]; } NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]; - UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:BWQuincyLocalize(@"CrashDataFoundTitle"), appName] - message:[NSString stringWithFormat:BWQuincyLocalize(@"CrashDataFoundDescription"), appName] + UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:BITHockeySDKLocalizedString(@"CrashDataFoundTitle"), appName] + message:[NSString stringWithFormat:BITHockeySDKLocalizedString(@"CrashDataFoundDescription"), appName] delegate:self - cancelButtonTitle:BWQuincyLocalize(@"CrashDontSendReport") - otherButtonTitles:BWQuincyLocalize(@"CrashSendReport"), nil]; + cancelButtonTitle:BITHockeySDKLocalizedString(@"CrashDontSendReport") + otherButtonTitles:BITHockeySDKLocalizedString(@"CrashSendReport"), nil]; if ([self isShowingAlwaysButton]) { - [alertView addButtonWithTitle:BWQuincyLocalize(@"CrashSendReportAlways")]; + [alertView addButtonWithTitle:BITHockeySDKLocalizedString(@"CrashSendReportAlways")]; } - [alertView setTag: QuincyKitAlertTypeSend]; + [alertView setTag: BITCrashAlertTypeSend]; [alertView show]; [alertView release]; } else { - [self _sendCrashReports]; + [self sendCrashReports]; } } } + +#pragma mark - PLCrashReporter + +// +// Called to handle a pending crash report. +// +- (void) handleCrashReport { + PLCrashReporter *crashReporter = [PLCrashReporter sharedReporter]; + NSError *error = NULL; + + // check if the next call ran successfully the last time + if (_analyzerStarted == 0) { + // mark the start of the routine + _analyzerStarted = 1; + [[NSUserDefaults standardUserDefaults] setValue:[NSNumber numberWithInt:_analyzerStarted] forKey:kBITCrashAnalyzerStarted]; + [[NSUserDefaults standardUserDefaults] synchronize]; + + // Try loading the crash report + _crashData = [[NSData alloc] initWithData:[crashReporter loadPendingCrashReportDataAndReturnError: &error]]; + + NSString *cacheFilename = [NSString stringWithFormat: @"%.0f", [NSDate timeIntervalSinceReferenceDate]]; + + if (_crashData == nil) { + NSLog(@"Could not load crash report: %@", error); + } else { + [_crashData writeToFile:[_crashesDir stringByAppendingPathComponent: cacheFilename] atomically:YES]; + + // get the startup timestamp from the crash report, and the file timestamp to calculate the timeinterval when the crash happened after startup + PLCrashReport *report = [[[PLCrashReport alloc] initWithData:_crashData error:&error] autorelease]; + + if (report.systemInfo.timestamp && report.applicationInfo.applicationStartupTimestamp) { + _timeintervalCrashInLastSessionOccured = [report.systemInfo.timestamp timeIntervalSinceDate:report.applicationInfo.applicationStartupTimestamp]; + } + } + } + + // Purge the report + // mark the end of the routine + _analyzerStarted = 0; + [[NSUserDefaults standardUserDefaults] setValue:[NSNumber numberWithInt:_analyzerStarted] forKey:kBITCrashAnalyzerStarted]; + [[NSUserDefaults standardUserDefaults] synchronize]; + + [crashReporter purgePendingCrashReport]; + return; +} + - (BOOL)hasNonApprovedCrashReports { - NSDictionary *approvedCrashReports = [[NSUserDefaults standardUserDefaults] dictionaryForKey: kApprovedCrashReports]; + NSDictionary *approvedCrashReports = [[NSUserDefaults standardUserDefaults] dictionaryForKey: kBITCrashApprovedReports]; if (!approvedCrashReports || [approvedCrashReports count] == 0) return YES; @@ -334,7 +294,7 @@ NSString *BWQuincyLocalize(NSString *stringToken) { } if ([_crashFiles count] > 0) { - BWQuincyLog(@"Pending crash reports found."); + BITHockeySDKLog(@"Pending crash reports found."); return YES; } else return NO; @@ -346,31 +306,31 @@ NSString *BWQuincyLocalize(NSString *stringToken) { - (void) showCrashStatusMessage { UIAlertView *alertView = nil; - if (_serverResult >= CrashReportStatusAssigned && + if (_serverResult >= BITCrashStatusAssigned && _crashIdenticalCurrentVersion && - quincyBundle()) { + BITHockeySDKBundle()) { // show some feedback to the user about the crash status NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]; switch (_serverResult) { - case CrashReportStatusAssigned: - alertView = [[UIAlertView alloc] initWithTitle: [NSString stringWithFormat:BWQuincyLocalize(@"CrashResponseTitle"), appName ] - message: [NSString stringWithFormat:BWQuincyLocalize(@"CrashResponseNextRelease"), appName] + case BITCrashStatusAssigned: + alertView = [[UIAlertView alloc] initWithTitle: [NSString stringWithFormat:BITHockeySDKLocalizedString(@"CrashResponseTitle"), appName ] + message: [NSString stringWithFormat:BITHockeySDKLocalizedString(@"CrashResponseNextRelease"), appName] delegate: self - cancelButtonTitle: BWQuincyLocalize(@"CrashResponseTitleOK") + cancelButtonTitle: BITHockeySDKLocalizedString(@"HockeyOK") otherButtonTitles: nil]; break; - case CrashReportStatusSubmitted: - alertView = [[UIAlertView alloc] initWithTitle: [NSString stringWithFormat:BWQuincyLocalize(@"CrashResponseTitle"), appName ] - message: [NSString stringWithFormat:BWQuincyLocalize(@"CrashResponseWaitingApple"), appName] + case BITCrashStatusSubmitted: + alertView = [[UIAlertView alloc] initWithTitle: [NSString stringWithFormat:BITHockeySDKLocalizedString(@"CrashResponseTitle"), appName ] + message: [NSString stringWithFormat:BITHockeySDKLocalizedString(@"CrashResponseWaitingApple"), appName] delegate: self - cancelButtonTitle: BWQuincyLocalize(@"CrashResponseTitleOK") + cancelButtonTitle: BITHockeySDKLocalizedString(@"HockeyOK") otherButtonTitles: nil]; break; - case CrashReportStatusAvailable: - alertView = [[UIAlertView alloc] initWithTitle: [NSString stringWithFormat:BWQuincyLocalize(@"CrashResponseTitle"), appName ] - message: [NSString stringWithFormat:BWQuincyLocalize(@"CrashResponseAvailable"), appName] + case BITCrashStatusAvailable: + alertView = [[UIAlertView alloc] initWithTitle: [NSString stringWithFormat:BITHockeySDKLocalizedString(@"CrashResponseTitle"), appName ] + message: [NSString stringWithFormat:BITHockeySDKLocalizedString(@"CrashResponseAvailable"), appName] delegate: self - cancelButtonTitle: BWQuincyLocalize(@"CrashResponseTitleOK") + cancelButtonTitle: BITHockeySDKLocalizedString(@"HockeyOK") otherButtonTitles: nil]; break; default: @@ -379,7 +339,7 @@ NSString *BWQuincyLocalize(NSString *stringToken) { } if (alertView) { - [alertView setTag: QuincyKitAlertTypeFeedback]; + [alertView setTag: BITCrashAlertTypeFeedback]; [alertView show]; [alertView release]; } @@ -391,89 +351,47 @@ NSString *BWQuincyLocalize(NSString *stringToken) { #pragma mark UIAlertView Delegate - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex { - if ([alertView tag] == QuincyKitAlertTypeSend) { + if ([alertView tag] == BITCrashAlertTypeSend) { switch (buttonIndex) { case 0: _sendingInProgress = NO; - [self _cleanCrashReports]; + [self cleanCrashReports]; break; case 1: - [self _sendCrashReports]; + [self sendCrashReports]; break; case 2: { - [[NSUserDefaults standardUserDefaults] setBool:YES forKey:kAutomaticallySendCrashReports]; + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:kBITCrashAutomaticallySendReports]; [[NSUserDefaults standardUserDefaults] synchronize]; - if (self.delegate != nil && [self.delegate respondsToSelector:@selector(userDidChooseSendAlways)]) { - [self.delegate userDidChooseSendAlways]; + if (self.delegate != nil && [self.delegate respondsToSelector:@selector(crashReporterWillSendCrashReportsAlways:)]) { + [self.delegate crashReporterWillSendCrashReportsAlways:self]; } - [self _sendCrashReports]; + [self sendCrashReports]; break; } default: _sendingInProgress = NO; - [self _cleanCrashReports]; + [self cleanCrashReports]; break; } } } -#pragma mark - -#pragma mark NSXMLParser Delegate -#pragma mark NSXMLParser - -- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict { - if (qName) { - elementName = qName; - } - - if ([elementName isEqualToString:@"result"]) { - _contentOfProperty = [NSMutableString string]; - } -} - -- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { - if (qName) { - elementName = qName; - } - - // open source implementation - if ([elementName isEqualToString: @"result"]) { - if ([_contentOfProperty intValue] > _serverResult) { - _serverResult = (CrashReportStatus)[_contentOfProperty intValue]; - } else { - CrashReportStatus errorcode = (CrashReportStatus)[_contentOfProperty intValue]; - NSLog(@"CrashReporter ended in error code: %i", errorcode); - } - } -} - - -- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { - if (_contentOfProperty) { - // If the current element is one whose content we care about, append 'string' - // to the property that holds the content of the current element. - if (string != nil) { - [_contentOfProperty appendString:string]; - } - } -} - -#pragma mark - -#pragma mark Private +#pragma mark - Private - (NSString *) extractAppUUIDs:(PLCrashReport *)report { NSMutableString *uuidString = [NSMutableString string]; - NSArray *uuidArray = [CNSCrashReportTextFormatter arrayOfAppUUIDsForCrashReport:report]; + NSArray *uuidArray = [BITCrashReportTextFormatter arrayOfAppUUIDsForCrashReport:report]; for (NSDictionary *element in uuidArray) { - if ([element objectForKey:kCNSBinaryImageKeyUUID] && [element objectForKey:kCNSBinaryImageKeyArch] && [element objectForKey:kCNSBinaryImageKeyUUID]) { + if ([element objectForKey:kBITBinaryImageKeyUUID] && [element objectForKey:kBITBinaryImageKeyArch] && [element objectForKey:kBITBinaryImageKeyUUID]) { [uuidString appendFormat:@"%@", - [element objectForKey:kCNSBinaryImageKeyType], - [element objectForKey:kCNSBinaryImageKeyArch], - [element objectForKey:kCNSBinaryImageKeyUUID] + [element objectForKey:kBITBinaryImageKeyType], + [element objectForKey:kBITBinaryImageKeyArch], + [element objectForKey:kBITBinaryImageKeyUUID] ]; } } @@ -482,7 +400,7 @@ NSString *BWQuincyLocalize(NSString *stringToken) { } -- (NSString *)_getDevicePlatform { +- (NSString *)getDevicePlatform { size_t size = 0; sysctlbyname("hw.machine", NULL, &size, NULL, 0); char *answer = (char*)malloc(size); @@ -493,25 +411,17 @@ NSString *BWQuincyLocalize(NSString *stringToken) { } -- (void)_performSendingCrashReports { - NSMutableDictionary *approvedCrashReports = [NSMutableDictionary dictionaryWithDictionary:[[NSUserDefaults standardUserDefaults] dictionaryForKey: kApprovedCrashReports]]; +- (void)performSendingCrashReports { + NSMutableDictionary *approvedCrashReports = [NSMutableDictionary dictionaryWithDictionary:[[NSUserDefaults standardUserDefaults] dictionaryForKey: kBITCrashApprovedReports]]; NSError *error = NULL; - NSString *userid = @""; - NSString *contact = @""; - NSString *description = @""; + NSString *username = _userName ?: @""; + NSString *email = _userEmail ?: @""; + NSString *applicationLog = @""; - if (self.delegate != nil && [self.delegate respondsToSelector:@selector(crashReportUserID)]) { - userid = [self.delegate crashReportUserID] ?: @""; - } - - if (self.delegate != nil && [self.delegate respondsToSelector:@selector(crashReportContact)]) { - contact = [self.delegate crashReportContact] ?: @""; - } - - if (self.delegate != nil && [self.delegate respondsToSelector:@selector(crashReportDescription)]) { - description = [self.delegate crashReportDescription] ?: @""; + if (self.delegate != nil && [self.delegate respondsToSelector:@selector(applicationLogForCrashReporter:)]) { + applicationLog = [self.delegate applicationLogForCrashReporter:self] ?: @""; } NSMutableString *crashes = nil; @@ -526,11 +436,13 @@ NSString *BWQuincyLocalize(NSString *stringToken) { if (report == nil) { NSLog(@"Could not parse crash report"); + // we cannot do anything with this report, so delete it + [self.fileManager removeItemAtPath:filename error:&error]; continue; } NSString *crashUUID = report.reportInfo.reportGUID ?: @""; - NSString *crashLogString = [CNSCrashReportTextFormatter stringValueForCrashReport:report withTextFormat:PLCrashReportTextFormatiOS]; + NSString *crashLogString = [BITCrashReportTextFormatter stringValueForCrashReport:report]; if ([report.applicationInfo.applicationVersion compare:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]] == NSOrderedSame) { _crashIdenticalCurrentVersion = YES; @@ -545,14 +457,14 @@ NSString *BWQuincyLocalize(NSString *stringToken) { [self extractAppUUIDs:report], report.applicationInfo.applicationIdentifier, report.systemInfo.operatingSystemVersion, - [self _getDevicePlatform], + [self getDevicePlatform], [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"], report.applicationInfo.applicationVersion, crashUUID, [crashLogString stringByReplacingOccurrencesOfString:@"]]>" withString:@"]]" @"]]>" options:NSLiteralSearch range:NSMakeRange(0,crashLogString.length)], - userid, - contact, - [description stringByReplacingOccurrencesOfString:@"]]>" withString:@"]]" @"]]>" options:NSLiteralSearch range:NSMakeRange(0,description.length)]]; + username, + email, + [applicationLog stringByReplacingOccurrencesOfString:@"]]>" withString:@"]]" @"]]>" options:NSLiteralSearch range:NSMakeRange(0,applicationLog.length)]]; // store this crash report as user approved, so if it fails it will retry automatically @@ -563,18 +475,18 @@ NSString *BWQuincyLocalize(NSString *stringToken) { } } - [[NSUserDefaults standardUserDefaults] setObject:approvedCrashReports forKey:kApprovedCrashReports]; + [[NSUserDefaults standardUserDefaults] setObject:approvedCrashReports forKey:kBITCrashApprovedReports]; [[NSUserDefaults standardUserDefaults] synchronize]; if (crashes != nil) { - BWQuincyLog(@"Sending crash reports:\n%@", crashes); - [self _postXML:[NSString stringWithFormat:@"%@", crashes] - toURL:[NSURL URLWithString:self.submissionURL]]; + BITHockeySDKLog(@"Sending crash reports:\n%@", crashes); + [self postXML:[NSString stringWithFormat:@"%@", crashes] + toURL:[NSURL URLWithString:BITHOCKEYSDK_URL]]; } } -- (void)_cleanCrashReports { +- (void)cleanCrashReports { NSError *error = NULL; for (NSUInteger i=0; i < [_crashFiles count]; i++) { @@ -582,22 +494,22 @@ NSString *BWQuincyLocalize(NSString *stringToken) { } [_crashFiles removeAllObjects]; - [[NSUserDefaults standardUserDefaults] setObject:nil forKey:kApprovedCrashReports]; + [[NSUserDefaults standardUserDefaults] setObject:nil forKey:kBITCrashApprovedReports]; [[NSUserDefaults standardUserDefaults] synchronize]; } -- (void)_sendCrashReports { +- (void)sendCrashReports { // send it to the next runloop - [self performSelector:@selector(_performSendingCrashReports) withObject:nil afterDelay:0.0f]; + [self performSelector:@selector(performSendingCrashReports) withObject:nil afterDelay:0.0f]; } -- (void)_checkForFeedbackStatus { +- (void)checkForFeedbackStatus { NSMutableURLRequest *request = nil; request = [NSMutableURLRequest requestWithURL: [NSURL URLWithString:[NSString stringWithFormat:@"%@api/2/apps/%@/crashes/%@", - self.submissionURL, - [self.appIdentifier stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding], + BITHOCKEYSDK_URL, + [_appIdentifier stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding], _feedbackRequestID ] ]]; @@ -608,45 +520,41 @@ NSString *BWQuincyLocalize(NSString *stringToken) { [request setTimeoutInterval: 15]; [request setHTTPMethod:@"GET"]; - _serverResult = CrashReportStatusUnknown; + _serverResult = BITCrashStatusUnknown; _statusCode = 200; // Release when done in the delegate method _responseData = [[NSMutableData alloc] init]; - if (self.delegate != nil && [self.delegate respondsToSelector:@selector(connectionOpened)]) { - [self.delegate connectionOpened]; - } - _urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; - BWQuincyLog(@"Requesting feedback status."); + if (!_urlConnection) { + BITHockeySDKLog(@"Requesting feedback status could not start!"); + } else { + BITHockeySDKLog(@"Requesting feedback status."); + } } -- (void)_postXML:(NSString*)xml toURL:(NSURL*)url { +- (void)postXML:(NSString*)xml toURL:(NSURL*)url { NSMutableURLRequest *request = nil; NSString *boundary = @"----FOO"; - if (self.appIdentifier) { - NSString *feedbackEnabled = @"&feedbackEnabled=no"; - - if ([self isFeedbackActivated]) { - feedbackEnabled = @"&feedbackEnabled=yes"; - } - - request = [NSMutableURLRequest requestWithURL: - [NSURL URLWithString:[NSString stringWithFormat:@"%@api/2/apps/%@/crashes?sdk=%@&sdk_version=%@%@", - self.submissionURL, - [self.appIdentifier stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding], - SDK_NAME, - SDK_VERSION, - feedbackEnabled - ] - ]]; - } else { - request = [NSMutableURLRequest requestWithURL:url]; + NSString *feedbackEnabled = @"&feedbackEnabled=no"; + + if ([self isFeedbackActivated]) { + feedbackEnabled = @"&feedbackEnabled=yes"; } + request = [NSMutableURLRequest requestWithURL: + [NSURL URLWithString:[NSString stringWithFormat:@"%@api/2/apps/%@/crashes?sdk=%@&sdk_version=%@%@", + BITHOCKEYSDK_URL, + [_appIdentifier stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding], + BITHOCKEYSDK_NAME, + BITHOCKEYSDK_VERSION, + feedbackEnabled + ] + ]]; + [request setCachePolicy: NSURLRequestReloadIgnoringLocalCacheData]; [request setValue:@"Quincy/iOS" forHTTPHeaderField:@"User-Agent"]; [request setValue:@"gzip" forHTTPHeaderField:@"Accept-Encoding"]; @@ -657,18 +565,14 @@ NSString *BWQuincyLocalize(NSString *stringToken) { NSMutableData *postBody = [NSMutableData data]; [postBody appendData:[[NSString stringWithFormat:@"--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; - if (self.appIdentifier) { - [postBody appendData:[@"Content-Disposition: form-data; name=\"xml\"; filename=\"crash.xml\"\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; - [postBody appendData:[[NSString stringWithFormat:@"Content-Type: text/xml\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; - } else { - [postBody appendData:[@"Content-Disposition: form-data; name=\"xmlstring\"\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; - } + [postBody appendData:[@"Content-Disposition: form-data; name=\"xml\"; filename=\"crash.xml\"\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; + [postBody appendData:[[NSString stringWithFormat:@"Content-Type: text/xml\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[xml dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [request setHTTPBody:postBody]; - _serverResult = CrashReportStatusUnknown; + _serverResult = BITCrashStatusUnknown; _statusCode = 200; //Release when done in the delegate method @@ -677,22 +581,18 @@ NSString *BWQuincyLocalize(NSString *stringToken) { _urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; if (!_urlConnection) { - BWQuincyLog(@"Sending crash reports could not start!"); + BITHockeySDKLog(@"Sending crash reports could not start!"); _sendingInProgress = NO; } else { - if (self.delegate != nil && [self.delegate respondsToSelector:@selector(connectionOpened)]) { - [self.delegate connectionOpened]; + if (self.delegate != nil && [self.delegate respondsToSelector:@selector(crashReporterWillSendCrashReport:)]) { + [self.delegate crashReporterWillSendCrashReport:self]; } - if (self.delegate != nil && [self.delegate respondsToSelector:@selector(sendingCrashReportsDidStart)]) { - [self.delegate sendingCrashReportsDidStart]; - } - - BWQuincyLog(@"Sending crash reports started."); + BITHockeySDKLog(@"Sending crash reports started."); } } -#pragma mark NSURLConnection Delegate +#pragma mark - NSURLConnection Delegate - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { if ([response isKindOfClass:[NSHTTPURLResponse class]]) { @@ -705,15 +605,11 @@ NSString *BWQuincyLocalize(NSString *stringToken) { } - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { - if (self.delegate != nil && [self.delegate respondsToSelector:@selector(connectionClosed)]) { - [self.delegate connectionClosed]; + if (self.delegate != nil && [self.delegate respondsToSelector:@selector(crashReporter:didFailWithError:)]) { + [self.delegate crashReporter:self didFailWithError:error]; } - if (self.delegate != nil && [self.delegate respondsToSelector:@selector(sendingCrashReportsDidFailWithError:)]) { - [self.delegate sendingCrashReportsDidFailWithError:error]; - } - - BWQuincyLog(@"ERROR: %@", [error localizedDescription]); + BITHockeySDKLog(@"ERROR: %@", [error localizedDescription]); _sendingInProgress = NO; @@ -727,85 +623,68 @@ NSString *BWQuincyLocalize(NSString *stringToken) { NSError *error = nil; if (_statusCode >= 200 && _statusCode < 400 && _responseData != nil && [_responseData length] > 0) { - [self _cleanCrashReports]; + [self cleanCrashReports]; _feedbackRequestID = nil; - if (self.appIdentifier) { - // HockeyApp uses PList XML format - NSMutableDictionary *response = [NSPropertyListSerialization propertyListFromData:_responseData - mutabilityOption:NSPropertyListMutableContainersAndLeaves - format:nil - errorDescription:NULL]; - BWQuincyLog(@"Received API response: %@", response); - - _serverResult = (CrashReportStatus)[[response objectForKey:@"status"] intValue]; - if ([response objectForKey:@"id"]) { - _feedbackRequestID = [[NSString alloc] initWithString:[response objectForKey:@"id"]]; - _feedbackDelayInterval = [[response objectForKey:@"delay"] floatValue]; - if (_feedbackDelayInterval > 0) - _feedbackDelayInterval *= 0.01; - } - } else { - BWQuincyLog(@"Received API response: %@", [[[NSString alloc] initWithBytes:[_responseData bytes] length:[_responseData length] encoding: NSUTF8StringEncoding] autorelease]); - - NSXMLParser *parser = [[NSXMLParser alloc] initWithData:_responseData]; - // Set self as the delegate of the parser so that it will receive the parser delegate methods callbacks. - [parser setDelegate:self]; - // Depending on the XML document you're parsing, you may want to enable these features of NSXMLParser. - [parser setShouldProcessNamespaces:NO]; - [parser setShouldReportNamespacePrefixes:NO]; - [parser setShouldResolveExternalEntities:NO]; - - [parser parse]; - - [parser release]; + // HockeyApp uses PList XML format + NSMutableDictionary *response = [NSPropertyListSerialization propertyListFromData:_responseData + mutabilityOption:NSPropertyListMutableContainersAndLeaves + format:nil + errorDescription:NULL]; + BITHockeySDKLog(@"Received API response: %@", response); + + _serverResult = (BITCrashStatus)[[response objectForKey:@"status"] intValue]; + if ([response objectForKey:@"id"]) { + _feedbackRequestID = [[NSString alloc] initWithString:[response objectForKey:@"id"]]; + _feedbackDelayInterval = [[response objectForKey:@"delay"] floatValue]; + if (_feedbackDelayInterval > 0) + _feedbackDelayInterval *= 0.01; } if ([self isFeedbackActivated]) { // only proceed if the server did not report any problem - if ((self.appIdentifier) && (_serverResult == CrashReportStatusQueued)) { + if (_serverResult == BITCrashStatusQueued) { // the report is still in the queue if (_feedbackRequestID) { - [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(_checkForFeedbackStatus) object:nil]; - [self performSelector:@selector(_checkForFeedbackStatus) withObject:nil afterDelay:_feedbackDelayInterval]; + [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(checkForFeedbackStatus) object:nil]; + [self performSelector:@selector(checkForFeedbackStatus) withObject:nil afterDelay:_feedbackDelayInterval]; } } else { [self showCrashStatusMessage]; - - if (self.delegate != nil && [self.delegate respondsToSelector:@selector(sendingCrashReportsDidFinish)]) { - [self.delegate sendingCrashReportsDidFinish]; - } - + } + + if (self.delegate != nil && [self.delegate respondsToSelector:@selector(crashReporterDidFinishSendingCrashReport:)]) { + [self.delegate crashReporterDidFinishSendingCrashReport:self]; } } - } else if (_statusCode == 400 && self.appIdentifier) { - [self _cleanCrashReports]; + } else if (_statusCode == 400) { + [self cleanCrashReports]; - error = [NSError errorWithDomain:kQuincyErrorDomain - code:QuincyAPIAppVersionRejected + error = [NSError errorWithDomain:kBITCrashErrorDomain + code:BITCrashAPIAppVersionRejected userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"The server rejected receiving crash reports for this app version!", NSLocalizedDescriptionKey, nil]]; - if (self.delegate != nil && [self.delegate respondsToSelector:@selector(sendingCrashReportsDidFailWithError:)]) { - [self.delegate sendingCrashReportsDidFailWithError:error]; + if (self.delegate != nil && [self.delegate respondsToSelector:@selector(crashReporter:didFailWithError:)]) { + [self.delegate crashReporter:self didFailWithError:error]; } - BWQuincyLog(@"ERROR: %@", [error localizedDescription]); + BITHockeySDKLog(@"ERROR: %@", [error localizedDescription]); } else { if (_responseData == nil || [_responseData length] == 0) { - error = [NSError errorWithDomain:kQuincyErrorDomain - code:QuincyAPIReceivedEmptyResponse + error = [NSError errorWithDomain:kBITCrashErrorDomain + code:BITCrashAPIReceivedEmptyResponse userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"Sending failed with an empty response!", NSLocalizedDescriptionKey, nil]]; } else { - error = [NSError errorWithDomain:kQuincyErrorDomain - code:QuincyAPIErrorWithStatusCode + error = [NSError errorWithDomain:kBITCrashErrorDomain + code:BITCrashAPIErrorWithStatusCode userInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"Sending failed with status code: %i", _statusCode], NSLocalizedDescriptionKey, nil]]; } - - BWQuincyLog(@"ERROR: %@", [error localizedDescription]); - } - - if (self.delegate != nil && [self.delegate respondsToSelector:@selector(connectionClosed)]) { - [self.delegate connectionClosed]; + + if (self.delegate != nil && [self.delegate respondsToSelector:@selector(crashReporter:didFailWithError:)]) { + [self.delegate crashReporter:self didFailWithError:error]; + } + + BITHockeySDKLog(@"ERROR: %@", [error localizedDescription]); } _sendingInProgress = NO; @@ -816,50 +695,5 @@ NSString *BWQuincyLocalize(NSString *stringToken) { _urlConnection = nil; } -#pragma mark PLCrashReporter - -// -// Called to handle a pending crash report. -// -- (void) handleCrashReport { - PLCrashReporter *crashReporter = [PLCrashReporter sharedReporter]; - NSError *error = NULL; - - // check if the next call ran successfully the last time - if (_analyzerStarted == 0) { - // mark the start of the routine - _analyzerStarted = 1; - [[NSUserDefaults standardUserDefaults] setValue:[NSNumber numberWithInt:_analyzerStarted] forKey:kQuincyKitAnalyzerStarted]; - [[NSUserDefaults standardUserDefaults] synchronize]; - - // Try loading the crash report - _crashData = [[NSData alloc] initWithData:[crashReporter loadPendingCrashReportDataAndReturnError: &error]]; - - NSString *cacheFilename = [NSString stringWithFormat: @"%.0f", [NSDate timeIntervalSinceReferenceDate]]; - - if (_crashData == nil) { - NSLog(@"Could not load crash report: %@", error); - } else { - [_crashData writeToFile:[_crashesDir stringByAppendingPathComponent: cacheFilename] atomically:YES]; - - // get the startup timestamp from the crash report, and the file timestamp to calculate the timeinterval when the crash happened after startup - PLCrashReport *report = [[[PLCrashReport alloc] initWithData:_crashData error:&error] autorelease]; - - if (report.systemInfo.timestamp && report.applicationInfo.applicationStartupTimestamp) { - _timeintervalCrashInLastSessionOccured = [report.systemInfo.timestamp timeIntervalSinceDate:report.applicationInfo.applicationStartupTimestamp]; - } - } - } - - // Purge the report - // mark the end of the routine - _analyzerStarted = 0; - [[NSUserDefaults standardUserDefaults] setValue:[NSNumber numberWithInt:_analyzerStarted] forKey:kQuincyKitAnalyzerStarted]; - [[NSUserDefaults standardUserDefaults] synchronize]; - - [crashReporter purgePendingCrashReport]; - return; -} - @end diff --git a/Classes/BITCrashManagerDelegate.h b/Classes/BITCrashManagerDelegate.h new file mode 100644 index 0000000000..be0cf0cfe1 --- /dev/null +++ b/Classes/BITCrashManagerDelegate.h @@ -0,0 +1,60 @@ +/* + * Author: Andreas Linde + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#import + +@protocol BITCrashManagerDelegate + +@optional + +/** Return any log string based data the crash report being processed should contain + */ +-(NSString *)applicationLogForCrashReporter:(BITCrashManager *)crashReporter; + +/** Invoked before the user is asked to send a crash report, so you can do additional actions. + E.g. to make sure not to ask the user for an app rating :) + */ +-(void)crashReporterWillShowSubmitCrashReportAlert:(BITCrashManager *)crashReporter; + +/** Invoked after the user did choose to send crashes always in the alert + */ +-(void)crashReporterWillSendCrashReportsAlways:(BITCrashManager *)crashReporter; + +/** Invoked right before sending crash reports will start + */ +- (void)crashReporterWillSendCrashReport:(BITCrashManager *)crashReporter; + +/** Invoked after sending crash reports failed + */ +- (void)crashReporter:(BITCrashManager *)crashReporter didFailWithError:(NSError *)error; + +/** Invoked after sending crash reports succeeded + */ +- (void)crashReporterDidFinishSendingCrashReport:(BITCrashManager *)crashReporter; + +@end \ No newline at end of file diff --git a/Classes/CNSCrashReportTextFormatter.h b/Classes/BITCrashReportTextFormatter.h similarity index 58% rename from Classes/CNSCrashReportTextFormatter.h rename to Classes/BITCrashReportTextFormatter.h index e8a2e08633..ebaf38bb47 100644 --- a/Classes/CNSCrashReportTextFormatter.h +++ b/Classes/BITCrashReportTextFormatter.h @@ -6,7 +6,7 @@ * * Copyright (c) 2008-2012 Plausible Labs Cooperative, Inc. * Copyright (c) 2010 MOSO Corporation, Pty Ltd. - * Copyright (c) 2012 Codenauts UG (haftungsbeschränkt) + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. * All rights reserved. * * Permission is hereby granted, free of charge, to any person @@ -34,38 +34,20 @@ #import -#import "CrashReporter/PLCrashReportFormatter.h" - -/** - * Supported text output formats. - * - * @ingroup enums - */ -typedef enum { - /** An iOS-compatible crash log text format. Compatible with the crash logs generated by the device and available - * through iTunes Connect. */ - CNSCrashReportTextFormatiOS = 0 -} CNSCrashReportTextFormat; - +#import // Dictionary keys for array elements returned by arrayOfAppUUIDsForCrashReport: -#define kCNSBinaryImageKeyUUID @"uuid" -#define kCNSBinaryImageKeyArch @"arch" -#define kCNSBinaryImageKeyType @"type" +#ifndef kBITBinaryImageKeyUUID +#define kBITBinaryImageKeyUUID @"uuid" +#define kBITBinaryImageKeyArch @"arch" +#define kBITBinaryImageKeyType @"type" +#endif -@interface CNSCrashReportTextFormatter : NSObject { -@private - /** Text output format. */ - CNSCrashReportTextFormat _textFormat; - - /** Encoding to use for string output. */ - NSStringEncoding _stringEncoding; +@interface BITCrashReportTextFormatter : NSObject { } -+ (NSString *) stringValueForCrashReport: (PLCrashReport *) report withTextFormat: (CNSCrashReportTextFormat) textFormat; -+ (NSArray *) arrayOfAppUUIDsForCrashReport: (PLCrashReport *) report; - -- (id) initWithTextFormat: (CNSCrashReportTextFormat) textFormat stringEncoding: (NSStringEncoding) stringEncoding; ++ (NSString *)stringValueForCrashReport:(PLCrashReport *)report; ++ (NSArray *)arrayOfAppUUIDsForCrashReport:(PLCrashReport *)report; @end diff --git a/Classes/CNSCrashReportTextFormatter.m b/Classes/BITCrashReportTextFormatter.m similarity index 92% rename from Classes/CNSCrashReportTextFormatter.m rename to Classes/BITCrashReportTextFormatter.m index 9441aba29a..38659c515c 100644 --- a/Classes/CNSCrashReportTextFormatter.m +++ b/Classes/BITCrashReportTextFormatter.m @@ -6,7 +6,7 @@ * * Copyright (c) 2008-2012 Plausible Labs Cooperative, Inc. * Copyright (c) 2010 MOSO Corporation, Pty Ltd. - * Copyright (c) 2012 Codenauts UG (haftungsbeschränkt) + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. * All rights reserved. * * Permission is hereby granted, free of charge, to any person @@ -31,22 +31,22 @@ * OTHER DEALINGS IN THE SOFTWARE. */ -#import "CrashReporter/CrashReporter.h" +#import -#import "CNSCrashReportTextFormatter.h" +#import "BITCrashReportTextFormatter.h" -@interface CNSCrashReportTextFormatter (PrivateAPI) +@interface BITCrashReportTextFormatter (PrivateAPI) NSInteger binaryImageSort(id binary1, id binary2, void *context); -+ (NSString *) formatStackFrame: (PLCrashReportStackFrameInfo *) frameInfo - frameIndex: (NSUInteger) frameIndex - report: (PLCrashReport *) report; ++ (NSString *)formatStackFrame:(PLCrashReportStackFrameInfo *)frameInfo + frameIndex:(NSUInteger)frameIndex + report:(PLCrashReport *)report; @end /** * Formats PLCrashReport data as human-readable text. */ -@implementation CNSCrashReportTextFormatter +@implementation BITCrashReportTextFormatter /** @@ -58,7 +58,7 @@ NSInteger binaryImageSort(id binary1, id binary2, void *context); * * @return Returns the formatted result on success, or nil if an error occurs. */ -+ (NSString *) stringValueForCrashReport: (PLCrashReport *) report withTextFormat: (CNSCrashReportTextFormat) textFormat { ++ (NSString *)stringValueForCrashReport:(PLCrashReport *)report { NSMutableString* text = [NSMutableString string]; boolean_t lp64 = true; // quiesce GCC uninitialized value warning @@ -435,7 +435,7 @@ NSInteger binaryImageSort(id binary1, id binary2, void *context); * * @return Returns the formatted result on success, or nil if an error occurs. */ -+ (NSArray *) arrayOfAppUUIDsForCrashReport: (PLCrashReport *) report { ++ (NSArray *)arrayOfAppUUIDsForCrashReport:(PLCrashReport *)report { NSMutableArray* appUUIDs = [NSMutableArray array]; /* Images. The iPhone crash report format sorts these in ascending order, by the base address */ @@ -498,40 +498,18 @@ NSInteger binaryImageSort(id binary1, id binary2, void *context); } if ([imagePath isEqual: report.processInfo.processPath] || [imagePath hasPrefix:appBundleContentsPath]) { - [appUUIDs addObject:[NSDictionary dictionaryWithObjectsAndKeys:uuid, kCNSBinaryImageKeyUUID, archName, kCNSBinaryImageKeyArch, imageType, kCNSBinaryImageKeyType, nil]]; + [appUUIDs addObject:[NSDictionary dictionaryWithObjectsAndKeys:uuid, kBITBinaryImageKeyUUID, archName, kBITBinaryImageKeyArch, imageType, kBITBinaryImageKeyType, nil]]; } } return appUUIDs; } - -/** - * Initialize with the request string encoding and output format. - * - * @param textFormat Format to use for the generated text crash report. - * @param stringEncoding Encoding to use when writing to the output stream. - */ -- (id) initWithTextFormat: (CNSCrashReportTextFormat) textFormat stringEncoding: (NSStringEncoding) stringEncoding { - if ((self = [super init]) == nil) - return nil; - - _textFormat = textFormat; - _stringEncoding = stringEncoding; - - return self; -} - -// from PLCrashReportFormatter protocol -- (NSData *) formatReport: (PLCrashReport *) report error: (NSError **) outError { - NSString *text = [PLCrashReportTextFormatter stringValueForCrashReport: report withTextFormat: _textFormat]; - return [text dataUsingEncoding: _stringEncoding allowLossyConversion: YES]; -} @end -@implementation CNSCrashReportTextFormatter (PrivateAPI) +@implementation BITCrashReportTextFormatter (PrivateAPI) /** @@ -543,9 +521,9 @@ NSInteger binaryImageSort(id binary1, id binary2, void *context); * * @return Returns a formatted frame line. */ -+ (NSString *) formatStackFrame: (PLCrashReportStackFrameInfo *) frameInfo - frameIndex: (NSUInteger) frameIndex - report: (PLCrashReport *) report ++ (NSString *)formatStackFrame: (PLCrashReportStackFrameInfo *) frameInfo + frameIndex: (NSUInteger) frameIndex + report: (PLCrashReport *) report { /* Base image address containing instrumention pointer, offset of the IP from that base * address, and the associated image name */ diff --git a/Classes/BITHockeyManager.h b/Classes/BITHockeyManager.h new file mode 100644 index 0000000000..44257bf4b7 --- /dev/null +++ b/Classes/BITHockeyManager.h @@ -0,0 +1,81 @@ +/* + * Author: Andreas Linde + * Kent Sutherland + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#import "BITUpdateManager.h" + + +@protocol BITHockeyManagerDelegate; + +@class BITCrashManager; + +@interface BITHockeyManager : NSObject { +@private + id delegate; + NSString *_appIdentifier; + + BOOL _validAppIdentifier; + + BOOL _startManagerIsInvoked; +} + +#pragma mark - Public Properties + +@property (nonatomic, retain) BITCrashManager *crashManager; + +@property (nonatomic, retain) BITUpdateManager *updateManager; + + +// if YES the app is installed from the app store +// if NO the app is installed via ad-hoc or enterprise distribution +@property (nonatomic, readonly) BOOL isAppStoreEnvironment; + +// Enable debug logging; ONLY ENABLE THIS FOR DEBUGGING! +// +// Default: NO +@property (nonatomic, assign, getter=isLoggingEnabled) BOOL loggingEnabled; + + +#pragma mark - Public Methods + +// Returns the shared manager object ++ (BITHockeyManager *)sharedHockeyManager; + +// Configure HockeyApp with a single app identifier and delegate; use this +// only for debug or beta versions of your app! +- (void)configureWithIdentifier:(NSString *)appIdentifier delegate:(id)delegate; + +// Configure HockeyApp with different app identifiers for beta and live versions +// of the app; the update alert will only be shown for the beta identifier +- (void)configureWithBetaIdentifier:(NSString *)betaIdentifier liveIdentifier:(NSString *)liveIdentifier delegate:(id)delegate; + +// Initialize all submodules and start them +- (void)startManager; + + +@end diff --git a/Classes/BITHockeyManager.m b/Classes/BITHockeyManager.m new file mode 100644 index 0000000000..ed2129d6b1 --- /dev/null +++ b/Classes/BITHockeyManager.m @@ -0,0 +1,296 @@ +/* + * Author: Andreas Linde + * Kent Sutherland + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#import "HockeySDK.h" +#import "HockeySDKPrivate.h" +#import "BITUpdateManager.h" + + +@interface BITHockeyManager () + +- (BOOL)shouldUseLiveIdenfitier; + +- (void)configureJMC; + +@end + +@implementation BITHockeyManager + +@synthesize crashManager = _crashManager; +@synthesize updateManager = _updateManager; + +@synthesize isAppStoreEnvironment = _isAppStoreEnvironment; + + +#pragma mark - Public Class Methods + ++ (BITHockeyManager *)sharedHockeyManager { + static BITHockeyManager *sharedInstance = nil; + static dispatch_once_t pred; + + dispatch_once(&pred, ^{ + sharedInstance = [BITHockeyManager alloc]; + sharedInstance = [sharedInstance init]; + }); + + return sharedInstance; +} + +- (id) init { + if ((self = [super init])) { + _isAppStoreEnvironment = NO; + _startManagerIsInvoked = NO; + + [self performSelector:@selector(validateStartManagerIsInvoked) withObject:nil afterDelay:0.0f]; + } + return self; +} + +- (void)dealloc { + [_appIdentifier release], _appIdentifier = nil; + + [_crashManager release], _crashManager = nil; + [_updateManager release], _updateManager = nil; + + delegate = nil; + + [super dealloc]; +} + + +#pragma mark - Public Instance Methods (Configuration) + +- (void)configureWithIdentifier:(NSString *)newAppIdentifier delegate:(id)newDelegate { + delegate = newDelegate; + [_appIdentifier release]; + _appIdentifier = [newAppIdentifier copy]; + + [self initializeModules]; +} + +- (void)configureWithBetaIdentifier:(NSString *)betaIdentifier liveIdentifier:(NSString *)liveIdentifier delegate:(id)newDelegate { + delegate = newDelegate; + [_appIdentifier release]; + + if ([self shouldUseLiveIdenfitier]) { + _appIdentifier = [liveIdentifier copy]; + } + else { + _appIdentifier = [betaIdentifier copy]; + } + + [self initializeModules]; +} + + +- (void)startManager { + BITHockeySDKLog(@"Starting HockeyManager"); + _startManagerIsInvoked = YES; + + // start CrashManager + BITHockeySDKLog(@"Start crashManager"); + [_crashManager performSelector:@selector(startManager) withObject:nil afterDelay:1.0f]; + + // Setup UpdateManager + BITHockeySDKLog(@"Start UpdateManager"); + [_updateManager performSelector:@selector(startManager) withObject:nil afterDelay:0.0f]; +} + + +- (void)validateStartManagerIsInvoked { + if (_validAppIdentifier && !_isAppStoreEnvironment) { + if (!_startManagerIsInvoked) { + NSLog(@"ERROR: You did not call [[BITHockeyManager sharedHockeyManager] startManager] to startup the HockeySDK! Please do so after setting up all properties. The SDK is NOT running."); + } + } +} + + +#pragma mark - Private Instance Methods + +- (BOOL)shouldUseLiveIdenfitier { + BOOL delegateResult = NO; + if ([delegate respondsToSelector:@selector(shouldUseLiveIdenfitier)]) { + delegateResult = [(NSObject *)delegate shouldUseLiveIdenfitier]; + } + + return (delegateResult) || (_isAppStoreEnvironment); +} + +- (void)initializeModules { + NSCharacterSet *hexSet = [NSCharacterSet characterSetWithCharactersInString:@"0123456789abcdef"]; + NSCharacterSet *inStringSet = [NSCharacterSet characterSetWithCharactersInString:_appIdentifier]; + _validAppIdentifier = ([_appIdentifier length] == 32) && ([hexSet isSupersetOfSet:inStringSet]); + + // check if we are really not in an app store environment + if ([[NSBundle mainBundle] pathForResource:@"embedded" ofType:@"mobileprovision"]) { + _isAppStoreEnvironment = NO; + } else { + _isAppStoreEnvironment = YES; + } + +#if TARGET_IPHONE_SIMULATOR + _isAppStoreEnvironment = NO; +#endif + + _startManagerIsInvoked = NO; + + if (_validAppIdentifier) { + BITHockeySDKLog(@"Setup CrashManager"); + self.crashManager = [[[BITCrashManager alloc] initWithAppIdentifier:_appIdentifier] autorelease]; + + BITHockeySDKLog(@"Setup UpdateManager"); + self.updateManager = [[[BITUpdateManager alloc] initWithAppIdentifier:_appIdentifier isAppStoreEnvironemt:_isAppStoreEnvironment] autorelease]; + + // Only if JMC is part of the project + if ([[self class] isJMCPresent]) { + BITHockeySDKLog(@"Setup JMC"); + [_updateManager setCheckForTracker:YES]; + [_updateManager addObserver:self forKeyPath:@"trackerConfig" options:0 context:nil]; + [[self class] disableJMCCrashReporter]; + [self performSelector:@selector(configureJMC) withObject:nil afterDelay:0]; + } + + } else { + NSLog(@"ERROR: The app identifier is invalid! Please use the HockeyApp app identifier you find on the apps website on HockeyApp! The SDK is disabled!"); + } +} + + +#pragma mark - JMC + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundeclared-selector" ++ (id)jmcInstance { + id jmcClass = NSClassFromString(@"JMC"); + if ((jmcClass) && ([jmcClass respondsToSelector:@selector(sharedInstance)])) { + return [jmcClass performSelector:@selector(sharedInstance)]; + } +#ifdef JMC_LEGACY + else if ((jmcClass) && ([jmcClass respondsToSelector:@selector(instance)])) { + return [jmcClass performSelector:@selector(instance)]; // legacy pre (JMC 1.0.11) support + } +#endif + + return nil; +} +#pragma clang diagnostic pop + ++ (BOOL)isJMCActive { + id jmcInstance = [self jmcInstance]; + return (jmcInstance) && ([jmcInstance performSelector:@selector(url)]); +} + ++ (BOOL)isJMCPresent { + return [self jmcInstance] != nil; +} + +#pragma mark - Private Class Methods + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundeclared-selector" ++ (void)disableJMCCrashReporter { + id jmcInstance = [self jmcInstance]; + id jmcOptions = [jmcInstance performSelector:@selector(options)]; + SEL crashReporterSelector = @selector(setCrashReportingEnabled:); + + BOOL value = NO; + + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[jmcOptions methodSignatureForSelector:crashReporterSelector]]; + invocation.target = jmcOptions; + invocation.selector = crashReporterSelector; + [invocation setArgument:&value atIndex:2]; + [invocation invoke]; +} +#pragma clang diagnostic pop + ++ (BOOL)checkJMCConfiguration:(NSDictionary *)configuration { + return (([configuration isKindOfClass:[NSDictionary class]]) && + ([[configuration valueForKey:@"enabled"] boolValue]) && + ([[configuration valueForKey:@"url"] length] > 0) && + ([[configuration valueForKey:@"key"] length] > 0) && + ([[configuration valueForKey:@"project"] length] > 0)); +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundeclared-selector" ++ (void)applyJMCConfiguration:(NSDictionary *)configuration { + id jmcInstance = [self jmcInstance]; + SEL configureSelector = @selector(configureJiraConnect:projectKey:apiKey:); + + NSString *url = [configuration valueForKey:@"url"]; + NSString *project = [configuration valueForKey:@"project"]; + NSString *key = [configuration valueForKey:@"key"]; + + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[jmcInstance methodSignatureForSelector:configureSelector]]; + invocation.target = jmcInstance; + invocation.selector = configureSelector; + [invocation setArgument:&url atIndex:2]; + [invocation setArgument:&project atIndex:3]; + [invocation setArgument:&key atIndex:4]; + [invocation invoke]; + + if ([jmcInstance respondsToSelector:@selector(ping)]) { + [jmcInstance performSelector:@selector(ping)]; + } +} +#pragma clang diagnostic pop + +- (void)configureJMC { + // Return if JMC is already configured + if ([[self class] isJMCActive]) { + return; + } + + // Configure JMC from user defaults + NSDictionary *configurations = [[NSUserDefaults standardUserDefaults] valueForKey:@"BITTrackerConfigurations"]; + NSDictionary *configuration = [configurations valueForKey:_appIdentifier]; + if ([[self class] checkJMCConfiguration:configuration]) { + [[self class] applyJMCConfiguration:configuration]; + } +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + if (([object trackerConfig]) && ([[object trackerConfig] isKindOfClass:[NSDictionary class]])) { + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + NSMutableDictionary *trackerConfig = [[defaults valueForKey:@"BITTrackerConfigurations"] mutableCopy]; + if (!trackerConfig) { + trackerConfig = [[NSMutableDictionary dictionaryWithCapacity:1] retain]; + } + + [trackerConfig setValue:[object trackerConfig] forKey:_appIdentifier]; + [defaults setValue:trackerConfig forKey:@"BITTrackerConfigurations"]; + [trackerConfig release]; + + [defaults synchronize]; + [self configureJMC]; + } +} + +@end diff --git a/Classes/BITHockeyManagerDelegate.h b/Classes/BITHockeyManagerDelegate.h new file mode 100644 index 0000000000..e10825be7d --- /dev/null +++ b/Classes/BITHockeyManagerDelegate.h @@ -0,0 +1,41 @@ +/* + * Author: Andreas Linde + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#import + +@protocol BITHockeyManagerDelegate + +@optional + +// Invoked when the manager is configured +// +// Implement to force the usage of the live identifier, e.g. for enterprise apps +// which are distributed inside your company +- (BOOL)shouldUseLiveIdenfitier; + +@end \ No newline at end of file diff --git a/Classes/BITUpdateManager.h b/Classes/BITUpdateManager.h new file mode 100644 index 0000000000..1454d13139 --- /dev/null +++ b/Classes/BITUpdateManager.h @@ -0,0 +1,194 @@ +/* + * Author: Andreas Linde + * Peter Steinberger + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * Copyright (c) 2011 Andreas Linde. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + + +#import + + +typedef enum { + BITUpdateComparisonResultDifferent, + BITUpdateComparisonResultGreater +} BITUpdateComparisonResult; + +typedef enum { + BITUpdateAuthorizationDenied, + BITUpdateAuthorizationAllowed, + BITUpdateAuthorizationPending +} BITUpdateAuthorizationState; + +typedef enum { + BITUpdateCheckStartup = 0, + BITUpdateCheckDaily = 1, + BITUpdateCheckManually = 2 +} BITUpdateSetting; + +@protocol BITUpdateManagerDelegate; + +@class BITAppVersionMetaInfo; +@class BITUpdateViewController; + +@interface BITUpdateManager : NSObject { + NSString *_appIdentifier; + NSString *_currentAppVersion; + + UINavigationController *_navController; + BITUpdateViewController *_currentHockeyViewController; + + BOOL _dataFound; + BOOL _showFeedback; + BOOL _updateURLOffline; + BOOL _updateAlertShowing; + BOOL _lastCheckFailed; + + BOOL _isAppStoreEnvironment; +} + + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Setting Properties + +// delegate is optional +@property (nonatomic, assign) id delegate; + +// hockey secret is required if authentication is used +@property (nonatomic, retain) NSString *authenticationSecret; + +// if YES, the current user data is send: device type, iOS version, app version, UDID (default) +// if NO, no such data is send to the server +@property (nonatomic, assign, getter=shouldSendUserData) BOOL sendUserData; + +// if YES, the the users usage time of the app to the service, only in 1 minute granularity! (default) +// if NO, no such data is send to the server +@property (nonatomic, assign, getter=shouldSendUsageTime) BOOL sendUsageTime; + +// if YES, the user agrees to send the usage data, user can change it if the developer shows the settings (default) +// if NO, the user overwrites the developer setting and no such data is sent +@property (nonatomic, assign, getter=isAllowUserToDisableSendData) BOOL allowUserToDisableSendData; + +// if YES, the user allowed to send user data (default) +// if NO, the user denied to send user data +@property (nonatomic, assign, getter=doesUserAllowsSendUserData) BOOL userAllowsSendUserData; + +// if YES, the user allowed to send usage data (default) +// if NO, the user denied to send usage data +@property (nonatomic, assign, getter=doesUserAllowsSendUsageTime) BOOL userAllowsSendUsageTime; + +// if YES, the new version alert will be displayed always if the current version is outdated (default) +// if NO, the alert will be displayed only once for each new update +@property (nonatomic, assign) BOOL alwaysShowUpdateReminder; + +// if YES, the user can change the HockeyUpdateSetting value (default) +// if NO, the user can not change it, and the default or developer defined value will be used +@property (nonatomic, assign, getter=shouldShowUserSettings) BOOL showUserSettings; + +// set bar style of navigation controller +@property (nonatomic, assign) UIBarStyle barStyle; + +// set modal presentation style of update view +@property (nonatomic, assign) UIModalPresentationStyle modalPresentationStyle; + +// if YES, then an update check will be performed after the application becomes active (default) +// if NO, then the update check will not happen unless invoked explicitly +@property (nonatomic, assign, getter=isCheckForUpdateOnLaunch) BOOL checkForUpdateOnLaunch; + +// if YES, the alert notifying about an new update also shows a button to install the update directly +// if NO, the alert notifying about an new update only shows ignore and show update button +@property (nonatomic, assign, getter=isShowingDirectInstallOption) BOOL showDirectInstallOption; + +// if YES, each app version needs to be authorized by the server to run on this device +// if NO, each app version does not need to be authorized (default) +@property (nonatomic, assign, getter=isRequireAuthorization) BOOL requireAuthorization; + +// HockeyComparisonResultDifferent: alerts if the version on the server is different (default) +// HockeyComparisonResultGreater: alerts if the version on the server is greater +@property (nonatomic, assign) BITUpdateComparisonResult compareVersionType; + +// see HockeyUpdateSetting-enum. Will be saved in user defaults. +// default value: HockeyUpdateCheckStartup +@property (nonatomic, assign) BITUpdateSetting updateSetting; + +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Private Properties + +// if YES, the API will return an existing JMC config +// if NO, the API will return only version information +@property (nonatomic, assign) BOOL checkForTracker; + +// Contains the tracker config if received from server +@property (nonatomic, retain, readonly) NSDictionary *trackerConfig; + + +- (id)initWithAppIdentifier:(NSString *)appIdentifier isAppStoreEnvironemt:(BOOL)isAppStoreEnvironment; + +- (void)startManager; + +// is an update available? +- (BOOL)isUpdateAvailable; + +// are we currently checking for updates? +- (BOOL)isCheckInProgress; + +// open update info view +- (void)showUpdateView; + +// manually start an update check +- (void)checkForUpdate; + +// checks for update, informs the user (error, no update found, etc) +- (void)checkForUpdateShowFeedback:(BOOL)feedback; + +// initiates app-download call. displays an system UIAlertView +- (BOOL)initiateAppDownload; + +// checks wether this app version is authorized +- (BOOL)appVersionIsAuthorized; + +// start checking for an authorization key +- (void)checkForAuthorization; + +// convenience methode to create hockey view controller +- (BITUpdateViewController *)hockeyViewController:(BOOL)modal; + +// get/set current active hockey view controller +@property (nonatomic, retain) BITUpdateViewController *currentHockeyViewController; + +// convenience method to get current running version string +- (NSString *)currentAppVersion; + +// get newest app version +- (BITAppVersionMetaInfo *)newestAppVersion; + +// get array of all available versions +- (NSArray *)appVersions; + +// check if there is any newer version mandatory +- (BOOL)hasNewerMandatoryVersion; + +@end diff --git a/Classes/BWHockeyManager.m b/Classes/BITUpdateManager.m similarity index 51% rename from Classes/BWHockeyManager.m rename to Classes/BITUpdateManager.m index 524204dd5d..e8fcafeffa 100644 --- a/Classes/BWHockeyManager.m +++ b/Classes/BITUpdateManager.m @@ -1,33 +1,44 @@ -// -// BWHockeyManager.m -// -// Created by Andreas Linde on 8/17/10. -// Copyright 2010-2011 Andreas Linde. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. +/* + * Author: Andreas Linde + * Peter Steinberger + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * Copyright (c) 2011 Andreas Linde. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ -#import "BWHockeyManager.h" -#import "BWApp.h" -#import "NSString+HockeyAdditions.h" -#import "UIImage+HockeyAdditions.h" -#import #import +#import +#import "HockeySDK.h" +#import "HockeySDKPrivate.h" + +#import "BITUpdateManager.h" +#import "BITAppVersionMetaInfo.h" + +#import "NSString+BITHockeyAdditions.h" +#import "UIImage+BITHockeyAdditions.h" + // API defines - do not change #define BETA_DOWNLOAD_TYPE_PROFILE @"profile" @@ -39,134 +50,86 @@ #define BETA_UPDATE_TIMESTAMP @"timestamp" #define BETA_UPDATE_APPSIZE @"appsize" -@interface BWHockeyManager () -- (NSString *)getDevicePlatform_; +@interface BITUpdateManager () - (id)parseJSONResultString:(NSString *)jsonString; -- (void)connectionOpened_; -- (void)connectionClosed_; - (BOOL)shouldCheckForUpdates; - (void)startUsage; - (void)stopUsage; -- (void)startManager; - (void)showAuthorizationScreen:(NSString *)message image:(NSString *)image; - (BOOL)canSendUserData; - (BOOL)canSendUsageTime; - (NSString *)currentUsageString; - (NSString *)installationDateString; - (NSString *)authenticationToken; -- (HockeyAuthorizationState)authorizationState; +- (BITUpdateAuthorizationState)authorizationState; @property (nonatomic, assign, getter=isUpdateAvailable) BOOL updateAvailable; @property (nonatomic, assign, getter=isCheckInProgress) BOOL checkInProgress; @property (nonatomic, retain) NSMutableData *receivedData; @property (nonatomic, copy) NSDate *lastCheck; -@property (nonatomic, copy) NSArray *apps; +@property (nonatomic, copy) NSArray *appVersions; @property (nonatomic, retain) NSURLConnection *urlConnection; @property (nonatomic, copy) NSDate *usageStartTimestamp; @property (nonatomic, retain) UIView *authorizeView; @property (nonatomic, retain) NSDictionary *trackerConfig; @end -// hockey api error domain -typedef enum { - HockeyErrorUnknown, - HockeyAPIServerReturnedInvalidStatus, - HockeyAPIServerReturnedInvalidData, - HockeyAPIServerReturnedEmptyResponse, - HockeyAPIClientAuthorizationMissingSecret, - HockeyAPIClientCannotCreateConnection -} HockeyErrorReason; -static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; -@implementation BWHockeyManager +@implementation BITUpdateManager -@synthesize delegate = delegate_; -@synthesize updateURL = updateURL_; -@synthesize appIdentifier = appIdentifier_; -@synthesize urlConnection = urlConnection_; -@synthesize loggingEnabled = loggingEnabled_; -@synthesize checkInProgress = checkInProgress_; -@synthesize receivedData = receivedData_; -@synthesize sendUserData = sendUserData_; -@synthesize sendUsageTime = sendUsageTime_; -@synthesize allowUserToDisableSendData = allowUserToDisableSendData_; -@synthesize userAllowsSendUserData = userAllowsSendUserData_; -@synthesize userAllowsSendUsageTime = userAllowsSendUsageTime_; -@synthesize alwaysShowUpdateReminder = showUpdateReminder_; -@synthesize checkForUpdateOnLaunch = checkForUpdateOnLaunch_; -@synthesize compareVersionType = compareVersionType_; -@synthesize lastCheck = lastCheck_; -@synthesize showUserSettings = showUserSettings_; -@synthesize updateSetting = updateSetting_; -@synthesize apps = apps_; -@synthesize updateAvailable = updateAvailable_; -@synthesize usageStartTimestamp = usageStartTimestamp_; -@synthesize currentHockeyViewController = currentHockeyViewController_; -@synthesize showDirectInstallOption = showDirectInstallOption_; -@synthesize requireAuthorization = requireAuthorization_; -@synthesize authenticationSecret = authenticationSecret_; -@synthesize authorizeView = authorizeView_; -@synthesize isAppStoreEnvironment = isAppStoreEnvironment_; -@synthesize checkForTracker = checkForTracker_; -@synthesize trackerConfig = trackerConfig_; -@synthesize barStyle = barStyle_; -@synthesize modalPresentationStyle = modalPresentationStyle_; +@synthesize delegate = _delegate; -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark static - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 40000 -+(BWHockeyManager *)sharedHockeyManager -{ - static BWHockeyManager *sharedInstance = nil; - static dispatch_once_t pred; - - dispatch_once(&pred, ^{ - sharedInstance = [BWHockeyManager alloc]; - sharedInstance = [sharedInstance init]; - }); - - return sharedInstance; -} -#else -+ (BWHockeyManager *)sharedHockeyManager { - static BWHockeyManager *hockeyManager = nil; - - if (hockeyManager == nil) { - hockeyManager = [[BWHockeyManager alloc] init]; - } - - return hockeyManager; -} -#endif +@synthesize urlConnection = _urlConnection; +@synthesize checkInProgress = _checkInProgress; +@synthesize receivedData = _receivedData; +@synthesize sendUserData = _sendUserData; +@synthesize sendUsageTime = _sendUsageTime; +@synthesize allowUserToDisableSendData = _allowUserToDisableSendData; +@synthesize userAllowsSendUserData = _userAllowsSendUserData; +@synthesize userAllowsSendUsageTime = _userAllowsSendUsageTime; +@synthesize alwaysShowUpdateReminder = _showUpdateReminder; +@synthesize checkForUpdateOnLaunch = _checkForUpdateOnLaunch; +@synthesize compareVersionType = _compareVersionType; +@synthesize lastCheck = _lastCheck; +@synthesize showUserSettings = _showUserSettings; +@synthesize updateSetting = _updateSetting; +@synthesize appVersions = _appVersions; +@synthesize updateAvailable = _updateAvailable; +@synthesize usageStartTimestamp = _usageStartTimestamp; +@synthesize currentHockeyViewController = _currentHockeyViewController; +@synthesize showDirectInstallOption = _showDirectInstallOption; +@synthesize requireAuthorization = _requireAuthorization; +@synthesize authenticationSecret = _authenticationSecret; +@synthesize authorizeView = _authorizeView; +@synthesize checkForTracker = _checkForTracker; +@synthesize trackerConfig = _trackerConfig; +@synthesize barStyle = _barStyle; +@synthesize modalPresentationStyle = _modalPresentationStyle; -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark private +#pragma mark - private -- (void)reportError_:(NSError *)error { - BWHockeyLog(@"Error: %@", [error localizedDescription]); - lastCheckFailed_ = YES; +- (void)reportError:(NSError *)error { + BITHockeySDKLog(@"Error: %@", [error localizedDescription]); + _lastCheckFailed = YES; // only show error if we enable that - if (showFeedback_) { - UIAlertView *alert = [[UIAlertView alloc] initWithTitle:BWHockeyLocalize(@"HockeyError") + if (_showFeedback) { + UIAlertView *alert = [[UIAlertView alloc] initWithTitle:BITHockeySDKLocalizedString(@"UpdateError") message:[error localizedDescription] delegate:nil - cancelButtonTitle:BWHockeyLocalize(@"OK") otherButtonTitles:nil]; + cancelButtonTitle:BITHockeySDKLocalizedString(@"OK") otherButtonTitles:nil]; [alert show]; [alert release]; - showFeedback_ = NO; + _showFeedback = NO; } } -- (NSString *)encodedAppIdentifier_ { - return (self.appIdentifier ? [self.appIdentifier bw_URLEncodedString] : [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"] bw_URLEncodedString]); +- (NSString *)encodedAppIdentifier { + return (_appIdentifier ? [_appIdentifier bit_URLEncodedString] : [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"] bit_URLEncodedString]); } -- (NSString *)getDevicePlatform_ { +- (NSString *)getDevicePlatform { size_t size; sysctlbyname("hw.machine", NULL, &size, NULL, 0); char *answer = (char*)malloc(size); @@ -176,46 +139,37 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; return platform; } -- (void)connectionOpened_ { - if ([self.delegate respondsToSelector:@selector(connectionOpened)]) - [(id)self.delegate connectionOpened]; -} - -- (void)connectionClosed_ { - if ([self.delegate respondsToSelector:@selector(connectionClosed)]) - [(id)self.delegate connectionClosed]; -} - (void)startUsage { self.usageStartTimestamp = [NSDate date]; BOOL newVersion = NO; - if (![[NSUserDefaults standardUserDefaults] valueForKey:kUsageTimeForVersionString]) { + if (![[NSUserDefaults standardUserDefaults] valueForKey:kBITUpdateUsageTimeForVersionString]) { newVersion = YES; } else { - if ([(NSString *)[[NSUserDefaults standardUserDefaults] valueForKey:kUsageTimeForVersionString] compare:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]] != NSOrderedSame) { + if ([(NSString *)[[NSUserDefaults standardUserDefaults] valueForKey:kBITUpdateUsageTimeForVersionString] compare:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]] != NSOrderedSame) { newVersion = YES; } } if (newVersion) { - [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithDouble:[[NSDate date] timeIntervalSinceReferenceDate]] forKey:kDateOfVersionInstallation]; - [[NSUserDefaults standardUserDefaults] setObject:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] forKey:kUsageTimeForVersionString]; - [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithDouble:0] forKey:kUsageTimeOfCurrentVersion]; + [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithDouble:[[NSDate date] timeIntervalSinceReferenceDate]] forKey:kBITUpdateDateOfVersionInstallation]; + [[NSUserDefaults standardUserDefaults] setObject:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] forKey:kBITUpdateUsageTimeForVersionString]; + [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithDouble:0] forKey:kBITUpdateUsageTimeOfCurrentVersion]; [[NSUserDefaults standardUserDefaults] synchronize]; } } - (void)stopUsage { - double timeDifference = [[NSDate date] timeIntervalSinceReferenceDate] - [usageStartTimestamp_ timeIntervalSinceReferenceDate]; - double previousTimeDifference = [(NSNumber *)[[NSUserDefaults standardUserDefaults] valueForKey:kUsageTimeOfCurrentVersion] doubleValue]; + double timeDifference = [[NSDate date] timeIntervalSinceReferenceDate] - [_usageStartTimestamp timeIntervalSinceReferenceDate]; + double previousTimeDifference = [(NSNumber *)[[NSUserDefaults standardUserDefaults] valueForKey:kBITUpdateUsageTimeOfCurrentVersion] doubleValue]; - [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithDouble:previousTimeDifference + timeDifference] forKey:kUsageTimeOfCurrentVersion]; + [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithDouble:previousTimeDifference + timeDifference] forKey:kBITUpdateUsageTimeOfCurrentVersion]; [[NSUserDefaults standardUserDefaults] synchronize]; } - (NSString *)currentUsageString { - double currentUsageTime = [[NSUserDefaults standardUserDefaults] doubleForKey:kUsageTimeOfCurrentVersion]; + double currentUsageTime = [[NSUserDefaults standardUserDefaults] doubleForKey:kBITUpdateUsageTimeOfCurrentVersion]; if (currentUsageTime > 0) { // round (up) to 1 minute @@ -228,7 +182,7 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; - (NSString *)installationDateString { NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease]; [formatter setDateFormat:@"MM/dd/yyyy"]; - double installationTimeStamp = [[NSUserDefaults standardUserDefaults] doubleForKey:kDateOfVersionInstallation]; + double installationTimeStamp = [[NSUserDefaults standardUserDefaults] doubleForKey:kBITUpdateDateOfVersionInstallation]; if (installationTimeStamp == 0.0f) { return [formatter stringFromDate:[NSDate date]]; } else { @@ -237,8 +191,8 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; } - (NSString *)deviceIdentifier { - if ([delegate_ respondsToSelector:@selector(customDeviceIdentifier)]) { - NSString *identifier = [delegate_ performSelector:@selector(customDeviceIdentifier)]; + if ([_delegate respondsToSelector:@selector(customDeviceIdentifierForUpdateManager:)]) { + NSString *identifier = [_delegate performSelector:@selector(customDeviceIdentifierForUpdateManager:) withObject:self]; if (identifier && [identifier length] > 0) { return identifier; } @@ -248,8 +202,8 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; } - (NSString *)authenticationToken { - return [BWmd5([NSString stringWithFormat:@"%@%@%@%@", - authenticationSecret_, + return [BITHockeySDKMD5([NSString stringWithFormat:@"%@%@%@%@", + _authenticationSecret, [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"], [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"], [self deviceIdentifier] @@ -257,49 +211,49 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; ) lowercaseString]; } -- (HockeyAuthorizationState)authorizationState { - NSString *version = [[NSUserDefaults standardUserDefaults] objectForKey:kHockeyAuthorizedVersion]; - NSString *token = [[NSUserDefaults standardUserDefaults] objectForKey:kHockeyAuthorizedToken]; +- (BITUpdateAuthorizationState)authorizationState { + NSString *version = [[NSUserDefaults standardUserDefaults] objectForKey:kBITUpdateAuthorizedVersion]; + NSString *token = [[NSUserDefaults standardUserDefaults] objectForKey:kBITUpdateAuthorizedToken]; if (version != nil && token != nil) { if ([version compare:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]] == NSOrderedSame) { // if it is denied, block the screen permanently if ([token compare:[self authenticationToken]] != NSOrderedSame) { - return HockeyAuthorizationDenied; + return BITUpdateAuthorizationDenied; } else { - return HockeyAuthorizationAllowed; + return BITUpdateAuthorizationAllowed; } } } - return HockeyAuthorizationPending; + return BITUpdateAuthorizationPending; } -- (void)checkUpdateAvailable_ { +- (void)checkUpdateAvailable { // check if there is an update available - if (self.compareVersionType == HockeyComparisonResultGreater) { - self.updateAvailable = ([self.app.version versionCompare:self.currentAppVersion] == NSOrderedDescending); + if (self.compareVersionType == BITUpdateComparisonResultGreater) { + self.updateAvailable = ([self.newestAppVersion.version versionCompare:self.currentAppVersion] == NSOrderedDescending); } else { - self.updateAvailable = ([self.app.version compare:self.currentAppVersion] != NSOrderedSame); + self.updateAvailable = ([self.newestAppVersion.version compare:self.currentAppVersion] != NSOrderedSame); } } -- (void)loadAppCache_ { - NSData *savedHockeyData = [[NSUserDefaults standardUserDefaults] objectForKey:kArrayOfLastHockeyCheck]; +- (void)loadAppCache { + NSData *savedHockeyData = [[NSUserDefaults standardUserDefaults] objectForKey:kBITUpdateArrayOfLastCheck]; NSArray *savedHockeyCheck = nil; if (savedHockeyData) { savedHockeyCheck = [NSKeyedUnarchiver unarchiveObjectWithData:savedHockeyData]; } if (savedHockeyCheck) { - self.apps = [NSArray arrayWithArray:savedHockeyCheck]; - [self checkUpdateAvailable_]; + self.appVersions = [NSArray arrayWithArray:savedHockeyCheck]; + [self checkUpdateAvailable]; } else { - self.apps = nil; + self.appVersions = nil; } } -- (void)saveAppCache_ { - NSData *data = [NSKeyedArchiver archivedDataWithRootObject:self.apps]; - [[NSUserDefaults standardUserDefaults] setObject:data forKey:kArrayOfLastHockeyCheck]; +- (void)saveAppCache { + NSData *data = [NSKeyedArchiver archivedDataWithRootObject:self.appVersions]; + [[NSUserDefaults standardUserDefaults] setObject:data forKey:kBITUpdateArrayOfLastCheck]; [[NSUserDefaults standardUserDefaults] synchronize]; } @@ -315,7 +269,7 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; if ([UIWindow instancesRespondToSelector:@selector(rootViewController)]) { if ([window rootViewController]) { visibleWindow = window; - BWHockeyLog(@"UIWindow with rootViewController found: %@", visibleWindow); + BITHockeySDKLog(@"UIWindow with rootViewController found: %@", visibleWindow); break; } } @@ -349,37 +303,25 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSObject +#pragma mark - Init -- (id)init { +- (id)initWithAppIdentifier:(NSString *)appIdentifier isAppStoreEnvironemt:(BOOL)isAppStoreEnvironment { if ((self = [super init])) { - updateURL_ = nil; - appIdentifier_ = nil; - checkInProgress_ = NO; - dataFound = NO; - updateAvailable_ = NO; - lastCheckFailed_ = NO; - currentAppVersion_ = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]; - navController_ = nil; - authorizeView_ = nil; - requireAuthorization_ = NO; - authenticationSecret_= nil; - loggingEnabled_ = NO; - lastCheck_ = nil; - - // check if we are really not in an app store environment - if ([[NSBundle mainBundle] pathForResource:@"embedded" ofType:@"mobileprovision"]) { - isAppStoreEnvironment_ = NO; - } else { - isAppStoreEnvironment_ = YES; - } - -#if TARGET_IPHONE_SIMULATOR - isAppStoreEnvironment_ = NO; -#endif + _appIdentifier = appIdentifier; + _isAppStoreEnvironment = isAppStoreEnvironment; + _delegate = nil; + _checkInProgress = NO; + _dataFound = NO; + _updateAvailable = NO; + _lastCheckFailed = NO; + _currentAppVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]; + _navController = nil; + _authorizeView = nil; + _requireAuthorization = NO; + _authenticationSecret = nil; + _lastCheck = nil; + // set defaults self.showDirectInstallOption = NO; self.requireAuthorization = NO; @@ -388,111 +330,105 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; self.allowUserToDisableSendData = YES; self.alwaysShowUpdateReminder = YES; self.checkForUpdateOnLaunch = YES; - self.showUserSettings = YES; - self.compareVersionType = HockeyComparisonResultGreater; + self.showUserSettings = NO; + self.compareVersionType = BITUpdateComparisonResultGreater; self.barStyle = UIBarStyleDefault; self.modalPresentationStyle = UIModalPresentationFormSheet; // load update setting from user defaults and check value - if ([[NSUserDefaults standardUserDefaults] objectForKey:kHockeyAutoUpdateSetting]) { - self.updateSetting = (HockeyUpdateSetting)[[NSUserDefaults standardUserDefaults] integerForKey:kHockeyAutoUpdateSetting]; + if ([[NSUserDefaults standardUserDefaults] objectForKey:kBITUpdateAutoUpdateSetting]) { + self.updateSetting = (BITUpdateSetting)[[NSUserDefaults standardUserDefaults] integerForKey:kBITUpdateAutoUpdateSetting]; } else { - self.updateSetting = HockeyUpdateCheckStartup; + self.updateSetting = BITUpdateCheckStartup; } - if ([[NSUserDefaults standardUserDefaults] objectForKey:kDateOfLastHockeyCheck]) { + if ([[NSUserDefaults standardUserDefaults] objectForKey:kBITUpdateDateOfLastCheck]) { // we did write something else in the past, so for compatibility reasons do this - id tempLastCheck = [[NSUserDefaults standardUserDefaults] objectForKey:kDateOfLastHockeyCheck]; + id tempLastCheck = [[NSUserDefaults standardUserDefaults] objectForKey:kBITUpdateDateOfLastCheck]; if ([tempLastCheck isKindOfClass:[NSDate class]]) { self.lastCheck = tempLastCheck; } } - if (!lastCheck_) { + if (!_lastCheck) { self.lastCheck = [NSDate distantPast]; } - if ([[NSUserDefaults standardUserDefaults] objectForKey:kHockeyAllowUserSetting]) { - self.userAllowsSendUserData = [[NSUserDefaults standardUserDefaults] boolForKey:kHockeyAllowUserSetting]; + if ([[NSUserDefaults standardUserDefaults] objectForKey:kBITUpdateAllowUserSetting]) { + self.userAllowsSendUserData = [[NSUserDefaults standardUserDefaults] boolForKey:kBITUpdateAllowUserSetting]; } else { self.userAllowsSendUserData = YES; } - if ([[NSUserDefaults standardUserDefaults] objectForKey:kHockeyAllowUsageSetting]) { - self.userAllowsSendUsageTime = [[NSUserDefaults standardUserDefaults] boolForKey:kHockeyAllowUsageSetting]; + if ([[NSUserDefaults standardUserDefaults] objectForKey:kBITUpdateAllowUsageSetting]) { + self.userAllowsSendUsageTime = [[NSUserDefaults standardUserDefaults] boolForKey:kBITUpdateAllowUsageSetting]; } else { self.userAllowsSendUsageTime = YES; } - if (!hockeyBundle()) { + if (!BITHockeySDKBundle()) { NSLog(@"WARNING: Hockey.bundle is missing, make sure it is added!"); } - [self loadAppCache_]; + [self loadAppCache]; [self startUsage]; + + NSNotificationCenter *dnc = [NSNotificationCenter defaultCenter]; + [dnc addObserver:self selector:@selector(startManager) name:BITHockeyNetworkDidBecomeReachableNotification object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(startManager) - name:BWHockeyNetworkBecomeReachable - object:nil]; - - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(stopUsage) - name:UIApplicationWillTerminateNotification - object:nil]; + [dnc addObserver:self selector:@selector(stopUsage) name:UIApplicationWillTerminateNotification object:nil]; + [dnc addObserver:self selector:@selector(startUsage) name:UIApplicationDidBecomeActiveNotification object:nil]; + [dnc addObserver:self selector:@selector(stopUsage) name:UIApplicationWillResignActiveNotification object:nil]; } return self; } - (void)dealloc { - [[NSNotificationCenter defaultCenter] removeObserver:self name:BWHockeyNetworkBecomeReachable object:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self name:BITHockeyNetworkDidBecomeReachableNotification object:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillTerminateNotification object:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillResignActiveNotification object:nil]; - BW_IF_IOS4_OR_GREATER( - [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil]; - [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillResignActiveNotification object:nil]; - ) - self.delegate = nil; + _delegate = nil; - [urlConnection_ cancel]; + [_urlConnection cancel]; self.urlConnection = nil; - [navController_ release]; - [authorizeView_ release]; - [currentHockeyViewController_ release]; - [updateURL_ release]; - [apps_ release]; - [receivedData_ release]; - [lastCheck_ release]; - [usageStartTimestamp_ release]; - [authenticationSecret_ release]; + [_navController release]; + [_authorizeView release]; + [_currentHockeyViewController release]; + [_appVersions release]; + [_receivedData release]; + [_lastCheck release]; + [_usageStartTimestamp release]; + [_authenticationSecret release]; [super dealloc]; } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark BetaUpdateUI -- (BWHockeyViewController *)hockeyViewController:(BOOL)modal { - return [[[BWHockeyViewController alloc] init:self modal:modal] autorelease]; +#pragma mark - BetaUpdateUI + +- (BITUpdateViewController *)hockeyViewController:(BOOL)modal { + return [[[BITUpdateViewController alloc] init:self modal:modal] autorelease]; } - (void)showUpdateView { - if (isAppStoreEnvironment_) { + if (_isAppStoreEnvironment) { NSLog(@"this should not be called from an app store build."); return; } - if (currentHockeyViewController_) { - BWHockeyLog(@"update view already visible, aborting"); + if (_currentHockeyViewController) { + BITHockeySDKLog(@"update view already visible, aborting"); return; } UIViewController *parentViewController = nil; - if ([[self delegate] respondsToSelector:@selector(viewControllerForHockeyController:)]) { - parentViewController = [[self delegate] viewControllerForHockeyController:self]; + if ([[self delegate] respondsToSelector:@selector(viewControllerForUpdateManager:)]) { + parentViewController = [_delegate viewControllerForUpdateManager:self]; } UIWindow *visibleWindow = [self findVisibleWindow]; @@ -511,65 +447,63 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; parentViewController = [[NSClassFromString(@"TTNavigator") performSelector:(NSSelectorFromString(@"navigator"))] visibleViewController]; } - if (navController_ != nil) [navController_ release]; + if (_navController != nil) [_navController release]; - BWHockeyViewController *hockeyViewController = [self hockeyViewController:YES]; - navController_ = [[UINavigationController alloc] initWithRootViewController:hockeyViewController]; - navController_.navigationBar.barStyle = barStyle_; - navController_.modalPresentationStyle = modalPresentationStyle_; + BITUpdateViewController *hockeyViewController = [self hockeyViewController:YES]; + _navController = [[UINavigationController alloc] initWithRootViewController:hockeyViewController]; + _navController.navigationBar.barStyle = _barStyle; + _navController.modalPresentationStyle = _modalPresentationStyle; if (parentViewController) { - if ([navController_ respondsToSelector:@selector(setModalTransitionStyle:)]) { - navController_.modalTransitionStyle = UIModalTransitionStyleCoverVertical; + if ([_navController respondsToSelector:@selector(setModalTransitionStyle:)]) { + _navController.modalTransitionStyle = UIModalTransitionStyleCoverVertical; } // page sheet for the iPad - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad && [navController_ respondsToSelector:@selector(setModalPresentationStyle:)]) { - navController_.modalPresentationStyle = UIModalPresentationFormSheet; + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad && [_navController respondsToSelector:@selector(setModalPresentationStyle:)]) { + _navController.modalPresentationStyle = UIModalPresentationFormSheet; } hockeyViewController.modalAnimated = YES; - [parentViewController presentModalViewController:navController_ animated:YES]; + [parentViewController presentModalViewController:_navController animated:YES]; } else { // if not, we add a subview to the window. A bit hacky but should work in most circumstances. // Also, we don't get a nice animation for free, but hey, this is for beta not production users ;) - BWHockeyLog(@"No rootViewController found, using UIWindow-approach: %@", visibleWindow); + NSLog(@"Warning: No rootViewController found and no view controller set via delegate, using UIWindow-approach: %@", visibleWindow); hockeyViewController.modalAnimated = NO; - [visibleWindow addSubview:navController_.view]; + [visibleWindow addSubview:_navController.view]; } } -- (void)showCheckForUpdateAlert_ { - if (isAppStoreEnvironment_) return; +- (void)showCheckForUpdateAlert { + if (_isAppStoreEnvironment) return; - if (!updateAlertShowing_) { + if (!_updateAlertShowing) { if ([self hasNewerMandatoryVersion]) { - UIAlertView *alertView = [[[UIAlertView alloc] initWithTitle:BWHockeyLocalize(@"HockeyUpdateAvailable") - message:[NSString stringWithFormat:BWHockeyLocalize(@"HockeyUpdateAlertMandatoryTextWithAppVersion"), [self.app nameAndVersionString]] + UIAlertView *alertView = [[[UIAlertView alloc] initWithTitle:BITHockeySDKLocalizedString(@"UpdateAvailable") + message:[NSString stringWithFormat:BITHockeySDKLocalizedString(@"UpdateAlertMandatoryTextWithAppVersion"), [self.newestAppVersion nameAndVersionString]] delegate:self - cancelButtonTitle:BWHockeyLocalize(@"HockeyInstallUpdate") + cancelButtonTitle:BITHockeySDKLocalizedString(@"UpdateInstall") otherButtonTitles:nil ] autorelease]; [alertView setTag:2]; [alertView show]; - updateAlertShowing_ = YES; + _updateAlertShowing = YES; } else { - UIAlertView *alertView = [[[UIAlertView alloc] initWithTitle:BWHockeyLocalize(@"HockeyUpdateAvailable") - message:[NSString stringWithFormat:BWHockeyLocalize(@"HockeyUpdateAlertTextWithAppVersion"), [self.app nameAndVersionString]] + UIAlertView *alertView = [[[UIAlertView alloc] initWithTitle:BITHockeySDKLocalizedString(@"UpdateAvailable") + message:[NSString stringWithFormat:BITHockeySDKLocalizedString(@"UpdateAlertTextWithAppVersion"), [self.newestAppVersion nameAndVersionString]] delegate:self - cancelButtonTitle:BWHockeyLocalize(@"HockeyIgnore") - otherButtonTitles:BWHockeyLocalize(@"HockeyShowUpdate"), nil + cancelButtonTitle:BITHockeySDKLocalizedString(@"UpdateIgnore") + otherButtonTitles:BITHockeySDKLocalizedString(@"UpdateShow"), nil ] autorelease]; - BW_IF_IOS4_OR_GREATER( - if (self.isShowingDirectInstallOption) { - [alertView addButtonWithTitle:BWHockeyLocalize(@"HockeyInstallUpdate")]; - } - ) + if (self.isShowingDirectInstallOption) { + [alertView addButtonWithTitle:BITHockeySDKLocalizedString(@"UpdateInstall")]; + } [alertView setTag:0]; [alertView show]; - updateAlertShowing_ = YES; + _updateAlertShowing = YES; } } } @@ -601,13 +535,13 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; CGRect frame = [visibleWindow frame]; self.authorizeView = [[[UIView alloc] initWithFrame:frame] autorelease]; - UIImageView *backgroundView = [[[UIImageView alloc] initWithImage:[UIImage bw_imageNamed:@"bg.png" bundle:kHockeyBundleName]] autorelease]; + UIImageView *backgroundView = [[[UIImageView alloc] initWithImage:[UIImage BIT_imageNamed:@"bg.png" bundle:BITHOCKEYSDK_BUNDLE]] autorelease]; backgroundView.contentMode = UIViewContentModeScaleAspectFill; backgroundView.frame = frame; [self.authorizeView addSubview:backgroundView]; if (image != nil) { - UIImageView *imageView = [[[UIImageView alloc] initWithImage:[UIImage bw_imageNamed:image bundle:kHockeyBundleName]] autorelease]; + UIImageView *imageView = [[[UIImageView alloc] initWithImage:[UIImage BIT_imageNamed:image bundle:BITHOCKEYSDK_BUNDLE]] autorelease]; imageView.contentMode = UIViewContentModeCenter; imageView.frame = frame; [self.authorizeView addSubview:imageView]; @@ -632,9 +566,7 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark JSONParsing +#pragma mark - JSONParsing - (id)parseJSONResultString:(NSString *)jsonString { NSError *error = nil; @@ -643,7 +575,7 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; if (!jsonString) return nil; -#if BW_NATIVE_JSON_AVAILABLE +#if BITHOCKEYSDK_NATIVE_JSON_AVAILABLE feedResult = [NSJSONSerialization JSONObjectWithData:[jsonString dataUsingEncoding:NSUTF8StringEncoding] options:kNilOptions error:&error]; #else id nsjsonClass = NSClassFromString(@"NSJSONSerialization"); @@ -696,31 +628,31 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; [invocation invoke]; [invocation getReturnValue:&feedResult]; } else { - error = [NSError errorWithDomain:kHockeyErrorDomain - code:HockeyAPIServerReturnedEmptyResponse + error = [NSError errorWithDomain:kBITUpdateErrorDomain + code:BITUpdateAPIServerReturnedEmptyResponse userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"You need a JSON Framework in your runtime for iOS4!", NSLocalizedDescriptionKey, nil]]; } #endif if (error) { - [self reportError_:error]; + [self reportError:error]; return nil; } return feedResult; } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark RequestComments + +#pragma mark - RequestComments - (BOOL)shouldCheckForUpdates { BOOL checkForUpdate = NO; + switch (self.updateSetting) { - case HockeyUpdateCheckStartup: + case BITUpdateCheckStartup: checkForUpdate = YES; break; - case HockeyUpdateCheckDaily: { + case BITUpdateCheckDaily: { NSTimeInterval dateDiff = fabs([self.lastCheck timeIntervalSinceNow]); if (dateDiff != 0) dateDiff = dateDiff / (60*60*24); @@ -728,28 +660,29 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; checkForUpdate = (dateDiff >= 1); break; } - case HockeyUpdateCheckManually: + case BITUpdateCheckManually: checkForUpdate = NO; break; default: break; } + return checkForUpdate; } - (void)checkForAuthorization { - NSMutableString *parameter = [NSMutableString stringWithFormat:@"api/2/apps/%@", [self encodedAppIdentifier_]]; + NSMutableString *parameter = [NSMutableString stringWithFormat:@"api/2/apps/%@", [self encodedAppIdentifier]]; [parameter appendFormat:@"?format=json&authorize=yes&app_version=%@&udid=%@&sdk=%@&sdk_version=%@", - [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] bw_URLEncodedString], - ([self isAppStoreEnvironment] ? @"appstore" : [[self deviceIdentifier] bw_URLEncodedString]), - SDK_NAME, - SDK_VERSION + [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] bit_URLEncodedString], + (_isAppStoreEnvironment ? @"appstore" : [[self deviceIdentifier] bit_URLEncodedString]), + BITHOCKEYSDK_NAME, + BITHOCKEYSDK_VERSION ]; // build request & send - NSString *url = [NSString stringWithFormat:@"%@%@", self.updateURL, parameter]; - BWHockeyLog(@"sending api request to %@", url); + NSString *url = [NSString stringWithFormat:@"%@%@", BITHOCKEYSDK_URL, parameter]; + BITHockeySDKLog(@"sending api request to %@", url); NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:1 timeoutInterval:10.0]; [request setHTTPMethod:@"GET"]; @@ -768,19 +701,20 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; // server returned empty response? if (![feedDict count]) { - [self reportError_:[NSError errorWithDomain:kHockeyErrorDomain code:HockeyAPIServerReturnedEmptyResponse userInfo: - [NSDictionary dictionaryWithObjectsAndKeys:@"Server returned empty response.", NSLocalizedDescriptionKey, nil]]]; + [self reportError:[NSError errorWithDomain:kBITUpdateErrorDomain + code:BITUpdateAPIServerReturnedEmptyResponse + userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"Server returned empty response.", NSLocalizedDescriptionKey, nil]]]; return; } else { - BWHockeyLog(@"Received API response: %@", responseString); + BITHockeySDKLog(@"Received API response: %@", responseString); NSString *token = [[feedDict objectForKey:@"authcode"] lowercaseString]; failed = NO; if ([[self authenticationToken] compare:token] == NSOrderedSame) { // identical token, activate this version // store the new data - [[NSUserDefaults standardUserDefaults] setObject:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] forKey:kHockeyAuthorizedVersion]; - [[NSUserDefaults standardUserDefaults] setObject:token forKey:kHockeyAuthorizedToken]; + [[NSUserDefaults standardUserDefaults] setObject:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] forKey:kBITUpdateAuthorizedVersion]; + [[NSUserDefaults standardUserDefaults] setObject:token forKey:kBITUpdateAuthorizedVersion]; [[NSUserDefaults standardUserDefaults] synchronize]; self.requireAuthorization = NO; @@ -792,29 +726,30 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; } } else { // different token, block this version - BWHockeyLog(@"AUTH FAILURE: %@", [self authenticationToken]); + BITHockeySDKLog(@"AUTH FAILURE: %@", [self authenticationToken]); // store the new data - [[NSUserDefaults standardUserDefaults] setObject:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] forKey:kHockeyAuthorizedVersion]; - [[NSUserDefaults standardUserDefaults] setObject:token forKey:kHockeyAuthorizedToken]; + [[NSUserDefaults standardUserDefaults] setObject:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] forKey:kBITUpdateAuthorizedVersion]; + [[NSUserDefaults standardUserDefaults] setObject:token forKey:kBITUpdateAuthorizedVersion]; [[NSUserDefaults standardUserDefaults] synchronize]; - [self showAuthorizationScreen:BWHockeyLocalize(@"HockeyAuthorizationDenied") image:@"authorize_denied.png"]; + [self showAuthorizationScreen:BITHockeySDKLocalizedString(@"UpdateAuthorizationDenied") image:@"authorize_denied.png"]; } } } if (failed) { - [self showAuthorizationScreen:BWHockeyLocalize(@"HockeyAuthorizationOffline") image:@"authorize_request.png"]; + [self showAuthorizationScreen:BITHockeySDKLocalizedString(@"UpdateAuthorizationOffline") image:@"authorize_request.png"]; } } - (void)checkForUpdate { - if (!updateURL_) return; + if (_isAppStoreEnvironment && !_checkForTracker) return; + if (self.requireAuthorization) return; if (self.isUpdateAvailable && [self hasNewerMandatoryVersion]) { - [self showCheckForUpdateAlert_]; + [self showCheckForUpdateAlert]; } [self checkForUpdateShowFeedback:NO]; } @@ -822,34 +757,34 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; - (void)checkForUpdateShowFeedback:(BOOL)feedback { if (self.isCheckInProgress) return; - showFeedback_ = feedback; + _showFeedback = feedback; self.checkInProgress = YES; // do we need to update? - if (![self shouldCheckForUpdates] && !currentHockeyViewController_) { - BWHockeyLog(@"update not needed right now"); + if (![self shouldCheckForUpdates] && !_currentHockeyViewController) { + BITHockeySDKLog(@"update not needed right now"); self.checkInProgress = NO; return; } NSMutableString *parameter = [NSMutableString stringWithFormat:@"api/2/apps/%@?format=json&udid=%@&sdk=%@&sdk_version=%@", - [[self encodedAppIdentifier_] bw_URLEncodedString], - ([self isAppStoreEnvironment] ? @"appstore" : [[self deviceIdentifier] bw_URLEncodedString]), - SDK_NAME, - SDK_VERSION]; + [[self encodedAppIdentifier] bit_URLEncodedString], + (_isAppStoreEnvironment ? @"appstore" : [[self deviceIdentifier] bit_URLEncodedString]), + BITHOCKEYSDK_NAME, + BITHOCKEYSDK_VERSION]; // add additional statistics if user didn't disable flag if ([self canSendUserData]) { [parameter appendFormat:@"&app_version=%@&os=iOS&os_version=%@&device=%@&lang=%@&first_start_at=%@", - [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] bw_URLEncodedString], - [[[UIDevice currentDevice] systemVersion] bw_URLEncodedString], - [[self getDevicePlatform_] bw_URLEncodedString], - [[[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0] bw_URLEncodedString], - [[self installationDateString] bw_URLEncodedString] + [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] bit_URLEncodedString], + [[[UIDevice currentDevice] systemVersion] bit_URLEncodedString], + [[self getDevicePlatform] bit_URLEncodedString], + [[[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0] bit_URLEncodedString], + [[self installationDateString] bit_URLEncodedString] ]; if ([self canSendUsageTime]) { [parameter appendFormat:@"&usage_time=%@", - [[self currentUsageString] bw_URLEncodedString] + [[self currentUsageString] bit_URLEncodedString] ]; } } @@ -859,8 +794,8 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; } // build request & send - NSString *url = [NSString stringWithFormat:@"%@%@", self.updateURL, parameter]; - BWHockeyLog(@"sending api request to %@", url); + NSString *url = [NSString stringWithFormat:@"%@%@", BITHOCKEYSDK_URL, parameter]; + BITHockeySDKLog(@"sending api request to %@", url); NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:1 timeoutInterval:10.0]; [request setHTTPMethod:@"GET"]; @@ -868,31 +803,24 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; [request setValue:@"gzip" forHTTPHeaderField:@"Accept-Encoding"]; self.urlConnection = [[[NSURLConnection alloc] initWithRequest:request delegate:self] autorelease]; - if (!urlConnection_) { + if (!_urlConnection) { self.checkInProgress = NO; - [self reportError_:[NSError errorWithDomain:kHockeyErrorDomain code:HockeyAPIClientCannotCreateConnection userInfo: - [NSDictionary dictionaryWithObjectsAndKeys:@"Url Connection could not be created.", NSLocalizedDescriptionKey, nil]]]; + [self reportError:[NSError errorWithDomain:kBITUpdateErrorDomain + code:BITUpdateAPIClientCannotCreateConnection + userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"Url Connection could not be created.", NSLocalizedDescriptionKey, nil]]]; } } - (BOOL)initiateAppDownload { - if ([self isAppStoreEnvironment]) return NO; + if (_isAppStoreEnvironment) return NO; if (!self.isUpdateAvailable) { - BWHockeyLog(@"Warning: No update available. Aborting."); + BITHockeySDKLog(@"Warning: No update available. Aborting."); return NO; } - BW_IF_PRE_IOS4 - ( - NSString *message = [NSString stringWithFormat:BWHockeyLocalize(@"HockeyiOS3Message"), self.updateURL]; - UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:BWHockeyLocalize(@"HockeyWarning") message:message delegate:nil cancelButtonTitle:BWHockeyLocalize(@"HockeyOK") otherButtonTitles:nil] autorelease]; - [alert show]; - return NO; - ) - #if TARGET_IPHONE_SIMULATOR - UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:BWHockeyLocalize(@"HockeyWarning") message:BWHockeyLocalize(@"HockeySimulatorMessage") delegate:nil cancelButtonTitle:BWHockeyLocalize(@"HockeyOK") otherButtonTitles:nil] autorelease]; + UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:hockeySDKLocalizedString(@"UpdateWarning") message:hockeySDKLocalizedString(@"UpdateSimulatorMessage") delegate:nil cancelButtonTitle:hockeySDKLocalizedString(@"HockeyOK") otherButtonTitles:nil] autorelease]; [alert show]; return NO; #endif @@ -902,21 +830,22 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; extraParameter = [NSString stringWithFormat:@"&udid=%@", [self deviceIdentifier]]; } - NSString *hockeyAPIURL = [NSString stringWithFormat:@"%@api/2/apps/%@?format=plist%@", self.updateURL, [self encodedAppIdentifier_], extraParameter]; - NSString *iOSUpdateURL = [NSString stringWithFormat:@"itms-services://?action=download-manifest&url=%@", [hockeyAPIURL bw_URLEncodedString]]; + NSString *hockeyAPIURL = [NSString stringWithFormat:@"%@api/2/apps/%@?format=plist%@", BITHOCKEYSDK_URL, [self encodedAppIdentifier], extraParameter]; + NSString *iOSUpdateURL = [NSString stringWithFormat:@"itms-services://?action=download-manifest&url=%@", [hockeyAPIURL bit_URLEncodedString]]; - BWHockeyLog(@"API Server Call: %@, calling iOS with %@", hockeyAPIURL, iOSUpdateURL); + BITHockeySDKLog(@"API Server Call: %@, calling iOS with %@", hockeyAPIURL, iOSUpdateURL); BOOL success = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:iOSUpdateURL]]; - BWHockeyLog(@"System returned: %d", success); + BITHockeySDKLog(@"System returned: %d", success); return success; } // checks wether this app version is authorized - (BOOL)appVersionIsAuthorized { - if (self.requireAuthorization && !authenticationSecret_) { - [self reportError_:[NSError errorWithDomain:kHockeyErrorDomain code:HockeyAPIClientAuthorizationMissingSecret userInfo: - [NSDictionary dictionaryWithObjectsAndKeys:@"Authentication secret is not set but required.", NSLocalizedDescriptionKey, nil]]]; + if (self.requireAuthorization && !_authenticationSecret) { + [self reportError:[NSError errorWithDomain:kBITUpdateErrorDomain + code:BITUpdateAPIClientAuthorizationMissingSecret + userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"Authentication secret is not set but required.", NSLocalizedDescriptionKey, nil]]]; return NO; } @@ -926,10 +855,10 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; return YES; } - HockeyAuthorizationState state = [self authorizationState]; - if (state == HockeyAuthorizationDenied) { - [self showAuthorizationScreen:BWHockeyLocalize(@"HockeyAuthorizationDenied") image:@"authorize_denied.png"]; - } else if (state == HockeyAuthorizationAllowed) { + BITUpdateAuthorizationState state = [self authorizationState]; + if (state == BITUpdateAuthorizationDenied) { + [self showAuthorizationScreen:BITHockeySDKLocalizedString(@"UpdateAuthorizationDenied") image:@"authorize_denied.png"]; + } else if (state == BITUpdateAuthorizationAllowed) { self.requireAuthorization = NO; return YES; } @@ -941,25 +870,22 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; // begin the startup process - (void)startManager { if (![self appVersionIsAuthorized]) { - if ([self authorizationState] == HockeyAuthorizationPending) { - [self showAuthorizationScreen:BWHockeyLocalize(@"HockeyAuthorizationProgress") image:@"authorize_request.png"]; + if ([self authorizationState] == BITUpdateAuthorizationPending) { + [self showAuthorizationScreen:BITHockeySDKLocalizedString(@"UpdateAuthorizationProgress") image:@"authorize_request.png"]; [self performSelector:@selector(checkForAuthorization) withObject:nil afterDelay:0.0f]; } } else { if ([self shouldCheckForUpdates]) { - [self performSelector:@selector(checkForUpdate) withObject:nil afterDelay:0.0f]; + [self performSelector:@selector(checkForUpdate) withObject:nil afterDelay:1.0f]; } } } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSURLRequest +#pragma mark - NSURLRequest - (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse { - [self connectionOpened_]; NSURLRequest *newRequest = request; if (redirectResponse) { newRequest = nil; @@ -973,42 +899,40 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; if (statusCode == 404) { [connection cancel]; // stop connecting; no more delegate messages NSString *errorStr = [NSString stringWithFormat:@"Hockey API received HTTP Status Code %d", statusCode]; - [self connectionClosed_]; - [self reportError_:[NSError errorWithDomain:kHockeyErrorDomain code:HockeyAPIServerReturnedInvalidStatus userInfo: - [NSDictionary dictionaryWithObjectsAndKeys:errorStr, NSLocalizedDescriptionKey, nil]]]; + [self reportError:[NSError errorWithDomain:kBITUpdateErrorDomain + code:BITUpdateAPIServerReturnedInvalidStatus + userInfo:[NSDictionary dictionaryWithObjectsAndKeys:errorStr, NSLocalizedDescriptionKey, nil]]]; return; } } self.receivedData = [NSMutableData data]; - [receivedData_ setLength:0]; + [_receivedData setLength:0]; } - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { - [receivedData_ appendData:data]; + [_receivedData appendData:data]; } - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { - [self connectionClosed_]; self.receivedData = nil; self.urlConnection = nil; self.checkInProgress = NO; - [self reportError_:error]; + [self reportError:error]; } // api call returned, parsing - (void)connectionDidFinishLoading:(NSURLConnection *)connection { - [self connectionClosed_]; self.checkInProgress = NO; if ([self.receivedData length]) { - NSString *responseString = [[[NSString alloc] initWithBytes:[receivedData_ bytes] length:[receivedData_ length] encoding: NSUTF8StringEncoding] autorelease]; - BWHockeyLog(@"Received API response: %@", responseString); + NSString *responseString = [[[NSString alloc] initWithBytes:[_receivedData bytes] length:[_receivedData length] encoding: NSUTF8StringEncoding] autorelease]; + BITHockeySDKLog(@"Received API response: %@", responseString); id json = [self parseJSONResultString:responseString]; self.trackerConfig = (([self checkForTracker] && [[json valueForKey:@"tracker"] isKindOfClass:[NSDictionary class]]) ? [json valueForKey:@"tracker"] : nil); - if (![self isAppStoreEnvironment]) { + if (!_isAppStoreEnvironment) { NSArray *feedArray = (NSArray *)([self checkForTracker] ? [json valueForKey:@"versions"] : json); self.receivedData = nil; @@ -1019,72 +943,79 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; // server returned empty response? if (![feedArray count]) { - [self reportError_:[NSError errorWithDomain:kHockeyErrorDomain code:HockeyAPIServerReturnedEmptyResponse userInfo: - [NSDictionary dictionaryWithObjectsAndKeys:@"Server returned empty response.", NSLocalizedDescriptionKey, nil]]]; + [self reportError:[NSError errorWithDomain:kBITUpdateErrorDomain + code:BITUpdateAPIServerReturnedEmptyResponse + userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"Server returned empty response.", NSLocalizedDescriptionKey, nil]]]; return; } else { - lastCheckFailed_ = NO; + _lastCheckFailed = NO; } - NSString *currentAppCacheVersion = [[[self app].version copy] autorelease]; + NSString *currentAppCacheVersion = [[[self newestAppVersion].version copy] autorelease]; // clear cache and reload with new data - NSMutableArray *tmpApps = [NSMutableArray arrayWithCapacity:[feedArray count]]; + NSMutableArray *tmpAppVersions = [NSMutableArray arrayWithCapacity:[feedArray count]]; for (NSDictionary *dict in feedArray) { - BWApp *app = [BWApp appFromDict:dict]; - if ([app isValid]) { - [tmpApps addObject:app]; + BITAppVersionMetaInfo *appVersionMetaInfo = [BITAppVersionMetaInfo appVersionMetaInfoFromDict:dict]; + if ([appVersionMetaInfo isValid]) { + [tmpAppVersions addObject:appVersionMetaInfo]; } else { - [self reportError_:[NSError errorWithDomain:kHockeyErrorDomain code:HockeyAPIServerReturnedInvalidData userInfo: - [NSDictionary dictionaryWithObjectsAndKeys:@"Invalid data received from server.", NSLocalizedDescriptionKey, nil]]]; + [self reportError:[NSError errorWithDomain:kBITUpdateErrorDomain + code:BITUpdateAPIServerReturnedInvalidData + userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"Invalid data received from server.", NSLocalizedDescriptionKey, nil]]]; } } // only set if different! - if (![self.apps isEqualToArray:tmpApps]) { - self.apps = [[tmpApps copy] autorelease]; + if (![self.appVersions isEqualToArray:tmpAppVersions]) { + self.appVersions = [[tmpAppVersions copy] autorelease]; } - [self saveAppCache_]; + [self saveAppCache]; - [self checkUpdateAvailable_]; - BOOL newVersionDiffersFromCachedVersion = ![self.app.version isEqualToString:currentAppCacheVersion]; + [self checkUpdateAvailable]; + BOOL newVersionDiffersFromCachedVersion = ![self.newestAppVersion.version isEqualToString:currentAppCacheVersion]; // show alert if we are on the latest & greatest - if (showFeedback_ && !self.isUpdateAvailable) { + if (_showFeedback && !self.isUpdateAvailable) { // use currentVersionString, as version still may differ (e.g. server: 1.2, client: 1.3) NSString *versionString = [self currentAppVersion]; NSString *shortVersionString = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; shortVersionString = shortVersionString ? [NSString stringWithFormat:@"%@ ", shortVersionString] : @""; versionString = [shortVersionString length] ? [NSString stringWithFormat:@"(%@)", versionString] : versionString; - NSString *currentVersionString = [NSString stringWithFormat:@"%@ %@ %@%@", self.app.name, BWHockeyLocalize(@"HockeyVersion"), shortVersionString, versionString]; - NSString *alertMsg = [NSString stringWithFormat:BWHockeyLocalize(@"HockeyNoUpdateNeededMessage"), currentVersionString]; - UIAlertView *alert = [[UIAlertView alloc] initWithTitle:BWHockeyLocalize(@"HockeyNoUpdateNeededTitle") message:alertMsg delegate:nil cancelButtonTitle:BWHockeyLocalize(@"HockeyOK") otherButtonTitles:nil]; + NSString *currentVersionString = [NSString stringWithFormat:@"%@ %@ %@%@", self.newestAppVersion.name, BITHockeySDKLocalizedString(@"UpdateVersion"), shortVersionString, versionString]; + NSString *alertMsg = [NSString stringWithFormat:BITHockeySDKLocalizedString(@"UpdateNoUpdateAvailableMessage"), currentVersionString]; + UIAlertView *alert = [[UIAlertView alloc] initWithTitle:BITHockeySDKLocalizedString(@"UpdateNoUpdateAvailableTitle") + message:alertMsg + delegate:nil + cancelButtonTitle:BITHockeySDKLocalizedString(@"HockeyOK") + otherButtonTitles:nil]; [alert show]; [alert release]; } if (self.isUpdateAvailable && (self.alwaysShowUpdateReminder || newVersionDiffersFromCachedVersion || [self hasNewerMandatoryVersion])) { - if (updateAvailable_ && !currentHockeyViewController_) { - [self showCheckForUpdateAlert_]; + if (_updateAvailable && !_currentHockeyViewController) { + [self showCheckForUpdateAlert]; } } - showFeedback_ = NO; + _showFeedback = NO; } } else { - [self reportError_:[NSError errorWithDomain:kHockeyErrorDomain code:HockeyAPIServerReturnedEmptyResponse userInfo: - [NSDictionary dictionaryWithObjectsAndKeys:@"Server returned an empty response.", NSLocalizedDescriptionKey, nil]]]; + [self reportError:[NSError errorWithDomain:kBITUpdateErrorDomain + code:BITUpdateAPIServerReturnedEmptyResponse + userInfo:[NSDictionary dictionaryWithObjectsAndKeys:@"Server returned an empty response.", NSLocalizedDescriptionKey, nil]]]; } } - (BOOL)hasNewerMandatoryVersion { BOOL result = NO; - for (BWApp *app in self.apps) { - if ([app.version isEqualToString:self.currentAppVersion] || [app.version versionCompare:self.currentAppVersion] == NSOrderedAscending) { + for (BITAppVersionMetaInfo *appVersion in self.appVersions) { + if ([appVersion.version isEqualToString:self.currentAppVersion] || [appVersion.version versionCompare:self.currentAppVersion] == NSOrderedAscending) { break; } - if ([app.mandatory boolValue]) { + if ([appVersion.mandatory boolValue]) { result = YES; } } @@ -1092,154 +1023,115 @@ static NSString *kHockeyErrorDomain = @"HockeyErrorDomain"; return result; } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Properties -- (void)setCurrentHockeyViewController:(BWHockeyViewController *)aCurrentHockeyViewController { - if (currentHockeyViewController_ != aCurrentHockeyViewController) { - [currentHockeyViewController_ release]; - currentHockeyViewController_ = [aCurrentHockeyViewController retain]; - //BWHockeyLog(@"active hockey view controller: %@", aCurrentHockeyViewController); - } -} +#pragma mark - Properties -- (void)setUpdateURL:(NSString *)anUpdateURL { - // ensure url ends with a trailing slash - if (![anUpdateURL hasSuffix:@"/"]) { - anUpdateURL = [NSString stringWithFormat:@"%@/", anUpdateURL]; +- (void)setCurrentHockeyViewController:(BITUpdateViewController *)aCurrentHockeyViewController { + if (_currentHockeyViewController != aCurrentHockeyViewController) { + [_currentHockeyViewController release]; + _currentHockeyViewController = [aCurrentHockeyViewController retain]; + //HockeySDKLog(@"active hockey view controller: %@", aCurrentHockeyViewController); } - - BW_IF_IOS4_OR_GREATER( - // register/deregister logic - NSNotificationCenter *dnc = [NSNotificationCenter defaultCenter]; - if (!updateURL_ && anUpdateURL) { - [dnc addObserver:self selector:@selector(startUsage) name:UIApplicationDidBecomeActiveNotification object:nil]; - [dnc addObserver:self selector:@selector(stopUsage) name:UIApplicationWillResignActiveNotification object:nil]; - } else if (updateURL_ && !anUpdateURL) { - [dnc removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil]; - [dnc removeObserver:self name:UIApplicationWillResignActiveNotification object:nil]; - } - ) - - if (updateURL_ != anUpdateURL) { - [updateURL_ release]; - updateURL_ = [anUpdateURL copy]; - } - - [self performSelector:@selector(startManager) withObject:nil afterDelay:0.0f]; -} - -- (void)setAppIdentifier:(NSString *)anAppIdentifier { - if (appIdentifier_ != anAppIdentifier) { - [appIdentifier_ release]; - appIdentifier_ = [anAppIdentifier copy]; - } - - [self setUpdateURL:@"https://sdk.hockeyapp.net/"]; } - (void)setCheckForUpdateOnLaunch:(BOOL)flag { - if (checkForUpdateOnLaunch_ != flag) { - checkForUpdateOnLaunch_ = flag; - BW_IF_IOS4_OR_GREATER( - NSNotificationCenter *dnc = [NSNotificationCenter defaultCenter]; - if (flag) { - [dnc addObserver:self selector:@selector(checkForUpdate) name:UIApplicationDidBecomeActiveNotification object:nil]; - } else { - [dnc removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil]; - } - ) + if (_checkForUpdateOnLaunch != flag) { + _checkForUpdateOnLaunch = flag; + NSNotificationCenter *dnc = [NSNotificationCenter defaultCenter]; + if (flag) { + [dnc addObserver:self selector:@selector(checkForUpdate) name:UIApplicationDidBecomeActiveNotification object:nil]; + } else { + [dnc removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil]; + } } } - (void)setUserAllowsSendUserData:(BOOL)flag { - userAllowsSendUserData_ = flag; + _userAllowsSendUserData = flag; - [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:userAllowsSendUserData_] forKey:kHockeyAllowUserSetting]; + [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:_userAllowsSendUserData] forKey:kBITUpdateAllowUserSetting]; [[NSUserDefaults standardUserDefaults] synchronize]; } - (void)setUserAllowsSendUsageTime:(BOOL)flag { - userAllowsSendUsageTime_ = flag; + _userAllowsSendUsageTime = flag; - [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:userAllowsSendUsageTime_] forKey:kHockeyAllowUsageSetting]; + [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:_userAllowsSendUsageTime] forKey:kBITUpdateAllowUsageSetting]; [[NSUserDefaults standardUserDefaults] synchronize]; } - (NSString *)currentAppVersion { - return currentAppVersion_; + return _currentAppVersion; } -- (void)setUpdateSetting:(HockeyUpdateSetting)anUpdateSetting { - if (anUpdateSetting > HockeyUpdateCheckManually) { - updateSetting_ = HockeyUpdateCheckStartup; +- (void)setUpdateSetting:(BITUpdateSetting)anUpdateSetting { + if (anUpdateSetting > BITUpdateCheckManually) { + _updateSetting = BITUpdateCheckStartup; } - updateSetting_ = anUpdateSetting; - [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:updateSetting_] forKey:kHockeyAutoUpdateSetting]; + _updateSetting = anUpdateSetting; + [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInteger:_updateSetting] forKey:kBITUpdateAutoUpdateSetting]; [[NSUserDefaults standardUserDefaults] synchronize]; } - (void)setLastCheck:(NSDate *)aLastCheck { - if (lastCheck_ != aLastCheck) { - [lastCheck_ release]; - lastCheck_ = [aLastCheck copy]; + if (_lastCheck != aLastCheck) { + [_lastCheck release]; + _lastCheck = [aLastCheck copy]; - [[NSUserDefaults standardUserDefaults] setObject:lastCheck_ forKey:kDateOfLastHockeyCheck]; + [[NSUserDefaults standardUserDefaults] setObject:_lastCheck forKey:kBITUpdateDateOfLastCheck]; [[NSUserDefaults standardUserDefaults] synchronize]; } } -- (void)setApps:(NSArray *)anApps { - if (apps_ != anApps || !apps_) { - [apps_ release]; - [self willChangeValueForKey:@"apps"]; +- (void)setAppVersions:(NSArray *)anAppVersions { + if (_appVersions != anAppVersions || !_appVersions) { + [_appVersions release]; + [self willChangeValueForKey:@"appVersions"]; // populate with default values (if empty) - if (![anApps count]) { - BWApp *defaultApp = [[[BWApp alloc] init] autorelease]; + if (![anAppVersions count]) { + BITAppVersionMetaInfo *defaultApp = [[[BITAppVersionMetaInfo alloc] init] autorelease]; defaultApp.name = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"]; - defaultApp.version = currentAppVersion_; + defaultApp.version = _currentAppVersion; defaultApp.shortVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; - apps_ = [[NSArray arrayWithObject:defaultApp] retain]; - }else { - apps_ = [anApps copy]; + _appVersions = [[NSArray arrayWithObject:defaultApp] retain]; + } else { + _appVersions = [anAppVersions copy]; } - [self didChangeValueForKey:@"apps"]; + [self didChangeValueForKey:@"appVersions"]; } } -- (BWApp *)app { - BWApp *app = [apps_ objectAtIndex:0]; - return app; +- (BITAppVersionMetaInfo *)newestAppVersion { + BITAppVersionMetaInfo *appVersion = [_appVersions objectAtIndex:0]; + return appVersion; } - (void)setAuthorizeView:(UIView *)anAuthorizeView { - if (authorizeView_ != anAuthorizeView) { - [authorizeView_ removeFromSuperview]; - [authorizeView_ release]; - authorizeView_ = [anAuthorizeView retain]; + if (_authorizeView != anAuthorizeView) { + [_authorizeView removeFromSuperview]; + [_authorizeView release]; + _authorizeView = [anAuthorizeView retain]; } } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIAlertViewDelegate + +#pragma mark - UIAlertViewDelegate // invoke the selected action from the actionsheet for a location element - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex { if ([alertView tag] == 2) { [self initiateAppDownload]; - updateAlertShowing_ = NO; + _updateAlertShowing = NO; return; } else if ([alertView tag] == 1) { [self alertFallback:[alertView message]]; return; } - updateAlertShowing_ = NO; + _updateAlertShowing = NO; if (buttonIndex == [alertView firstOtherButtonIndex]) { // YES button has been clicked [self showUpdateView]; diff --git a/Classes/BITUpdateManagerDelegate.h b/Classes/BITUpdateManagerDelegate.h new file mode 100644 index 0000000000..624cdf5d53 --- /dev/null +++ b/Classes/BITUpdateManagerDelegate.h @@ -0,0 +1,51 @@ +/* + * Author: Andreas Linde + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#import + +@protocol BITUpdateManagerDelegate + +/* + Return the device UDID which is required for beta testing, should return nil for app store configuration! + Example implementation if your configuration for the App Store is called "AppStore": + + #ifndef (CONFIGURATION_AppStore) + if ([[UIDevice currentDevice] respondsToSelector:@selector(uniqueIdentifier)]) + return [[UIDevice currentDevice] performSelector:@selector(uniqueIdentifier)]; + #endif + return nil; + + */ +- (NSString *)customDeviceIdentifierForUpdateManager:(BITUpdateManager *)updateManager; + +@optional + +// optional parent view controller for the update screen when invoked via the alert view, default is the root UIWindow instance +- (UIViewController *)viewControllerForUpdateManager:(BITUpdateManager *)updateManager; + +@end diff --git a/Classes/BITUpdateSettingsViewController.h b/Classes/BITUpdateSettingsViewController.h new file mode 100644 index 0000000000..396eec5c11 --- /dev/null +++ b/Classes/BITUpdateSettingsViewController.h @@ -0,0 +1,42 @@ +/* + * Author: Andreas Linde + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * Copyright (c) 2011 Andreas Linde. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#import + +@class BITUpdateManager; + +@interface BITUpdateSettingsViewController : UIViewController { +} + +@property (nonatomic, retain) BITUpdateManager *updateManager; + +- (id)init:(BITUpdateManager *)newUpdateManager; +- (id)init; + +@end diff --git a/Classes/BWHockeySettingsViewController.m b/Classes/BITUpdateSettingsViewController.m similarity index 54% rename from Classes/BWHockeySettingsViewController.m rename to Classes/BITUpdateSettingsViewController.m index 8ceddb3513..184b4c5c21 100644 --- a/Classes/BWHockeySettingsViewController.m +++ b/Classes/BITUpdateSettingsViewController.m @@ -1,32 +1,54 @@ -// -// BWHockeySettingsViewController.m -// HockeyDemo -// -// Created by Andreas Linde on 3/8/11. -// Copyright 2011 Andreas Linde. All rights reserved. -// +/* + * Author: Andreas Linde + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * Copyright (c) 2011 Andreas Linde. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#import "BITUpdateSettingsViewController.h" + +#import "HockeySDK.h" +#import "HockeySDKPrivate.h" -#import "BWHockeySettingsViewController.h" -#import "BWHockeyManager.h" -#import "BWGlobal.h" #define BW_RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1] -@implementation BWHockeySettingsViewController +@implementation BITUpdateSettingsViewController -@synthesize hockeyManager = hockeyManager_; +@synthesize updateManager = _updateManager; - (void)dismissSettings { [self.navigationController dismissModalViewControllerAnimated:YES]; } -#pragma mark - -#pragma mark Initialization +#pragma mark - Initialization -- (id)init:(BWHockeyManager *)newHockeyManager { +- (id)init:(BITUpdateManager *)newUpdateManager { if ((self = [super init])) { - self.hockeyManager = newHockeyManager; - self.title = BWHockeyLocalize(@"HockeySettingsTitle"); + self.updateManager = newUpdateManager; + self.title = BITHockeySDKLocalizedString(@"UpdateSettingsTitle"); CGRect frame = self.view.frame; frame.origin = CGPointZero; @@ -34,22 +56,13 @@ UITableView *tableView_ = [[[UITableView alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height - 260, self.view.frame.size.width, 260) style:UITableViewStyleGrouped] autorelease]; tableView_.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleWidth; - BW_IF_3_2_OR_GREATER( - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { - self.view.backgroundColor = BW_RGBCOLOR(200, 202, 204); - tableView_.backgroundColor = BW_RGBCOLOR(200, 202, 204); - } else { - tableView_.frame = frame; - tableView_.autoresizingMask = tableView_.autoresizingMask | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin; - } - ) - BW_IF_PRE_3_2( - self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone - target:self - action:@selector(dismissSettings)] autorelease]; - tableView_.frame = frame; - tableView_.autoresizingMask = tableView_.autoresizingMask | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin; - ) + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { + self.view.backgroundColor = BW_RGBCOLOR(200, 202, 204); + tableView_.backgroundColor = BW_RGBCOLOR(200, 202, 204); + } else { + tableView_.frame = frame; + tableView_.autoresizingMask = tableView_.autoresizingMask | UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin; + } tableView_.delegate = self; tableView_.dataSource = self; @@ -62,18 +75,18 @@ } - (id)init { - return [self init:[BWHockeyManager sharedHockeyManager]]; + return [self init:[BITHockeyManager sharedHockeyManager].updateManager]; } -#pragma mark - -#pragma mark Table view data source + +#pragma mark - Table view data source - (int)numberOfSections { int numberOfSections = 1; - if ([self.hockeyManager isAllowUserToDisableSendData]) { - if ([self.hockeyManager shouldSendUserData]) numberOfSections++; - if ([self.hockeyManager shouldSendUsageTime]) numberOfSections++; + if ([_updateManager isAllowUserToDisableSendData]) { + if ([_updateManager shouldSendUserData]) numberOfSections++; + if ([_updateManager shouldSendUsageTime]) numberOfSections++; } return numberOfSections; @@ -82,7 +95,7 @@ - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { if (section == [self numberOfSections] - 1) { - return BWHockeyLocalize(@"HockeySectionCheckTitle"); + return BITHockeySDKLocalizedString(@"UpdateSectionCheckTitle"); } else { return nil; } @@ -106,10 +119,10 @@ footer.textColor = [UIColor grayColor]; footer.font = [UIFont systemFontOfSize:13]; - if (section == 0 && [self.hockeyManager isAllowUserToDisableSendData] && [self.hockeyManager shouldSendUserData]) { - footer.text = BWHockeyLocalize(@"HockeySettingsUserDataDescription"); - } else if ([self.hockeyManager isAllowUserToDisableSendData] && section < [self numberOfSections]) { - footer.text = BWHockeyLocalize(@"HockeySettingsUsageDataDescription"); + if (section == 0 && [_updateManager isAllowUserToDisableSendData] && [_updateManager shouldSendUserData]) { + footer.text = BITHockeySDKLocalizedString(@"UpdateSettingsUserDataDescription"); + } else if ([_updateManager isAllowUserToDisableSendData] && section < [self numberOfSections]) { + footer.text = BITHockeySDKLocalizedString(@"UpdateSettingsUsageDataDescription"); } UIView* view = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 285, footer.frame.size.height + 6 + 11)] autorelease]; @@ -147,11 +160,11 @@ - (void)sendUserData:(UISwitch *)switcher { - [self.hockeyManager setUserAllowsSendUserData:switcher.on]; + [_updateManager setUserAllowsSendUserData:switcher.on]; } - (void)sendUsageData:(UISwitch *)switcher { - [self.hockeyManager setUserAllowsSendUsageTime:switcher.on]; + [_updateManager setUserAllowsSendUsageTime:switcher.on]; } @@ -185,42 +198,42 @@ cell.selectionStyle = UITableViewCellSelectionStyleBlue; // update check selection - HockeyUpdateSetting hockeyAutoUpdateSetting = [[BWHockeyManager sharedHockeyManager] updateSetting]; + BITUpdateSetting hockeyAutoUpdateSetting = [_updateManager updateSetting]; if (indexPath.row == 0) { // on startup - cell.textLabel.text = BWHockeyLocalize(@"HockeySectionCheckStartup"); - if (hockeyAutoUpdateSetting == HockeyUpdateCheckStartup) { + cell.textLabel.text = BITHockeySDKLocalizedString(@"UpdateSectionCheckStartup"); + if (hockeyAutoUpdateSetting == BITUpdateCheckStartup) { cell.accessoryType = UITableViewCellAccessoryCheckmark; } } else if (indexPath.row == 1) { // daily - cell.textLabel.text = BWHockeyLocalize(@"HockeySectionCheckDaily"); - if (hockeyAutoUpdateSetting == HockeyUpdateCheckDaily) { + cell.textLabel.text = BITHockeySDKLocalizedString(@"UpdateSectionCheckDaily"); + if (hockeyAutoUpdateSetting == BITUpdateCheckDaily) { cell.accessoryType = UITableViewCellAccessoryCheckmark; } } else { // manually - cell.textLabel.text = BWHockeyLocalize(@"HockeySectionCheckManually"); - if (hockeyAutoUpdateSetting == HockeyUpdateCheckManually) { + cell.textLabel.text = BITHockeySDKLocalizedString(@"UpdateSectionCheckManually"); + if (hockeyAutoUpdateSetting == BITUpdateCheckManually) { cell.accessoryType = UITableViewCellAccessoryCheckmark; } } } else { UISwitch *toggleSwitch = [[[UISwitch alloc] initWithFrame:CGRectZero] autorelease]; - if (indexPath.section == 0 && [self.hockeyManager shouldSendUserData] && [self.hockeyManager isAllowUserToDisableSendData]) { + if (indexPath.section == 0 && [_updateManager shouldSendUserData] && [_updateManager isAllowUserToDisableSendData]) { // send user data - cell.textLabel.text = BWHockeyLocalize(@"HockeySettingsUserData"); + cell.textLabel.text = BITHockeySDKLocalizedString(@"UpdateSettingsUserData"); [toggleSwitch addTarget:self action:@selector(sendUserData:) forControlEvents:UIControlEventValueChanged]; - [toggleSwitch setOn:[self.hockeyManager doesUserAllowsSendUserData]]; + [toggleSwitch setOn:[_updateManager doesUserAllowsSendUserData]]; - } else if ([self.hockeyManager shouldSendUsageTime] && [self.hockeyManager isAllowUserToDisableSendData]) { + } else if ([_updateManager shouldSendUsageTime] && [_updateManager isAllowUserToDisableSendData]) { // send usage time - cell.textLabel.text = BWHockeyLocalize(@"HockeySettingsUsageData"); + cell.textLabel.text = BITHockeySDKLocalizedString(@"UpdateSettingsUsageData"); [toggleSwitch addTarget:self action:@selector(sendUsageData:) forControlEvents:UIControlEventValueChanged]; - [toggleSwitch setOn:[self.hockeyManager doesUserAllowsSendUsageTime]]; + [toggleSwitch setOn:[_updateManager doesUserAllowsSendUsageTime]]; } cell.accessoryView = toggleSwitch; @@ -231,8 +244,7 @@ } -#pragma mark - -#pragma mark Table view delegate +#pragma mark - Table view delegate - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; @@ -240,43 +252,29 @@ // update check interval selection if (indexPath.row == 0) { // on startup - [BWHockeyManager sharedHockeyManager].updateSetting = HockeyUpdateCheckStartup; + _updateManager.updateSetting = BITUpdateCheckStartup; } else if (indexPath.row == 1) { // daily - [BWHockeyManager sharedHockeyManager].updateSetting = HockeyUpdateCheckDaily; + _updateManager.updateSetting = BITUpdateCheckDaily; } else { // manually - [BWHockeyManager sharedHockeyManager].updateSetting = HockeyUpdateCheckManually; + _updateManager.updateSetting = BITUpdateCheckManually; } [tableView reloadData]; } -#pragma mark - -#pragma mark Memory management - -- (void)didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. - [super didReceiveMemoryWarning]; - - // Relinquish ownership any cached data, images, etc. that aren't in use. -} - -- (void)viewDidUnload { - // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand. - // For example: self.myOutlet = nil; -} - +#pragma mark - Memory management - (void)dealloc { + [_updateManager release]; + [super dealloc]; } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Rotation +#pragma mark - Rotation - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { BOOL shouldAutorotate; diff --git a/Classes/BITUpdateViewController.h b/Classes/BITUpdateViewController.h new file mode 100644 index 0000000000..8d7e77e95f --- /dev/null +++ b/Classes/BITUpdateViewController.h @@ -0,0 +1,66 @@ +/* + * Author: Andreas Linde + * Peter Steinberger + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * Copyright (c) 2011 Andreas Linde, Peter Steinberger. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#import + +@class PSStoreButton; +@class PSAppStoreHeader; +@class BITUpdateManager; + +typedef enum { + AppStoreButtonStateOffline, + AppStoreButtonStateCheck, + AppStoreButtonStateSearching, + AppStoreButtonStateUpdate, + AppStoreButtonStateInstalling +} AppStoreButtonState; + +@interface BITUpdateViewController : UITableViewController { + BOOL _kvoRegistered; + BOOL _showAllVersions; + UIStatusBarStyle _statusBarStyle; + PSAppStoreHeader *_appStoreHeader; + PSStoreButton *_appStoreButton; + + id _popOverController; + + NSMutableArray *_cells; + + BOOL _isAppStoreEnvironment; +} + +@property (nonatomic, retain) BITUpdateManager *updateManager; +@property (nonatomic, readwrite) BOOL modal; +@property (nonatomic, readwrite) BOOL modalAnimated; + +- (id)init:(BITUpdateManager *)newUpdateManager modal:(BOOL)newModal; +- (id)init; + +@end diff --git a/Classes/BWHockeyViewController.m b/Classes/BITUpdateViewController.m similarity index 57% rename from Classes/BWHockeyViewController.m rename to Classes/BITUpdateViewController.m index 660558b8fe..7203de7565 100644 --- a/Classes/BWHockeyViewController.m +++ b/Classes/BITUpdateViewController.m @@ -1,42 +1,51 @@ -// -// BWHockeyViewController.m -// -// Created by Andreas Linde on 8/17/10. -// Copyright 2010-2011 Andreas Linde, Peter Steinberger. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. +/* + * Author: Andreas Linde + * Peter Steinberger + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * Copyright (c) 2011 Andreas Linde, Peter Steinberger. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ #import -#import "NSString+HockeyAdditions.h" -#import "BWHockeyViewController.h" -#import "BWHockeyManager.h" -#import "BWGlobal.h" -#import "UIImage+HockeyAdditions.h" +#import "NSString+BITHockeyAdditions.h" +#import "BITAppVersionMetaInfo.h" +#import "UIImage+BITHockeyAdditions.h" #import "PSAppStoreHeader.h" #import "PSWebTableViewCell.h" -#import "BWHockeySettingsViewController.h" +#import "BITUpdateSettingsViewController.h" +#import "PSStoreButton.h" -#define BW_RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1] +#import "HockeySDK.h" +#import "HockeySDKPrivate.h" + + +#define BIT_RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1] #define kWebCellIdentifier @"PSWebTableViewCell" #define kAppStoreViewHeight 90 -@interface BWHockeyViewController () +@interface BITUpdateViewController() // updates the whole view - (void)showPreviousVersionAction; - (void)redrawTableView; @@ -45,89 +54,78 @@ @end -@implementation BWHockeyViewController +@implementation BITUpdateViewController @synthesize appStoreButtonState = appStoreButtonState_; -@synthesize hockeyManager = hockeyManager_; -@synthesize modal = modal_; -@synthesize modalAnimated = modalAnimated_; +@synthesize modal = _modal; +@synthesize modalAnimated = _modalAnimated; -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark private -- (void)restoreStoreButtonStateAnimated_:(BOOL)animated { - if ([self.hockeyManager isAppStoreEnvironment]) { +#pragma mark - Private + +- (void)restoreStoreButtonStateAnimated:(BOOL)animated { + if (_isAppStoreEnvironment) { [self setAppStoreButtonState:AppStoreButtonStateOffline animated:animated]; - } else if ([self.hockeyManager isUpdateAvailable]) { + } else if ([_updateManager isUpdateAvailable]) { [self setAppStoreButtonState:AppStoreButtonStateUpdate animated:animated]; } else { [self setAppStoreButtonState:AppStoreButtonStateCheck animated:animated]; } } -- (void)updateAppStoreHeader_ { - BWApp *app = self.hockeyManager.app; - appStoreHeader_.headerLabel = app.name; - appStoreHeader_.middleHeaderLabel = [app versionString]; +- (void)updateAppStoreHeader { + BITAppVersionMetaInfo *appVersion = _updateManager.newestAppVersion; + _appStoreHeader.headerLabel = appVersion.name; + _appStoreHeader.middleHeaderLabel = [appVersion versionString]; NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease]; [formatter setDateStyle:NSDateFormatterMediumStyle]; NSMutableString *subHeaderString = [NSMutableString string]; - if (app.date) { - [subHeaderString appendString:[formatter stringFromDate:app.date]]; + if (appVersion.date) { + [subHeaderString appendString:[formatter stringFromDate:appVersion.date]]; } - if (app.size) { + if (appVersion.size) { if ([subHeaderString length]) { [subHeaderString appendString:@" - "]; } - [subHeaderString appendString:app.sizeInMB]; + [subHeaderString appendString:appVersion.sizeInMB]; } - appStoreHeader_.subHeaderLabel = subHeaderString; + _appStoreHeader.subHeaderLabel = subHeaderString; } - (void)appDidBecomeActive_ { if (self.appStoreButtonState == AppStoreButtonStateInstalling) { [self setAppStoreButtonState:AppStoreButtonStateUpdate animated:YES]; - } else if (![self.hockeyManager isCheckInProgress]) { - [self restoreStoreButtonStateAnimated_:YES]; + } else if (![_updateManager isCheckInProgress]) { + [self restoreStoreButtonStateAnimated:YES]; } } - (void)openSettings:(id)sender { - BWHockeySettingsViewController *settings = [[[BWHockeySettingsViewController alloc] init] autorelease]; + BITUpdateSettingsViewController *settings = [[[BITUpdateSettingsViewController alloc] init] autorelease]; Class popoverControllerClass = NSClassFromString(@"UIPopoverController"); if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad && popoverControllerClass) { - if (popOverController_ == nil) { - popOverController_ = [[popoverControllerClass alloc] initWithContentViewController:settings]; + if (_popOverController == nil) { + _popOverController = [[popoverControllerClass alloc] initWithContentViewController:settings]; } - if ([popOverController_ contentViewController].view.window) { - [popOverController_ dismissPopoverAnimated:YES]; + if ([_popOverController contentViewController].view.window) { + [_popOverController dismissPopoverAnimated:YES]; }else { - [popOverController_ setPopoverContentSize: CGSizeMake(320, 440)]; - [popOverController_ presentPopoverFromBarButtonItem:self.navigationItem.rightBarButtonItem + [_popOverController setPopoverContentSize: CGSizeMake(320, 440)]; + [_popOverController presentPopoverFromBarButtonItem:self.navigationItem.rightBarButtonItem permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES]; } } else { - - BW_IF_3_2_OR_GREATER( - settings.modalTransitionStyle = UIModalTransitionStylePartialCurl; - [self presentModalViewController:settings animated:YES]; - ) - BW_IF_PRE_3_2( - UINavigationController *navController = [[[UINavigationController alloc] initWithRootViewController:settings] autorelease]; - navController.modalTransitionStyle = UIModalTransitionStyleCoverVertical; - [self presentModalViewController:navController animated:YES]; - ) + settings.modalTransitionStyle = UIModalTransitionStylePartialCurl; + [self presentModalViewController:settings animated:YES]; } } -- (UIImage *)addGlossToImage_:(UIImage *)image { - BW_IF_IOS4_OR_GREATER(UIGraphicsBeginImageContextWithOptions(image.size, NO, 0.0);) - BW_IF_PRE_IOS4(UIGraphicsBeginImageContext(image.size);) +- (UIImage *)addGlossToImage:(UIImage *)image { + UIGraphicsBeginImageContextWithOptions(image.size, NO, 0.0); [image drawAtPoint:CGPointZero]; - UIImage *iconGradient = [UIImage bw_imageNamed:@"IconGradient.png" bundle:kHockeyBundleName]; + UIImage *iconGradient = [UIImage bit_imageNamed:@"IconGradient.png" bundle:BITHOCKEYSDK_BUNDLE]; [iconGradient drawInRect:CGRectMake(0, 0, image.size.width, image.size.height) blendMode:kCGBlendModeNormal alpha:0.5]; UIImage *result = UIGraphicsGetImageFromCurrentImageContext(); @@ -161,64 +159,62 @@ } - (void)changePreviousVersionButtonBackground:(id)sender { - [(UIButton *)sender setBackgroundColor:BW_RGBCOLOR(183,183,183)]; + [(UIButton *)sender setBackgroundColor:BIT_RGBCOLOR(183,183,183)]; } - (void)changePreviousVersionButtonBackgroundHighlighted:(id)sender { - [(UIButton *)sender setBackgroundColor:BW_RGBCOLOR(183,183,183)]; + [(UIButton *)sender setBackgroundColor:BIT_RGBCOLOR(183,183,183)]; } - (void)showHidePreviousVersionsButton { - BOOL multipleVersionButtonNeeded = [self.hockeyManager.apps count] > 1 && !showAllVersions_; + BOOL multipleVersionButtonNeeded = [_updateManager.appVersions count] > 1 && !_showAllVersions; if(multipleVersionButtonNeeded) { // align at the bottom if tableview is small UIView *footerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, kMinPreviousVersionButtonHeight)]; footerView.autoresizingMask = UIViewAutoresizingFlexibleWidth; - footerView.backgroundColor = BW_RGBCOLOR(200, 202, 204); + footerView.backgroundColor = BIT_RGBCOLOR(200, 202, 204); UIButton *footerButton = [UIButton buttonWithType:UIButtonTypeCustom]; - BW_IF_IOS4_OR_GREATER( - //footerButton.layer.shadowOffset = CGSizeMake(-2, 2); - footerButton.layer.shadowColor = [[UIColor blackColor] CGColor]; - footerButton.layer.shadowRadius = 2.0f; - ) + //footerButton.layer.shadowOffset = CGSizeMake(-2, 2); + footerButton.layer.shadowColor = [[UIColor blackColor] CGColor]; + footerButton.layer.shadowRadius = 2.0f; footerButton.titleLabel.font = [UIFont boldSystemFontOfSize:14]; - [footerButton setTitle:BWHockeyLocalize(@"HockeyShowPreviousVersions") forState:UIControlStateNormal]; + [footerButton setTitle:BITHockeySDKLocalizedString(@"UpdateShowPreviousVersions") forState:UIControlStateNormal]; [footerButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; [footerButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; - [footerButton setBackgroundImage:[UIImage bw_imageNamed:@"buttonHighlight.png" bundle:kHockeyBundleName] forState:UIControlStateHighlighted]; + [footerButton setBackgroundImage:[UIImage bit_imageNamed:@"buttonHighlight.png" bundle:BITHOCKEYSDK_BUNDLE] forState:UIControlStateHighlighted]; footerButton.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin; [footerButton addTarget:self action:@selector(showPreviousVersionAction) forControlEvents:UIControlEventTouchUpInside]; footerButton.frame = CGRectMake(0, kMinPreviousVersionButtonHeight-44, self.view.frame.size.width, 44); - footerButton.backgroundColor = BW_RGBCOLOR(183,183,183); + footerButton.backgroundColor = BIT_RGBCOLOR(183,183,183); [footerView addSubview:footerButton]; self.tableView.tableFooterView = footerView; [self realignPreviousVersionButton]; [footerView release]; } else { self.tableView.tableFooterView = nil; - self.tableView.backgroundColor = BW_RGBCOLOR(200, 202, 204); + self.tableView.backgroundColor = BIT_RGBCOLOR(200, 202, 204); } } -- (void)configureWebCell:(PSWebTableViewCell *)cell forApp_:(BWApp *)app { +- (void)configureWebCell:(PSWebTableViewCell *)cell forAppVersion:(BITAppVersionMetaInfo *)appVersion { // create web view for a version NSString *installed = @""; - if ([app.version isEqualToString:[self.hockeyManager currentAppVersion]]) { - installed = [NSString stringWithFormat:@"%@", [app isEqual:self.hockeyManager.app] ? @"left" : @"right", BWHockeyLocalize(@"HockeyInstalled")]; + if ([appVersion.version isEqualToString:[_updateManager currentAppVersion]]) { + installed = [NSString stringWithFormat:@"%@", [appVersion isEqual:_updateManager.newestAppVersion] ? @"left" : @"right", BITHockeySDKLocalizedString(@"UpdateInstalled")]; } - if ([app isEqual:self.hockeyManager.app]) { - if ([app.notes length] > 0) { + if ([appVersion isEqual:_updateManager.newestAppVersion]) { + if ([appVersion.notes length] > 0) { installed = [NSString stringWithFormat:@"

 %@

", installed]; - cell.webViewContent = [NSString stringWithFormat:@"%@%@", installed, app.notes]; + cell.webViewContent = [NSString stringWithFormat:@"%@%@", installed, appVersion.notes]; } else { - cell.webViewContent = [NSString stringWithFormat:@"
%@
", BWHockeyLocalize(@"HockeyNoReleaseNotesAvailable")]; + cell.webViewContent = [NSString stringWithFormat:@"
%@
", BITHockeySDKLocalizedString(@"UpdateNoReleaseNotesAvailable")]; } } else { - cell.webViewContent = [NSString stringWithFormat:@"

%@%@
%@

%@

", [app versionString], installed, [app dateString], [app notesOrEmptyString]]; + cell.webViewContent = [NSString stringWithFormat:@"

%@%@
%@

%@

", [appVersion versionString], installed, [appVersion dateString], [appVersion notesOrEmptyString]]; } - cell.cellBackgroundColor = BW_RGBCOLOR(200, 202, 204); + cell.cellBackgroundColor = BIT_RGBCOLOR(200, 202, 204); [cell addWebView]; // hack @@ -227,47 +223,46 @@ [cell addObserver:self forKeyPath:@"webViewSize" options:0 context:nil]; } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSObject -- (id)init:(BWHockeyManager *)newHockeyManager modal:(BOOL)newModal { +#pragma mark - Init + +- (id)init:(BITUpdateManager *)newUpdateManager modal:(BOOL)newModal { if ((self = [super initWithStyle:UITableViewStylePlain])) { - self.hockeyManager = newHockeyManager; + self.updateManager = newUpdateManager; self.modal = newModal; self.modalAnimated = YES; - self.title = BWHockeyLocalize(@"HockeyUpdateScreenTitle"); + self.title = BITHockeySDKLocalizedString(@"UpdateScreenTitle"); - if ([self.hockeyManager shouldShowUserSettings]) { - self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithImage:[UIImage bw_imageNamed:@"gear.png" bundle:kHockeyBundleName] + _isAppStoreEnvironment = [BITHockeyManager sharedHockeyManager].isAppStoreEnvironment; + + if ([_updateManager shouldShowUserSettings]) { + self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithImage:[UIImage bit_imageNamed:@"gear.png" bundle:BITHOCKEYSDK_BUNDLE] style:UIBarButtonItemStyleBordered target:self action:@selector(openSettings:)] autorelease]; } - cells_ = [[NSMutableArray alloc] initWithCapacity:5]; - popOverController_ = nil; + _cells = [[NSMutableArray alloc] initWithCapacity:5]; + _popOverController = nil; } return self; } - (id)init { - return [self init:[BWHockeyManager sharedHockeyManager] modal:NO]; + return [self init:[BITHockeyManager sharedHockeyManager].updateManager modal:NO]; } - (void)dealloc { [self viewDidUnload]; - for (UITableViewCell *cell in cells_) { + for (UITableViewCell *cell in _cells) { [cell removeObserver:self forKeyPath:@"webViewSize"]; } - [cells_ release]; + [_cells release]; [super dealloc]; } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark View lifecycle +#pragma mark - View lifecycle - (void)onAction:(id)sender { if (self.modal) { @@ -293,7 +288,7 @@ [self.navigationController popViewControllerAnimated:YES]; } - [[UIApplication sharedApplication] setStatusBarStyle:statusBarStyle_]; + [[UIApplication sharedApplication] setStatusBarStyle:_statusBarStyle]; } - (CAGradientLayer *)backgroundLayer { @@ -327,22 +322,22 @@ [dnc addObserver:self selector:@selector(appDidBecomeActive_) name:UIApplicationDidBecomeActiveNotification object:nil]; // hook into manager with kvo! - [self.hockeyManager addObserver:self forKeyPath:@"checkInProgress" options:0 context:nil]; - [self.hockeyManager addObserver:self forKeyPath:@"isUpdateURLOffline" options:0 context:nil]; - [self.hockeyManager addObserver:self forKeyPath:@"updateAvailable" options:0 context:nil]; - [self.hockeyManager addObserver:self forKeyPath:@"apps" options:0 context:nil]; - kvoRegistered_ = YES; + [_updateManager addObserver:self forKeyPath:@"checkInProgress" options:0 context:nil]; + [_updateManager addObserver:self forKeyPath:@"isUpdateURLOffline" options:0 context:nil]; + [_updateManager addObserver:self forKeyPath:@"updateAvailable" options:0 context:nil]; + [_updateManager addObserver:self forKeyPath:@"apps" options:0 context:nil]; + _kvoRegistered = YES; - self.tableView.backgroundColor = BW_RGBCOLOR(200, 202, 204); + self.tableView.backgroundColor = BIT_RGBCOLOR(200, 202, 204); self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; UIView *topView = [[[UIView alloc] initWithFrame:CGRectMake(0, -(600-kAppStoreViewHeight), self.view.frame.size.width, 600)] autorelease]; topView.autoresizingMask = UIViewAutoresizingFlexibleWidth; - topView.backgroundColor = BW_RGBCOLOR(140, 141, 142); + topView.backgroundColor = BIT_RGBCOLOR(140, 141, 142); [self.tableView addSubview:topView]; - appStoreHeader_ = [[PSAppStoreHeader alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, kAppStoreViewHeight)]; - [self updateAppStoreHeader_]; + _appStoreHeader = [[PSAppStoreHeader alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, kAppStoreViewHeight)]; + [self updateAppStoreHeader]; NSString *iconString = nil; NSArray *icons = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIconFiles"]; @@ -362,7 +357,7 @@ if (icons) { BOOL useHighResIcon = NO; - BW_IF_IOS4_OR_GREATER(if ([UIScreen mainScreen].scale == 2.0f) useHighResIcon = YES;) + if ([UIScreen mainScreen].scale == 2.0f) useHighResIcon = YES; for(NSString *icon in icons) { iconString = icon; @@ -386,12 +381,12 @@ } if (addGloss) { - appStoreHeader_.iconImage = [self addGlossToImage_:[UIImage imageNamed:iconString]]; + _appStoreHeader.iconImage = [self addGlossToImage:[UIImage imageNamed:iconString]]; } else { - appStoreHeader_.iconImage = [UIImage imageNamed:iconString]; + _appStoreHeader.iconImage = [UIImage imageNamed:iconString]; } - self.tableView.tableHeaderView = appStoreHeader_; + self.tableView.tableHeaderView = _appStoreHeader; if (self.modal) { self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone @@ -406,47 +401,47 @@ storeButton.buttonData = [PSStoreButtonData dataWithLabel:@"" colors:[PSStoreButton appStoreGrayColor] enabled:NO]; self.appStoreButtonState = AppStoreButtonStateCheck; [storeButton alignToSuperview]; - appStoreButton_ = [storeButton retain]; + _appStoreButton = [storeButton retain]; } - (void)viewWillAppear:(BOOL)animated { - if ([self.hockeyManager isAppStoreEnvironment]) + if (_isAppStoreEnvironment) self.appStoreButtonState = AppStoreButtonStateOffline; - self.hockeyManager.currentHockeyViewController = self; + _updateManager.currentHockeyViewController = self; [super viewWillAppear:animated]; - statusBarStyle_ = [[UIApplication sharedApplication] statusBarStyle]; + _statusBarStyle = [[UIApplication sharedApplication] statusBarStyle]; [[UIApplication sharedApplication] setStatusBarStyle:(self.navigationController.navigationBar.barStyle == UIBarStyleDefault) ? UIStatusBarStyleDefault : UIStatusBarStyleBlackOpaque]; [self redrawTableView]; } - (void)viewWillDisappear:(BOOL)animated { - self.hockeyManager.currentHockeyViewController = nil; + _updateManager.currentHockeyViewController = nil; //if the popover is still visible, dismiss it - [popOverController_ dismissPopoverAnimated:YES]; + [_popOverController dismissPopoverAnimated:YES]; [super viewWillDisappear:animated]; - [[UIApplication sharedApplication] setStatusBarStyle:statusBarStyle_]; + [[UIApplication sharedApplication] setStatusBarStyle:_statusBarStyle]; } - (void)redrawTableView { - [self restoreStoreButtonStateAnimated_:NO]; - [self updateAppStoreHeader_]; + [self restoreStoreButtonStateAnimated:NO]; + [self updateAppStoreHeader]; // clean up and remove any pending overservers - for (UITableViewCell *cell in cells_) { + for (UITableViewCell *cell in _cells) { [cell removeObserver:self forKeyPath:@"webViewSize"]; } - [cells_ removeAllObjects]; + [_cells removeAllObjects]; int i = 0; - BOOL breakAfterThisApp = NO; - for (BWApp *app in self.hockeyManager.apps) { + BOOL breakAfterThisAppVersion = NO; + for (BITAppVersionMetaInfo *appVersion in _updateManager.appVersions) { i++; // only show the newer version of the app by default, if we don't show all versions - if (!showAllVersions_) { - if ([app.version isEqualToString:[self.hockeyManager currentAppVersion]]) { + if (!_showAllVersions) { + if ([appVersion.version isEqualToString:[_updateManager currentAppVersion]]) { if (i == 1) { - breakAfterThisApp = YES; + breakAfterThisAppVersion = YES; } else { break; } @@ -454,10 +449,10 @@ } PSWebTableViewCell *cell = [[[PSWebTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:kWebCellIdentifier] autorelease]; - [self configureWebCell:cell forApp_:app]; - [cells_ addObject:cell]; + [self configureWebCell:cell forAppVersion:appVersion]; + [_cells addObject:cell]; - if (breakAfterThisApp) break; + if (breakAfterThisAppVersion) break; } [self.tableView reloadData]; @@ -465,14 +460,14 @@ } - (void)showPreviousVersionAction { - showAllVersions_ = YES; + _showAllVersions = YES; BOOL showAllPending = NO; - for (BWApp *app in self.hockeyManager.apps) { + for (BITAppVersionMetaInfo *appVersion in _updateManager.appVersions) { if (!showAllPending) { - if ([app.version isEqualToString:[self.hockeyManager currentAppVersion]]) { + if ([appVersion.version isEqualToString:[_updateManager currentAppVersion]]) { showAllPending = YES; - if (app == self.hockeyManager.app) { + if (appVersion == _updateManager.newestAppVersion) { continue; // skip this version already if it the latest version is the installed one } } else { @@ -481,33 +476,32 @@ } PSWebTableViewCell *cell = [[[PSWebTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:kWebCellIdentifier] autorelease]; - [self configureWebCell:cell forApp_:app]; - [cells_ addObject:cell]; + [self configureWebCell:cell forAppVersion:appVersion]; + [_cells addObject:cell]; } [self.tableView reloadData]; [self showHidePreviousVersionsButton]; } - (void)viewDidUnload { - [appStoreHeader_ release]; appStoreHeader_ = nil; - [popOverController_ release], popOverController_ = nil; + [_appStoreHeader release]; _appStoreHeader = nil; + [_popOverController release], _popOverController = nil; [[NSNotificationCenter defaultCenter] removeObserver:self]; // test if KVO's are registered. if class is destroyed before it was shown(viewDidLoad) no KVOs are registered. - if (kvoRegistered_) { - [self.hockeyManager removeObserver:self forKeyPath:@"checkInProgress"]; - [self.hockeyManager removeObserver:self forKeyPath:@"isUpdateURLOffline"]; - [self.hockeyManager removeObserver:self forKeyPath:@"updateAvailable"]; - [self.hockeyManager removeObserver:self forKeyPath:@"apps"]; - kvoRegistered_ = NO; + if (_kvoRegistered) { + [_updateManager removeObserver:self forKeyPath:@"checkInProgress"]; + [_updateManager removeObserver:self forKeyPath:@"isUpdateURLOffline"]; + [_updateManager removeObserver:self forKeyPath:@"updateAvailable"]; + [_updateManager removeObserver:self forKeyPath:@"apps"]; + _kvoRegistered = NO; } [super viewDidUnload]; } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Table view data source + +#pragma mark - Table view data source - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; @@ -516,31 +510,30 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { CGFloat rowHeight = 0; - if ([cells_ count] > (NSUInteger)indexPath.row) { - PSWebTableViewCell *cell = [cells_ objectAtIndex:indexPath.row]; + if ([_cells count] > (NSUInteger)indexPath.row) { + PSWebTableViewCell *cell = [_cells objectAtIndex:indexPath.row]; rowHeight = cell.webViewSize.height; } - if ([self.hockeyManager.apps count] > 1 && !showAllVersions_) { - self.tableView.backgroundColor = BW_RGBCOLOR(183, 183, 183); + if ([_updateManager.appVersions count] > 1 && !_showAllVersions) { + self.tableView.backgroundColor = BIT_RGBCOLOR(183, 183, 183); } if (rowHeight == 0) { rowHeight = indexPath.row == 0 ? 250 : 44; // fill screen on startup - self.tableView.backgroundColor = BW_RGBCOLOR(200, 202, 204); + self.tableView.backgroundColor = BIT_RGBCOLOR(200, 202, 204); } return rowHeight; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { - NSInteger cellCount = [cells_ count]; + NSInteger cellCount = [_cells count]; return cellCount; } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark KVO + +#pragma mark - KVO - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { // only make changes if we are visible @@ -549,15 +542,15 @@ [self.tableView reloadData]; [self realignPreviousVersionButton]; } else if ([keyPath isEqualToString:@"checkInProgress"]) { - if (self.hockeyManager.isCheckInProgress) { + if (_updateManager.isCheckInProgress) { [self setAppStoreButtonState:AppStoreButtonStateSearching animated:YES]; }else { - [self restoreStoreButtonStateAnimated_:YES]; + [self restoreStoreButtonStateAnimated:YES]; } } else if ([keyPath isEqualToString:@"isUpdateURLOffline"]) { - [self restoreStoreButtonStateAnimated_:YES]; + [self restoreStoreButtonStateAnimated:YES]; } else if ([keyPath isEqualToString:@"updateAvailable"]) { - [self restoreStoreButtonStateAnimated_:YES]; + [self restoreStoreButtonStateAnimated:YES]; } else if ([keyPath isEqualToString:@"apps"]) { [self redrawTableView]; } @@ -566,18 +559,16 @@ // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { - if ([cells_ count] > (NSUInteger)indexPath.row) { - return [cells_ objectAtIndex:indexPath.row]; + if ([_cells count] > (NSUInteger)indexPath.row) { + return [_cells objectAtIndex:indexPath.row]; } else { - BWHockeyLog(@"Warning: cells_ and indexPath do not match? forgot calling redrawTableView?"); + BITHockeySDKLog(@"Warning: cells_ and indexPath do not match? forgot calling redrawTableView?"); } return nil; } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Rotation +#pragma mark - Rotation - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { BOOL shouldAutorotate; @@ -595,12 +586,11 @@ - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration { // update all cells - [cells_ makeObjectsPerformSelector:@selector(addWebView)]; + [_cells makeObjectsPerformSelector:@selector(addWebView)]; } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark PSAppStoreHeaderDelegate + +#pragma mark - PSAppStoreHeaderDelegate - (void)setAppStoreButtonState:(AppStoreButtonState)anAppStoreButtonState { [self setAppStoreButtonState:anAppStoreButtonState animated:NO]; @@ -611,19 +601,19 @@ switch (anAppStoreButtonState) { case AppStoreButtonStateOffline: - [appStoreButton_ setButtonData:[PSStoreButtonData dataWithLabel:BWHockeyLocalize(@"HockeyButtonOffline") colors:[PSStoreButton appStoreGrayColor] enabled:NO] animated:animated]; + [_appStoreButton setButtonData:[PSStoreButtonData dataWithLabel:BITHockeySDKLocalizedString(@"UpdateButtonOffline") colors:[PSStoreButton appStoreGrayColor] enabled:NO] animated:animated]; break; case AppStoreButtonStateCheck: - [appStoreButton_ setButtonData:[PSStoreButtonData dataWithLabel:BWHockeyLocalize(@"HockeyButtonCheck") colors:[PSStoreButton appStoreGreenColor] enabled:YES] animated:animated]; + [_appStoreButton setButtonData:[PSStoreButtonData dataWithLabel:BITHockeySDKLocalizedString(@"UpdateButtonCheck") colors:[PSStoreButton appStoreGreenColor] enabled:YES] animated:animated]; break; case AppStoreButtonStateSearching: - [appStoreButton_ setButtonData:[PSStoreButtonData dataWithLabel:BWHockeyLocalize(@"HockeyButtonSearching") colors:[PSStoreButton appStoreGrayColor] enabled:NO] animated:animated]; + [_appStoreButton setButtonData:[PSStoreButtonData dataWithLabel:BITHockeySDKLocalizedString(@"UpdateButtonSearching") colors:[PSStoreButton appStoreGrayColor] enabled:NO] animated:animated]; break; case AppStoreButtonStateUpdate: - [appStoreButton_ setButtonData:[PSStoreButtonData dataWithLabel:BWHockeyLocalize(@"HockeyButtonUpdate") colors:[PSStoreButton appStoreBlueColor] enabled:YES] animated:animated]; + [_appStoreButton setButtonData:[PSStoreButtonData dataWithLabel:BITHockeySDKLocalizedString(@"UpdateButtonUpdate") colors:[PSStoreButton appStoreBlueColor] enabled:YES] animated:animated]; break; case AppStoreButtonStateInstalling: - [appStoreButton_ setButtonData:[PSStoreButtonData dataWithLabel:BWHockeyLocalize(@"HockeyButtonInstalling") colors:[PSStoreButton appStoreGrayColor] enabled:NO] animated:animated]; + [_appStoreButton setButtonData:[PSStoreButtonData dataWithLabel:BITHockeySDKLocalizedString(@"UpdateButtonInstalling") colors:[PSStoreButton appStoreGrayColor] enabled:NO] animated:animated]; break; default: break; @@ -633,10 +623,10 @@ - (void)storeButtonFired:(PSStoreButton *)button { switch (appStoreButtonState_) { case AppStoreButtonStateCheck: - [self.hockeyManager checkForUpdateShowFeedback:YES]; + [_updateManager checkForUpdateShowFeedback:YES]; break; case AppStoreButtonStateUpdate: - if ([self.hockeyManager initiateAppDownload]) { + if ([_updateManager initiateAppDownload]) { [self setAppStoreButtonState:AppStoreButtonStateInstalling animated:YES]; }; break; diff --git a/Classes/BWApp.h b/Classes/BWApp.h deleted file mode 100644 index f8cfd4bc9a..0000000000 --- a/Classes/BWApp.h +++ /dev/null @@ -1,56 +0,0 @@ -// -// BWApp.h -// HockeyDemo -// -// Created by Peter Steinberger on 04.02.11. -// Copyright 2011 Buzzworks. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import - -@interface BWApp : NSObject { - NSString *name_; - NSString *version_; - NSString *shortVersion_; - NSString *notes_; - NSDate *date_; - NSNumber *size_; - NSNumber *mandatory_; -} -@property (nonatomic, copy) NSString *name; -@property (nonatomic, copy) NSString *version; -@property (nonatomic, copy) NSString *shortVersion; -@property (nonatomic, copy) NSString *notes; -@property (nonatomic, copy) NSDate *date; -@property (nonatomic, copy) NSNumber *size; -@property (nonatomic, copy) NSNumber *mandatory; - -- (NSString *)nameAndVersionString; -- (NSString *)versionString; -- (NSString *)dateString; -- (NSString *)sizeInMB; -- (NSString *)notesOrEmptyString; -- (void)setDateWithTimestamp:(NSTimeInterval)timestamp; -- (BOOL)isValid; -- (BOOL)isEqualToBWApp:(BWApp *)anApp; - -+ (BWApp *)appFromDict:(NSDictionary *)dict; - -@end diff --git a/Classes/BWApp.m b/Classes/BWApp.m deleted file mode 100644 index 265c92aa7d..0000000000 --- a/Classes/BWApp.m +++ /dev/null @@ -1,186 +0,0 @@ -// -// BWApp.m -// HockeyDemo -// -// Created by Peter Steinberger on 04.02.11. -// Copyright 2011 Buzzworks. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "BWApp.h" -#import "BWGlobal.h" - -@implementation BWApp - -@synthesize name = name_; -@synthesize version = version_; -@synthesize shortVersion = shortVersion_; -@synthesize notes = notes_; -@synthesize date = date_; -@synthesize size = size_; -@synthesize mandatory = mandatory_; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark static - -+ (BWApp *)appFromDict:(NSDictionary *)dict { - BWApp *app = [[[[self class] alloc] init] autorelease]; - - // NSParameterAssert([dict isKindOfClass:[NSDictionary class]]); - if ([dict isKindOfClass:[NSDictionary class]]) { - app.name = [dict objectForKey:@"title"]; - app.version = [dict objectForKey:@"version"]; - app.shortVersion = [dict objectForKey:@"shortversion"]; - [app setDateWithTimestamp:[[dict objectForKey:@"timestamp"] doubleValue]]; - app.size = [dict objectForKey:@"appsize"]; - app.notes = [dict objectForKey:@"notes"]; - app.mandatory = [dict objectForKey:@"mandatory"]; - } - - return app; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSObject - -- (void)dealloc { - [name_ release]; - [version_ release]; - [shortVersion_ release]; - [notes_ release]; - [date_ release]; - [size_ release]; - [mandatory_ release]; - - [super dealloc]; -} - -- (BOOL)isEqual:(id)other { - if (other == self) - return YES; - if (!other || ![other isKindOfClass:[self class]]) - return NO; - return [self isEqualToBWApp:other]; -} - -- (BOOL)isEqualToBWApp:(BWApp *)anApp { - if (self == anApp) - return YES; - if (self.name != anApp.name && ![self.name isEqualToString:anApp.name]) - return NO; - if (self.version != anApp.version && ![self.version isEqualToString:anApp.version]) - return NO; - if (self.shortVersion != anApp.shortVersion && ![self.shortVersion isEqualToString:anApp.shortVersion]) - return NO; - if (self.notes != anApp.notes && ![self.notes isEqualToString:anApp.notes]) - return NO; - if (self.date != anApp.date && ![self.date isEqualToDate:anApp.date]) - return NO; - if (self.size != anApp.size && ![self.size isEqualToNumber:anApp.size]) - return NO; - if (self.mandatory != anApp.mandatory && ![self.mandatory isEqualToNumber:anApp.mandatory]) - return NO; - return YES; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSCoder - -- (void)encodeWithCoder:(NSCoder *)encoder { - [encoder encodeObject:self.name forKey:@"name"]; - [encoder encodeObject:self.version forKey:@"version"]; - [encoder encodeObject:self.shortVersion forKey:@"shortVersion"]; - [encoder encodeObject:self.notes forKey:@"notes"]; - [encoder encodeObject:self.date forKey:@"date"]; - [encoder encodeObject:self.size forKey:@"size"]; - [encoder encodeObject:self.mandatory forKey:@"mandatory"]; -} - -- (id)initWithCoder:(NSCoder *)decoder { - if ((self = [super init])) { - self.name = [decoder decodeObjectForKey:@"name"]; - self.version = [decoder decodeObjectForKey:@"version"]; - self.shortVersion = [decoder decodeObjectForKey:@"shortVersion"]; - self.notes = [decoder decodeObjectForKey:@"notes"]; - self.date = [decoder decodeObjectForKey:@"date"]; - self.size = [decoder decodeObjectForKey:@"size"]; - self.mandatory = [decoder decodeObjectForKey:@"mandatory"]; - } - return self; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Properties - -- (NSString *)nameAndVersionString { - NSString *appNameAndVersion = [NSString stringWithFormat:@"%@ %@", self.name, [self versionString]]; - return appNameAndVersion; -} - -- (NSString *)versionString { - NSString *shortString = ([self.shortVersion respondsToSelector:@selector(length)] && [self.shortVersion length]) ? [NSString stringWithFormat:@"%@", self.shortVersion] : @""; - NSString *versionString = [shortString length] ? [NSString stringWithFormat:@" (%@)", self.version] : self.version; - return [NSString stringWithFormat:@"%@ %@%@", BWHockeyLocalize(@"HockeyVersion"), shortString, versionString]; -} - -- (NSString *)dateString { - NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease]; - [formatter setDateStyle:NSDateFormatterMediumStyle]; - - return [formatter stringFromDate:self.date]; -} - -- (NSString *)sizeInMB { - if ([size_ isKindOfClass: [NSNumber class]] && [size_ doubleValue] > 0) { - double appSizeInMB = [size_ doubleValue]/(1024*1024); - NSString *appSizeString = [NSString stringWithFormat:@"%.1f MB", appSizeInMB]; - return appSizeString; - } - - return @"0 MB"; -} - -- (void)setDateWithTimestamp:(NSTimeInterval)timestamp { - if (timestamp) { - NSDate *appDate = [NSDate dateWithTimeIntervalSince1970:timestamp]; - self.date = appDate; - } else { - self.date = nil; - } -} - -- (NSString *)notesOrEmptyString { - if (self.notes) { - return self.notes; - }else { - return [NSString string]; - } -} - -// a valid app needs at least following properties: name, version, date -- (BOOL)isValid { - BOOL valid = [self.name length] && [self.version length] && self.date; - return valid; -} - -@end diff --git a/Classes/BWGlobal.h b/Classes/BWGlobal.h deleted file mode 100644 index 46b4ecf1d2..0000000000 --- a/Classes/BWGlobal.h +++ /dev/null @@ -1,127 +0,0 @@ -// -// BWGlobal.h -// -// Created by Andreas Linde on 08/17/10. -// Copyright 2010-2011 Andreas Linde, Peter Steinberger. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "BWHockeyManager.h" -#import "BWApp.h" - -#define SDK_NAME @"HockeySDK" -#define SDK_VERSION @"2.2.6" - -#ifndef HOCKEY_BLOCK_UDID -#define HOCKEY_BLOCK_UDID 1 -#endif - -// uncomment this line to enable NSLog-debugging output -//#define kHockeyDebugEnabled - -#define kArrayOfLastHockeyCheck @"ArrayOfLastHockeyCheck" -#define kDateOfLastHockeyCheck @"DateOfLastHockeyCheck" -#define kDateOfVersionInstallation @"DateOfVersionInstallation" -#define kUsageTimeOfCurrentVersion @"UsageTimeOfCurrentVersion" -#define kUsageTimeForVersionString @"kUsageTimeForVersionString" -#define kHockeyAutoUpdateSetting @"HockeyAutoUpdateSetting" -#define kHockeyAllowUserSetting @"HockeyAllowUserSetting" -#define kHockeyAllowUsageSetting @"HockeyAllowUsageSetting" -#define kHockeyAutoUpdateSetting @"HockeyAutoUpdateSetting" -#define kHockeyAuthorizedVersion @"HockeyAuthorizedVersion" -#define kHockeyAuthorizedToken @"HockeyAuthorizedToken" - -#define kHockeyBundleName @"Hockey.bundle" - -// Notification message which HockeyManager is listening to, to retry requesting updated from the server -#define BWHockeyNetworkBecomeReachable @"NetworkDidBecomeReachable" - -#define BWHockeyLog(fmt, ...) do { if([BWHockeyManager sharedHockeyManager].isLoggingEnabled) { NSLog((@"[HockeyLib] %s/%d " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); }} while(0) - -NSBundle *hockeyBundle(void); -NSString *BWmd5(NSString *str); -NSString *BWHockeyLocalize(NSString *stringToken); - -// compatibility helper -#ifdef HOCKEYLIB_STATIC_LIBRARY -// If HockeyLib is built as a static library and linked into the project -// we can't use this project's deployment target to statically decide if -// native JSON is available -#define BW_NATIVE_JSON_AVAILABLE 0 -#else -#define BW_NATIVE_JSON_AVAILABLE __IPHONE_OS_VERSION_MIN_REQUIRED >= 50000 -#endif - -#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_3_2 -#define kCFCoreFoundationVersionNumber_iPhoneOS_3_2 478.61 -#endif -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 32000 -#define BW_IF_3_2_OR_GREATER(...) \ -if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iPhoneOS_3_2) \ -{ \ -__VA_ARGS__ \ -} -#else -#define BW_IF_3_2_OR_GREATER(...) -#endif -#define BW_IF_PRE_3_2(...) \ -if (kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iPhoneOS_3_2) \ -{ \ -__VA_ARGS__ \ -} - -#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_4_0 -#define kCFCoreFoundationVersionNumber_iPhoneOS_4_0 550.32 -#endif -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000 -#define BW_IF_IOS4_OR_GREATER(...) \ -if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iPhoneOS_4_0) \ -{ \ -__VA_ARGS__ \ -} -#else -#define BW_IF_IOS4_OR_GREATER(...) -#endif - -#define BW_IF_PRE_IOS4(...) \ -if (kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iPhoneOS_4_0) \ -{ \ -__VA_ARGS__ \ -} - - - -#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_5_0 -#define kCFCoreFoundationVersionNumber_iPhoneOS_5_0 674.0 -#endif -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 50000 -#define BW_IF_IOS5_OR_GREATER(...) \ -if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iPhoneOS_5_0) \ -{ \ -__VA_ARGS__ \ -} -#else -#define BW_IF_IOS5_OR_GREATER(...) -#endif - -#define BW_IF_PRE_IOS5(...) \ -if (kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iPhoneOS_5_0) \ -{ \ -__VA_ARGS__ \ -} diff --git a/Classes/BWGlobal.m b/Classes/BWGlobal.m deleted file mode 100644 index d967d5a9b7..0000000000 --- a/Classes/BWGlobal.m +++ /dev/null @@ -1,61 +0,0 @@ -// -// BWGlobal.h -// -// Created by Andreas Linde on 08/17/10. -// Copyright 2010-2011 Andreas Linde, Peter Steinberger. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "BWGlobal.h" -#include - -NSBundle *hockeyBundle(void) { - static NSBundle* bundle = nil; - if (!bundle) { - NSString* path = [[[NSBundle mainBundle] resourcePath] - stringByAppendingPathComponent:kHockeyBundleName]; - bundle = [[NSBundle bundleWithPath:path] retain]; - } - return bundle; -} - -NSString *BWmd5(NSString *str) { - const char *cStr = [str UTF8String]; - unsigned char result[CC_MD5_DIGEST_LENGTH]; - CC_MD5( cStr, strlen(cStr), result ); - return [NSString - stringWithFormat: @"%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X", - result[0], result[1], - result[2], result[3], - result[4], result[5], - result[6], result[7], - result[8], result[9], - result[10], result[11], - result[12], result[13], - result[14], result[15] - ]; -} - -NSString *BWHockeyLocalize(NSString *stringToken) { - if (hockeyBundle()) { - return NSLocalizedStringFromTableInBundle(stringToken, @"Hockey", hockeyBundle(), @""); - } else { - return stringToken; - } -} diff --git a/Classes/BWHockeyManager.h b/Classes/BWHockeyManager.h deleted file mode 100644 index 5fac1180af..0000000000 --- a/Classes/BWHockeyManager.h +++ /dev/null @@ -1,266 +0,0 @@ -// -// BWHockeyManager.h -// -// Created by Andreas Linde on 8/17/10. -// Copyright 2010-2011 Andreas Linde. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - - -#import -#import "BWHockeyViewController.h" -#import "BWGlobal.h" - - -typedef enum { - HockeyComparisonResultDifferent, - HockeyComparisonResultGreater -} HockeyComparisonResult; - -typedef enum { - HockeyAuthorizationDenied, - HockeyAuthorizationAllowed, - HockeyAuthorizationPending -} HockeyAuthorizationState; - -typedef enum { - HockeyUpdateCheckStartup = 0, - HockeyUpdateCheckDaily = 1, - HockeyUpdateCheckManually = 2 -} HockeyUpdateSetting; - -@protocol BWHockeyManagerDelegate; - -@class BWApp; - -@interface BWHockeyManager : NSObject { - id delegate_; - NSArray *apps_; - - NSString *updateURL_; - NSString *appIdentifier_; - NSString *currentAppVersion_; - - UINavigationController *navController_; - BWHockeyViewController *currentHockeyViewController_; - UIView *authorizeView_; - - NSMutableData *receivedData_; - - BOOL loggingEnabled_; - BOOL checkInProgress_; - BOOL dataFound; - BOOL updateAvailable_; - BOOL showFeedback_; - BOOL updateURLOffline_; - BOOL updateAlertShowing_; - BOOL lastCheckFailed_; - - BOOL isAppStoreEnvironment_; - - NSURLConnection *urlConnection_; - NSDate *lastCheck_; - NSDate *usageStartTimestamp_; - - BOOL sendUserData_; - BOOL sendUsageTime_; - BOOL allowUserToDisableSendData_; - BOOL userAllowsSendUserData_; - BOOL userAllowsSendUsageTime_; - BOOL showUpdateReminder_; - BOOL checkForUpdateOnLaunch_; - HockeyComparisonResult compareVersionType_; - HockeyUpdateSetting updateSetting_; - BOOL showUserSettings_; - BOOL showDirectInstallOption_; - - BOOL requireAuthorization_; - NSString *authenticationSecret_; - - BOOL checkForTracker_; - NSDictionary *trackerConfig_; - - UIBarStyle barStyle_; - UIModalPresentationStyle modalPresentationStyle_; -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -// this is a singleton -+ (BWHockeyManager *)sharedHockeyManager; - -// update url needs to be set -@property (nonatomic, retain) NSString *updateURL; - -// private app identifier (optional) -@property (nonatomic, retain) NSString *appIdentifier; - -// delegate is optional -@property (nonatomic, assign) id delegate; - -// hockey secret is required if authentication is used -@property (nonatomic, retain) NSString *authenticationSecret; - - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Setting Properties - -// if YES, states will be logged using NSLog. Only enable this for debugging! -// if NO, nothing will be logged. (default) -@property (nonatomic, assign, getter=isLoggingEnabled) BOOL loggingEnabled; - -// if YES, the current user data is send: device type, iOS version, app version, UDID (default) -// if NO, no such data is send to the server -@property (nonatomic, assign, getter=shouldSendUserData) BOOL sendUserData; - -// if YES, the the users usage time of the app to the service, only in 1 minute granularity! (default) -// if NO, no such data is send to the server -@property (nonatomic, assign, getter=shouldSendUsageTime) BOOL sendUsageTime; - -// if YES, the user agrees to send the usage data, user can change it if the developer shows the settings (default) -// if NO, the user overwrites the developer setting and no such data is sent -@property (nonatomic, assign, getter=isAllowUserToDisableSendData) BOOL allowUserToDisableSendData; - -// if YES, the user allowed to send user data (default) -// if NO, the user denied to send user data -@property (nonatomic, assign, getter=doesUserAllowsSendUserData) BOOL userAllowsSendUserData; - -// if YES, the user allowed to send usage data (default) -// if NO, the user denied to send usage data -@property (nonatomic, assign, getter=doesUserAllowsSendUsageTime) BOOL userAllowsSendUsageTime; - -// if YES, the new version alert will be displayed always if the current version is outdated (default) -// if NO, the alert will be displayed only once for each new update -@property (nonatomic, assign) BOOL alwaysShowUpdateReminder; - -// if YES, the user can change the HockeyUpdateSetting value (default) -// if NO, the user can not change it, and the default or developer defined value will be used -@property (nonatomic, assign, getter=shouldShowUserSettings) BOOL showUserSettings; - -// set bar style of navigation controller -@property (nonatomic, assign) UIBarStyle barStyle; - -// set modal presentation style of update view -@property (nonatomic, assign) UIModalPresentationStyle modalPresentationStyle; - -// if YES, then an update check will be performed after the application becomes active (default) -// if NO, then the update check will not happen unless invoked explicitly -@property (nonatomic, assign, getter=isCheckForUpdateOnLaunch) BOOL checkForUpdateOnLaunch; - -// if YES, the alert notifying about an new update also shows a button to install the update directly -// if NO, the alert notifying about an new update only shows ignore and show update button -@property (nonatomic, assign, getter=isShowingDirectInstallOption) BOOL showDirectInstallOption; - -// if YES, each app version needs to be authorized by the server to run on this device -// if NO, each app version does not need to be authorized (default) -@property (nonatomic, assign, getter=isRequireAuthorization) BOOL requireAuthorization; - -// HockeyComparisonResultDifferent: alerts if the version on the server is different (default) -// HockeyComparisonResultGreater: alerts if the version on the server is greater -@property (nonatomic, assign) HockeyComparisonResult compareVersionType; - -// see HockeyUpdateSetting-enum. Will be saved in user defaults. -// default value: HockeyUpdateCheckStartup -@property (nonatomic, assign) HockeyUpdateSetting updateSetting; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Private Properties - -// if YES, the API will return an existing JMC config -// if NO, the API will return only version information -@property (nonatomic, assign) BOOL checkForTracker; - -// Contains the tracker config if received from server -@property (nonatomic, retain, readonly) NSDictionary *trackerConfig; - -// if YES the app is installed from the app store -// if NO the app is installed via ad-hoc or enterprise distribution -@property (nonatomic, readonly) BOOL isAppStoreEnvironment; - -// is an update available? -- (BOOL)isUpdateAvailable; - -// are we currently checking for updates? -- (BOOL)isCheckInProgress; - -// open update info view -- (void)showUpdateView; - -// manually start an update check -- (void)checkForUpdate; - -// checks for update, informs the user (error, no update found, etc) -- (void)checkForUpdateShowFeedback:(BOOL)feedback; - -// initiates app-download call. displays an system UIAlertView -- (BOOL)initiateAppDownload; - -// checks wether this app version is authorized -- (BOOL)appVersionIsAuthorized; - -// start checking for an authorization key -- (void)checkForAuthorization; - -// convenience methode to create hockey view controller -- (BWHockeyViewController *)hockeyViewController:(BOOL)modal; - -// get/set current active hockey view controller -@property (nonatomic, retain) BWHockeyViewController *currentHockeyViewController; - -// convenience method to get current running version string -- (NSString *)currentAppVersion; - -// get newest app or array of all available versions -- (BWApp *)app; - -- (NSArray *)apps; - -// check if there is any newer version mandatory -- (BOOL)hasNewerMandatoryVersion; - -@end - -/////////////////////////////////////////////////////////////////////////////////////////////////// -@protocol BWHockeyManagerDelegate - -/* - Return the device UDID which is required for beta testing, should return nil for app store configuration! - Example implementation if your configuration for the App Store is called "AppStore": - - #ifndef (CONFIGURATION_AppStore) - if ([[UIDevice currentDevice] respondsToSelector:@selector(uniqueIdentifier)]) - return [[UIDevice currentDevice] performSelector:@selector(uniqueIdentifier)]; - #endif - return nil; - - */ -- (NSString *)customDeviceIdentifier; - -@optional - -// Invoked when the internet connection is started, to let the app enable the activity indicator -- (void)connectionOpened; - -// Invoked when the internet connection is closed, to let the app disable the activity indicator -- (void)connectionClosed; - -// optional parent view controller for the update screen when invoked via the alert view, default is the root UIWindow instance -- (UIViewController *)viewControllerForHockeyController:(BWHockeyManager *)hockeyController; - -@end diff --git a/Classes/BWHockeySettingsViewController.h b/Classes/BWHockeySettingsViewController.h deleted file mode 100644 index f0683baf14..0000000000 --- a/Classes/BWHockeySettingsViewController.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// BWHockeySettingsViewController.h -// HockeyDemo -// -// Created by Andreas Linde on 3/8/11. -// Copyright 2011 Andreas Linde. All rights reserved. -// - -#import - -@class BWHockeyManager; - -@interface BWHockeySettingsViewController : UIViewController { - BWHockeyManager *hockeyManager_; -} - -@property (nonatomic, retain) BWHockeyManager *hockeyManager; - -- (id)init:(BWHockeyManager *)newHockeyManager; -- (id)init; - -@end diff --git a/Classes/BWHockeyViewController.h b/Classes/BWHockeyViewController.h deleted file mode 100644 index 5a596ec2ac..0000000000 --- a/Classes/BWHockeyViewController.h +++ /dev/null @@ -1,68 +0,0 @@ -// -// BWHockeyViewController.h -// -// Created by Andreas Linde on 8/17/10. -// Copyright 2010-2011 Andreas Linde. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "PSStoreButton.h" - -@class PSAppStoreHeader; - -typedef enum { - AppStoreButtonStateOffline, - AppStoreButtonStateCheck, - AppStoreButtonStateSearching, - AppStoreButtonStateUpdate, - AppStoreButtonStateInstalling -} AppStoreButtonState; - - -@class BWHockeyManager; - -@interface BWHockeyViewController : UITableViewController { - BWHockeyManager *hockeyManager_; - - NSDictionary *cellLayout; - - BOOL modal_; - BOOL modalAnimated_; - BOOL kvoRegistered_; - BOOL showAllVersions_; - UIStatusBarStyle statusBarStyle_; - PSAppStoreHeader *appStoreHeader_; - PSStoreButton *appStoreButton_; - - id popOverController_; - - AppStoreButtonState appStoreButtonState_; - - NSMutableArray *cells_; -} - -@property (nonatomic, retain) BWHockeyManager *hockeyManager; -@property (nonatomic, readwrite) BOOL modal; -@property (nonatomic, readwrite) BOOL modalAnimated; - -- (id)init:(BWHockeyManager *)newHockeyManager modal:(BOOL)newModal; -- (id)init; - -@end diff --git a/Classes/BWQuincyManager.h b/Classes/BWQuincyManager.h deleted file mode 100644 index f2d917a749..0000000000 --- a/Classes/BWQuincyManager.h +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Author: Andreas Linde - * Kent Sutherland - * - * Copyright (c) 2011 Andreas Linde & Kent Sutherland. - * All rights reserved. - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -#import -#import "BWQuincyManagerDelegate.h" - -#define BWQuincyLog(fmt, ...) do { if([BWQuincyManager sharedQuincyManager].isLoggingEnabled) { NSLog((@"[QuincyLib] %s/%d " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); }} while(0) - -#define kQuincyBundleName @"Quincy.bundle" - -NSBundle *quincyBundle(void); -NSString *BWQuincyLocalize(NSString *stringToken); - -//#define BWQuincyLocalize(StringToken) NSLocalizedStringFromTableInBundle(StringToken, @"Quincy", quincyBundle(), @"") - -// flags if the crashlog analyzer is started. since this may theoretically crash we need to track it -#define kQuincyKitAnalyzerStarted @"QuincyKitAnalyzerStarted" - -// flags if the QuincyKit is activated at all -#define kQuincyKitActivated @"QuincyKitActivated" - -// flags if the crashreporter should automatically send crashes without asking the user again -#define kAutomaticallySendCrashReports @"AutomaticallySendCrashReports" - -// stores the set of crashreports that have been approved but aren't sent yet -#define kApprovedCrashReports @"ApprovedCrashReports" - -// Notification message which QuincyManager is listening to, to retry sending pending crash reports to the server -#define BWQuincyNetworkBecomeReachable @"NetworkDidBecomeReachable" - -typedef enum QuincyKitAlertType { - QuincyKitAlertTypeSend = 0, - QuincyKitAlertTypeFeedback = 1, -} CrashAlertType; - -typedef enum CrashReportStatus { - // The status of the crash is queued, need to check later (HockeyApp) - CrashReportStatusQueued = -80, - - // This app version is set to discontinued, no new crash reports accepted by the server - CrashReportStatusFailureVersionDiscontinued = -30, - - // XML: Sender version string contains not allowed characters, only alphanumberical including space and . are allowed - CrashReportStatusFailureXMLSenderVersionNotAllowed = -21, - - // XML: Version string contains not allowed characters, only alphanumberical including space and . are allowed - CrashReportStatusFailureXMLVersionNotAllowed = -20, - - // SQL for adding a symoblicate todo entry in the database failed - CrashReportStatusFailureSQLAddSymbolicateTodo = -18, - - // SQL for adding crash log in the database failed - CrashReportStatusFailureSQLAddCrashlog = -17, - - // SQL for adding a new version in the database failed - CrashReportStatusFailureSQLAddVersion = -16, - - // SQL for checking if the version is already added in the database failed - CrashReportStatusFailureSQLCheckVersionExists = -15, - - // SQL for creating a new pattern for this bug and set amount of occurrances to 1 in the database failed - CrashReportStatusFailureSQLAddPattern = -14, - - // SQL for checking the status of the bugfix version in the database failed - CrashReportStatusFailureSQLCheckBugfixStatus = -13, - - // SQL for updating the occurances of this pattern in the database failed - CrashReportStatusFailureSQLUpdatePatternOccurances = -12, - - // SQL for getting all the known bug patterns for the current app version in the database failed - CrashReportStatusFailureSQLFindKnownPatterns = -11, - - // SQL for finding the bundle identifier in the database failed - CrashReportStatusFailureSQLSearchAppName = -10, - - // the post request didn't contain valid data - CrashReportStatusFailureInvalidPostData = -3, - - // incoming data may not be added, because e.g. bundle identifier wasn't found - CrashReportStatusFailureInvalidIncomingData = -2, - - // database cannot be accessed, check hostname, username, password and database name settings in config.php - CrashReportStatusFailureDatabaseNotAvailable = -1, - - CrashReportStatusUnknown = 0, - - CrashReportStatusAssigned = 1, - - CrashReportStatusSubmitted = 2, - - CrashReportStatusAvailable = 3, -} CrashReportStatus; - -@interface BWQuincyManager : NSObject { - NSString *_submissionURL; - - id _delegate; - - BOOL _loggingEnabled; - BOOL _showAlwaysButton; - BOOL _feedbackActivated; - BOOL _autoSubmitCrashReport; - - BOOL _didCrashInLastSession; - NSTimeInterval _timeintervalCrashInLastSessionOccured; - - NSString *_appIdentifier; - - NSString *_feedbackRequestID; - float _feedbackDelayInterval; - - NSMutableString *_contentOfProperty; - CrashReportStatus _serverResult; - - int _analyzerStarted; - NSString *_crashesDir; - NSFileManager *_fileManager; - - BOOL _crashIdenticalCurrentVersion; - BOOL _crashReportActivated; - - NSMutableArray *_crashFiles; - - NSMutableData *_responseData; - NSInteger _statusCode; - - NSURLConnection *_urlConnection; - - NSData *_crashData; - - NSString *_languageStyle; - BOOL _sendingInProgress; -} - -+ (BWQuincyManager *)sharedQuincyManager; - -// submission URL defines where to send the crash reports to (required) -@property (nonatomic, retain) NSString *submissionURL; - -// delegate is optional -@property (nonatomic, assign) id delegate; - -/////////////////////////////////////////////////////////////////////////////////////////////////// -// settings - -// if YES, states will be logged using NSLog. Only enable this for debugging! -// if NO, nothing will be logged. (default) -@property (nonatomic, assign, getter=isLoggingEnabled) BOOL loggingEnabled; - -// nil, using the default localization files (Default) -// set to another string which will be appended to the Quincy localization file name, "Alternate" is another provided text set -@property (nonatomic, retain) NSString *languageStyle; - -// if YES, the user will get the option to choose "Always" for sending crash reports. This will cause the dialog not to show the alert description text landscape mode! (default) -// if NO, the dialog will not show a "Always" button -@property (nonatomic, assign, getter=isShowingAlwaysButton) BOOL showAlwaysButton; - -// if YES, the user will be presented with a status of the crash, if known -// if NO, the user will not see any feedback information (default) -@property (nonatomic, assign, getter=isFeedbackActivated) BOOL feedbackActivated; - -// if YES, the crash report will be submitted without asking the user -// if NO, the user will be asked if the crash report can be submitted (default) -@property (nonatomic, assign, getter=isAutoSubmitCrashReport) BOOL autoSubmitCrashReport; - -// will return YES if the last session crashed, to e.g. make sure a "rate my app" alert will not show up -@property (nonatomic, readonly) BOOL didCrashInLastSession; - -// will return the timeinterval from startup to the crash in seconds, default is -1 -@property (nonatomic, readonly) NSTimeInterval timeintervalCrashInLastSessionOccured; - -// If you want to use HockeyApp instead of your own server, this is required -@property (nonatomic, retain) NSString *appIdentifier; - -@end diff --git a/Classes/BWQuincyManagerDelegate.h b/Classes/BWQuincyManagerDelegate.h deleted file mode 100644 index 7ce424a8d1..0000000000 --- a/Classes/BWQuincyManagerDelegate.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// CNSCrashReportManagerDelegate.h -// HockeySDK -// -// Created by Andreas Linde on 29.03.12. -// Copyright (c) 2012 __MyCompanyName__. All rights reserved. -// - -#import - -// This protocol is used to send the image updates -@protocol BWQuincyManagerDelegate - -@optional - -// Return the userid the crashreport should contain, empty by default --(NSString *) crashReportUserID; - -// Return the contact value (e.g. email) the crashreport should contain, empty by default --(NSString *) crashReportContact; - -// Return the description the crashreport should contain, empty by default. The string will automatically be wrapped into <[DATA[ ]]>, so make sure you don't do that in your string. --(NSString *) crashReportDescription; - -// Invoked when the internet connection is started, to let the app enable the activity indicator --(void) connectionOpened; - -// Invoked when the internet connection is closed, to let the app disable the activity indicator --(void) connectionClosed; - -// Invoked before the user is asked to send a crash report, so you can do additional actions. E.g. to make sure not to ask the user for an app rating :) --(void) willShowSubmitCrashReportAlert; - -// Invoked after the user did choose to send crashes always in the alert --(void) userDidChooseSendAlways; - -// Invoked right before sending crash reports to the server succeeded --(void) sendingCrashReportsDidStart; - -// Invoked after sending crash reports to the server failed --(void) sendingCrashReportsDidFailWithError:(NSError *)error; - -// Invoked after sending crash reports to the server succeeded --(void) sendingCrashReportsDidFinish; - -@end \ No newline at end of file diff --git a/Classes/CNSFixCategoryBug.h b/Classes/CNSFixCategoryBug.h deleted file mode 100644 index b680612c44..0000000000 --- a/Classes/CNSFixCategoryBug.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// CNSFixCategoryBug.h -// HockeySDK -// -// Created by Andreas Linde on 12/7/11. -// Copyright (c) 2011 Andreas Linde. All rights reserved. -// - -#ifndef HockeySDK_CNSFixCategoryBug_h -#define HockeySDK_CNSFixCategoryBug_h - -/** - Add this macro before each category implementation, so we don't have to use - -all_load or -force_load to load object files from static libraries that only contain - categories and no classes. - See http://developer.apple.com/library/mac/#qa/qa2006/qa1490.html for more info. - - Shamelessly borrowed from Three20 - */ - -#define CNS_FIX_CATEGORY_BUG(name) @interface CNS_FIX_CATEGORY_BUG##name @end \ -@implementation CNS_FIX_CATEGORY_BUG##name @end - - -#endif diff --git a/Classes/CNSHockeyManager.h b/Classes/CNSHockeyManager.h deleted file mode 100644 index 6f4e71b4ee..0000000000 --- a/Classes/CNSHockeyManager.h +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright 2011 Codenauts UG (haftungsbeschränkt). All rights reserved. -// See LICENSE.txt for author information. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "BWHockeyManager.h" - -#pragma mark - Delegate - -@protocol CNSHockeyManagerDelegate - -/* - Return the device UDID which is required for beta testing, should return nil for app store configuration! - Example implementation if your configuration for the App Store is called "AppStore": - - #ifndef (CONFIGURATION_AppStore) - if ([[UIDevice currentDevice] respondsToSelector:@selector(uniqueIdentifier)]) - return [[UIDevice currentDevice] performSelector:@selector(uniqueIdentifier)]; - #endif - return nil; - - */ -- (NSString *)customDeviceIdentifier; - -@optional - -// Invoked when the manager is configured -// -// Implement to force the usage of the live identifier, e.g. for enterprise apps -// which are distributed inside your company -- (BOOL)shouldUseLiveIdenfitier; - -// Invoked when the internet connection is started -// -// Implement to let the delegate enable the activity indicator -- (void)connectionOpened; - -// Invoked when the internet connection is closed -// -// Implement to let the delegate disable the activity indicator -- (void)connectionClosed; - -// Invoked via the alert view to define the presenting view controller -// -// Default is the root view controller of the main window instance -- (UIViewController *)viewControllerForHockeyController:(BWHockeyManager *)hockeyController; - -// Invoked before a crash report will be sent -// -// Return a userid or similar which the crashreport should contain -// -// Maximum length: 255 chars -// -// Default: empty -- (NSString *)crashReportUserID; - -// Invoked before a crash report will be sent -// -// Return contact data, e.g. an email address, for the crash report -// Maximum length: 255 chars -// -// Default: empty --(NSString *)crashReportContact; - -// Invoked before a crash report will be sent -// -// Return a the description for the crashreport should contain; the string -// will automatically be wrapped into <[DATA[ ]]>, so make sure you don't do -// that in your string. -// -// Default: empty --(NSString *)crashReportDescription; - -// Invoked before the user is asked to send a crash report -// -// Implement to do additional actions, e.g. to make sure to not to ask the -// user for an app rating :) -- (void)willShowSubmitCrashReportAlert; - -// Invoked after the user did choose to send crashes always in the alert --(void) userDidChooseSendAlways; - -@end - -@interface CNSHockeyManager : NSObject { -@private - id delegate; - NSString *appIdentifier; -} - -#pragma mark - Public Properties - -// Custom language style; set to a string which will be appended to -// to the localization file name; the Hockey SDK includes an alternative -// file, to use this, set to @"Alternate" -// -// Default: nil -@property (nonatomic, retain) NSString *languageStyle; - -// Enable debug logging; ONLY ENABLE THIS FOR DEBUGGING! -// -// Default: NO -@property (nonatomic, assign, getter=isLoggingEnabled) BOOL loggingEnabled; - -// Show button "Always" in crash alert; this will cause the dialog not to -// show the alert description text landscape mode! (default) -// -// Default: NO -@property (nonatomic, assign, getter=isShowingAlwaysButton) BOOL showAlwaysButton; - -// Show feedback from server with status of the crash; if you set a crash -// to resolved on HockeyApp and assign a fixed version, this version will -// be reported to the user -// -// Default: NO -@property (nonatomic, assign, getter=isFeedbackActivated) BOOL feedbackActivated; - -// Submit crash report without asking the user -// -// Default: NO -@property (nonatomic, assign, getter=isAutoSubmitCrashReport) BOOL autoSubmitCrashReport; - -// Send user data to HockeyApp when checking for a new version; works only -// for beta apps and should not be activated for live apps. User data includes -// the device type, OS version, app version and device UDID. -// -// Default: YES -@property (nonatomic, assign, getter=shouldSendUserData) BOOL sendUserData; - -// Send usage time to HockeyApp when checking for a new version; works only -// for beta apps and should not be activated for live apps. -// -// Default: YES -@property (nonatomic, assign, getter=shouldSendUsageTime) BOOL sendUsageTime; - -// Enable to allow the user to change the settings from the update view -// -// Default: YES -@property (nonatomic, assign, getter=shouldShowUserSettings) BOOL showUserSettings; - -// Set bar style of navigation controller -// -// Default: UIBarStyleDefault -@property (nonatomic, assign) UIBarStyle barStyle; - -// Set modal presentation style of update view -// -// Default: UIModalPresentationStyleFormSheet -@property (nonatomic, assign) UIModalPresentationStyle modalPresentationStyle; - -// Allow the user to disable the sending of user data; this settings should -// only be set if showUserSettings is enabled. -// -// Default: YES -@property (nonatomic, assign, getter=isUserAllowedToDisableSendData) BOOL allowUserToDisableSendData; - -// Enable to show the new version alert every time the app becomes active and -// the current version is outdated -// -// Default: YES -@property (nonatomic, assign) BOOL alwaysShowUpdateReminder; - -// Enable to check for a new version every time the app becomes active; if -// disabled you need to trigger the update mechanism manually -// -// Default: YES -@property (nonatomic, assign, getter=shouldCheckForUpdateOnLaunch) BOOL checkForUpdateOnLaunch; - -// Show a button "Install" in the update alert to let the user directly start -// the update; note that the user will not see the release notes. -// -// Default: NO -@property (nonatomic, assign, getter=isShowingDirectInstallOption) BOOL showDirectInstallOption; - -// Enable to check on the server that the app is authorized to run on this -// device; the check is based on the UDID and the authentication secret which -// is shown on the app page on HockeyApp -// -// Default: NO -@property (nonatomic, assign, getter=shouldRequireAuthorization) BOOL requireAuthorization; - -// Set to the authentication secret which is shown on the app page on HockeyApp; -// must be set if requireAuthorization is enabled; leave empty otherwise -// -// Default: nil -@property (nonatomic, retain) NSString *authenticationSecret; - -// Define how the client determines if a new version is available. -// -// Values: -// HockeyComparisonResultDifferent - the version on the server is different -// HockeyComparisonResultGreate - the version on the server is greater -// -// Default: HockeyComparisonResultGreater -@property (nonatomic, assign) HockeyComparisonResult compareVersionType; - -// if YES the app is installed from the app store -// if NO the app is installed via ad-hoc or enterprise distribution -@property (nonatomic, readonly) BOOL isAppStoreEnvironment; - -#pragma mark - Public Methods - -// Returns the shared manager object -+ (CNSHockeyManager *)sharedHockeyManager; - -// Configure HockeyApp with a single app identifier and delegate; use this -// only for debug or beta versions of your app! -- (void)configureWithIdentifier:(NSString *)appIdentifier delegate:(id)delegate; - -// Configure HockeyApp with different app identifiers for beta and live versions -// of the app; the update alert will only be shown for the beta identifier -- (void)configureWithBetaIdentifier:(NSString *)betaIdentifier liveIdentifier:(NSString *)liveIdentifier delegate:(id)delegate; - -// Returns true if the app crashes in the last session -- (BOOL)didCrashInLastSession; - -// Returns true if an update is available -- (BOOL)isUpdateAvailable; - -// Returns true if update check is running -- (BOOL)isCheckInProgress; - -// Show update info view -- (void)showUpdateView; - -// Manually start an update check -- (void)checkForUpdate; - -// Checks for update and informs the user if an update was found or an -// error occurred -- (void)checkForUpdateShowFeedback:(BOOL)feedback; - -// Initiates app-download call; this displays an alert view of the OS -- (BOOL)initiateAppDownload; - -// Returns true if this app version was authorized with the server -- (BOOL)appVersionIsAuthorized; - -// Manually check if the device is authorized to run this version -- (void)checkForAuthorization; - -// Return a new instance of BWHockeyViewController -- (BWHockeyViewController *)hockeyViewController:(BOOL)modal; - -@end diff --git a/Classes/CNSHockeyManager.m b/Classes/CNSHockeyManager.m deleted file mode 100644 index cc5b5bb427..0000000000 --- a/Classes/CNSHockeyManager.m +++ /dev/null @@ -1,427 +0,0 @@ -// Copyright 2011 Codenauts UG (haftungsbeschränkt). All rights reserved. -// See LICENSE.txt for author information. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "CNSHockeyManager.h" -#import "BWQuincyManager.h" -#import "BWHockeyManager.h" - -@interface CNSHockeyManager () - -- (BOOL)shouldUseLiveIdenfitier; - -- (void)configureJMC; -- (void)configureHockeyManager; -- (void)configureQuincyManager; - -@end - -@implementation CNSHockeyManager - -#pragma mark - Public Class Methods - -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 40000 -+ (CNSHockeyManager *)sharedHockeyManager { - static CNSHockeyManager *sharedInstance = nil; - static dispatch_once_t pred; - - dispatch_once(&pred, ^{ - sharedInstance = [CNSHockeyManager alloc]; - sharedInstance = [sharedInstance init]; - }); - - return sharedInstance; -} -#else -+ (CNSHockeyManager *)sharedHockeyManager { - static CNSHockeyManager *hockeyManager = nil; - - if (hockeyManager == nil) { - hockeyManager = [[CNSHockeyManager alloc] init]; - } - - return hockeyManager; -} -#endif - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wundeclared-selector" -+ (id)jmcInstance { - id jmcClass = NSClassFromString(@"JMC"); - if ((jmcClass) && ([jmcClass respondsToSelector:@selector(sharedInstance)])) { - return [jmcClass performSelector:@selector(sharedInstance)]; - } -#ifdef JMC_LEGACY - else if ((jmcClass) && ([jmcClass respondsToSelector:@selector(instance)])) { - return [jmcClass performSelector:@selector(instance)]; // legacy pre (JMC 1.0.11) support - } -#endif - - return nil; -} -#pragma clang diagnostic pop - -+ (BOOL)isJMCActive { - id jmcInstance = [self jmcInstance]; - return (jmcInstance) && ([jmcInstance performSelector:@selector(url)]); -} - -+ (BOOL)isJMCPresent { - return [self jmcInstance] != nil; -} - -#pragma mark - Private Class Methods - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wundeclared-selector" -+ (void)disableJMCCrashReporter { - id jmcInstance = [self jmcInstance]; - id jmcOptions = [jmcInstance performSelector:@selector(options)]; - SEL crashReporterSelector = @selector(setCrashReportingEnabled:); - - BOOL value = NO; - - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[jmcOptions methodSignatureForSelector:crashReporterSelector]]; - invocation.target = jmcOptions; - invocation.selector = crashReporterSelector; - [invocation setArgument:&value atIndex:2]; - [invocation invoke]; -} -#pragma clang diagnostic pop - -+ (BOOL)checkJMCConfiguration:(NSDictionary *)configuration { - return (([configuration isKindOfClass:[NSDictionary class]]) && - ([[configuration valueForKey:@"enabled"] boolValue]) && - ([[configuration valueForKey:@"url"] length] > 0) && - ([[configuration valueForKey:@"key"] length] > 0) && - ([[configuration valueForKey:@"project"] length] > 0)); -} - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wundeclared-selector" -+ (void)applyJMCConfiguration:(NSDictionary *)configuration { - id jmcInstance = [self jmcInstance]; - SEL configureSelector = @selector(configureJiraConnect:projectKey:apiKey:); - - NSString *url = [configuration valueForKey:@"url"]; - NSString *project = [configuration valueForKey:@"project"]; - NSString *key = [configuration valueForKey:@"key"]; - - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[jmcInstance methodSignatureForSelector:configureSelector]]; - invocation.target = jmcInstance; - invocation.selector = configureSelector; - [invocation setArgument:&url atIndex:2]; - [invocation setArgument:&project atIndex:3]; - [invocation setArgument:&key atIndex:4]; - [invocation invoke]; - - if ([jmcInstance respondsToSelector:@selector(ping)]) { - [jmcInstance performSelector:@selector(ping)]; - } -} -#pragma clang diagnostic pop - -#pragma mark - Public Instance Methods (Configuration) - -- (void)configureWithIdentifier:(NSString *)newAppIdentifier delegate:(id)newDelegate { - delegate = newDelegate; - [appIdentifier release]; - appIdentifier = [newAppIdentifier copy]; - - [self configureQuincyManager]; - [self configureHockeyManager]; -} - -- (void)configureWithBetaIdentifier:(NSString *)betaIdentifier liveIdentifier:(NSString *)liveIdentifier delegate:(id)newDelegate { - delegate = newDelegate; - [appIdentifier release]; - - if ([self shouldUseLiveIdenfitier]) { - appIdentifier = [liveIdentifier copy]; - } - else { - appIdentifier = [betaIdentifier copy]; - } - - if (appIdentifier) { - [self configureQuincyManager]; - [self configureHockeyManager]; - } -} - -- (BOOL)isLoggingEnabled { - return [[BWHockeyManager sharedHockeyManager] isLoggingEnabled]; - return [[BWQuincyManager sharedQuincyManager] isLoggingEnabled]; -} - -- (void)setLoggingEnabled:(BOOL)loggingEnabled { - return [[BWHockeyManager sharedHockeyManager] setLoggingEnabled:loggingEnabled]; - return [[BWQuincyManager sharedQuincyManager] setLoggingEnabled:loggingEnabled]; -} - -#pragma mark - Public Instance Methods (Crash Reporting) - -- (NSString *)languageStyle { - return [[BWQuincyManager sharedQuincyManager] languageStyle]; -} - -- (void)setLanguageStyle:(NSString *)languageStyle { - [[BWQuincyManager sharedQuincyManager] setLanguageStyle:languageStyle]; -} - -- (BOOL)isShowingAlwaysButton { - return [[BWQuincyManager sharedQuincyManager] isShowingAlwaysButton]; -} - -- (void)setShowAlwaysButton:(BOOL)showAlwaysButton { - [[BWQuincyManager sharedQuincyManager] setShowAlwaysButton:showAlwaysButton]; -} - -- (BOOL)isFeedbackActivated { - return [[BWQuincyManager sharedQuincyManager] isFeedbackActivated]; -} - -- (void)setFeedbackActivated:(BOOL)setFeedbackActivated { - [[BWQuincyManager sharedQuincyManager] setFeedbackActivated:setFeedbackActivated]; -} - -- (BOOL)isAutoSubmitCrashReport { - return [[BWQuincyManager sharedQuincyManager] isAutoSubmitCrashReport]; -} - -- (void)setAutoSubmitCrashReport:(BOOL)autoSubmitCrashReport { - [[BWQuincyManager sharedQuincyManager] setAutoSubmitCrashReport:autoSubmitCrashReport]; -} - -- (BOOL)didCrashInLastSession { - return [[BWQuincyManager sharedQuincyManager] didCrashInLastSession]; -} - -#pragma mark - Public Instance Methods (Distribution) - -- (BOOL)shouldSendUserData { - return [[BWHockeyManager sharedHockeyManager] shouldSendUserData]; -} - -- (void)setSendUserData:(BOOL)sendUserData { - [[BWHockeyManager sharedHockeyManager] setSendUserData:sendUserData]; -} - -- (BOOL)shouldSendUsageTime { - return [[BWHockeyManager sharedHockeyManager] shouldSendUsageTime]; -} - -- (void)setSendUsageTime:(BOOL)sendUsageTime { - [[BWHockeyManager sharedHockeyManager] setSendUsageTime:sendUsageTime]; -} - -- (BOOL)shouldShowUserSettings { - return [[BWHockeyManager sharedHockeyManager] shouldShowUserSettings]; -} - -- (void)setShowUserSettings:(BOOL)showUserSettings { - [[BWHockeyManager sharedHockeyManager] setShowUserSettings:showUserSettings]; -} - -- (UIBarStyle)barStyle { - return [[BWHockeyManager sharedHockeyManager] barStyle]; -} - -- (void)setBarStyle:(UIBarStyle)barStyle { - [[BWHockeyManager sharedHockeyManager] setBarStyle:barStyle]; -} - -- (UIModalPresentationStyle)modalPresentationStyle { - return [[BWHockeyManager sharedHockeyManager] modalPresentationStyle]; -} - -- (void)setModalPresentationStyle:(UIModalPresentationStyle)modalPresentationStyle { - [[BWHockeyManager sharedHockeyManager] setModalPresentationStyle:modalPresentationStyle]; -} - -- (BOOL)isUserAllowedToDisableSendData { - return [[BWHockeyManager sharedHockeyManager] isAllowUserToDisableSendData]; -} - -- (void)setAllowUserToDisableSendData:(BOOL)allowUserToDisableSendData { - [[BWHockeyManager sharedHockeyManager] setAllowUserToDisableSendData:allowUserToDisableSendData]; -} - -- (BOOL)alwaysShowUpdateReminder { - return [[BWHockeyManager sharedHockeyManager] alwaysShowUpdateReminder]; -} - -- (void)setAlwaysShowUpdateReminder:(BOOL)alwaysShowUpdateReminder { - [[BWHockeyManager sharedHockeyManager] setAlwaysShowUpdateReminder:alwaysShowUpdateReminder]; -} - -- (BOOL)shouldCheckForUpdateOnLaunch { - return [[BWHockeyManager sharedHockeyManager] isCheckForUpdateOnLaunch]; -} - -- (void)setCheckForUpdateOnLaunch:(BOOL)checkForUpdateOnLaunch { - [[BWHockeyManager sharedHockeyManager] setCheckForUpdateOnLaunch:checkForUpdateOnLaunch]; -} - -- (BOOL)isShowingDirectInstallOption { - return [[BWHockeyManager sharedHockeyManager] isShowingDirectInstallOption]; -} - -- (void)setShowDirectInstallOption:(BOOL)showDirectInstallOption { - [[BWHockeyManager sharedHockeyManager] setShowDirectInstallOption:showDirectInstallOption]; -} - -- (BOOL)shouldRequireAuthorization { - return [[BWHockeyManager sharedHockeyManager] isRequireAuthorization]; -} - -- (void)setRequireAuthorization:(BOOL)requireAuthorization { - [[BWHockeyManager sharedHockeyManager] setRequireAuthorization:requireAuthorization]; -} - -- (NSString *)authenticationSecret { - return [[BWHockeyManager sharedHockeyManager] authenticationSecret]; -} - -- (void)setAuthenticationSecret:(NSString *)authenticationSecret { - [[BWHockeyManager sharedHockeyManager] setAuthenticationSecret:authenticationSecret]; -} - -- (HockeyComparisonResult)compareVersionType { - return [[BWHockeyManager sharedHockeyManager] compareVersionType]; -} - -- (void)setCompareVersionType:(HockeyComparisonResult)compareVersionType { - [[BWHockeyManager sharedHockeyManager] setCompareVersionType:compareVersionType]; -} - -- (BOOL)isAppStoreEnvironment { - return [[BWHockeyManager sharedHockeyManager] isAppStoreEnvironment]; -} - -- (BOOL)isUpdateAvailable { - return [[BWHockeyManager sharedHockeyManager] isUpdateAvailable]; -} - -- (BOOL)isCheckInProgress { - return [[BWHockeyManager sharedHockeyManager] isCheckInProgress]; -} - -- (void)showUpdateView { - [[BWHockeyManager sharedHockeyManager] showUpdateView]; -} - -- (void)checkForUpdate { - [[BWHockeyManager sharedHockeyManager] checkForUpdate]; -} - -- (void)checkForUpdateShowFeedback:(BOOL)feedback { - [[BWHockeyManager sharedHockeyManager] checkForUpdateShowFeedback:feedback]; -} - -- (BOOL)initiateAppDownload { - return [[BWHockeyManager sharedHockeyManager] initiateAppDownload]; -} - -- (BOOL)appVersionIsAuthorized { - return [[BWHockeyManager sharedHockeyManager] appVersionIsAuthorized]; -} - -- (void)checkForAuthorization { - [[BWHockeyManager sharedHockeyManager] checkForAuthorization]; -} - -- (BWHockeyViewController *)hockeyViewController:(BOOL)modal { - return [[BWHockeyManager sharedHockeyManager] hockeyViewController:modal]; -} - -#pragma mark - Private Instance Methods - -- (BOOL)shouldUseLiveIdenfitier { - BOOL delegateResult = NO; - if ([delegate respondsToSelector:@selector(shouldUseLiveIdenfitier)]) { - delegateResult = [(NSObject *)delegate shouldUseLiveIdenfitier]; - } - - return (delegateResult) || ([[BWHockeyManager sharedHockeyManager] isAppStoreEnvironment]); -} - -- (void)configureQuincyManager { - [[BWQuincyManager sharedQuincyManager] setAppIdentifier:appIdentifier]; - [[BWQuincyManager sharedQuincyManager] setDelegate:(id)delegate]; -} - -- (void)configureHockeyManager { - [[BWHockeyManager sharedHockeyManager] setAppIdentifier:appIdentifier]; - [[BWHockeyManager sharedHockeyManager] setCheckForTracker:YES]; - [[BWHockeyManager sharedHockeyManager] setDelegate:(id)delegate]; - - // Only if JMC is part of the project - if ([[self class] isJMCPresent]) { - [[BWHockeyManager sharedHockeyManager] addObserver:self forKeyPath:@"trackerConfig" options:0 context:nil]; - [[self class] disableJMCCrashReporter]; - [self performSelector:@selector(configureJMC) withObject:nil afterDelay:0]; - } -} - -- (void)configureJMC { - // Return if JMC is already configured - if ([[self class] isJMCActive]) { - return; - } - - // Return if app id is nil - if (!appIdentifier) { - return; - } - - // Configure JMC from user defaults - NSDictionary *configurations = [[NSUserDefaults standardUserDefaults] valueForKey:@"CNSTrackerConfigurations"]; - NSDictionary *configuration = [configurations valueForKey:appIdentifier]; - if ([[self class] checkJMCConfiguration:configuration]) { - [[self class] applyJMCConfiguration:configuration]; - } -} - -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - if (([object trackerConfig]) && ([[object trackerConfig] isKindOfClass:[NSDictionary class]])) { - NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; - NSMutableDictionary *trackerConfig = [[defaults valueForKey:@"CNSTrackerConfigurations"] mutableCopy]; - if (!trackerConfig) { - trackerConfig = [[NSMutableDictionary dictionaryWithCapacity:1] retain]; - } - - [trackerConfig setValue:[object trackerConfig] forKey:appIdentifier]; - [defaults setValue:trackerConfig forKey:@"CNSTrackerConfigurations"]; - [trackerConfig release]; - - [defaults synchronize]; - [self configureJMC]; - } -} - -- (void)dealloc { - [appIdentifier release], appIdentifier = nil; - delegate = nil; - - [super dealloc]; -} - -@end diff --git a/Classes/HockeySDK.h b/Classes/HockeySDK.h new file mode 100644 index 0000000000..75ab536f04 --- /dev/null +++ b/Classes/HockeySDK.h @@ -0,0 +1,82 @@ +/* + * Author: Andreas Linde + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * Copyright (c) 2011 Andreas Linde. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef HockeySDK_h +#define HockeySDK_h + +#import "BITHockeyManager.h" +#import "BITHockeyManagerDelegate.h" + +#import "BITCrashManager.h" +#import "BITCrashManagerDelegate.h" + +#import "BITUpdateManager.h" +#import "BITUpdateManagerDelegate.h" +#import "BITUpdateViewController.h" +#import "BITUpdateSettingsViewController.h" + +// Notification message which HockeyManager is listening to, to retry requesting updated from the server +#define BITHockeyNetworkDidBecomeReachableNotification @"BITHockeyNetworkDidBecomeReachable" + + +// Crash Reporting + +// flags if the crashreporter is activated at all +// set this as bool in user defaults e.g. in the settings, if you want to let the user be able to deactivate it +#define kBITCrashActivated @"BITCrashActivated" + +// flags if the crashreporter should automatically send crashes without asking the user again +// set this as bool in user defaults e.g. in the settings, if you want to let the user be able to set this on or off +#define kBITCrashAutomaticallySendReports @"BITCrashAutomaticallySendReports" + +// hockey api error domain +typedef enum { + BITCrashErrorUnknown, + BITCrashAPIAppVersionRejected, + BITCrashAPIReceivedEmptyResponse, + BITCrashAPIErrorWithStatusCode +} BITCrashErrorReason; +static NSString *kBITCrashErrorDomain = @"BITCrashReporterErrorDomain"; + + +// Update App Versions + +// hockey api error domain +typedef enum { + BITUpdateErrorUnknown, + BITUpdateAPIServerReturnedInvalidStatus, + BITUpdateAPIServerReturnedInvalidData, + BITUpdateAPIServerReturnedEmptyResponse, + BITUpdateAPIClientAuthorizationMissingSecret, + BITUpdateAPIClientCannotCreateConnection +} BITUpdateErrorReason; +static NSString *kBITUpdateErrorDomain = @"BITUpdaterErrorDomain"; + + +#endif diff --git a/Classes/HockeySDKPrivate.h b/Classes/HockeySDKPrivate.h new file mode 100644 index 0000000000..aa732a7708 --- /dev/null +++ b/Classes/HockeySDKPrivate.h @@ -0,0 +1,94 @@ +/* + * Author: Andreas Linde + * Kent Sutherland + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * Copyright (c) 2011 Andreas Linde & Kent Sutherland. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + + +#import + +#ifndef HockeySDK_HockeySDKPrivate_h +#define HockeySDK_HockeySDKPrivate_h + +#define BITHOCKEYSDK_NAME @"HockeySDK" +#define BITHOCKEYSDK_VERSION @"2.3.0-dev" + +#define kBITUpdateArrayOfLastCheck @"BITUpdateArrayOfLastCheck" +#define kBITUpdateDateOfLastCheck @"BITUpdateDateOfLastCheck" +#define kBITUpdateDateOfVersionInstallation @"BITUpdateDateOfVersionInstallation" +#define kBITUpdateUsageTimeOfCurrentVersion @"BITUpdateUsageTimeOfCurrentVersion" +#define kBITUpdateUsageTimeForVersionString @"BITUpdateUsageTimeForVersionString" +#define kBITUpdateAutoUpdateSetting @"BITUpdateAutoUpdateSetting" +#define kBITUpdateAllowUserSetting @"BITUpdateAllowUserSetting" +#define kBITUpdateAllowUsageSetting @"BITUpdateAllowUsageSetting" +#define kBITUpdateAutoUpdateSetting @"BITUpdateAutoUpdateSetting" +#define kBITUpdateAuthorizedVersion @"BITUpdateAuthorizedVersion" +#define kBITUpdateAuthorizedToken @"BITUpdateAuthorizedToken" + +#define BITHOCKEYSDK_BUNDLE @"HockeySDKResources" +#define BITHOCKEYSDK_URL @"https://sdk.hockeyapp.net/" + +#define BITHockeySDKLog(fmt, ...) do { if([BITHockeyManager sharedHockeyManager].isLoggingEnabled) { NSLog((@"[HockeySDK] %s/%d " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); }} while(0) + +NSBundle *BITHockeySDKBundle(void); +NSString *BITHockeySDKLocalizedString(NSString *stringToken); +NSString *BITHockeySDKMD5(NSString *str); + + +// compatibility helper +#ifdef BITHOCKEYSDK_STATIC_LIBRARY +// If HockeySDK is built as a static library and linked into the project +// we can't use this project's deployment target to statically decide if +// native JSON is available +#define BITHOCKEYSDK_NATIVE_JSON_AVAILABLE 0 +#else +#define BITHOCKEYSDK_NATIVE_JSON_AVAILABLE __IPHONE_OS_VERSION_MIN_REQUIRED >= 50000 +#endif + + + +#ifndef kCFCoreFoundationVersionNumber_iPhoneOS_5_0 +#define kCFCoreFoundationVersionNumber_iPhoneOS_5_0 674.0 +#endif +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 50000 +#define BITHOCKEYSDK_IF_IOS5_OR_GREATER(...) \ +if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iPhoneOS_5_0) \ +{ \ +__VA_ARGS__ \ +} +#else +#define BITHOCKEYSDK_IF_IOS5_OR_GREATER(...) +#endif + +#define BITHOCKEYSDK_IF_PRE_IOS5(...) \ +if (kCFCoreFoundationVersionNumber < kCFCoreFoundationVersionNumber_iPhoneOS_5_0) \ +{ \ +__VA_ARGS__ \ +} + + +#endif diff --git a/Classes/HockeySDKPrivate.m b/Classes/HockeySDKPrivate.m new file mode 100644 index 0000000000..f5a32fe0d1 --- /dev/null +++ b/Classes/HockeySDKPrivate.m @@ -0,0 +1,69 @@ +/* + * Author: Andreas Linde + * + * Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + * Copyright (c) 2011 Andreas Linde. + * All rights reserved. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#import "HockeySDKPrivate.h" +#include + + +// Load the framework bundle. +NSBundle *BITHockeySDKBundle(void) { + static NSBundle *bundle = nil; + static dispatch_once_t predicate; + dispatch_once(&predicate, ^{ + NSString* mainBundlePath = [[NSBundle mainBundle] resourcePath]; + NSString* frameworkBundlePath = [mainBundlePath stringByAppendingPathComponent:BITHOCKEYSDK_BUNDLE]; + bundle = [[NSBundle bundleWithPath:frameworkBundlePath] retain]; + }); + return bundle; +} + +NSString *BITHockeySDKLocalizedString(NSString *stringToken) { + if (BITHockeySDKBundle()) { + return NSLocalizedStringFromTableInBundle(stringToken, @"HockeySDK", BITHockeySDKBundle(), @""); + } else { + return stringToken; + } +} + +NSString *BITHockeySDKMD5(NSString *str) { + const char *cStr = [str UTF8String]; + unsigned char result[CC_MD5_DIGEST_LENGTH]; + CC_MD5( cStr, strlen(cStr), result ); + return [NSString + stringWithFormat: @"%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X", + result[0], result[1], + result[2], result[3], + result[4], result[5], + result[6], result[7], + result[8], result[9], + result[10], result[11], + result[12], result[13], + result[14], result[15] + ]; +} \ No newline at end of file diff --git a/Classes/NSString+HockeyAdditions.h b/Classes/NSString+BITHockeyAdditions.h similarity index 84% rename from Classes/NSString+HockeyAdditions.h rename to Classes/NSString+BITHockeyAdditions.h index e56df48e02..707add671d 100755 --- a/Classes/NSString+HockeyAdditions.h +++ b/Classes/NSString+BITHockeyAdditions.h @@ -1,8 +1,7 @@ // -// NSString+HockeyAdditions.h -// // Created by Jon Crosby on 10/19/07. // Copyright 2007 Kaboomerang LLC. All rights reserved. +// Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -25,11 +24,11 @@ #import -@interface NSString (HockeyAdditions) +@interface NSString (BITHockeyAdditions) -- (NSString *)bw_URLEncodedString; -- (NSString *)bw_URLDecodedString; +- (NSString *)bit_URLEncodedString; +- (NSString *)bit_URLDecodedString; -- (NSComparisonResult)versionCompare:(NSString *)other; +- (NSComparisonResult)bit_versionCompare:(NSString *)other; @end diff --git a/Classes/NSString+HockeyAdditions.m b/Classes/NSString+BITHockeyAdditions.m similarity index 89% rename from Classes/NSString+HockeyAdditions.m rename to Classes/NSString+BITHockeyAdditions.m index d51776a9bf..b465ad37a2 100755 --- a/Classes/NSString+HockeyAdditions.m +++ b/Classes/NSString+BITHockeyAdditions.m @@ -1,8 +1,7 @@ // -// NSString+HockeyAdditions.m -// // Created by Jon Crosby on 10/19/07. // Copyright 2007 Kaboomerang LLC. All rights reserved. +// Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -23,16 +22,11 @@ // THE SOFTWARE. -#import "NSString+HockeyAdditions.h" +#import "NSString+BITHockeyAdditions.h" -#ifdef HOCKEYLIB_STATIC_LIBRARY -#import "CNSFixCategoryBug.h" -CNS_FIX_CATEGORY_BUG(NSString_HockeyAdditions) -#endif +@implementation NSString (BITHockeyAdditions) -@implementation NSString (HockeyAdditions) - -- (NSString *)bw_URLEncodedString { +- (NSString *)bit_URLEncodedString { NSString *result = (NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)self, NULL, @@ -42,7 +36,7 @@ CNS_FIX_CATEGORY_BUG(NSString_HockeyAdditions) return result; } -- (NSString*)bw_URLDecodedString { +- (NSString*)bit_URLDecodedString { NSString *result = (NSString *)CFURLCreateStringByReplacingPercentEscapesUsingEncoding(kCFAllocatorDefault, (CFStringRef)self, CFSTR(""), @@ -51,7 +45,7 @@ CNS_FIX_CATEGORY_BUG(NSString_HockeyAdditions) return result; } -- (NSComparisonResult)versionCompare:(NSString *)other { +- (NSComparisonResult)bit_versionCompare:(NSString *)other { // Extract plain version number from self NSString *plainSelf = self; NSRange letterRange = [plainSelf rangeOfCharacterFromSet: [NSCharacterSet letterCharacterSet]]; diff --git a/Classes/PSAppStoreHeader.h b/Classes/PSAppStoreHeader.h index c885d1e607..4f3d946669 100644 --- a/Classes/PSAppStoreHeader.h +++ b/Classes/PSAppStoreHeader.h @@ -1,9 +1,6 @@ // -// PSAppStoreHeader.h -// HockeyDemo -// // Created by Peter Steinberger on 09.01.11. -// Copyright 2011 Peter Steinberger. All rights reserved. +// Copyright (c) 2011-2012 Peter Steinberger. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Classes/PSAppStoreHeader.m b/Classes/PSAppStoreHeader.m index 76af969fcf..1509a694a1 100644 --- a/Classes/PSAppStoreHeader.m +++ b/Classes/PSAppStoreHeader.m @@ -1,9 +1,6 @@ // -// PSAppStoreHeader.m -// HockeyDemo -// // Created by Peter Steinberger on 09.01.11. -// Copyright 2011 Peter Steinberger. All rights reserved. +// Copyright (c) 2011-2012 Peter Steinberger. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -24,13 +21,14 @@ // THE SOFTWARE. #import "PSAppStoreHeader.h" -#import "UIImage+HockeyAdditions.h" -#import "BWGlobal.h" +#import "UIImage+BITHockeyAdditions.h" +#import "HockeySDKPrivate.h" -#define BW_RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1] -#define kLightGrayColor BW_RGBCOLOR(200, 202, 204) -#define kDarkGrayColor BW_RGBCOLOR(140, 141, 142) +#define BIT_RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1] + +#define kLightGrayColor BIT_RGBCOLOR(200, 202, 204) +#define kDarkGrayColor BIT_RGBCOLOR(140, 141, 142) #define kImageHeight 57 #define kReflectionHeight 20 @@ -45,9 +43,8 @@ @synthesize subHeaderLabel; @synthesize iconImage = iconImage_; -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSObject + +#pragma mark - NSObject - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { @@ -67,9 +64,7 @@ } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView +#pragma mark - UIView - (void)drawRect:(CGRect)rect { CGRect bounds = self.bounds; @@ -85,8 +80,8 @@ CGGradientRelease(gradient); // draw header name - UIColor *mainTextColor = BW_RGBCOLOR(0,0,0); - UIColor *secondaryTextColor = BW_RGBCOLOR(48,48,48); + UIColor *mainTextColor = BIT_RGBCOLOR(0,0,0); + UIColor *secondaryTextColor = BIT_RGBCOLOR(48,48,48); UIFont *mainFont = [UIFont boldSystemFontOfSize:20]; UIFont *secondaryFont = [UIFont boldSystemFontOfSize:12]; UIFont *smallFont = [UIFont systemFontOfSize:12]; @@ -101,12 +96,10 @@ // shadows are a beast NSInteger shadowOffset = 2; - BW_IF_IOS4_OR_GREATER(if([[UIScreen mainScreen] scale] == 2) shadowOffset = 1;) - BW_IF_IOS5_OR_GREATER(shadowOffset = 1;) // iOS5 changes this - again! - - BW_IF_3_2_OR_GREATER(CGContextSetShadowWithColor(context, CGSizeMake(shadowOffset, shadowOffset), 0, myColor);) - BW_IF_PRE_3_2(shadowOffset=1;CGContextSetShadowWithColor(context, CGSizeMake(shadowOffset, -shadowOffset), 0, myColor);) + if([[UIScreen mainScreen] scale] == 2) shadowOffset = 1; + BITHOCKEYSDK_IF_IOS5_OR_GREATER(shadowOffset = 1;) // iOS5 changes this - again! + CGContextSetShadowWithColor(context, CGSizeMake(shadowOffset, shadowOffset), 0, myColor); [mainTextColor set]; [headerLabel_ drawInRect:CGRectMake(kTextRow, kImageMargin, globalWidth-kTextRow, 20) withFont:mainFont lineBreakMode:UILineBreakModeTailTruncation]; @@ -124,9 +117,8 @@ CGColorSpaceRelease(myColorSpace); } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Properties + +#pragma mark - Properties - (void)setHeaderLabel:(NSString *)anHeaderLabel { if (headerLabel_ != anHeaderLabel) { @@ -157,14 +149,14 @@ [iconImage_ release]; // scale, make borders and reflection - iconImage_ = [anIconImage bw_imageToFitSize:CGSizeMake(kImageHeight, kImageHeight) honorScaleFactor:YES]; - iconImage_ = [[iconImage_ bw_roundedCornerImage:kImageBorderRadius borderSize:0.0] retain]; + iconImage_ = [anIconImage bit_imageToFitSize:CGSizeMake(kImageHeight, kImageHeight) honorScaleFactor:YES]; + iconImage_ = [[iconImage_ bit_roundedCornerImage:kImageBorderRadius borderSize:0.0] retain]; // create reflected image [reflectedImage_ release]; reflectedImage_ = nil; if (anIconImage) { - reflectedImage_ = [[iconImage_ bw_reflectedImageWithHeight:kReflectionHeight fromAlpha:0.5 toAlpha:0.0] retain]; + reflectedImage_ = [[iconImage_ bit_reflectedImageWithHeight:kReflectionHeight fromAlpha:0.5 toAlpha:0.0] retain]; } [self setNeedsDisplay]; } diff --git a/Classes/PSStoreButton.h b/Classes/PSStoreButton.h index cf01390060..5efb5b4b16 100644 --- a/Classes/PSStoreButton.h +++ b/Classes/PSStoreButton.h @@ -1,9 +1,6 @@ // -// PSStoreButton.h -// HockeyDemo -// // Created by Peter Steinberger on 09.01.11. -// Copyright 2011 Peter Steinberger. All rights reserved. +// Copyright 2011-2012 Peter Steinberger. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Classes/PSStoreButton.m b/Classes/PSStoreButton.m index 152b2f2b5e..b7e215a320 100644 --- a/Classes/PSStoreButton.m +++ b/Classes/PSStoreButton.m @@ -1,9 +1,6 @@ // -// PSStoreButton.m -// HockeyDemo -// // Created by Peter Steinberger on 09.01.11. -// Copyright 2011 Peter Steinberger. All rights reserved. +// Copyright 2011-2012 Peter Steinberger. All rights reserved. // // This code was inspired by https://github.com/dhmspector/ZIStoreButton // @@ -39,9 +36,8 @@ @synthesize colors = colors_; @synthesize enabled = enabled_; -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSObject + +#pragma mark - NSObject - (id)initWithLabel:(NSString*)aLabel colors:(NSArray*)aColors enabled:(BOOL)flag { if ((self = [super init])) { @@ -77,9 +73,8 @@ @synthesize buttonDelegate = buttonDelegate_; @synthesize customPadding = customPadding_; -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark private + +#pragma mark - private - (void)buttonPressed:(id)sender { [buttonDelegate_ storeButtonFired:self]; @@ -159,9 +154,8 @@ } } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSObject + +#pragma mark - NSObject - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { @@ -214,9 +208,8 @@ [super dealloc]; } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView + +#pragma mark - UIView - (CGSize)sizeThatFits:(CGSize)size { CGSize constr = (CGSize){.height = self.frame.size.height, .width = PS_MAX_WIDTH}; @@ -241,9 +234,8 @@ } } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Properties + +#pragma mark - Properties - (void)setButtonData:(PSStoreButtonData *)aButtonData { [self setButtonData:aButtonData animated:NO]; @@ -258,9 +250,8 @@ [self updateButtonAnimated:animated]; } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark Static + +#pragma mark - Static + (NSArray *)appStoreGreenColor { return [NSArray arrayWithObjects:(id) diff --git a/Classes/PSWebTableViewCell.h b/Classes/PSWebTableViewCell.h index 864f01e280..e5549c0167 100644 --- a/Classes/PSWebTableViewCell.h +++ b/Classes/PSWebTableViewCell.h @@ -1,9 +1,6 @@ // -// PSWebTableViewCell.h -// HockeyDemo -// // Created by Peter Steinberger on 04.02.11. -// Copyright 2011 Peter Steinberger. All rights reserved. +// Copyright 2011-2012 Peter Steinberger. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/Classes/PSWebTableViewCell.m b/Classes/PSWebTableViewCell.m index 4e4515a737..3b0db9e55a 100644 --- a/Classes/PSWebTableViewCell.m +++ b/Classes/PSWebTableViewCell.m @@ -1,9 +1,6 @@ // -// PSWebTableViewCell.m -// HockeyDemo -// // Created by Peter Steinberger on 04.02.11. -// Copyright 2011 Peter Steinberger. All rights reserved. +// Copyright 2011-2012 Peter Steinberger. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -24,7 +21,7 @@ // THE SOFTWARE. #import "PSWebTableViewCell.h" -#import "BWGlobal.h" + @implementation PSWebTableViewCell @@ -47,9 +44,8 @@ body { font: 13px 'Helvetica Neue', Helvetica; word-wrap:break-word; padding:8px @synthesize webViewSize = webViewSize_; @synthesize cellBackgroundColor = cellBackgroundColor_; -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark private + +#pragma mark - private - (void)addWebView { if(webViewContent_) { @@ -83,7 +79,7 @@ body { font: 13px 'Helvetica Neue', Helvetica; word-wrap:break-word; padding:8px webView_.frame = webViewRect; NSString *deviceWidth = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? [NSString stringWithFormat:@"%.0f", CGRectGetWidth(self.bounds)] : @"device-width"; - //BWHockeyLog(@"%@\n%@\%@", PSWebTableViewCellHtmlTemplate, deviceWidth, self.webViewContent); + //HockeySDKLog(@"%@\n%@\%@", PSWebTableViewCellHtmlTemplate, deviceWidth, self.webViewContent); NSString *contentHtml = [NSString stringWithFormat:PSWebTableViewCellHtmlTemplate, deviceWidth, self.webViewContent]; [webView_ loadHTMLString:contentHtml baseURL:nil]; } @@ -118,9 +114,8 @@ body { font: 13px 'Helvetica Neue', Helvetica; word-wrap:break-word; padding:8px } } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark NSObject + +#pragma mark - NSObject - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { if((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) { @@ -135,9 +130,8 @@ body { font: 13px 'Helvetica Neue', Helvetica; word-wrap:break-word; padding:8px [super dealloc]; } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIView + +#pragma mark - UIView - (void)setFrame:(CGRect)aFrame { BOOL needChange = !CGRectEqualToRect(aFrame, self.frame); @@ -148,9 +142,8 @@ body { font: 13px 'Helvetica Neue', Helvetica; word-wrap:break-word; padding:8px } } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UITableViewCell + +#pragma mark - UITableViewCell - (void)prepareForReuse { [self removeWebView]; @@ -158,9 +151,8 @@ body { font: 13px 'Helvetica Neue', Helvetica; word-wrap:break-word; padding:8px [super prepareForReuse]; } -/////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark UIWebView + +#pragma mark - UIWebView - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { if(navigationType == UIWebViewNavigationTypeOther) diff --git a/Classes/UIImage+HockeyAdditions.h b/Classes/UIImage+BITHockeyAdditions.h similarity index 61% rename from Classes/UIImage+HockeyAdditions.h rename to Classes/UIImage+BITHockeyAdditions.h index dccc74d1ba..c883fce9b9 100644 --- a/Classes/UIImage+HockeyAdditions.h +++ b/Classes/UIImage+BITHockeyAdditions.h @@ -1,9 +1,10 @@ // -// UIImage+HockeyAdditions.h -// HockeyDemo +// UIImage+BITHockeySDKAdditions.h // // Created by Peter Steinberger on 10.01.11. -// Copyright 2011 Peter Steinberger. All rights reserved. +// Copyright (c) 2011-2012 Peter Steinberger. +// Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. +// All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -25,14 +26,14 @@ #import -@interface UIImage (HockeyAdditions) +@interface UIImage (BITHockeySDKAdditions) -- (UIImage *)bw_roundedCornerImage:(NSInteger)cornerSize borderSize:(NSInteger)borderSize; -- (UIImage *)bw_imageToFitSize:(CGSize)fitSize honorScaleFactor:(BOOL)honorScaleFactor; -- (UIImage *)bw_reflectedImageWithHeight:(NSUInteger)height fromAlpha:(float)fromAlpha toAlpha:(float)toAlpha; +- (UIImage *)bit_roundedCornerImage:(NSInteger)cornerSize borderSize:(NSInteger)borderSize; +- (UIImage *)bit_imageToFitSize:(CGSize)fitSize honorScaleFactor:(BOOL)honorScaleFactor; +- (UIImage *)bit_reflectedImageWithHeight:(NSUInteger)height fromAlpha:(float)fromAlpha toAlpha:(float)toAlpha; -- (id)bw_initWithContentsOfResolutionIndependentFile:(NSString *)path NS_RETURNS_RETAINED; -+ (UIImage*)bw_imageWithContentsOfResolutionIndependentFile:(NSString *)path; -+ (UIImage *)bw_imageNamed:(NSString *)imageName bundle:(NSString *)bundleName; +- (id)bit_initWithContentsOfResolutionIndependentFile:(NSString *)path NS_RETURNS_RETAINED; ++ (UIImage *)bit_imageWithContentsOfResolutionIndependentFile:(NSString *)path; ++ (UIImage *)bit_imageNamed:(NSString *)imageName bundle:(NSString *)bundleName; @end diff --git a/Classes/UIImage+HockeyAdditions.m b/Classes/UIImage+BITHockeyAdditions.m similarity index 77% rename from Classes/UIImage+HockeyAdditions.m rename to Classes/UIImage+BITHockeyAdditions.m index 97c806aa38..15aa817621 100644 --- a/Classes/UIImage+HockeyAdditions.m +++ b/Classes/UIImage+BITHockeyAdditions.m @@ -1,9 +1,10 @@ // -// UIImage+HockeyAdditions.m -// HockeyDemo +// UIImage+BITHockeySDKAdditions.m // // Created by Peter Steinberger on 10.01.11. -// Copyright 2011 Peter Steinberger. All rights reserved. +// Copyright (c) 2011-2012 Peter Steinberger. +// Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. +// All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -23,20 +24,14 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import "UIImage+HockeyAdditions.h" -#import "BWGlobal.h" - -#ifdef HOCKEYLIB_STATIC_LIBRARY -#import "CNSFixCategoryBug.h" -CNS_FIX_CATEGORY_BUG(UIImage_HockeyAdditionsPrivate) -#endif +#import "UIImage+BITHockeyAdditions.h" // Private helper methods -@interface UIImage (HockeyAdditionsPrivate) -- (void)addRoundedRectToPath:(CGRect)rect context:(CGContextRef)context ovalWidth:(CGFloat)ovalWidth ovalHeight:(CGFloat)ovalHeight; +@interface UIImage (BITHockeyAdditionsPrivate) +- (void)bit_addRoundedRectToPath:(CGRect)rect context:(CGContextRef)context ovalWidth:(CGFloat)ovalWidth ovalHeight:(CGFloat)ovalHeight; @end -@implementation UIImage (HockeyAdditions) +@implementation UIImage (BITHockeyAdditions) CGContextRef MyOpenBitmapContext(int pixelsWide, int pixelsHigh); CGImageRef CreateGradientImage(int pixelsWide, int pixelsHigh, float fromAlpha, float toAlpha); @@ -84,32 +79,29 @@ CGImageRef CreateGradientImage(int pixelsWide, int pixelsHigh, float fromAlpha, // Creates a copy of this image with rounded corners // If borderSize is non-zero, a transparent border of the given size will also be added // Original author: Björn Sållarp. Used with permission. See: http://blog.sallarp.com/iphone-uiimage-round-corners/ -- (UIImage *)bw_roundedCornerImage:(NSInteger)cornerSize borderSize:(NSInteger)borderSize { +- (UIImage *)bit_roundedCornerImage:(NSInteger)cornerSize borderSize:(NSInteger)borderSize { // If the image does not have an alpha layer, add one UIImage *roundedImage = nil; -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000 - BW_IF_IOS4_OR_GREATER( - UIGraphicsBeginImageContextWithOptions(self.size, NO, 0.0); // 0.0 for scale means "correct scale for device's main screen". - CGImageRef sourceImg = CGImageCreateWithImageInRect([self CGImage], CGRectMake(0, 0, self.size.width * self.scale, self.size.height * self.scale)); // cropping happens here. - - // Create a clipping path with rounded corners - CGContextRef context = UIGraphicsGetCurrentContext(); - CGContextBeginPath(context); - [self addRoundedRectToPath:CGRectMake(borderSize, borderSize, self.size.width - borderSize * 2, self.size.height - borderSize * 2) - context:context - ovalWidth:cornerSize - ovalHeight:cornerSize]; - CGContextClosePath(context); - CGContextClip(context); - - roundedImage = [UIImage imageWithCGImage:sourceImg scale:0.0 orientation:self.imageOrientation]; // create cropped UIImage. - [roundedImage drawInRect:CGRectMake(0, 0, self.size.width, self.size.height)]; // the actual scaling happens here, and orientation is taken care of automatically. - CGImageRelease(sourceImg); - roundedImage = UIGraphicsGetImageFromCurrentImageContext(); - UIGraphicsEndImageContext(); - ) -#endif + UIGraphicsBeginImageContextWithOptions(self.size, NO, 0.0); // 0.0 for scale means "correct scale for device's main screen". + CGImageRef sourceImg = CGImageCreateWithImageInRect([self CGImage], CGRectMake(0, 0, self.size.width * self.scale, self.size.height * self.scale)); // cropping happens here. + + // Create a clipping path with rounded corners + CGContextRef context = UIGraphicsGetCurrentContext(); + CGContextBeginPath(context); + [self addRoundedRectToPath:CGRectMake(borderSize, borderSize, self.size.width - borderSize * 2, self.size.height - borderSize * 2) + context:context + ovalWidth:cornerSize + ovalHeight:cornerSize]; + CGContextClosePath(context); + CGContextClip(context); + + roundedImage = [UIImage imageWithCGImage:sourceImg scale:0.0 orientation:self.imageOrientation]; // create cropped UIImage. + [roundedImage drawInRect:CGRectMake(0, 0, self.size.width, self.size.height)]; // the actual scaling happens here, and orientation is taken care of automatically. + CGImageRelease(sourceImg); + roundedImage = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + if (!roundedImage) { // Try older method. UIImage *image = [self imageWithAlpha]; @@ -146,8 +138,7 @@ CGImageRef CreateGradientImage(int pixelsWide, int pixelsHigh, float fromAlpha, return roundedImage; } -#pragma mark - -#pragma mark Private helper methods +#pragma mark - Private helper methods // Adds a rectangular path to the given context and rounds its corners by the given extents // Original author: Björn Sållarp. Used with permission. See: http://blog.sallarp.com/iphone-uiimage-round-corners/ @@ -170,16 +161,14 @@ CGImageRef CreateGradientImage(int pixelsWide, int pixelsHigh, float fromAlpha, CGContextRestoreGState(context); } -- (UIImage *)bw_imageToFitSize:(CGSize)fitSize honorScaleFactor:(BOOL)honorScaleFactor +- (UIImage *)bit_imageToFitSize:(CGSize)fitSize honorScaleFactor:(BOOL)honorScaleFactor { float imageScaleFactor = 1.0; -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000 if (honorScaleFactor) { if ([self respondsToSelector:@selector(scale)]) { imageScaleFactor = [self scale]; } } -#endif float sourceWidth = [self size].width * imageScaleFactor; float sourceHeight = [self size].height * imageScaleFactor; @@ -214,16 +203,13 @@ CGImageRef CreateGradientImage(int pixelsWide, int pixelsHigh, float fromAlpha, // Create appropriately modified image. UIImage *image = nil; - BW_IF_IOS4_OR_GREATER - ( - UIGraphicsBeginImageContextWithOptions(destRect.size, NO, honorScaleFactor ? 0.0 : 1.0); // 0.0 for scale means "correct scale for device's main screen". - CGImageRef sourceImg = CGImageCreateWithImageInRect([self CGImage], sourceRect); // cropping happens here. - image = [UIImage imageWithCGImage:sourceImg scale:0.0 orientation:self.imageOrientation]; // create cropped UIImage. - [image drawInRect:destRect]; // the actual scaling happens here, and orientation is taken care of automatically. - CGImageRelease(sourceImg); - image = UIGraphicsGetImageFromCurrentImageContext(); - UIGraphicsEndImageContext(); - ) + UIGraphicsBeginImageContextWithOptions(destRect.size, NO, honorScaleFactor ? 0.0 : 1.0); // 0.0 for scale means "correct scale for device's main screen". + CGImageRef sourceImg = CGImageCreateWithImageInRect([self CGImage], sourceRect); // cropping happens here. + image = [UIImage imageWithCGImage:sourceImg scale:0.0 orientation:self.imageOrientation]; // create cropped UIImage. + [image drawInRect:destRect]; // the actual scaling happens here, and orientation is taken care of automatically. + CGImageRelease(sourceImg); + image = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); if (!image) { // Try older method. @@ -292,7 +278,7 @@ CGContextRef MyOpenBitmapContext(int pixelsWide, int pixelsHigh) { return UIGraphicsGetCurrentContext(); } -- (UIImage *)bw_reflectedImageWithHeight:(NSUInteger)height fromAlpha:(float)fromAlpha toAlpha:(float)toAlpha { +- (UIImage *)bit_reflectedImageWithHeight:(NSUInteger)height fromAlpha:(float)fromAlpha toAlpha:(float)toAlpha { if(height == 0) return nil; @@ -319,7 +305,7 @@ CGContextRef MyOpenBitmapContext(int pixelsWide, int pixelsHigh) { return theImage; } -- (id)bw_initWithContentsOfResolutionIndependentFile:(NSString *)path { +- (id)bit_initWithContentsOfResolutionIndependentFile:(NSString *)path { if ([UIScreen instancesRespondToSelector:@selector(scale)] && (int)[[UIScreen mainScreen] scale] == 2.0) { NSString *path2x = [[path stringByDeletingLastPathComponent] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@@2x.%@", @@ -334,19 +320,19 @@ CGContextRef MyOpenBitmapContext(int pixelsWide, int pixelsHigh) { return [self initWithContentsOfFile:path]; } -+ (UIImage*)bw_imageWithContentsOfResolutionIndependentFile:(NSString *)path { ++ (UIImage*)bit_imageWithContentsOfResolutionIndependentFile:(NSString *)path { #ifndef __clang_analyzer__ // clang alayzer in 4.2b3 thinks here's a leak, which is not the case. - return [[[UIImage alloc] bw_initWithContentsOfResolutionIndependentFile:path] autorelease]; + return [[[UIImage alloc] bit_initWithContentsOfResolutionIndependentFile:path] autorelease]; #endif } -+ (UIImage *)bw_imageNamed:(NSString *)imageName bundle:(NSString *)bundleName { ++ (UIImage *)bit_imageNamed:(NSString *)imageName bundle:(NSString *)bundleName { NSString *resourcePath = [[NSBundle mainBundle] resourcePath]; NSString *bundlePath = [resourcePath stringByAppendingPathComponent:bundleName]; NSString *imagePath = [bundlePath stringByAppendingPathComponent:imageName]; - return [UIImage bw_imageWithContentsOfResolutionIndependentFile:imagePath]; + return [UIImage bit_imageWithContentsOfResolutionIndependentFile:imagePath]; } @end diff --git a/HockeySDK.podspec b/HockeySDK.podspec index 29f57ad413..34e4338d75 100644 --- a/HockeySDK.podspec +++ b/HockeySDK.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = 'HockeySDK' - s.version = '2.2.6' + s.version = '2.3.0' s.license = 'MIT' s.platform = :ios s.summary = 'Distribute beta apps and collect crash reports with HockeyApp.' s.homepage = 'http://hockeyapp.net/' s.author = { 'Andreas Linde' => 'mail@andreaslinde.de', 'Thomas Dohmke' => "thomas@dohmke.de" } - s.source = { :git => 'https://github.com/codenauts/HockeySDK-iOS', :tag => '2.2.3' } + s.source = { :git => 'https://github.com/bitstadium/HockeySDK-iOS', :tag => '2.3.0' } s.description = 'HockeyApp is a server to distribute beta apps and collect crash reports. ' \ 'It improves the testing process dramatically and can be used for both beta ' \ @@ -17,7 +17,7 @@ Pod::Spec.new do |s| 'yourself when the network becomse reachable.' s.source_files = 'Classes' - s.resources = 'Resources/Hockey.bundle', 'Resources/Quincy.bundle' + s.resources = 'Resources/HockeySDKResources.bundle' s.frameworks = 'QuartzCore', 'SystemConfiguration', 'CrashReporter' s.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '"$(BUILT_PRODUCTS_DIR)/Pods/Frameworks"' } diff --git a/LICENSE.txt b/LICENSE.txt index 476cd4502a..4cc0bf4e50 100755 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,20 +1,10 @@ -## Authors - -Andreas Linde -Stanley Rost -Fabian Kreiser -Tobias Höhmann -FutureTap -Kent Sutherland -Peter Steinberger -Thomas Dohmke - ## Licenses The Hockey SDK is provided under the following license: The MIT License - Copyright (c) 2011-2012 Codenauts UG (haftungsbeschränkt). All rights reserved. + Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. + All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation @@ -41,6 +31,7 @@ Except as noted below, PLCrashReporter is provided under the following license: Copyright (c) 2008 - 2012 Plausible Labs Cooperative, Inc. + Copyright (c) 2012 HockeyApp, Bit Stadium GmbH. All rights reserved. Permission is hereby granted, free of charge, to any person diff --git a/Resources/Hockey.bundle/de.lproj/Hockey.strings b/Resources/Hockey.bundle/de.lproj/Hockey.strings deleted file mode 100644 index d021c93ca3..0000000000 --- a/Resources/Hockey.bundle/de.lproj/Hockey.strings +++ /dev/null @@ -1,87 +0,0 @@ -/* - Hockey.strings - Hockey - - Created by Andreas Linde on 11/15/10. - Copyright 2010 buzzworks.de. All rights reserved. - */ - - -/* Alert view */ - -/* For dialogs yes buttons */ -"HockeyYes" = "Ja"; - -/* For dialogs no buttons */ -"HockeyNo" = "Nein"; - -/* Update available */ -"HockeyUpdateAvailable" = "Aktualisierung verfügbar"; - -/* Would you like to check out the new update? You can do this later on at any time in the In-App settings. */ -"HockeyUpdateAlertText" = "Möchten Sie sich weitere Informationen zu der Aktualisierung ansehen?"; - - -/* Update details screen */ - -/* Update Details */ -"HockeyUpdateScreenTitle" = "Aktualisierung"; - - -/* Settings */ - -/* Screen title for settings view */ -"HockeySettingsTitle" = "Einstellungen"; - -/* Text asking the user to send user data (on/off switch) */ -"HockeySettingsUserData" = "Daten senden"; - -/* Description text for turning on/off sending user data */ -"HockeySettingsUserDataDescription" = "Daten senden liefert dem Entwickler die folgenden Daten: Programmversion, Sprache, Gerätetyp und iOS Version."; - -/* Text asking the user to send usage data (on/off switch) */ -"HockeySettingsUsageData" = "Testzeit senden"; - -/* Description text for turning on/off sending usage data */ -"HockeySettingsUsageDataDescription" = "Testzeit senden informiert den Entwickler über die Summe der Testzeit, in einer Genauigkeit von 1 Minute."; - -/* Title for defining when update checks may be made */ -"HockeySectionCheckTitle" = "Nach Aktualisierung Prüfen"; - -/* On Startup */ -"HockeySectionCheckStartup" = "Beim Start"; - -/* Daily */ -"HockeySectionCheckDaily" = "Täglich"; - -/* Manually */ -"HockeySectionCheckManually" = "Manuell"; - - -"HockeyVersion" = "Version"; -"HockeyShowPreviousVersions" = "Zeige frühere Versionen..."; -"HockeyNoUpdateNeededTitle" = "Kein Update Verfügbar"; -"HockeyNoUpdateNeededMessage" = "%@ ist bereits die aktuellste Version."; -"HockeyUpdateAlertTextWithAppVersion" = "%@ ist verfügbar."; -"HockeyUpdateAlertMandatoryTextWithAppVersion" = "%@ ist verfügbar und muss installiert werden!"; -"HockeyIgnore" = "Ignorieren"; -"HockeyShowUpdate" = "Anzeigen"; -"HockeyInstallUpdate" = "Installieren"; -"HockeyError" = "Fehler"; -"HockeyOK" = "OK"; -"HockeyWarning" = "Warnung"; -"HockeyNoReleaseNotesAvailable" = "Keine Release Notes verfügbar."; - -"HockeyAuthorizationProgress" = "Autorisierung..."; -"HockeyAuthorizationOffline" = "Internet Verbindung wird benötigt!"; -"HockeyAuthorizationDenied" = "Autorisierung verweigert. Bitte kontaktieren Sie den Entwickler."; - -"HockeyiOS3Message" = "In-App download benötigt iOS 4 oder höher. Sie können die Applikation manuell updaten, indem sie das IPA von %@ laden und es via iTunes syncen."; -"HockeySimulatorMessage" = "Hockey funktioniert nicht im Simulator."; - -"HockeyButtonCheck" = "PRÜFE"; -"HockeyButtonSearching" = "PRÜFEN"; -"HockeyButtonUpdate" = "UPDATE"; -"HockeyButtonInstalling" = "INSTALLIEREN"; -"HockeyButtonOffline" = "OFFLINE"; -"HockeyInstalled" = "INSTALLIERT"; diff --git a/Resources/Hockey.bundle/en.lproj/Hockey.strings b/Resources/Hockey.bundle/en.lproj/Hockey.strings deleted file mode 100644 index 456dbac3eb..0000000000 --- a/Resources/Hockey.bundle/en.lproj/Hockey.strings +++ /dev/null @@ -1,87 +0,0 @@ -/* - Hockey.strings - Hockey - - Created by Andreas Linde on 11/15/10. - Copyright 2010 buzzworks.de. All rights reserved. - */ - - -/* Alert view */ - -/* For dialogs yes buttons */ -"HockeyYes" = "Yes"; - -/* For dialogs no buttons */ -"HockeyNo" = "No"; - -/* Update available */ -"HockeyUpdateAvailable" = "Update available"; - -/* Would you like to check out the new update? You can do this later on at any time in the In-App settings. */ -"HockeyUpdateAlertText" = "Would you like to check out the new update?"; - - -/* Update details screen */ - -/* Update Details */ -"HockeyUpdateScreenTitle" = "Update"; - - -/* Settings */ - -/* Screen title for settings view */ -"HockeySettingsTitle" = "Settings"; - -/* Text asking the user to send user data (on/off switch) */ -"HockeySettingsUserData" = "Send User Data"; - -/* Description text for turning on/off sending user data */ -"HockeySettingsUserDataDescription" = "Send User Data will send the following data to the developer: app version, language, device type and iOS version."; - -/* Text asking the user to send usage data (on/off switch) */ -"HockeySettingsUsageData" = "Send Usage Data"; - -/* Description text for turning on/off sending usage data */ -"HockeySettingsUsageDataDescription" = "Send Usage Data will send the amount of test time to the developer, in a granularity of 1 minute."; - -/* Title for defining when update checks may be made */ -"HockeySectionCheckTitle" = "Check For Update"; - -/* On Startup */ -"HockeySectionCheckStartup" = "On Startup"; - -/* Daily */ -"HockeySectionCheckDaily" = "Daily"; - -/* Manually */ -"HockeySectionCheckManually" = "Manually"; - - -"HockeyVersion" = "Version"; -"HockeyShowPreviousVersions" = "Show previous versions..."; -"HockeyNoUpdateNeededTitle" = "No Update Available"; -"HockeyNoUpdateNeededMessage" = "%@ is already the latest version."; -"HockeyUpdateAlertTextWithAppVersion" = "%@ is available."; -"HockeyUpdateAlertMandatoryTextWithAppVersion" = "%@ is available and is a mandatory update!"; -"HockeyIgnore" = "Ignore"; -"HockeyShowUpdate" = "Show"; -"HockeyInstallUpdate" = "Install"; -"HockeyError" = "Error"; -"HockeyOK" = "OK"; -"HockeyWarning" = "Warning"; -"HockeyNoReleaseNotesAvailable" = "No release notes available."; - -"HockeyAuthorizationProgress" = "Authorizing..."; -"HockeyAuthorizationOffline" = "Internet connection required!"; -"HockeyAuthorizationDenied" = "Authorizing denied. Please contact the developer."; - -"HockeyiOS3Message" = "In-App download requires iOS 4 or higher. You can update this application via downloading the IPA from %@ and syncing it with iTunes."; -"HockeySimulatorMessage" = "Hockey Update does not work in the Simulator.\nThe itms-services:// url scheme is implemented but nonfunctional."; - -"HockeyButtonCheck" = "CHECK"; -"HockeyButtonSearching" = "CHECKING"; -"HockeyButtonUpdate" = "UPDATE"; -"HockeyButtonInstalling" = "INSTALLING"; -"HockeyButtonOffline" = "OFFLINE"; -"HockeyInstalled" = "INSTALLED"; diff --git a/Resources/Hockey.bundle/it.lproj/Hockey.strings b/Resources/Hockey.bundle/it.lproj/Hockey.strings deleted file mode 100755 index 0dab9c83ee..0000000000 --- a/Resources/Hockey.bundle/it.lproj/Hockey.strings +++ /dev/null @@ -1,87 +0,0 @@ -/* - Hockey.strings - Hockey - - Created by Andreas Linde on 11/15/10. - Copyright 2010 buzzworks.de. All rights reserved. - */ - - -/* Alert view */ - -/* For dialogs yes buttons */ -"HockeyYes" = "Si"; - -/* For dialogs no buttons */ -"HockeyNo" = "No"; - -/* Update available */ -"HockeyUpdateAvailable" = "Aggiornamento disponibile"; - -/* Would you like to check out the new update? You can do this later on at any time in the In-App settings. */ -"HockeyUpdateAlertText" = "Vuoi scaricare il nuovo aggiornamento ?"; - - -/* Update details screen */ - -/* Update Details */ -"HockeyUpdateScreenTitle" = "Aggiorna"; - - -/* Settings */ - -/* Screen title for settings view */ -"HockeySettingsTitle" = "Impostazioni"; - -/* Text asking the user to send user data (on/off switch) */ -"HockeySettingsUserData" = "Invia dati di sistema"; - -/* Description text for turning on/off sending user data */ -"HockeySettingsUserDataDescription" = "Invia le seguenti informazioni allo sviluppatore: versione app, lingua, tipo dispositivo e versione iOS."; - -/* Text asking the user to send usage data (on/off switch) */ -"HockeySettingsUsageData" = "Invia dati di utilizzo"; - -/* Description text for turning on/off sending usage data */ -"HockeySettingsUsageDataDescription" = "Invia il tempo di utilizzo allo svilupatore, con un dettaglio di 1 minuto."; - -/* Title for defining when update checks may be made */ -"HockeySectionCheckTitle" = "Controlla gli aggiornamenti"; - -/* On Startup */ -"HockeySectionCheckStartup" = "All'avvio"; - -/* Daily */ -"HockeySectionCheckDaily" = "Ogni giorno"; - -/* Manually */ -"HockeySectionCheckManually" = "Manualmente"; - - -"HockeyVersion" = "Versione"; -"HockeyShowPreviousVersions" = "Mostra le versioni precedenti..."; -"HockeyNoUpdateNeededTitle" = "Nessun aggiornamento disponibile"; -"HockeyNoUpdateNeededMessage" = "%@ aggiornata all'ultima versione."; -"HockeyUpdateAlertTextWithAppVersion" = "%@ disponibile."; -"HockeyUpdateAlertMandatoryTextWithAppVersion" = "%@ is available and is a mandatory update!"; -"HockeyIgnore" = "Ignora"; -"HockeyShowUpdate" = "Mostra"; -"HockeyInstallUpdate" = "Installa"; -"HockeyError" = "Errore"; -"HockeyOK" = "OK"; -"HockeyWarning" = "Avviso"; -"HockeyNoReleaseNotesAvailable" = "Non sono disponibili note di rilascio."; - -"HockeyAuthorizationProgress" = "Attendo autorizzazione..."; -"HockeyAuthorizationOffline" = "E' richiesta la connessione internet!"; -"HockeyAuthorizationDenied" = "Autorizzazione negata, contattare lo sviluppatore."; - -"HockeyiOS3Message" = "L'aggioranento dall'applicazione possibile con iOS 4 o superiore. Puoi aggiornare questa applicazione scaricandola da %@."; -"HockeySimulatorMessage" = "Hockey Update does not work in the Simulator.\nThe itms-services:// url scheme is implemented but nonfunctional."; - -"HockeyButtonCheck" = "CONTROLLA"; -"HockeyButtonSearching" = "CONTROLLO"; -"HockeyButtonUpdate" = "AGGIORNA"; -"HockeyButtonInstalling" = "INSTALLO"; -"HockeyButtonOffline" = "OFFLINE"; -"HockeyInstalled" = "INSTALLATA"; diff --git a/Resources/Hockey.bundle/sv.lproj/Hockey.strings b/Resources/Hockey.bundle/sv.lproj/Hockey.strings deleted file mode 100644 index 2a8e33863e..0000000000 --- a/Resources/Hockey.bundle/sv.lproj/Hockey.strings +++ /dev/null @@ -1,88 +0,0 @@ -/* - Hockey.strings - Hockey - - Created by Andreas Linde on 11/15/10. - Copyright 2010 buzzworks.de. All rights reserved. - Swedish translation by Joakim Ramer. - */ - - -/* Alert view */ - -/* For dialogs yes buttons */ -"HockeyYes" = "Ja"; - -/* For dialogs no buttons */ -"HockeyNo" = "Nej"; - -/* Update available */ -"HockeyUpdateAvailable" = "Uppdatering tillgänglig"; - -/* Would you like to check out the new update? You can do this later on at any time in the In-App settings. */ -"HockeyUpdateAlertText" = "Vill du hämta den nya uppdateringen?"; - - -/* Update details screen */ - -/* Update Details */ -"HockeyUpdateScreenTitle" = "Uppdatera"; - - -/* Settings */ - -/* Screen title for settings view */ -"HockeySettingsTitle" = "Inställningar"; - -/* Text asking the user to send user data (on/off switch) */ -"HockeySettingsUserData" = "Skicka användardata"; - -/* Description text for turning on/off sending user data */ -"HockeySettingsUserDataDescription" = "Skicka användardata skickar följande till utvecklaren: app version, språk, enhetstyp och iOS version."; - -/* Text asking the user to send usage data (on/off switch) */ -"HockeySettingsUsageData" = "Skicka användn.data"; - -/* Description text for turning on/off sending usage data */ -"HockeySettingsUsageDataDescription" = "Skicka användningsdata skickar information om hur länge appen testats (i antal minuter), till utvecklaren."; - -/* Title for defining when update checks may be made */ -"HockeySectionCheckTitle" = "Leta efter uppdateringar"; - -/* On Startup */ -"HockeySectionCheckStartup" = "Vid uppstart"; - -/* Daily */ -"HockeySectionCheckDaily" = "Dagligen"; - -/* Manually */ -"HockeySectionCheckManually" = "Manuellt"; - - -"HockeyVersion" = "Version"; -"HockeyShowPreviousVersions" = "Se tidigare versioner..."; -"HockeyNoUpdateNeededTitle" = "Ingen uppdatering tillgänglig"; -"HockeyNoUpdateNeededMessage" = "%@ är den senaste versionen."; -"HockeyUpdateAlertTextWithAppVersion" = "%@ finns."; -"HockeyUpdateAlertMandatoryTextWithAppVersion" = "%@ is available and is a mandatory update!"; -"HockeyIgnore" = "Ignorera"; -"HockeyShowUpdate" = "Visa"; -"HockeyInstallUpdate" = "Installera"; -"HockeyError" = "Error"; -"HockeyOK" = "OK"; -"HockeyWarning" = "Varning"; -"HockeyNoReleaseNotesAvailable" = "Inga releasenoteringar tillgängliga."; - -"HockeyAuthorizationProgress" = "Auktoriserar..."; -"HockeyAuthorizationOffline" = "Internetuppkoppling krävs!"; -"HockeyAuthorizationDenied" = "Auktoriseringen nekades. Kontakta utvecklaren."; - -"HockeyiOS3Message" = "In-App nedladdning kräver iOS 4 eller högre. Du kan uppdatera applikationen genoma att ladda ner IPA-filen från %@ och synka in den i iTunes."; -"HockeySimulatorMessage" = "Hockey Update fungerar inte i Simulatorn.\nitms-services:// url schemat är implementerat men fungerar ej."; - -"HockeyButtonCheck" = "FRÅGA"; -"HockeyButtonSearching" = "FRÅGAR"; -"HockeyButtonUpdate" = "UPPDATERA"; -"HockeyButtonInstalling" = "INSTALLERAR"; -"HockeyButtonOffline" = "OFFLINE"; -"HockeyInstalled" = "INSTALLERAD"; \ No newline at end of file diff --git a/Resources/Hockey.bundle/IconGradient.png b/Resources/IconGradient.png similarity index 100% rename from Resources/Hockey.bundle/IconGradient.png rename to Resources/IconGradient.png diff --git a/Resources/Hockey.bundle/IconGradient@2x.png b/Resources/IconGradient@2x.png similarity index 100% rename from Resources/Hockey.bundle/IconGradient@2x.png rename to Resources/IconGradient@2x.png diff --git a/Resources/Quincy.bundle/de.lproj/Quincy.strings b/Resources/Quincy.bundle/de.lproj/Quincy.strings deleted file mode 100755 index 3f63136e98..0000000000 Binary files a/Resources/Quincy.bundle/de.lproj/Quincy.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/de.lproj/QuincyAlternate.strings b/Resources/Quincy.bundle/de.lproj/QuincyAlternate.strings deleted file mode 100755 index 8a1a0ed154..0000000000 Binary files a/Resources/Quincy.bundle/de.lproj/QuincyAlternate.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/en.lproj/Quincy.strings b/Resources/Quincy.bundle/en.lproj/Quincy.strings deleted file mode 100755 index 4137ba40f5..0000000000 Binary files a/Resources/Quincy.bundle/en.lproj/Quincy.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/en.lproj/QuincyAlternate.strings b/Resources/Quincy.bundle/en.lproj/QuincyAlternate.strings deleted file mode 100755 index dbe56b7398..0000000000 Binary files a/Resources/Quincy.bundle/en.lproj/QuincyAlternate.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/es.lproj/Quincy.strings b/Resources/Quincy.bundle/es.lproj/Quincy.strings deleted file mode 100755 index 54b6137f50..0000000000 Binary files a/Resources/Quincy.bundle/es.lproj/Quincy.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/es.lproj/QuincyAlternate.strings b/Resources/Quincy.bundle/es.lproj/QuincyAlternate.strings deleted file mode 100755 index 4736dca12e..0000000000 Binary files a/Resources/Quincy.bundle/es.lproj/QuincyAlternate.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/fr.lproj/Quincy.strings b/Resources/Quincy.bundle/fr.lproj/Quincy.strings deleted file mode 100755 index 53713d16cc..0000000000 Binary files a/Resources/Quincy.bundle/fr.lproj/Quincy.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/fr.lproj/QuincyAlternate.strings b/Resources/Quincy.bundle/fr.lproj/QuincyAlternate.strings deleted file mode 100755 index 39340c6522..0000000000 Binary files a/Resources/Quincy.bundle/fr.lproj/QuincyAlternate.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/it.lproj/Quincy.strings b/Resources/Quincy.bundle/it.lproj/Quincy.strings deleted file mode 100755 index e91fb7c678..0000000000 Binary files a/Resources/Quincy.bundle/it.lproj/Quincy.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/it.lproj/QuincyAlternate.strings b/Resources/Quincy.bundle/it.lproj/QuincyAlternate.strings deleted file mode 100755 index 640149ab01..0000000000 Binary files a/Resources/Quincy.bundle/it.lproj/QuincyAlternate.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/ja.lproj/Quincy.strings b/Resources/Quincy.bundle/ja.lproj/Quincy.strings deleted file mode 100755 index b27f1e9555..0000000000 Binary files a/Resources/Quincy.bundle/ja.lproj/Quincy.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/ja.lproj/QuincyAlternate.strings b/Resources/Quincy.bundle/ja.lproj/QuincyAlternate.strings deleted file mode 100755 index b8d010e157..0000000000 Binary files a/Resources/Quincy.bundle/ja.lproj/QuincyAlternate.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/nl.lproj/Quincy.strings b/Resources/Quincy.bundle/nl.lproj/Quincy.strings deleted file mode 100755 index ea18175fd5..0000000000 Binary files a/Resources/Quincy.bundle/nl.lproj/Quincy.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/nl.lproj/QuincyAlternate.strings b/Resources/Quincy.bundle/nl.lproj/QuincyAlternate.strings deleted file mode 100755 index 71c99c7779..0000000000 Binary files a/Resources/Quincy.bundle/nl.lproj/QuincyAlternate.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/pt-PT.lproj/Quincy.strings b/Resources/Quincy.bundle/pt-PT.lproj/Quincy.strings deleted file mode 100755 index 0d5912c037..0000000000 Binary files a/Resources/Quincy.bundle/pt-PT.lproj/Quincy.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/pt-PT.lproj/QuincyAlternate.strings b/Resources/Quincy.bundle/pt-PT.lproj/QuincyAlternate.strings deleted file mode 100755 index 32acabf127..0000000000 Binary files a/Resources/Quincy.bundle/pt-PT.lproj/QuincyAlternate.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/pt.lproj/Quincy.strings b/Resources/Quincy.bundle/pt.lproj/Quincy.strings deleted file mode 100755 index c99da648ed..0000000000 Binary files a/Resources/Quincy.bundle/pt.lproj/Quincy.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/pt.lproj/QuincyAlternate.strings b/Resources/Quincy.bundle/pt.lproj/QuincyAlternate.strings deleted file mode 100755 index 2712ccfff8..0000000000 Binary files a/Resources/Quincy.bundle/pt.lproj/QuincyAlternate.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/ru.lproj/Quincy.strings b/Resources/Quincy.bundle/ru.lproj/Quincy.strings deleted file mode 100755 index 139aa9ce1e..0000000000 Binary files a/Resources/Quincy.bundle/ru.lproj/Quincy.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/ru.lproj/QuincyAlternate.strings b/Resources/Quincy.bundle/ru.lproj/QuincyAlternate.strings deleted file mode 100755 index 139aa9ce1e..0000000000 Binary files a/Resources/Quincy.bundle/ru.lproj/QuincyAlternate.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/sv.lproj/Quincy.strings b/Resources/Quincy.bundle/sv.lproj/Quincy.strings deleted file mode 100755 index f36df14e20..0000000000 Binary files a/Resources/Quincy.bundle/sv.lproj/Quincy.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/sv.lproj/QuincyAlternate.strings b/Resources/Quincy.bundle/sv.lproj/QuincyAlternate.strings deleted file mode 100755 index d3cbe2a085..0000000000 Binary files a/Resources/Quincy.bundle/sv.lproj/QuincyAlternate.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/tr.lproj/Quincy.strings b/Resources/Quincy.bundle/tr.lproj/Quincy.strings deleted file mode 100644 index 246e757edd..0000000000 Binary files a/Resources/Quincy.bundle/tr.lproj/Quincy.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/tr.lproj/QuincyAlternate.strings b/Resources/Quincy.bundle/tr.lproj/QuincyAlternate.strings deleted file mode 100644 index 2594040b01..0000000000 Binary files a/Resources/Quincy.bundle/tr.lproj/QuincyAlternate.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/zh_CN.lproj/Quincy.strings b/Resources/Quincy.bundle/zh_CN.lproj/Quincy.strings deleted file mode 100644 index f83511d1ba..0000000000 Binary files a/Resources/Quincy.bundle/zh_CN.lproj/Quincy.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/zh_CN.lproj/QuincyAlternate.strings b/Resources/Quincy.bundle/zh_CN.lproj/QuincyAlternate.strings deleted file mode 100644 index 23aed4c961..0000000000 Binary files a/Resources/Quincy.bundle/zh_CN.lproj/QuincyAlternate.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/zh_TW.lproj/Quincy.strings b/Resources/Quincy.bundle/zh_TW.lproj/Quincy.strings deleted file mode 100644 index 347f9df0dd..0000000000 Binary files a/Resources/Quincy.bundle/zh_TW.lproj/Quincy.strings and /dev/null differ diff --git a/Resources/Quincy.bundle/zh_TW.lproj/QuincyAlternate.strings b/Resources/Quincy.bundle/zh_TW.lproj/QuincyAlternate.strings deleted file mode 100644 index e6a0d9bd1b..0000000000 Binary files a/Resources/Quincy.bundle/zh_TW.lproj/QuincyAlternate.strings and /dev/null differ diff --git a/Resources/Hockey.bundle/authorize_denied.png b/Resources/authorize_denied.png similarity index 100% rename from Resources/Hockey.bundle/authorize_denied.png rename to Resources/authorize_denied.png diff --git a/Resources/Hockey.bundle/authorize_denied@2x.png b/Resources/authorize_denied@2x.png similarity index 100% rename from Resources/Hockey.bundle/authorize_denied@2x.png rename to Resources/authorize_denied@2x.png diff --git a/Resources/Hockey.bundle/authorize_request.png b/Resources/authorize_request.png similarity index 100% rename from Resources/Hockey.bundle/authorize_request.png rename to Resources/authorize_request.png diff --git a/Resources/Hockey.bundle/authorize_request@2x.png b/Resources/authorize_request@2x.png similarity index 100% rename from Resources/Hockey.bundle/authorize_request@2x.png rename to Resources/authorize_request@2x.png diff --git a/Resources/Hockey.bundle/bg.png b/Resources/bg.png similarity index 100% rename from Resources/Hockey.bundle/bg.png rename to Resources/bg.png diff --git a/Resources/Hockey.bundle/buttonHighlight.png b/Resources/buttonHighlight.png similarity index 100% rename from Resources/Hockey.bundle/buttonHighlight.png rename to Resources/buttonHighlight.png diff --git a/Resources/Hockey.bundle/buttonHighlight@2x.png b/Resources/buttonHighlight@2x.png similarity index 100% rename from Resources/Hockey.bundle/buttonHighlight@2x.png rename to Resources/buttonHighlight@2x.png diff --git a/Resources/de.lproj/HockeySDK.strings b/Resources/de.lproj/HockeySDK.strings new file mode 100755 index 0000000000..db29a23743 --- /dev/null +++ b/Resources/de.lproj/HockeySDK.strings @@ -0,0 +1,144 @@ +/* General */ + +/* For dialogs yes buttons */ +"HockeyYes" = "Ja"; + +/* For dialogs no buttons */ +"HockeyNo" = "Nein"; + +/* For dialogs ok buttons */ +"HockeyOK" = "OK"; + + +/* Crash */ + + +/* Crash dialog */ + +/* Title showing in the alert box when crash report data has been found */ +"CrashDataFoundTitle" = "%@ unerwartet beendet"; + +/* Description explaining that crash data has been found and ask the user if the data might be uplaoded to the developers server */ +"CrashDataFoundDescription" = "Möchten Sie einen anonymen Absturzbericht senden, damit wir das Problem beheben können?"; + +/* Alert box button if the users wants to send crash data always automatically */ +"CrashSendReportAlways" = "Immer senden"; + +/* Alert box button to send the crash report once */ +"CrashSendReport" = "Bericht senden"; + +/* Alert box button to decline sending the report */ +"CrashDontSendReport" = "Nicht senden"; + +/* Text showing in a processing box that the crash data is being uploaded to the server */ +"CrashReportSending" = "Senden…"; + + +/* Crash status dialog */ + +/* Title for the alertview giving feedback about the crash */ +"CrashResponseTitle" = "Zuvor auf %@"; + +/* Full text telling the bug is fixed and will be available in the next release */ +"CrashResponseNextRelease" = "%@ wurde unerwartet beendet. Die gute Nachricht? Die Absturzursache wurde gefunden und wird für eine zukünftige Aktualisierung behoben. Bleiben Sie dran."; + +/* Full text telling the bug is fixed and the new release is waiting at Apple */ +"CrashResponseWaitingApple" = "%@ wurde unerwartet beendet. Die gute Nachricht? Wir haben den Fehler bereits behoben und eine Aktualisierung an Apple gesendet. Gedulden Sie sich noch etwas, während sie geprüft wird."; + +/* Full text telling the bug is fixed and an update is available in the AppStore */ +"CrashResponseAvailable" = "%@ wurde unerwartet beendet. Die gute Nachricht? Wir haben den Fehler bereits behoben! Aktualisieren Sie auf die neueste Version."; + + +/* Update */ + + +/* Update Alert view */ + +/* Update available */ +"UpdateAvailable" = "Aktualisierung verfügbar"; + +"UpdateAlertTextWithAppVersion" = "%@ ist verfügbar."; + +"UpdateAlertMandatoryTextWithAppVersion" = "%@ ist verfügbar und muss installiert werden!"; + +"UpdateIgnore" = "Ignorieren"; + +"UpdateShow" = "Anzeigen"; + +"UpdateInstall" = "Installieren"; + + +/* Update Details */ + +"UpdateScreenTitle" = "Aktualisierung"; + +"UpdateButtonCheck" = "PRÜFE"; + +"UpdateButtonSearching" = "PRÜFEN"; + +"UpdateButtonUpdate" = "UPDATE"; + +"UpdateButtonInstalling" = "INSTALLIEREN"; + +"UpdateButtonOffline" = "OFFLINE"; + +"UpdateInstalled" = "INSTALLIERT"; + +"UpdateVersion" = "Version"; + +"UpdateShowPreviousVersions" = "Zeige frühere Versionen..."; + +"UpdateNoUpdateAvailableTitle" = "Kein Update Verfügbar"; + +"UpdateNoUpdateAvailableMessage" = "%@ ist bereits die aktuellste Version."; + +"UpdateError" = "Fehler"; + +"UpdateWarning" = "Warnung"; + +"UpdateNoReleaseNotesAvailable" = "Keine Release Notes verfügbar."; + + +/* Update Authorization */ + +"UpdateAuthorizationProgress" = "Autorisierung..."; + +"UpdateAuthorizationOffline" = "Internet Verbindung wird benötigt!"; + +"UpdateAuthorizationDenied" = "Autorisierung verweigert. Bitte kontaktieren Sie den Entwickler."; + + +/* Update Simulator Warning */ + +"UpdateSimulatorMessage" = "Hockey funktioniert nicht im Simulator."; + + +/* Update Settings */ + +/* Screen title for settings view */ +"UpdateSettingsTitle" = "Einstellungen"; + +/* Text asking the user to send user data (on/off switch) */ +"UpdateSettingsUserData" = "Daten senden"; + +/* Description text for turning on/off sending user data */ +"UpdateSettingsUserDataDescription" = "Daten senden liefert dem Entwickler die folgenden Daten: Programmversion, Sprache, Gerätetyp und iOS Version."; + +/* Text asking the user to send usage data (on/off switch) */ +"UpdateSettingsUsageData" = "Testzeit senden"; + +/* Description text for turning on/off sending usage data */ +"UpdateSettingsUsageDataDescription" = "Testzeit senden informiert den Entwickler über die Summe der Testzeit, in einer Genauigkeit von 1 Minute."; + +/* Title for defining when update checks may be made */ +"UpdateSectionCheckTitle" = "Nach Aktualisierung Prüfen"; + +/* On Startup */ +"UpdateSectionCheckStartup" = "Beim Start"; + +/* Daily */ +"UpdateSectionCheckDaily" = "Täglich"; + +/* Manually */ +"UpdateSectionCheckManually" = "Manuell"; + diff --git a/Resources/en.lproj/HockeySDK.strings b/Resources/en.lproj/HockeySDK.strings new file mode 100755 index 0000000000..a70cc835e3 --- /dev/null +++ b/Resources/en.lproj/HockeySDK.strings @@ -0,0 +1,143 @@ +/* General */ + +/* For dialogs yes buttons */ +"HockeyYes" = "Yes"; + +/* For dialogs no buttons */ +"HockeyNo" = "No"; + +/* For dialogs ok buttons */ +"HockeyOK" = "OK"; + + +/* Crash */ + + +/* Crash dialog */ + +/* Title showing in the alert box when crash report data has been found */ +"CrashDataFoundTitle" = "%@ Unexpectedly Quit"; + +/* Description explaining that crash data has been found and ask the user if the data might be uploaded to the developers server */ +"CrashDataFoundDescription" = "Would you like to send an anonymous report so we can fix the problem?"; + +/* Alert box button if the users wants to send crash data always automatically */ +"CrashSendReportAlways" = "Always Send"; + +/* Alert box button to send the crash report once */ +"CrashSendReport" = "Send Report"; + +/* Alert box button to decline sending the report */ +"CrashDontSendReport" = "Don't Send"; + +/* Text showing in a processing box that the crash data is being uploaded to the server */ +"CrashReportSending" = "Sending…"; + + +/* Crash status dialog */ + +/* Title for the alertview giving feedback about the crash */ +"CrashResponseTitle" = "Previously on %@"; + +/* Full text telling the bug is fixed and will be available in the next release */ +"CrashResponseNextRelease" = "The bug has been fixed for a future update. Stay tuned."; + +/* Full text telling the bug is fixed and the new release is waiting at Apple */ +"CrashResponseWaitingApple" = "The bug has been fixed, and we submitted an update to Apple. Hang tight while it’s in review!"; + +/* Full text telling the bug is fixed and an update is available in the AppStore */ +"CrashResponseAvailable" = "The bug has been fixed. Update to the latest version in the App Store."; + + +/* Update */ + + +/* Update Alert view */ + +/* Update available */ +"UpdateAvailable" = "Update available"; + +"UpdateAlertTextWithAppVersion" = "%@ is available."; + +"UpdateAlertMandatoryTextWithAppVersion" = "%@ is available and is a mandatory update!"; + +"UpdateIgnore" = "Ignore"; + +"UpdateShow" = "Show"; + +"UpdateInstall" = "Install"; + + +/* Update Details */ + +"UpdateScreenTitle" = "Update"; + +"UpdateButtonCheck" = "CHECK"; + +"UpdateButtonSearching" = "CHECKING"; + +"UpdateButtonUpdate" = "UPDATE"; + +"UpdateButtonInstalling" = "INSTALLING"; + +"UpdateButtonOffline" = "OFFLINE"; + +"UpdateInstalled" = "INSTALLED"; + +"UpdateVersion" = "Version"; + +"UpdateShowPreviousVersions" = "Show previous versions..."; + +"UpdateNoUpdateAvailableTitle" = "No Update Available"; + +"UpdateNoUpdateAvailableMessage" = "%@ is already the latest version."; + +"UpdateError" = "Error"; + +"UpdateWarning" = "Warning"; + +"UpdateNoReleaseNotesAvailable" = "No release notes available."; + + +/* Update Authorization */ + +"UpdateAuthorizationProgress" = "Authorizing..."; + +"UpdateAuthorizationOffline" = "Internet connection required!"; + +"UpdateAuthorizationDenied" = "Authorizing denied. Please contact the developer."; + + +/* Update Simulator Warning */ + +"UpdateSimulatorMessage" = "Hockey Update does not work in the Simulator.\nThe itms-services:// url scheme is implemented but nonfunctional."; + + +/* Update Settings */ + +/* Screen title for settings view */ +"UpdateSettingsTitle" = "Settings"; + +/* Text asking the user to send user data (on/off switch) */ +"UpdateSettingsUserData" = "Send User Data"; + +/* Description text for turning on/off sending user data */ +"UpdateSettingsUserDataDescription" = "Send User Data will send the following data to the developer: app version, language, device type and iOS version."; + +/* Text asking the user to send usage data (on/off switch) */ +"UpdateSettingsUsageData" = "Send Usage Data"; + +/* Description text for turning on/off sending usage data */ +"UpdateSettingsUsageDataDescription" = "Send Usage Data will send the amount of test time to the developer, in a granularity of 1 minute."; + +/* Title for defining when update checks may be made */ +"UpdateSectionCheckTitle" = "Check For Update"; + +/* On Startup */ +"UpdateSectionCheckStartup" = "On Startup"; + +/* Daily */ +"UpdateSectionCheckDaily" = "Daily"; + +/* Manually */ +"UpdateSectionCheckManually" = "Manually"; diff --git a/Resources/es.lproj/HockeySDK.strings b/Resources/es.lproj/HockeySDK.strings new file mode 100755 index 0000000000..bcceab12aa --- /dev/null +++ b/Resources/es.lproj/HockeySDK.strings @@ -0,0 +1,143 @@ +/* General */ + +/* For dialogs yes buttons */ +"HockeyYes" = "Yes"; + +/* For dialogs no buttons */ +"HockeyNo" = "No"; + +/* For dialogs ok buttons */ +"HockeyOK" = "OK"; + + +/* Crash */ + + +/* Crash dialog */ + +/* Title showing in the alert box when crash report data has been found */ +"CrashDataFoundTitle" = "Conflicto de datos detectado"; + +/* Description explaining that crash data has been found and ask the user if the data might be uploaded to the developers server */ +"CrashDataFoundDescription" = "La aplicación fallo previamente. ¿Le gustaría proporcionar de manera anonima información relacionado con el fallo al programador para que este pueda solucionar el problema?"; + +/* Alert box button if the users wants to send crash data always automatically */ +"CrashSendReportAlways" = "Siempre"; + +/* Alert box button to send the crash report once */ +"CrashSendReport" = "Sí"; + +/* Alert box button to decline sending the report */ +"CrashDontSendReport" = "No"; + +/* Text showing in a processing box that the crash data is being uploaded to the server */ +"CrashReportSending" = "Enviando…"; + + +/* Crash status dialog */ + +/* Title for the alertview giving feedback about the crash */ +"CrashResponseTitle" = "Estado de la falla"; + +/* Full text telling the bug is fixed and will be available in the next release */ +"CrashResponseNextRelease" = "El error que causo la falla ha sido solucionado y la corrección estará disponible en la siguiente versión de %@"; + +/* Full text telling the bug is fixed and the new release is waiting at Apple */ +"CrashResponseWaitingApple" = "El error que causo la falla ha sido solucionado, la nueva versión de %@ esta en espera de la aprobación de Apple"; + +/* Full text telling the bug is fixed and an update is available in the AppStore */ +"CrashResponseAvailable" = "El error que causo la falla ha sido solucionado, una nueva versión de %@ esta disponible. ¡Por favor actaulice!"; + + +/* Update */ + + +/* Update Alert view */ + +/* Update available */ +"UpdateAvailable" = "Update available"; + +"UpdateAlertTextWithAppVersion" = "%@ is available."; + +"UpdateAlertMandatoryTextWithAppVersion" = "%@ is available and is a mandatory update!"; + +"UpdateIgnore" = "Ignore"; + +"UpdateShow" = "Show"; + +"UpdateInstall" = "Install"; + + +/* Update Details */ + +"UpdateScreenTitle" = "Update"; + +"UpdateButtonCheck" = "CHECK"; + +"UpdateButtonSearching" = "CHECKING"; + +"UpdateButtonUpdate" = "UPDATE"; + +"UpdateButtonInstalling" = "INSTALLING"; + +"UpdateButtonOffline" = "OFFLINE"; + +"UpdateInstalled" = "INSTALLED"; + +"UpdateVersion" = "Version"; + +"UpdateShowPreviousVersions" = "Show previous versions..."; + +"UpdateNoUpdateAvailableTitle" = "No Update Available"; + +"UpdateNoUpdateAvailableMessage" = "%@ is already the latest version."; + +"UpdateError" = "Error"; + +"UpdateWarning" = "Warning"; + +"UpdateNoReleaseNotesAvailable" = "No release notes available."; + + +/* Update Authorization */ + +"UpdateAuthorizationProgress" = "Authorizing..."; + +"UpdateAuthorizationOffline" = "Internet connection required!"; + +"UpdateAuthorizationDenied" = "Authorizing denied. Please contact the developer."; + + +/* Update Simulator Warning */ + +"UpdateSimulatorMessage" = "Hockey Update does not work in the Simulator.\nThe itms-services:// url scheme is implemented but nonfunctional."; + + +/* Update Settings */ + +/* Screen title for settings view */ +"UpdateSettingsTitle" = "Settings"; + +/* Text asking the user to send user data (on/off switch) */ +"UpdateSettingsUserData" = "Send User Data"; + +/* Description text for turning on/off sending user data */ +"UpdateSettingsUserDataDescription" = "Send User Data will send the following data to the developer: app version, language, device type and iOS version."; + +/* Text asking the user to send usage data (on/off switch) */ +"UpdateSettingsUsageData" = "Send Usage Data"; + +/* Description text for turning on/off sending usage data */ +"UpdateSettingsUsageDataDescription" = "Send Usage Data will send the amount of test time to the developer, in a granularity of 1 minute."; + +/* Title for defining when update checks may be made */ +"UpdateSectionCheckTitle" = "Check For Update"; + +/* On Startup */ +"UpdateSectionCheckStartup" = "On Startup"; + +/* Daily */ +"UpdateSectionCheckDaily" = "Daily"; + +/* Manually */ +"UpdateSectionCheckManually" = "Manually"; diff --git a/Resources/fr.lproj/HockeySDK.strings b/Resources/fr.lproj/HockeySDK.strings new file mode 100755 index 0000000000..0bf3cfb9c7 --- /dev/null +++ b/Resources/fr.lproj/HockeySDK.strings @@ -0,0 +1,143 @@ +/* General */ + +/* For dialogs yes buttons */ +"HockeyYes" = "Oui"; + +/* For dialogs no buttons */ +"HockeyNo" = "Non"; + +/* For dialogs ok buttons */ +"HockeyOK" = "OK"; + + +/* Crash */ + + +/* Crash dialog */ + +/* Title showing in the alert box when crash report data has been found */ +"CrashDataFoundTitle" = "Rapport de plantage"; + +/* Description explaining that crash data has been found and ask the user if the data might be uploaded to the developers server */ +"CrashDataFoundDescription" = "%@ s’est fermé de façon inattendue. Souhaitez-vous envoyer un rapport d’incident anonyme pour nous aider à corriger le problème ?"; + +/* Alert box button if the users wants to send crash data always automatically */ +"CrashSendReportAlways" = "Toujours"; + +/* Alert box button to send the crash report once */ +"CrashSendReport" = "Oui"; + +/* Alert box button to decline sending the report */ +"CrashDontSendReport" = "Non"; + +/* Text showing in a processing box that the crash data is being uploaded to the server */ +"CrashReportSending" = "Envoyer…"; + + +/* Crash status dialog */ + +/* Title for the alertview giving feedback about the crash */ +"CrashResponseTitle" = "Précédemment dans %@"; + +/* Full text telling the bug is fixed and will be available in the next release */ +"CrashResponseNextRelease" = "%@ s’est fermé de façon inattendue. La bonne nouvelle ? La cause du problème a été détectée et une solution a été trouvée pour les versions ultérieures. Restez à l’écoute."; + +/* Full text telling the bug is fixed and the new release is waiting at Apple */ +"CrashResponseWaitingApple" = "%@ s’est fermé de façon inattendue. La bonne nouvelle ? Nous avons déjà corrigé le problème et soumis une mise à jour à Apple. Veuillez patienter durant l’examen de cette mise à jour !"; + +/* Full text telling the bug is fixed and an update is available in the AppStore */ +"CrashResponseAvailable" = "%@ s’est fermé de façon inattendue. La bonne nouvelle ? Nous avons déjà réglé le problème ! Veuillez installer la mise à jour la plus récente."; + + +/* Update */ + + +/* Update Alert view */ + +/* Update available */ +"UpdateAvailable" = "Update available"; + +"UpdateAlertTextWithAppVersion" = "%@ is available."; + +"UpdateAlertMandatoryTextWithAppVersion" = "%@ is available and is a mandatory update!"; + +"UpdateIgnore" = "Ignore"; + +"UpdateShow" = "Show"; + +"UpdateInstall" = "Install"; + + +/* Update Details */ + +"UpdateScreenTitle" = "Update"; + +"UpdateButtonCheck" = "CHECK"; + +"UpdateButtonSearching" = "CHECKING"; + +"UpdateButtonUpdate" = "UPDATE"; + +"UpdateButtonInstalling" = "INSTALLING"; + +"UpdateButtonOffline" = "OFFLINE"; + +"UpdateInstalled" = "INSTALLED"; + +"UpdateVersion" = "Version"; + +"UpdateShowPreviousVersions" = "Show previous versions..."; + +"UpdateNoUpdateAvailableTitle" = "No Update Available"; + +"UpdateNoUpdateAvailableMessage" = "%@ is already the latest version."; + +"UpdateError" = "Error"; + +"UpdateWarning" = "Warning"; + +"UpdateNoReleaseNotesAvailable" = "No release notes available."; + + +/* Update Authorization */ + +"UpdateAuthorizationProgress" = "Authorizing..."; + +"UpdateAuthorizationOffline" = "Internet connection required!"; + +"UpdateAuthorizationDenied" = "Authorizing denied. Please contact the developer."; + + +/* Update Simulator Warning */ + +"UpdateSimulatorMessage" = "Hockey Update does not work in the Simulator.\nThe itms-services:// url scheme is implemented but nonfunctional."; + + +/* Update Settings */ + +/* Screen title for settings view */ +"UpdateSettingsTitle" = "Settings"; + +/* Text asking the user to send user data (on/off switch) */ +"UpdateSettingsUserData" = "Send User Data"; + +/* Description text for turning on/off sending user data */ +"UpdateSettingsUserDataDescription" = "Send User Data will send the following data to the developer: app version, language, device type and iOS version."; + +/* Text asking the user to send usage data (on/off switch) */ +"UpdateSettingsUsageData" = "Send Usage Data"; + +/* Description text for turning on/off sending usage data */ +"UpdateSettingsUsageDataDescription" = "Send Usage Data will send the amount of test time to the developer, in a granularity of 1 minute."; + +/* Title for defining when update checks may be made */ +"UpdateSectionCheckTitle" = "Check For Update"; + +/* On Startup */ +"UpdateSectionCheckStartup" = "On Startup"; + +/* Daily */ +"UpdateSectionCheckDaily" = "Daily"; + +/* Manually */ +"UpdateSectionCheckManually" = "Manually"; diff --git a/Resources/Hockey.bundle/gear.png b/Resources/gear.png similarity index 100% rename from Resources/Hockey.bundle/gear.png rename to Resources/gear.png diff --git a/Resources/Hockey.bundle/gear@2x.png b/Resources/gear@2x.png similarity index 100% rename from Resources/Hockey.bundle/gear@2x.png rename to Resources/gear@2x.png diff --git a/Resources/it.lproj/HockeySDK.strings b/Resources/it.lproj/HockeySDK.strings new file mode 100755 index 0000000000..b21073b377 --- /dev/null +++ b/Resources/it.lproj/HockeySDK.strings @@ -0,0 +1,143 @@ +/* General */ + +/* For dialogs yes buttons */ +"HockeyYes" = "Si"; + +/* For dialogs no buttons */ +"HockeyNo" = "No"; + +/* For dialogs ok buttons */ +"HockeyOK" = "OK"; + + +/* Crash */ + + +/* Crash dialog */ + +/* Title showing in the alert box when crash report data has been found */ +"CrashDataFoundTitle" = "Dati del crash trovati"; + +/* Description explaining that crash data has been found and ask the user if the data might be uplaoded to the developers server */ +"CrashDataFoundDescription" = "L'applicazione precedentemente ha avuto un crash. Vuoi inviare allo sviluppatore i dati anonimi del crash in modo che possa provare a sistemare il problema?"; + +/* Alert box button if the users wants to send crash data always automatically */ +"CrashSendReportAlways" = "Sempre"; + +/* Alert box button to send the crash report once */ +"CrashSendReport" = "Si"; + +/* Alert box button to decline sending the report */ +"CrashDontSendReport" = "No"; + +/* Text showing in a processing box that the crash data is being uploaded to the server */ +"CrashReportSending" = "Invio…"; + + +/* Crash status dialog */ + +/* Title for the alertview giving feedback about the crash */ +"CrashResponseTitle" = "Stato del bug"; + +/* Full text telling the bug is fixed and will be available in the next release */ +"CrashResponseNextRelease" = "Il bug che ha causato il tuo problema è già stato risolto e sarà incluso nella prossima versione di %@."; + +/* Full text telling the bug is fixed and the new release is waiting at Apple */ +"CrashResponseWaitingApple" = "Il bug che ha causato il tuo problema è già stato risolto e la nuova versione di %@ è in attesa di approvazione da parte della Apple."; + +/* Full text telling the bug is fixed and an update is available in the AppStore */ +"CrashResponseAvailable" = "Il bug che ha causato il tuo problema è già stato risolto e la nuova versione di %@ è disponibile. Ti preghiamo di effettuare un aggiornamento!"; + + +/* Update */ + + +/* Update Alert view */ + +/* Update available */ +"UpdateAvailable" = "Aggiornamento disponibile"; + +"UpdateAlertTextWithAppVersion" = "%@ è disponibile."; + +"UpdateAlertMandatoryTextWithAppVersion" = "%@ is available and is a mandatory update!"; + +"UpdateIgnore" = "Ignora"; + +"UpdateShow" = "Mostra"; + +"UpdateInstall" = "Installa"; + + +/* Update Details */ + +"UpdateScreenTitle" = "Aggiorna"; + +"UpdateButtonCheck" = "CONTROLLA"; + +"UpdateButtonSearching" = "CONTROLLO"; + +"UpdateButtonUpdate" = "AGGIORNA"; + +"UpdateButtonInstalling" = "INSTALLO"; + +"UpdateButtonOffline" = "OFFLINE"; + +"UpdateInstalled" = "INSTALLATA"; + +"UpdateVersion" = "Versione"; + +"UpdateShowPreviousVersions" = "Mostra le versioni precedenti..."; + +"UpdateNoUpdateAvailableTitle" = "Nessun aggiornamento disponibile"; + +"UpdateNoUpdateAvailableMessage" = "%@ è aggiornata all'ultima versione."; + +"UpdateError" = "Errore"; + +"UpdateWarning" = "Avviso"; + +"UpdateNoReleaseNotesAvailable" = "Non sono disponibili note di rilascio."; + + +/* Update Authorization */ + +"UpdateAuthorizationProgress" = "Attendo autorizzazione..."; + +"UpdateAuthorizationOffline" = "E' richiesta la connessione internet!"; + +"UpdateAuthorizationDenied" = "Autorizzazione negata, contattare lo sviluppatore."; + + +/* Update Simulator Warning */ + +"UpdateSimulatorMessage" = "Hockey Update does not work in the Simulator.\nThe itms-services:// url scheme is implemented but nonfunctional."; + + +/* Update Settings */ + +/* Screen title for settings view */ +"UpdateSettingsTitle" = "Impostazioni"; + +/* Text asking the user to send user data (on/off switch) */ +"UpdateSettingsUserData" = "Invia dati di sistema"; + +/* Description text for turning on/off sending user data */ +"UpdateSettingsUserDataDescription" = "Invia le seguenti informazioni allo sviluppatore: versione app, lingua, tipo dispositivo e versione iOS."; + +/* Text asking the user to send usage data (on/off switch) */ +"UpdateSettingsUsageData" = "Invia dati di utilizzo"; + +/* Description text for turning on/off sending usage data */ +"UpdateSettingsUsageDataDescription" = "Invia il tempo di utilizzo allo svilupatore, con un dettaglio di 1 minuto."; + +/* Title for defining when update checks may be made */ +"UpdateSectionCheckTitle" = "Controlla gli aggiornamenti"; + +/* On Startup */ +"UpdateSectionCheckStartup" = "All'avvio"; + +/* Daily */ +"UpdateSectionCheckDaily" = "Ogni giorno"; + +/* Manually */ +"UpdateSectionCheckManually" = "Manualmente"; diff --git a/Resources/ja.lproj/HockeySDK.strings b/Resources/ja.lproj/HockeySDK.strings new file mode 100755 index 0000000000..31b10e7bdf --- /dev/null +++ b/Resources/ja.lproj/HockeySDK.strings @@ -0,0 +1,143 @@ +/* General */ + +/* For dialogs yes buttons */ +"HockeyYes" = "Yes"; + +/* For dialogs no buttons */ +"HockeyNo" = "No"; + +/* For dialogs ok buttons */ +"HockeyOK" = "保存"; + + +/* Crash */ + + +/* Crash dialog */ + +/* Title showing in the alert box when crash report data has been found */ +"CrashDataFoundTitle" = "クラッシュ時のデータを検知"; + +/* Description explaining that crash data has been found and ask the user if the data might be uplaoded to the developers server */ +"CrashDataFoundDescription" = "%@ は不正に終了しました。問題の修正のため、匿名でクラッシュレポートを送信しますか?"; + +/* Alert box button if the users wants to send crash data always automatically */ +"CrashSendReportAlways" = "いつも"; + +/* Alert box button to send the crash report once */ +"CrashSendReport" = "はい"; + +/* Alert box button to decline sending the report */ +"CrashDontSendReport" = "いいえ"; + +/* Text showing in a processing box that the crash data is being uploaded to the server */ +"CrashReportSending" = "送信中…"; + + +/* Crash status dialog */ + +/* Title for the alertview giving feedback about the crash */ +"CrashResponseTitle" = "%@、前回までは"; + +/* Full text telling the bug is fixed and will be available in the next release */ +"CrashResponseNextRelease" = "%@ は不正に終了しました。幸い、クラッシュの原因は既に特定され、将来のバージョンで修正されます。今しばらくお待ちください。"; + +/* Full text telling the bug is fixed and the new release is waiting at Apple */ +"CrashResponseWaitingApple" = "%@ は不正に終了しました。幸い、クラッシュの原因を既に修正したアップデートを Apple に提出しました。公開まで今しばらくお待ちください!"; + +/* Full text telling the bug is fixed and an update is available in the AppStore */ +"CrashResponseAvailable" = "%@ は不正に終了しました。幸い、クラッシュの原因を既に修正したアップデートが配布されています!最新版にアップデートしてください。"; + + +/* Update */ + + +/* Update Alert view */ + +/* Update available */ +"UpdateAvailable" = "Update available"; + +"UpdateAlertTextWithAppVersion" = "%@ is available."; + +"UpdateAlertMandatoryTextWithAppVersion" = "%@ is available and is a mandatory update!"; + +"UpdateIgnore" = "Ignore"; + +"UpdateShow" = "Show"; + +"UpdateInstall" = "Install"; + + +/* Update Details */ + +"UpdateScreenTitle" = "Update"; + +"UpdateButtonCheck" = "CHECK"; + +"UpdateButtonSearching" = "CHECKING"; + +"UpdateButtonUpdate" = "UPDATE"; + +"UpdateButtonInstalling" = "INSTALLING"; + +"UpdateButtonOffline" = "OFFLINE"; + +"UpdateInstalled" = "INSTALLED"; + +"UpdateVersion" = "Version"; + +"UpdateShowPreviousVersions" = "Show previous versions..."; + +"UpdateNoUpdateAvailableTitle" = "No Update Available"; + +"UpdateNoUpdateAvailableMessage" = "%@ is already the latest version."; + +"UpdateError" = "Error"; + +"UpdateWarning" = "Warning"; + +"UpdateNoReleaseNotesAvailable" = "No release notes available."; + + +/* Update Authorization */ + +"UpdateAuthorizationProgress" = "Authorizing..."; + +"UpdateAuthorizationOffline" = "Internet connection required!"; + +"UpdateAuthorizationDenied" = "Authorizing denied. Please contact the developer."; + + +/* Update Simulator Warning */ + +"UpdateSimulatorMessage" = "Hockey Update does not work in the Simulator.\nThe itms-services:// url scheme is implemented but nonfunctional."; + + +/* Update Settings */ + +/* Screen title for settings view */ +"UpdateSettingsTitle" = "Settings"; + +/* Text asking the user to send user data (on/off switch) */ +"UpdateSettingsUserData" = "Send User Data"; + +/* Description text for turning on/off sending user data */ +"UpdateSettingsUserDataDescription" = "Send User Data will send the following data to the developer: app version, language, device type and iOS version."; + +/* Text asking the user to send usage data (on/off switch) */ +"UpdateSettingsUsageData" = "Send Usage Data"; + +/* Description text for turning on/off sending usage data */ +"UpdateSettingsUsageDataDescription" = "Send Usage Data will send the amount of test time to the developer, in a granularity of 1 minute."; + +/* Title for defining when update checks may be made */ +"UpdateSectionCheckTitle" = "Check For Update"; + +/* On Startup */ +"UpdateSectionCheckStartup" = "On Startup"; + +/* Daily */ +"UpdateSectionCheckDaily" = "Daily"; + +/* Manually */ +"UpdateSectionCheckManually" = "Manually"; diff --git a/Resources/nl.lproj/HockeySDK.strings b/Resources/nl.lproj/HockeySDK.strings new file mode 100755 index 0000000000..2ef6cf2ed1 --- /dev/null +++ b/Resources/nl.lproj/HockeySDK.strings @@ -0,0 +1,143 @@ +/* General */ + +/* For dialogs yes buttons */ +"HockeyYes" = "Ja"; + +/* For dialogs no buttons */ +"HockeyNo" = "Nee"; + +/* For dialogs ok buttons */ +"HockeyOK" = "OK"; + + +/* Crash */ + + +/* Crash dialog */ + +/* Title showing in the alert box when crash report data has been found */ +"CrashDataFoundTitle" = "Crashdata gevonden"; + +/* Description explaining that crash data has been found and ask the user if the data might be uplaoded to the developers server */ +"CrashDataFoundDescription" = "De applicatie is gecrasht. Wilt u de ontwikkelaars anonieme data sturen zodat zij kunnen proberen de problemen op te lossen?"; + +/* Alert box button if the users wants to send crash data always automatically */ +"CrashSendReportAlways" = "Altijd"; + +/* Alert box button to send the crash report once */ +"CrashSendReport" = "Ja"; + +/* Alert box button to decline sending the report */ +"CrashDontSendReport" = "Nee"; + +/* Text showing in a processing box that the crash data is being uploaded to the server */ +"CrashReportSending" = "Zenden…"; + + +/* Crash status dialog */ + +/* Title for the alertview giving feedback about the crash */ +"CrashResponseTitle" = "Bugstatus"; + +/* Full text telling the bug is fixed and will be available in the next release */ +"CrashResponseNextRelease" = "De bug die uw probleem heeft veroorzaakt is reeds opgelost en de oplossing zal in een volgende versie van %@ worden toegevoegd."; + +/* Full text telling the bug is fixed and the new release is waiting at Apple */ +"CrashResponseWaitingApple" = "De bug die uw probleem heeft veroorzaakt is reeds opgelost en een nieuwe versie %@ wacht op goedkeuring door Apple."; + +/* Full text telling the bug is fixed and an update is available in the AppStore */ +"CrashResponseAvailable" = "De bug die uw probleem heeft veroorzaakt is reeds opgelost en een nieuwe versie van %@ is beschikbaar. Update a.u.b.!"; + + +/* Update */ + + +/* Update Alert view */ + +/* Update available */ +"UpdateAvailable" = "Update available"; + +"UpdateAlertTextWithAppVersion" = "%@ is available."; + +"UpdateAlertMandatoryTextWithAppVersion" = "%@ is available and is a mandatory update!"; + +"UpdateIgnore" = "Ignore"; + +"UpdateShow" = "Show"; + +"UpdateInstall" = "Install"; + + +/* Update Details */ + +"UpdateScreenTitle" = "Update"; + +"UpdateButtonCheck" = "CHECK"; + +"UpdateButtonSearching" = "CHECKING"; + +"UpdateButtonUpdate" = "UPDATE"; + +"UpdateButtonInstalling" = "INSTALLING"; + +"UpdateButtonOffline" = "OFFLINE"; + +"UpdateInstalled" = "INSTALLED"; + +"UpdateVersion" = "Version"; + +"UpdateShowPreviousVersions" = "Show previous versions..."; + +"UpdateNoUpdateAvailableTitle" = "No Update Available"; + +"UpdateNoUpdateAvailableMessage" = "%@ is already the latest version."; + +"UpdateError" = "Error"; + +"UpdateWarning" = "Warning"; + +"UpdateNoReleaseNotesAvailable" = "No release notes available."; + + +/* Update Authorization */ + +"UpdateAuthorizationProgress" = "Authorizing..."; + +"UpdateAuthorizationOffline" = "Internet connection required!"; + +"UpdateAuthorizationDenied" = "Authorizing denied. Please contact the developer."; + + +/* Update Simulator Warning */ + +"UpdateSimulatorMessage" = "Hockey Update does not work in the Simulator.\nThe itms-services:// url scheme is implemented but nonfunctional."; + + +/* Update Settings */ + +/* Screen title for settings view */ +"UpdateSettingsTitle" = "Settings"; + +/* Text asking the user to send user data (on/off switch) */ +"UpdateSettingsUserData" = "Send User Data"; + +/* Description text for turning on/off sending user data */ +"UpdateSettingsUserDataDescription" = "Send User Data will send the following data to the developer: app version, language, device type and iOS version."; + +/* Text asking the user to send usage data (on/off switch) */ +"UpdateSettingsUsageData" = "Send Usage Data"; + +/* Description text for turning on/off sending usage data */ +"UpdateSettingsUsageDataDescription" = "Send Usage Data will send the amount of test time to the developer, in a granularity of 1 minute."; + +/* Title for defining when update checks may be made */ +"UpdateSectionCheckTitle" = "Check For Update"; + +/* On Startup */ +"UpdateSectionCheckStartup" = "On Startup"; + +/* Daily */ +"UpdateSectionCheckDaily" = "Daily"; + +/* Manually */ +"UpdateSectionCheckManually" = "Manually"; diff --git a/Resources/pt-PT.lproj/HockeySDK.strings b/Resources/pt-PT.lproj/HockeySDK.strings new file mode 100755 index 0000000000..b03fc19389 --- /dev/null +++ b/Resources/pt-PT.lproj/HockeySDK.strings @@ -0,0 +1,143 @@ +/* General */ + +/* For dialogs yes buttons */ +"HockeyYes" = "Sim"; + +/* For dialogs no buttons */ +"HockeyNo" = "Não"; + +/* For dialogs ok buttons */ +"HockeyOK" = "OK"; + + +/* Crash */ + + +/* Crash dialog */ + +/* Title showing in the alert box when crash report data has been found */ +"CrashDataFoundTitle" = "Informação de falha encontrada"; + +/* Description explaining that crash data has been found and ask the user if the data might be uplaoded to the developers server */ +"CrashDataFoundDescription" = "A aplicação falhou anteriormente. Gostaria de enviar informação anónima ao programador acerca da falha de forma a poderem resolver o problema?"; + +/* Alert box button if the users wants to send crash data always automatically */ +"CrashSendReportAlways" = "Sempre"; + +/* Alert box button to send the crash report once */ +"CrashSendReport" = "Sim"; + +/* Alert box button to decline sending the report */ +"CrashDontSendReport" = "Não"; + +/* Text showing in a processing box that the crash data is being uploaded to the server */ +"CrashReportSending" = "Enviando…"; + + +/* Crash status dialog */ + +/* Title for the alertview giving feedback about the crash */ +"CrashResponseTitle" = "Estado do bug"; + +/* Full text telling the bug is fixed and will be available in the next release */ +"CrashResponseNextRelease" = "O bug que causou o problema já se encontra resolvido e a solução será incluída na próxima versão do %@."; + +/* Full text telling the bug is fixed and the new release is waiting at Apple */ +"CrashResponseWaitingApple" = "O bug que causou o problema já se encontra resolvido e a nova versão do %@ está aguardando aprovação da Apple."; + +/* Full text telling the bug is fixed and an update is available in the AppStore */ +"CrashResponseAvailable" = "O bug que causou o problema já se encontra resolvido e a nova versão do %@ está disponível. Por favor actualize!"; + + +/* Update */ + + +/* Update Alert view */ + +/* Update available */ +"UpdateAvailable" = "Update available"; + +"UpdateAlertTextWithAppVersion" = "%@ is available."; + +"UpdateAlertMandatoryTextWithAppVersion" = "%@ is available and is a mandatory update!"; + +"UpdateIgnore" = "Ignore"; + +"UpdateShow" = "Show"; + +"UpdateInstall" = "Install"; + + +/* Update Details */ + +"UpdateScreenTitle" = "Update"; + +"UpdateButtonCheck" = "CHECK"; + +"UpdateButtonSearching" = "CHECKING"; + +"UpdateButtonUpdate" = "UPDATE"; + +"UpdateButtonInstalling" = "INSTALLING"; + +"UpdateButtonOffline" = "OFFLINE"; + +"UpdateInstalled" = "INSTALLED"; + +"UpdateVersion" = "Version"; + +"UpdateShowPreviousVersions" = "Show previous versions..."; + +"UpdateNoUpdateAvailableTitle" = "No Update Available"; + +"UpdateNoUpdateAvailableMessage" = "%@ is already the latest version."; + +"UpdateError" = "Error"; + +"UpdateWarning" = "Warning"; + +"UpdateNoReleaseNotesAvailable" = "No release notes available."; + + +/* Update Authorization */ + +"UpdateAuthorizationProgress" = "Authorizing..."; + +"UpdateAuthorizationOffline" = "Internet connection required!"; + +"UpdateAuthorizationDenied" = "Authorizing denied. Please contact the developer."; + + +/* Update Simulator Warning */ + +"UpdateSimulatorMessage" = "Hockey Update does not work in the Simulator.\nThe itms-services:// url scheme is implemented but nonfunctional."; + + +/* Update Settings */ + +/* Screen title for settings view */ +"UpdateSettingsTitle" = "Settings"; + +/* Text asking the user to send user data (on/off switch) */ +"UpdateSettingsUserData" = "Send User Data"; + +/* Description text for turning on/off sending user data */ +"UpdateSettingsUserDataDescription" = "Send User Data will send the following data to the developer: app version, language, device type and iOS version."; + +/* Text asking the user to send usage data (on/off switch) */ +"UpdateSettingsUsageData" = "Send Usage Data"; + +/* Description text for turning on/off sending usage data */ +"UpdateSettingsUsageDataDescription" = "Send Usage Data will send the amount of test time to the developer, in a granularity of 1 minute."; + +/* Title for defining when update checks may be made */ +"UpdateSectionCheckTitle" = "Check For Update"; + +/* On Startup */ +"UpdateSectionCheckStartup" = "On Startup"; + +/* Daily */ +"UpdateSectionCheckDaily" = "Daily"; + +/* Manually */ +"UpdateSectionCheckManually" = "Manually"; diff --git a/Resources/pt.lproj/HockeySDK.strings b/Resources/pt.lproj/HockeySDK.strings new file mode 100755 index 0000000000..3fb8c3eba8 --- /dev/null +++ b/Resources/pt.lproj/HockeySDK.strings @@ -0,0 +1,143 @@ +/* General */ + +/* For dialogs yes buttons */ +"HockeyYes" = "Sim"; + +/* For dialogs no buttons */ +"HockeyNo" = "Não"; + +/* For dialogs ok buttons */ +"HockeyOK" = "OK"; + + +/* Crash */ + + +/* Crash dialog */ + +/* Title showing in the alert box when crash report data has been found */ +"CrashDataFoundTitle" = "Dados de falha encontrados"; + +/* Description explaining that crash data has been found and ask the user if the data might be uplaoded to the developers server */ +"CrashDataFoundDescription" = "O aplicativo falhou anteriormente. Você gostaria de enviar ao desenvolvedor os dados sobre a falha do sistema, para que ele resolva o problema?"; + +/* Alert box button if the users wants to send crash data always automatically */ +"CrashSendReportAlways" = "Sempre"; + +/* Alert box button to send the crash report once */ +"CrashSendReport" = "Sim"; + +/* Alert box button to decline sending the report */ +"CrashDontSendReport" = "Não"; + +/* Text showing in a processing box that the crash data is being uploaded to the server */ +"CrashReportSending" = "Enviando…"; + + +/* Crash status dialog */ + +/* Title for the alertview giving feedback about the crash */ +"CrashResponseTitle" = "Status do bug"; + +/* Full text telling the bug is fixed and will be available in the next release */ +"CrashResponseNextRelease" = "O bug que causou o problema já está resolvido e a solução será incluída na próxima versão do %@."; + +/* Full text telling the bug is fixed and the new release is waiting at Apple */ +"CrashResponseWaitingApple" = "O bug que causou o problema já está resolvido e uma nova versão do %@ está aguardando aprovação da Apple."; + +/* Full text telling the bug is fixed and an update is available in the AppStore */ +"CrashResponseAvailable" = "O bug que causou o problema já está resolvido e uma nova versão do %@ está disponível. Por favor, atualize!"; + + +/* Update */ + + +/* Update Alert view */ + +/* Update available */ +"UpdateAvailable" = "Update available"; + +"UpdateAlertTextWithAppVersion" = "%@ is available."; + +"UpdateAlertMandatoryTextWithAppVersion" = "%@ is available and is a mandatory update!"; + +"UpdateIgnore" = "Ignore"; + +"UpdateShow" = "Show"; + +"UpdateInstall" = "Install"; + + +/* Update Details */ + +"UpdateScreenTitle" = "Update"; + +"UpdateButtonCheck" = "CHECK"; + +"UpdateButtonSearching" = "CHECKING"; + +"UpdateButtonUpdate" = "UPDATE"; + +"UpdateButtonInstalling" = "INSTALLING"; + +"UpdateButtonOffline" = "OFFLINE"; + +"UpdateInstalled" = "INSTALLED"; + +"UpdateVersion" = "Version"; + +"UpdateShowPreviousVersions" = "Show previous versions..."; + +"UpdateNoUpdateAvailableTitle" = "No Update Available"; + +"UpdateNoUpdateAvailableMessage" = "%@ is already the latest version."; + +"UpdateError" = "Error"; + +"UpdateWarning" = "Warning"; + +"UpdateNoReleaseNotesAvailable" = "No release notes available."; + + +/* Update Authorization */ + +"UpdateAuthorizationProgress" = "Authorizing..."; + +"UpdateAuthorizationOffline" = "Internet connection required!"; + +"UpdateAuthorizationDenied" = "Authorizing denied. Please contact the developer."; + + +/* Update Simulator Warning */ + +"UpdateSimulatorMessage" = "Hockey Update does not work in the Simulator.\nThe itms-services:// url scheme is implemented but nonfunctional."; + + +/* Update Settings */ + +/* Screen title for settings view */ +"UpdateSettingsTitle" = "Settings"; + +/* Text asking the user to send user data (on/off switch) */ +"UpdateSettingsUserData" = "Send User Data"; + +/* Description text for turning on/off sending user data */ +"UpdateSettingsUserDataDescription" = "Send User Data will send the following data to the developer: app version, language, device type and iOS version."; + +/* Text asking the user to send usage data (on/off switch) */ +"UpdateSettingsUsageData" = "Send Usage Data"; + +/* Description text for turning on/off sending usage data */ +"UpdateSettingsUsageDataDescription" = "Send Usage Data will send the amount of test time to the developer, in a granularity of 1 minute."; + +/* Title for defining when update checks may be made */ +"UpdateSectionCheckTitle" = "Check For Update"; + +/* On Startup */ +"UpdateSectionCheckStartup" = "On Startup"; + +/* Daily */ +"UpdateSectionCheckDaily" = "Daily"; + +/* Manually */ +"UpdateSectionCheckManually" = "Manually"; diff --git a/Resources/ru.lproj/HockeySDK.strings b/Resources/ru.lproj/HockeySDK.strings new file mode 100755 index 0000000000..c0db812990 --- /dev/null +++ b/Resources/ru.lproj/HockeySDK.strings @@ -0,0 +1,140 @@ +/* General */ + +/* For dialogs yes buttons */ +"HockeyYes" = "Да"; + +/* For dialogs no buttons */ +"HockeyNo" = "Нет"; + +/* For dialogs ok buttons */ +"HockeyOK" = "OK"; + + +/* Crash */ + + +/* Crash dialog */ + +/* Title showing in the alert box when crash report data has been found */ +"CrashDataFoundTitle" = "Обнаружена проблема"; + +/* Description explaining that crash data has been found and ask the user if the data might be uplaoded to the developers server */ +"CrashDataFoundDescription" = "%@ программа неожиданно завершена. Хотите ли Вы отправить нам анонимное сообщение о неполадках, чтобы мы могли устранить проблему?"; + +/* Alert box button if the users wants to send crash data always automatically */ +"Always" = "Всегда"; + +/* Alert box button to send the crash report once */ +"Send Report" = "Да"; + +/* Alert box button to decline sending the report */ +"Don't Send" = "Нет"; + +/* Text showing in a processing box that the crash data is being uploaded to the server */ +"Sending" = "Отправить"; + +/* Title for the alertview giving feedback about the crash */ +"CrashResponseTitle" = "Обнаружена проблема %@"; + +/* Full text telling the bug is fixed and will be available in the next release */ +"CrashResponseNextRelease" = "%@ неожиданно завершен. Причина неполадки будет найдена и исправлена ​​в следующем обновлении. Оставайтесь с нами."; + +/* Full text telling the bug is fixed and the new release is waiting at Apple */ +"CrashResponseWaitingApple" = "%@ неожиданно завершен. Мы исправили ошибку и отправили обновление в Apple."; + +/* Full text telling the bug is fixed and an update is available in the AppStore */ +"CrashResponseAvailable" = "%@ неожиданно завершен. Ошибка исправлена​​! Обновите программу в App Store."; + + +/* Update */ + + +/* Update Alert view */ + +/* Update available */ +"UpdateAvailable" = "Update available"; + +"UpdateAlertTextWithAppVersion" = "%@ is available."; + +"UpdateAlertMandatoryTextWithAppVersion" = "%@ is available and is a mandatory update!"; + +"UpdateIgnore" = "Ignore"; + +"UpdateShow" = "Show"; + +"UpdateInstall" = "Install"; + + +/* Update Details */ + +"UpdateScreenTitle" = "Update"; + +"UpdateButtonCheck" = "CHECK"; + +"UpdateButtonSearching" = "CHECKING"; + +"UpdateButtonUpdate" = "UPDATE"; + +"UpdateButtonInstalling" = "INSTALLING"; + +"UpdateButtonOffline" = "OFFLINE"; + +"UpdateInstalled" = "INSTALLED"; + +"UpdateVersion" = "Version"; + +"UpdateShowPreviousVersions" = "Show previous versions..."; + +"UpdateNoUpdateAvailableTitle" = "No Update Available"; + +"UpdateNoUpdateAvailableMessage" = "%@ is already the latest version."; + +"UpdateError" = "Error"; + +"UpdateWarning" = "Warning"; + +"UpdateNoReleaseNotesAvailable" = "No release notes available."; + + +/* Update Authorization */ + +"UpdateAuthorizationProgress" = "Authorizing..."; + +"UpdateAuthorizationOffline" = "Internet connection required!"; + +"UpdateAuthorizationDenied" = "Authorizing denied. Please contact the developer."; + + +/* Update Simulator Warning */ + +"UpdateSimulatorMessage" = "Hockey Update does not work in the Simulator.\nThe itms-services:// url scheme is implemented but nonfunctional."; + + +/* Update Settings */ + +/* Screen title for settings view */ +"UpdateSettingsTitle" = "Settings"; + +/* Text asking the user to send user data (on/off switch) */ +"UpdateSettingsUserData" = "Send User Data"; + +/* Description text for turning on/off sending user data */ +"UpdateSettingsUserDataDescription" = "Send User Data will send the following data to the developer: app version, language, device type and iOS version."; + +/* Text asking the user to send usage data (on/off switch) */ +"UpdateSettingsUsageData" = "Send Usage Data"; + +/* Description text for turning on/off sending usage data */ +"UpdateSettingsUsageDataDescription" = "Send Usage Data will send the amount of test time to the developer, in a granularity of 1 minute."; + +/* Title for defining when update checks may be made */ +"UpdateSectionCheckTitle" = "Check For Update"; + +/* On Startup */ +"UpdateSectionCheckStartup" = "On Startup"; + +/* Daily */ +"UpdateSectionCheckDaily" = "Daily"; + +/* Manually */ +"UpdateSectionCheckManually" = "Manually"; diff --git a/Resources/sv.lproj/HockeySDK.strings b/Resources/sv.lproj/HockeySDK.strings new file mode 100755 index 0000000000..d529043cba --- /dev/null +++ b/Resources/sv.lproj/HockeySDK.strings @@ -0,0 +1,144 @@ +/* General */ + +/* For dialogs yes buttons */ +"HockeyYes" = "Ja"; + +/* For dialogs no buttons */ +"HockeyNo" = "Nej"; + +/* For dialogs ok buttons */ +"HockeyOK" = "OK"; + + +/* Crash */ + + +/* Crash dialog */ + +/* Title showing in the alert box when crash report data has been found */ +"CrashDataFoundTitle" = "%@ kraschade"; + +/* Description explaining that crash data has been found and ask the user if the data might be uploaded to the developers server */ +"CrashDataFoundDescription" = "Vill du skicka en anonym kraschrapport så att vi kan lösa felet?"; + +/* Alert box button if the users wants to send crash data always automatically */ +"CrashSendReportAlways" = "Skicka alltid"; + +/* Alert box button to send the crash report once */ +"CrashSendReport" = "Skicka rapport"; + +/* Alert box button to decline sending the report */ +"CrashDontSendReport" = "Skicka inte"; + +/* Text showing in a processing box that the crash data is being uploaded to the server */ +"CrashReportSending" = "Skickar…"; + + +/* Crash status dialog */ + +/* Title for the alertview giving feedback about the crash */ +"CrashResponseTitle" = "Tidigare %@ krasch"; + +/* Full text telling the bug is fixed and will be available in the next release */ +"CrashResponseNextRelease" = "Buggen har lösts och är borttagen i nästa release som kommer snart."; + +/* Full text telling the bug is fixed and the new release is waiting at Apple */ +"CrashResponseWaitingApple" = "Buggen har lösts, en ny version har skickats till Apple. Håll i dig medans de testar!"; + +/* Full text telling the bug is fixed and an update is available in the AppStore */ +"CrashResponseAvailable" = "Buggen har lösts. Updatera till senaste versionen i App Store."; + + +/* Update */ + + +/* Update Alert view */ + +/* Update available */ +"UpdateAvailable" = "Uppdatering tillgänglig"; + +"UpdateAlertTextWithAppVersion" = "%@ finns."; + +"UpdateAlertMandatoryTextWithAppVersion" = "%@ is available and is a mandatory update!"; + +"UpdateIgnore" = "Ignorera"; + +"UpdateShow" = "Visa"; + +"UpdateInstall" = "Installera"; + + +/* Update Details */ + +"UpdateScreenTitle" = "Uppdatera"; + +"UpdateButtonCheck" = "FRÅGA"; + +"UpdateButtonSearching" = "FRÅGAR"; + +"UpdateButtonUpdate" = "UPPDATERA"; + +"UpdateButtonInstalling" = "INSTALLERAR"; + +"UpdateButtonOffline" = "OFFLINE"; + +"UpdateInstalled" = "INSTALLERAD"; + +"UpdateVersion" = "Version"; + +"UpdateShowPreviousVersions" = "Se tidigare versioner..."; + +"UpdateNoUpdateAvailableTitle" = "Ingen uppdatering tillgänglig"; + +"UpdateNoUpdateAvailableMessage" = "%@ är den senaste versionen."; + +"UpdateError" = "Error"; + +"UpdateWarning" = "Varning"; + +"UpdateNoReleaseNotesAvailable" = "Inga releasenoteringar tillgängliga."; + + +/* Update Authorization */ + +"UpdateAuthorizationProgress" = "Auktoriserar..."; + +"UpdateAuthorizationOffline" = "Internetuppkoppling krävs!"; + +"UpdateAuthorizationDenied" = "Auktoriseringen nekades. Kontakta utvecklaren."; + + +/* Update Simulator Warning */ + +"UpdateSimulatorMessage" = "Hockey Update fungerar inte i Simulatorn.\nitms-services:// url schemat är implementerat men fungerar ej."; + + +/* Update Settings */ + +/* Screen title for settings view */ +"UpdateSettingsTitle" = "Inställningar"; + +/* Text asking the user to send user data (on/off switch) */ +"UpdateSettingsUserData" = "Skicka användardata"; + +/* Description text for turning on/off sending user data */ +"UpdateSettingsUserDataDescription" = "Skicka användardata skickar följande till utvecklaren: app version, språk, enhetstyp och iOS version."; + +/* Text asking the user to send usage data (on/off switch) */ +"UpdateSettingsUsageData" = "Skicka användn.data"; + +/* Description text for turning on/off sending usage data */ +"UpdateSettingsUsageDataDescription" = "Skicka användningsdata skickar information om hur länge appen testats (i antal minuter), till utvecklaren."; + +/* Title for defining when update checks may be made */ +"UpdateSectionCheckTitle" = "Leta efter uppdateringar"; + +/* On Startup */ +"UpdateSectionCheckStartup" = "Vid uppstart"; + +/* Daily */ +"UpdateSectionCheckDaily" = "Dagligen"; + +/* Manually */ +"UpdateSectionCheckManually" = "Manuellt"; + diff --git a/Resources/tr.lproj/HockeySDK.strings b/Resources/tr.lproj/HockeySDK.strings new file mode 100644 index 0000000000..63397da030 --- /dev/null +++ b/Resources/tr.lproj/HockeySDK.strings @@ -0,0 +1,142 @@ +/* General */ + +/* For dialogs yes buttons */ +"HockeyYes" = "Evet"; + +/* For dialogs no buttons */ +"HockeyNo" = "Yok"; + +/* For dialogs ok buttons */ +"HockeyOK" = "Tamam"; + + +/* Crash */ + + +/* Crash dialog */ + +/* Title showing in the alert box when crash report data has been found */ +"CrashDataFoundTitle" = "Hata raporu bulundu"; + +/* Description explaining that crash data has been found and ask the user if the data might be uplaoded to the developers server */ +"CrashDataFoundDescription" = "%@ beklenmeyen bir şekilde kapanmış. Bu hatayı gidermemizi kolaylaştırmak için anonim bir hata raporu göndermek ister misiniz?"; + +/* Alert box button if the users wants to send crash data always automatically */ +"CrashSendReportAlways" = "Her seferinde gönder!"; + +/* Alert box button to send the crash report once */ +"CrashSendReport" = "Gönder!"; + +/* Alert box button to decline sending the report */ +"CrashDontSendReport" = "Hayır"; + +/* Text showing in a processing box that the crash data is being uploaded to the server */ +"CrashReportSending" = "Gönderiliyor…"; + + +/* Crash status dialog */ + +/* Title for the alertview giving feedback about the crash */ +"CrashResponseTitle" = "Hata raporu bulundu"; + +/* Full text telling the bug is fixed and will be available in the next release */ +"CrashResponseNextRelease" = "%@ beklenmeyen bir şekilde kapanmış. Sorunun sebebi bulundu ve en kısa zamanda bir güncelleme ile giderilecek."; +/* Full text telling the bug is fixed and the new release is waiting at Apple */ +"CrashResponseWaitingApple" = "%@ beklenmeyen bir şekilde kapanmış. Hata giderildi ve yeni sunum Apple'a gönderildi. Birkaç gün içerisinde iTunes'tan indirebilirsiniz."; + +/* Full text telling the bug is fixed and an update is available in the AppStore */ +"CrashResponseAvailable" = "%@ beklenmeyen bir şekilde kapanmış. Bu hatayı gideren yeni sunumu iTunes'tan indirebilirsiniz."; + + +/* Update */ + + +/* Update Alert view */ + +/* Update available */ +"UpdateAvailable" = "Update available"; + +"UpdateAlertTextWithAppVersion" = "%@ is available."; + +"UpdateAlertMandatoryTextWithAppVersion" = "%@ is available and is a mandatory update!"; + +"UpdateIgnore" = "Ignore"; + +"UpdateShow" = "Show"; + +"UpdateInstall" = "Install"; + + +/* Update Details */ + +"UpdateScreenTitle" = "Update"; + +"UpdateButtonCheck" = "CHECK"; + +"UpdateButtonSearching" = "CHECKING"; + +"UpdateButtonUpdate" = "UPDATE"; + +"UpdateButtonInstalling" = "INSTALLING"; + +"UpdateButtonOffline" = "OFFLINE"; + +"UpdateInstalled" = "INSTALLED"; + +"UpdateVersion" = "Version"; + +"UpdateShowPreviousVersions" = "Show previous versions..."; + +"UpdateNoUpdateAvailableTitle" = "No Update Available"; + +"UpdateNoUpdateAvailableMessage" = "%@ is already the latest version."; + +"UpdateError" = "Error"; + +"UpdateWarning" = "Warning"; + +"UpdateNoReleaseNotesAvailable" = "No release notes available."; + + +/* Update Authorization */ + +"UpdateAuthorizationProgress" = "Authorizing..."; + +"UpdateAuthorizationOffline" = "Internet connection required!"; + +"UpdateAuthorizationDenied" = "Authorizing denied. Please contact the developer."; + + +/* Update Simulator Warning */ + +"UpdateSimulatorMessage" = "Hockey Update does not work in the Simulator.\nThe itms-services:// url scheme is implemented but nonfunctional."; + + +/* Update Settings */ + +/* Screen title for settings view */ +"UpdateSettingsTitle" = "Settings"; + +/* Text asking the user to send user data (on/off switch) */ +"UpdateSettingsUserData" = "Send User Data"; + +/* Description text for turning on/off sending user data */ +"UpdateSettingsUserDataDescription" = "Send User Data will send the following data to the developer: app version, language, device type and iOS version."; + +/* Text asking the user to send usage data (on/off switch) */ +"UpdateSettingsUsageData" = "Send Usage Data"; + +/* Description text for turning on/off sending usage data */ +"UpdateSettingsUsageDataDescription" = "Send Usage Data will send the amount of test time to the developer, in a granularity of 1 minute."; + +/* Title for defining when update checks may be made */ +"UpdateSectionCheckTitle" = "Check For Update"; + +/* On Startup */ +"UpdateSectionCheckStartup" = "On Startup"; + +/* Daily */ +"UpdateSectionCheckDaily" = "Daily"; + +/* Manually */ +"UpdateSectionCheckManually" = "Manually"; diff --git a/Resources/zh_CN.lproj/HockeySDK.strings b/Resources/zh_CN.lproj/HockeySDK.strings new file mode 100644 index 0000000000..ded16908e6 --- /dev/null +++ b/Resources/zh_CN.lproj/HockeySDK.strings @@ -0,0 +1,143 @@ +/* General */ + +/* For dialogs yes buttons */ +"HockeyYes" = "Yes"; + +/* For dialogs no buttons */ +"HockeyNo" = "No"; + +/* For dialogs ok buttons */ +"HockeyOK" = "确定"; + + +/* Crash */ + + +/* Crash dialog */ + +/* Title showing in the alert box when crash report data has been found */ +"CrashDataFoundTitle" = "发现崩溃数据"; + +/* Description explaining that crash data has been found and ask the user if the data might be uplaoded to the developers server */ +"CrashDataFoundDescription" = "%@ 不正常退出。您能否匿名提供崩溃记录以帮助我们解决问题?"; + +/* Alert box button if the users wants to send crash data always automatically */ +"CrashSendReportAlways" = "总是"; + +/* Alert box button to send the crash report once */ +"CrashSendReport" = "是"; + +/* Alert box button to decline sending the report */ +"CrashDontSendReport" = "否"; + +/* Text showing in a processing box that the crash data is being uploaded to the server */ +"CrashReportSending" = "发送中…"; + + +/* Crash status dialog */ + +/* Title for the alertview giving feedback about the crash */ +"CrashResponseTitle" = "之前在 %@"; + +/* Full text telling the bug is fixed and will be available in the next release */ +"CrashResponseNextRelease" = "%@ 不正常退出。好消息?造成崩溃的原因已被发现,并将在后续版本中修正。请耐心等待。"; + +/* Full text telling the bug is fixed and the new release is waiting at Apple */ +"CrashResponseWaitingApple" = "%@ 不正常。好消息?我们已经解决了这个问题,并已将新版本提交到苹果审核。请在审核期间耐心等待。"; + +/* Full text telling the bug is fixed and an update is available in the AppStore */ +"CrashResponseAvailable" = "%@ 不正常退出。好消息?我们已经解决了这个问题。请更新到最新版本。"; + + +/* Update */ + + +/* Update Alert view */ + +/* Update available */ +"UpdateAvailable" = "Update available"; + +"UpdateAlertTextWithAppVersion" = "%@ is available."; + +"UpdateAlertMandatoryTextWithAppVersion" = "%@ is available and is a mandatory update!"; + +"UpdateIgnore" = "Ignore"; + +"UpdateShow" = "Show"; + +"UpdateInstall" = "Install"; + + +/* Update Details */ + +"UpdateScreenTitle" = "Update"; + +"UpdateButtonCheck" = "CHECK"; + +"UpdateButtonSearching" = "CHECKING"; + +"UpdateButtonUpdate" = "UPDATE"; + +"UpdateButtonInstalling" = "INSTALLING"; + +"UpdateButtonOffline" = "OFFLINE"; + +"UpdateInstalled" = "INSTALLED"; + +"UpdateVersion" = "Version"; + +"UpdateShowPreviousVersions" = "Show previous versions..."; + +"UpdateNoUpdateAvailableTitle" = "No Update Available"; + +"UpdateNoUpdateAvailableMessage" = "%@ is already the latest version."; + +"UpdateError" = "Error"; + +"UpdateWarning" = "Warning"; + +"UpdateNoReleaseNotesAvailable" = "No release notes available."; + + +/* Update Authorization */ + +"UpdateAuthorizationProgress" = "Authorizing..."; + +"UpdateAuthorizationOffline" = "Internet connection required!"; + +"UpdateAuthorizationDenied" = "Authorizing denied. Please contact the developer."; + + +/* Update Simulator Warning */ + +"UpdateSimulatorMessage" = "Hockey Update does not work in the Simulator.\nThe itms-services:// url scheme is implemented but nonfunctional."; + + +/* Update Settings */ + +/* Screen title for settings view */ +"UpdateSettingsTitle" = "Settings"; + +/* Text asking the user to send user data (on/off switch) */ +"UpdateSettingsUserData" = "Send User Data"; + +/* Description text for turning on/off sending user data */ +"UpdateSettingsUserDataDescription" = "Send User Data will send the following data to the developer: app version, language, device type and iOS version."; + +/* Text asking the user to send usage data (on/off switch) */ +"UpdateSettingsUsageData" = "Send Usage Data"; + +/* Description text for turning on/off sending usage data */ +"UpdateSettingsUsageDataDescription" = "Send Usage Data will send the amount of test time to the developer, in a granularity of 1 minute."; + +/* Title for defining when update checks may be made */ +"UpdateSectionCheckTitle" = "Check For Update"; + +/* On Startup */ +"UpdateSectionCheckStartup" = "On Startup"; + +/* Daily */ +"UpdateSectionCheckDaily" = "Daily"; + +/* Manually */ +"UpdateSectionCheckManually" = "Manually"; diff --git a/Resources/zh_TW.lproj/HockeySDK.strings b/Resources/zh_TW.lproj/HockeySDK.strings new file mode 100644 index 0000000000..a19a806496 --- /dev/null +++ b/Resources/zh_TW.lproj/HockeySDK.strings @@ -0,0 +1,143 @@ +/* General */ + +/* For dialogs yes buttons */ +"HockeyYes" = "Yes"; + +/* For dialogs no buttons */ +"HockeyNo" = "No"; + +/* For dialogs ok buttons */ +"HockeyOK" = "確定"; + + +/* Crash */ + + +/* Crash dialog */ + +/* Title showing in the alert box when crash report data has been found */ +"CrashDataFoundTitle" = "發現崩潰數據"; + +/* Description explaining that crash data has been found and ask the user if the data might be uplaoded to the developers server */ +"CrashDataFoundDescription" = "%@ 不正常退出。你能否匿名提供崩潰記錄以幫助我們解決問題?"; + +/* Alert box button if the users wants to send crash data always automatically */ +"CrashSendReportAlways" = "總是"; + +/* Alert box button to send the crash report once */ +"CrashSendReport" = "是"; + +/* Alert box button to decline sending the report */ +"CrashDontSendReport" = "否"; + +/* Text showing in a processing box that the crash data is being uploaded to the server */ +"CrashReportSending" = "發送中…"; + + +/* Crash status dialog */ + +/* Title for the alertview giving feedback about the crash */ +"CrashResponseTitle" = "之前在 %@"; + +/* Full text telling the bug is fixed and will be available in the next release */ +"CrashResponseNextRelease" = "%@ 不正常退出。好消息?造成崩潰的原因已被發現,並將在後續版本中修正。請耐心等待。"; + +/* Full text telling the bug is fixed and the new release is waiting at Apple */ +"CrashResponseWaitingApple" = "%@ 不正常。好消息?我們已經解決了這個問題,並已將新版本提交到 Apple 審核。請在審核期間耐心等待。"; + +/* Full text telling the bug is fixed and an update is available in the AppStore */ +"CrashResponseAvailable" = "%@ 不正常退出。好消息?我們已經解決了這個問題。請更新到最新版本。"; + + +/* Update */ + + +/* Update Alert view */ + +/* Update available */ +"UpdateAvailable" = "Update available"; + +"UpdateAlertTextWithAppVersion" = "%@ is available."; + +"UpdateAlertMandatoryTextWithAppVersion" = "%@ is available and is a mandatory update!"; + +"UpdateIgnore" = "Ignore"; + +"UpdateShow" = "Show"; + +"UpdateInstall" = "Install"; + + +/* Update Details */ + +"UpdateScreenTitle" = "Update"; + +"UpdateButtonCheck" = "CHECK"; + +"UpdateButtonSearching" = "CHECKING"; + +"UpdateButtonUpdate" = "UPDATE"; + +"UpdateButtonInstalling" = "INSTALLING"; + +"UpdateButtonOffline" = "OFFLINE"; + +"UpdateInstalled" = "INSTALLED"; + +"UpdateVersion" = "Version"; + +"UpdateShowPreviousVersions" = "Show previous versions..."; + +"UpdateNoUpdateAvailableTitle" = "No Update Available"; + +"UpdateNoUpdateAvailableMessage" = "%@ is already the latest version."; + +"UpdateError" = "Error"; + +"UpdateWarning" = "Warning"; + +"UpdateNoReleaseNotesAvailable" = "No release notes available."; + + +/* Update Authorization */ + +"UpdateAuthorizationProgress" = "Authorizing..."; + +"UpdateAuthorizationOffline" = "Internet connection required!"; + +"UpdateAuthorizationDenied" = "Authorizing denied. Please contact the developer."; + + +/* Update Simulator Warning */ + +"UpdateSimulatorMessage" = "Hockey Update does not work in the Simulator.\nThe itms-services:// url scheme is implemented but nonfunctional."; + + +/* Update Settings */ + +/* Screen title for settings view */ +"UpdateSettingsTitle" = "Settings"; + +/* Text asking the user to send user data (on/off switch) */ +"UpdateSettingsUserData" = "Send User Data"; + +/* Description text for turning on/off sending user data */ +"UpdateSettingsUserDataDescription" = "Send User Data will send the following data to the developer: app version, language, device type and iOS version."; + +/* Text asking the user to send usage data (on/off switch) */ +"UpdateSettingsUsageData" = "Send Usage Data"; + +/* Description text for turning on/off sending usage data */ +"UpdateSettingsUsageDataDescription" = "Send Usage Data will send the amount of test time to the developer, in a granularity of 1 minute."; + +/* Title for defining when update checks may be made */ +"UpdateSectionCheckTitle" = "Check For Update"; + +/* On Startup */ +"UpdateSectionCheckStartup" = "On Startup"; + +/* Daily */ +"UpdateSectionCheckDaily" = "Daily"; + +/* Manually */ +"UpdateSectionCheckManually" = "Manually"; diff --git a/Support/HockeySDK.xcodeproj/project.pbxproj b/Support/HockeySDK.xcodeproj/project.pbxproj index b981b0c8cc..a107991b0c 100644 --- a/Support/HockeySDK.xcodeproj/project.pbxproj +++ b/Support/HockeySDK.xcodeproj/project.pbxproj @@ -7,79 +7,281 @@ objects = { /* Begin PBXBuildFile section */ - 1E322DAD148FCE2100077977 /* CNSFixCategoryBug.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E322DAC148FCE2100077977 /* CNSFixCategoryBug.h */; }; - 1E40BCB515A3487500BD64D9 /* BWQuincyManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB415A3487500BD64D9 /* BWQuincyManagerDelegate.h */; }; - 1E40BCB915A3494400BD64D9 /* CNSCrashReportTextFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB715A3494400BD64D9 /* CNSCrashReportTextFormatter.h */; }; - 1E40BCBA15A3494400BD64D9 /* CNSCrashReportTextFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E40BCB815A3494400BD64D9 /* CNSCrashReportTextFormatter.m */; }; + 1E40BCB515A3487500BD64D9 /* BITCrashManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB415A3487500BD64D9 /* BITCrashManagerDelegate.h */; settings = {ATTRIBUTES = (); }; }; + 1E40BCB915A3494400BD64D9 /* BITCrashReportTextFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB715A3494400BD64D9 /* BITCrashReportTextFormatter.h */; }; + 1E40BCBA15A3494400BD64D9 /* BITCrashReportTextFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E40BCB815A3494400BD64D9 /* BITCrashReportTextFormatter.m */; }; + 1E59545715B6C41300A03429 /* BITAppVersionMetaInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB45A148D7BF50015DEDC /* BITAppVersionMetaInfo.m */; }; + 1E59545A15B6C41300A03429 /* BITUpdateSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB460148D7BF50015DEDC /* BITUpdateSettingsViewController.m */; }; + 1E59545C15B6C41300A03429 /* BITCrashManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB464148D7BF50015DEDC /* BITCrashManager.m */; }; + 1E59545D15B6C41300A03429 /* BITHockeyManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB466148D7BF50015DEDC /* BITHockeyManager.m */; }; + 1E59545E15B6C41300A03429 /* NSString+BITHockeyAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB468148D7BF50015DEDC /* NSString+BITHockeyAdditions.m */; }; + 1E59545F15B6C41300A03429 /* PSAppStoreHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46A148D7BF50015DEDC /* PSAppStoreHeader.m */; }; + 1E59546015B6C41300A03429 /* PSStoreButton.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46C148D7BF50015DEDC /* PSStoreButton.m */; }; + 1E59546115B6C41300A03429 /* PSWebTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46E148D7BF50015DEDC /* PSWebTableViewCell.m */; }; + 1E59546215B6C41300A03429 /* UIImage+BITHockeyAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB470148D7BF50015DEDC /* UIImage+BITHockeyAdditions.m */; }; + 1E59546315B6C41300A03429 /* BITCrashReportTextFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E40BCB815A3494400BD64D9 /* BITCrashReportTextFormatter.m */; }; + 1E59546615B6C41300A03429 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E400561D148D79B500EB22B9 /* Foundation.framework */; }; + 1E59546715B6C41300A03429 /* CrashReporter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E41EB48B148D7C4E0015DEDC /* CrashReporter.framework */; }; + 1E59546915B6C41300A03429 /* BITAppVersionMetaInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB459148D7BF50015DEDC /* BITAppVersionMetaInfo.h */; }; + 1E59546B15B6C41300A03429 /* BITUpdateManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB45D148D7BF50015DEDC /* BITUpdateManager.h */; }; + 1E59546C15B6C41300A03429 /* BITUpdateSettingsViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB45F148D7BF50015DEDC /* BITUpdateSettingsViewController.h */; }; + 1E59546E15B6C41300A03429 /* BITHockeyManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB465148D7BF50015DEDC /* BITHockeyManager.h */; }; + 1E59547015B6C41300A03429 /* PSAppStoreHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB469148D7BF50015DEDC /* PSAppStoreHeader.h */; }; + 1E59547115B6C41300A03429 /* PSStoreButton.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46B148D7BF50015DEDC /* PSStoreButton.h */; }; + 1E59547215B6C41300A03429 /* PSWebTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46D148D7BF50015DEDC /* PSWebTableViewCell.h */; }; + 1E59547315B6C41300A03429 /* UIImage+BITHockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46F148D7BF50015DEDC /* UIImage+BITHockeyAdditions.h */; }; + 1E59547515B6C41300A03429 /* BITCrashManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB415A3487500BD64D9 /* BITCrashManagerDelegate.h */; settings = {ATTRIBUTES = (); }; }; + 1E59547615B6C41300A03429 /* BITCrashReportTextFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB715A3494400BD64D9 /* BITCrashReportTextFormatter.h */; }; + 1E59547815B6C41300A03429 /* HockeySDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E71509A15B5C76F004E88FF /* HockeySDK.h */; settings = {ATTRIBUTES = (); }; }; + 1E59548315B6C4EF00A03429 /* HockeySDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E71509A15B5C76F004E88FF /* HockeySDK.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1E59548415B6C4F300A03429 /* BITCrashManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB415A3487500BD64D9 /* BITCrashManagerDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1E59548515B6C4FB00A03429 /* BITHockeyManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB465148D7BF50015DEDC /* BITHockeyManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1E59548715B6C51100A03429 /* BITCrashReportTextFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB715A3494400BD64D9 /* BITCrashReportTextFormatter.h */; }; + 1E5954B315B6E15300A03429 /* BITUpdateManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB45D148D7BF50015DEDC /* BITUpdateManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1E5954B515B6E16300A03429 /* BITUpdateSettingsViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB45F148D7BF50015DEDC /* BITUpdateSettingsViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1E5954B615B6E17700A03429 /* PSStoreButton.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46B148D7BF50015DEDC /* PSStoreButton.h */; settings = {ATTRIBUTES = (); }; }; + 1E5954B815B6E19C00A03429 /* BITAppVersionMetaInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB459148D7BF50015DEDC /* BITAppVersionMetaInfo.h */; settings = {ATTRIBUTES = (); }; }; + 1E5954CD15B6F24A00A03429 /* BITAppVersionMetaInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB45A148D7BF50015DEDC /* BITAppVersionMetaInfo.m */; }; + 1E5954D015B6F24A00A03429 /* BITUpdateSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB460148D7BF50015DEDC /* BITUpdateSettingsViewController.m */; }; + 1E5954D215B6F24A00A03429 /* BITCrashManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB464148D7BF50015DEDC /* BITCrashManager.m */; }; + 1E5954D315B6F24A00A03429 /* BITHockeyManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB466148D7BF50015DEDC /* BITHockeyManager.m */; }; + 1E5954D415B6F24A00A03429 /* NSString+BITHockeyAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB468148D7BF50015DEDC /* NSString+BITHockeyAdditions.m */; }; + 1E5954D515B6F24A00A03429 /* PSAppStoreHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46A148D7BF50015DEDC /* PSAppStoreHeader.m */; }; + 1E5954D615B6F24A00A03429 /* PSStoreButton.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46C148D7BF50015DEDC /* PSStoreButton.m */; }; + 1E5954D715B6F24A00A03429 /* PSWebTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46E148D7BF50015DEDC /* PSWebTableViewCell.m */; }; + 1E5954D815B6F24A00A03429 /* UIImage+BITHockeyAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB470148D7BF50015DEDC /* UIImage+BITHockeyAdditions.m */; }; + 1E5954D915B6F24A00A03429 /* BITCrashReportTextFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E40BCB815A3494400BD64D9 /* BITCrashReportTextFormatter.m */; }; + 1E5954DC15B6F24A00A03429 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E400561D148D79B500EB22B9 /* Foundation.framework */; }; + 1E5954DD15B6F24A00A03429 /* CrashReporter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E41EB48B148D7C4E0015DEDC /* CrashReporter.framework */; }; + 1E59550C15B6F45800A03429 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E59550B15B6F45800A03429 /* CoreFoundation.framework */; }; + 1E59556115B6F80E00A03429 /* HockeySDK.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1E59555F15B6F80E00A03429 /* HockeySDK.strings */; }; + 1E59556315B6F81500A03429 /* HockeySDK.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1E59555F15B6F80E00A03429 /* HockeySDK.strings */; }; + 1E59556515B6F81C00A03429 /* HockeySDK.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1E59555F15B6F80E00A03429 /* HockeySDK.strings */; }; + 1E59556715B6F82300A03429 /* HockeySDK.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1E59555F15B6F80E00A03429 /* HockeySDK.strings */; }; + 1E59556915B6F82A00A03429 /* HockeySDK.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1E59555F15B6F80E00A03429 /* HockeySDK.strings */; }; + 1E59556B15B6F83100A03429 /* HockeySDK.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1E59555F15B6F80E00A03429 /* HockeySDK.strings */; }; + 1E59556D15B6F83700A03429 /* HockeySDK.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1E59555F15B6F80E00A03429 /* HockeySDK.strings */; }; + 1E59556F15B6F84000A03429 /* HockeySDK.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1E59555F15B6F80E00A03429 /* HockeySDK.strings */; }; + 1E59557115B6F84700A03429 /* HockeySDK.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1E59555F15B6F80E00A03429 /* HockeySDK.strings */; }; + 1E59557315B6F84D00A03429 /* HockeySDK.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1E59555F15B6F80E00A03429 /* HockeySDK.strings */; }; + 1E59557515B6F85700A03429 /* HockeySDK.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1E59555F15B6F80E00A03429 /* HockeySDK.strings */; }; + 1E59557715B6F85E00A03429 /* HockeySDK.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1E59555F15B6F80E00A03429 /* HockeySDK.strings */; }; + 1E59557915B6F86600A03429 /* HockeySDK.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1E59555F15B6F80E00A03429 /* HockeySDK.strings */; }; + 1E59557C15B6F8CC00A03429 /* HockeySDKResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 1E59550A15B6F45800A03429 /* HockeySDKResources.bundle */; }; + 1E59558D15B6FDA500A03429 /* PSAppStoreHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB469148D7BF50015DEDC /* PSAppStoreHeader.h */; }; + 1E59558E15B6FDA500A03429 /* PSStoreButton.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46B148D7BF50015DEDC /* PSStoreButton.h */; }; + 1E59558F15B6FDA500A03429 /* PSWebTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46D148D7BF50015DEDC /* PSWebTableViewCell.h */; }; + 1E59559015B6FDA500A03429 /* UIImage+BITHockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46F148D7BF50015DEDC /* UIImage+BITHockeyAdditions.h */; }; + 1E59559215B6FDA500A03429 /* BITAppVersionMetaInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB459148D7BF50015DEDC /* BITAppVersionMetaInfo.h */; }; + 1E59559415B6FDA500A03429 /* BITUpdateManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB45D148D7BF50015DEDC /* BITUpdateManager.h */; settings = {ATTRIBUTES = (); }; }; + 1E59559515B6FDA500A03429 /* BITUpdateSettingsViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB45F148D7BF50015DEDC /* BITUpdateSettingsViewController.h */; }; + 1E59559815B6FDA500A03429 /* BITCrashManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB415A3487500BD64D9 /* BITCrashManagerDelegate.h */; settings = {ATTRIBUTES = (); }; }; + 1E59559915B6FDA500A03429 /* BITCrashReportTextFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB715A3494400BD64D9 /* BITCrashReportTextFormatter.h */; }; + 1E59559A15B6FDA500A03429 /* BITHockeyManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB465148D7BF50015DEDC /* BITHockeyManager.h */; settings = {ATTRIBUTES = (); }; }; + 1E59559B15B6FDA500A03429 /* HockeySDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E71509A15B5C76F004E88FF /* HockeySDK.h */; settings = {ATTRIBUTES = (); }; }; + 1E59559D15B70F4D00A03429 /* HockeySDKPrivate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E59559C15B70F4D00A03429 /* HockeySDKPrivate.m */; }; + 1E59559E15B70F4D00A03429 /* HockeySDKPrivate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E59559C15B70F4D00A03429 /* HockeySDKPrivate.m */; }; + 1E59559F15B70F4D00A03429 /* HockeySDKPrivate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E59559C15B70F4D00A03429 /* HockeySDKPrivate.m */; }; + 1E5955A115B70F6900A03429 /* HockeySDKPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955A015B70F6900A03429 /* HockeySDKPrivate.h */; }; + 1E5955A215B70F6900A03429 /* HockeySDKPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955A015B70F6900A03429 /* HockeySDKPrivate.h */; }; + 1E5955A315B70F6900A03429 /* HockeySDKPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955A015B70F6900A03429 /* HockeySDKPrivate.h */; }; + 1E5955C615B71C8600A03429 /* authorize_denied.png in Resources */ = {isa = PBXBuildFile; fileRef = 1E5955BB15B71C8600A03429 /* authorize_denied.png */; }; + 1E5955C715B71C8600A03429 /* authorize_denied@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1E5955BC15B71C8600A03429 /* authorize_denied@2x.png */; }; + 1E5955C815B71C8600A03429 /* authorize_request.png in Resources */ = {isa = PBXBuildFile; fileRef = 1E5955BD15B71C8600A03429 /* authorize_request.png */; }; + 1E5955C915B71C8600A03429 /* authorize_request@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1E5955BE15B71C8600A03429 /* authorize_request@2x.png */; }; + 1E5955CA15B71C8600A03429 /* bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 1E5955BF15B71C8600A03429 /* bg.png */; }; + 1E5955CB15B71C8600A03429 /* buttonHighlight.png in Resources */ = {isa = PBXBuildFile; fileRef = 1E5955C015B71C8600A03429 /* buttonHighlight.png */; }; + 1E5955CC15B71C8600A03429 /* buttonHighlight@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1E5955C115B71C8600A03429 /* buttonHighlight@2x.png */; }; + 1E5955CD15B71C8600A03429 /* gear.png in Resources */ = {isa = PBXBuildFile; fileRef = 1E5955C215B71C8600A03429 /* gear.png */; }; + 1E5955CE15B71C8600A03429 /* gear@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1E5955C315B71C8600A03429 /* gear@2x.png */; }; + 1E5955CF15B71C8600A03429 /* IconGradient.png in Resources */ = {isa = PBXBuildFile; fileRef = 1E5955C415B71C8600A03429 /* IconGradient.png */; }; + 1E5955D015B71C8600A03429 /* IconGradient@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1E5955C515B71C8600A03429 /* IconGradient@2x.png */; }; + 1E5955D215B72E5400A03429 /* BITCrashManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955D115B72E5300A03429 /* BITCrashManager.h */; }; + 1E5955D315B72E5400A03429 /* BITCrashManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955D115B72E5300A03429 /* BITCrashManager.h */; }; + 1E5955D415B72E5400A03429 /* BITCrashManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955D115B72E5300A03429 /* BITCrashManager.h */; }; + 1E5955D615B72ED500A03429 /* BITUpdateManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E5955D515B72ED500A03429 /* BITUpdateManager.m */; }; + 1E5955D715B72ED500A03429 /* BITUpdateManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E5955D515B72ED500A03429 /* BITUpdateManager.m */; }; + 1E5955D815B72ED500A03429 /* BITUpdateManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E5955D515B72ED500A03429 /* BITUpdateManager.m */; }; + 1E5955E315B751EE00A03429 /* BITUpdateViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955E215B751ED00A03429 /* BITUpdateViewController.h */; }; + 1E5955E415B751EE00A03429 /* BITUpdateViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955E215B751ED00A03429 /* BITUpdateViewController.h */; }; + 1E5955E515B751EE00A03429 /* BITUpdateViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955E215B751ED00A03429 /* BITUpdateViewController.h */; }; + 1E5955E715B751FB00A03429 /* BITUpdateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E5955E615B751FB00A03429 /* BITUpdateViewController.m */; }; + 1E5955E815B751FB00A03429 /* BITUpdateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E5955E615B751FB00A03429 /* BITUpdateViewController.m */; }; + 1E5955E915B751FB00A03429 /* BITUpdateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E5955E615B751FB00A03429 /* BITUpdateViewController.m */; }; + 1E5955EB15B7538B00A03429 /* NSString+BITHockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955EA15B7538B00A03429 /* NSString+BITHockeyAdditions.h */; }; + 1E5955EC15B7538B00A03429 /* NSString+BITHockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955EA15B7538B00A03429 /* NSString+BITHockeyAdditions.h */; }; + 1E5955ED15B7538B00A03429 /* NSString+BITHockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955EA15B7538B00A03429 /* NSString+BITHockeyAdditions.h */; }; + 1E5955EF15B7752300A03429 /* BITUpdateManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955EE15B7752200A03429 /* BITUpdateManagerDelegate.h */; }; + 1E5955F015B7752300A03429 /* BITUpdateManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955EE15B7752200A03429 /* BITUpdateManagerDelegate.h */; }; + 1E5955F115B7752300A03429 /* BITUpdateManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955EE15B7752200A03429 /* BITUpdateManagerDelegate.h */; }; + 1E5955F215B77F5100A03429 /* NSString+BITHockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955EA15B7538B00A03429 /* NSString+BITHockeyAdditions.h */; }; + 1E5955F315B77F5600A03429 /* PSAppStoreHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB469148D7BF50015DEDC /* PSAppStoreHeader.h */; }; + 1E5955F415B77F5E00A03429 /* PSWebTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46D148D7BF50015DEDC /* PSWebTableViewCell.h */; }; + 1E5955F515B77F6000A03429 /* UIImage+BITHockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46F148D7BF50015DEDC /* UIImage+BITHockeyAdditions.h */; }; + 1E5955F615B77F6500A03429 /* HockeySDKPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955A015B70F6900A03429 /* HockeySDKPrivate.h */; }; + 1E5955F715B77F7600A03429 /* BITUpdateManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955EE15B7752200A03429 /* BITUpdateManagerDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1E5955F815B77F7C00A03429 /* BITUpdateViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955E215B751ED00A03429 /* BITUpdateViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1E5955F915B77F8200A03429 /* BITCrashManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955D115B72E5300A03429 /* BITCrashManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1E5955FB15B7877B00A03429 /* BITHockeyManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955FA15B7877A00A03429 /* BITHockeyManagerDelegate.h */; }; + 1E5955FC15B7877B00A03429 /* BITHockeyManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955FA15B7877A00A03429 /* BITHockeyManagerDelegate.h */; }; + 1E5955FD15B7877B00A03429 /* BITHockeyManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955FA15B7877A00A03429 /* BITHockeyManagerDelegate.h */; }; + 1E5955FE15B787D600A03429 /* BITHockeyManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E5955FA15B7877A00A03429 /* BITHockeyManagerDelegate.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1E71509B15B5C76F004E88FF /* HockeySDK.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E71509A15B5C76F004E88FF /* HockeySDK.h */; settings = {ATTRIBUTES = (); }; }; E400561E148D79B500EB22B9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E400561D148D79B500EB22B9 /* Foundation.framework */; }; - E41EB471148D7BF50015DEDC /* BWApp.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB459148D7BF50015DEDC /* BWApp.h */; }; - E41EB472148D7BF50015DEDC /* BWApp.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB45A148D7BF50015DEDC /* BWApp.m */; }; - E41EB473148D7BF50015DEDC /* BWGlobal.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB45B148D7BF50015DEDC /* BWGlobal.h */; }; - E41EB474148D7BF50015DEDC /* BWGlobal.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB45C148D7BF50015DEDC /* BWGlobal.m */; }; - E41EB475148D7BF50015DEDC /* BWHockeyManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB45D148D7BF50015DEDC /* BWHockeyManager.h */; }; - E41EB476148D7BF50015DEDC /* BWHockeyManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB45E148D7BF50015DEDC /* BWHockeyManager.m */; }; - E41EB477148D7BF50015DEDC /* BWHockeySettingsViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB45F148D7BF50015DEDC /* BWHockeySettingsViewController.h */; }; - E41EB478148D7BF50015DEDC /* BWHockeySettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB460148D7BF50015DEDC /* BWHockeySettingsViewController.m */; }; - E41EB479148D7BF50015DEDC /* BWHockeyViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB461148D7BF50015DEDC /* BWHockeyViewController.h */; }; - E41EB47A148D7BF50015DEDC /* BWHockeyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB462148D7BF50015DEDC /* BWHockeyViewController.m */; }; - E41EB47B148D7BF50015DEDC /* BWQuincyManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB463148D7BF50015DEDC /* BWQuincyManager.h */; }; - E41EB47C148D7BF50015DEDC /* BWQuincyManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB464148D7BF50015DEDC /* BWQuincyManager.m */; }; - E41EB47D148D7BF50015DEDC /* CNSHockeyManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB465148D7BF50015DEDC /* CNSHockeyManager.h */; }; - E41EB47E148D7BF50015DEDC /* CNSHockeyManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB466148D7BF50015DEDC /* CNSHockeyManager.m */; }; - E41EB47F148D7BF50015DEDC /* NSString+HockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB467148D7BF50015DEDC /* NSString+HockeyAdditions.h */; }; - E41EB480148D7BF50015DEDC /* NSString+HockeyAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB468148D7BF50015DEDC /* NSString+HockeyAdditions.m */; }; + E41EB471148D7BF50015DEDC /* BITAppVersionMetaInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB459148D7BF50015DEDC /* BITAppVersionMetaInfo.h */; }; + E41EB472148D7BF50015DEDC /* BITAppVersionMetaInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB45A148D7BF50015DEDC /* BITAppVersionMetaInfo.m */; }; + E41EB475148D7BF50015DEDC /* BITUpdateManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB45D148D7BF50015DEDC /* BITUpdateManager.h */; }; + E41EB477148D7BF50015DEDC /* BITUpdateSettingsViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB45F148D7BF50015DEDC /* BITUpdateSettingsViewController.h */; }; + E41EB478148D7BF50015DEDC /* BITUpdateSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB460148D7BF50015DEDC /* BITUpdateSettingsViewController.m */; }; + E41EB47C148D7BF50015DEDC /* BITCrashManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB464148D7BF50015DEDC /* BITCrashManager.m */; }; + E41EB47D148D7BF50015DEDC /* BITHockeyManager.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB465148D7BF50015DEDC /* BITHockeyManager.h */; }; + E41EB47E148D7BF50015DEDC /* BITHockeyManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB466148D7BF50015DEDC /* BITHockeyManager.m */; }; + E41EB480148D7BF50015DEDC /* NSString+BITHockeyAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB468148D7BF50015DEDC /* NSString+BITHockeyAdditions.m */; }; E41EB481148D7BF50015DEDC /* PSAppStoreHeader.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB469148D7BF50015DEDC /* PSAppStoreHeader.h */; }; E41EB482148D7BF50015DEDC /* PSAppStoreHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46A148D7BF50015DEDC /* PSAppStoreHeader.m */; }; E41EB483148D7BF50015DEDC /* PSStoreButton.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46B148D7BF50015DEDC /* PSStoreButton.h */; }; E41EB484148D7BF50015DEDC /* PSStoreButton.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46C148D7BF50015DEDC /* PSStoreButton.m */; }; E41EB485148D7BF50015DEDC /* PSWebTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46D148D7BF50015DEDC /* PSWebTableViewCell.h */; }; E41EB486148D7BF50015DEDC /* PSWebTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB46E148D7BF50015DEDC /* PSWebTableViewCell.m */; }; - E41EB487148D7BF50015DEDC /* UIImage+HockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46F148D7BF50015DEDC /* UIImage+HockeyAdditions.h */; }; - E41EB488148D7BF50015DEDC /* UIImage+HockeyAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB470148D7BF50015DEDC /* UIImage+HockeyAdditions.m */; }; + E41EB487148D7BF50015DEDC /* UIImage+BITHockeyAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = E41EB46F148D7BF50015DEDC /* UIImage+BITHockeyAdditions.h */; }; + E41EB488148D7BF50015DEDC /* UIImage+BITHockeyAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = E41EB470148D7BF50015DEDC /* UIImage+BITHockeyAdditions.m */; }; E41EB48C148D7C4E0015DEDC /* CrashReporter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E41EB48B148D7C4E0015DEDC /* CrashReporter.framework */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + 1E59547D15B6C47900A03429 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E4005611148D79B500EB22B9 /* Project object */; + proxyType = 1; + remoteGlobalIDString = E4005619148D79B500EB22B9; + remoteInfo = "HockeySDK-Device"; + }; + 1E59549315B6CBBE00A03429 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E4005611148D79B500EB22B9 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1E59545515B6C41300A03429; + remoteInfo = "HockeySDK-Simulator"; + }; + 1E59554815B6F6F600A03429 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E4005611148D79B500EB22B9 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1E59550915B6F45800A03429; + remoteInfo = HockeySDKBundle; + }; + 1E59557D15B6F97100A03429 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E4005611148D79B500EB22B9 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1E59550915B6F45800A03429; + remoteInfo = HockeySDKResources; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ - 1E322DAC148FCE2100077977 /* CNSFixCategoryBug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNSFixCategoryBug.h; sourceTree = ""; }; - 1E40BCB415A3487500BD64D9 /* BWQuincyManagerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BWQuincyManagerDelegate.h; sourceTree = ""; }; - 1E40BCB715A3494400BD64D9 /* CNSCrashReportTextFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNSCrashReportTextFormatter.h; sourceTree = ""; }; - 1E40BCB815A3494400BD64D9 /* CNSCrashReportTextFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNSCrashReportTextFormatter.m; sourceTree = ""; }; - E400561A148D79B500EB22B9 /* libHockeySDK.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libHockeySDK.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 1E40BCB415A3487500BD64D9 /* BITCrashManagerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITCrashManagerDelegate.h; sourceTree = ""; }; + 1E40BCB715A3494400BD64D9 /* BITCrashReportTextFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITCrashReportTextFormatter.h; sourceTree = ""; }; + 1E40BCB815A3494400BD64D9 /* BITCrashReportTextFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITCrashReportTextFormatter.m; sourceTree = ""; }; + 1E59544115B6C3DC00A03429 /* HockeySDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HockeySDK.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 1E59547C15B6C41300A03429 /* libHockeySDK-iphonesimulator.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libHockeySDK-iphonesimulator.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1E5954F215B6F24A00A03429 /* libHockeySDK.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libHockeySDK.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 1E59550A15B6F45800A03429 /* HockeySDKResources.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HockeySDKResources.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 1E59550B15B6F45800A03429 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; + 1E59556015B6F80E00A03429 /* de */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/HockeySDK.strings; sourceTree = ""; }; + 1E59556215B6F81500A03429 /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/HockeySDK.strings; sourceTree = ""; }; + 1E59556415B6F81C00A03429 /* es */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/HockeySDK.strings; sourceTree = ""; }; + 1E59556615B6F82300A03429 /* fr */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/HockeySDK.strings; sourceTree = ""; }; + 1E59556815B6F82A00A03429 /* it */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/HockeySDK.strings; sourceTree = ""; }; + 1E59556A15B6F83100A03429 /* ja */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/HockeySDK.strings; sourceTree = ""; }; + 1E59556C15B6F83700A03429 /* nl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/HockeySDK.strings; sourceTree = ""; }; + 1E59556E15B6F84000A03429 /* pt-PT */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/HockeySDK.strings"; sourceTree = ""; }; + 1E59557015B6F84700A03429 /* pt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/HockeySDK.strings; sourceTree = ""; }; + 1E59557215B6F84D00A03429 /* ru */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/HockeySDK.strings; sourceTree = ""; }; + 1E59557415B6F85700A03429 /* sv */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/HockeySDK.strings; sourceTree = ""; }; + 1E59557615B6F85E00A03429 /* tr */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/HockeySDK.strings; sourceTree = ""; }; + 1E59557815B6F86600A03429 /* zh_CN */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = zh_CN; path = zh_CN.lproj/HockeySDK.strings; sourceTree = ""; }; + 1E59557A15B6F86E00A03429 /* zh_TW */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = zh_TW; path = zh_TW.lproj/HockeySDK.strings; sourceTree = ""; }; + 1E59559C15B70F4D00A03429 /* HockeySDKPrivate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HockeySDKPrivate.m; sourceTree = ""; }; + 1E5955A015B70F6900A03429 /* HockeySDKPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HockeySDKPrivate.h; sourceTree = ""; }; + 1E5955BB15B71C8600A03429 /* authorize_denied.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = authorize_denied.png; sourceTree = ""; }; + 1E5955BC15B71C8600A03429 /* authorize_denied@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "authorize_denied@2x.png"; sourceTree = ""; }; + 1E5955BD15B71C8600A03429 /* authorize_request.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = authorize_request.png; sourceTree = ""; }; + 1E5955BE15B71C8600A03429 /* authorize_request@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "authorize_request@2x.png"; sourceTree = ""; }; + 1E5955BF15B71C8600A03429 /* bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bg.png; sourceTree = ""; }; + 1E5955C015B71C8600A03429 /* buttonHighlight.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = buttonHighlight.png; sourceTree = ""; }; + 1E5955C115B71C8600A03429 /* buttonHighlight@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "buttonHighlight@2x.png"; sourceTree = ""; }; + 1E5955C215B71C8600A03429 /* gear.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = gear.png; sourceTree = ""; }; + 1E5955C315B71C8600A03429 /* gear@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "gear@2x.png"; sourceTree = ""; }; + 1E5955C415B71C8600A03429 /* IconGradient.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = IconGradient.png; sourceTree = ""; }; + 1E5955C515B71C8600A03429 /* IconGradient@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "IconGradient@2x.png"; sourceTree = ""; }; + 1E5955D115B72E5300A03429 /* BITCrashManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITCrashManager.h; sourceTree = ""; }; + 1E5955D515B72ED500A03429 /* BITUpdateManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = BITUpdateManager.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 1E5955E215B751ED00A03429 /* BITUpdateViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITUpdateViewController.h; sourceTree = ""; }; + 1E5955E615B751FB00A03429 /* BITUpdateViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITUpdateViewController.m; sourceTree = ""; }; + 1E5955EA15B7538B00A03429 /* NSString+BITHockeyAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+BITHockeyAdditions.h"; sourceTree = ""; }; + 1E5955EE15B7752200A03429 /* BITUpdateManagerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITUpdateManagerDelegate.h; sourceTree = ""; }; + 1E5955FA15B7877A00A03429 /* BITHockeyManagerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITHockeyManagerDelegate.h; sourceTree = ""; }; + 1E71509A15B5C76F004E88FF /* HockeySDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HockeySDK.h; sourceTree = ""; }; + E400561A148D79B500EB22B9 /* libHockeySDK-iphoneos.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libHockeySDK-iphoneos.a"; sourceTree = BUILT_PRODUCTS_DIR; }; E400561D148D79B500EB22B9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; E400562B148D79B500EB22B9 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; - E400562D148D79B500EB22B9 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; - E4005649148D7A3000EB22B9 /* Hockey.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Hockey.bundle; sourceTree = ""; }; - E400564A148D7A3000EB22B9 /* Quincy.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Quincy.bundle; sourceTree = ""; }; - E41EB459148D7BF50015DEDC /* BWApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BWApp.h; sourceTree = ""; }; - E41EB45A148D7BF50015DEDC /* BWApp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BWApp.m; sourceTree = ""; }; - E41EB45B148D7BF50015DEDC /* BWGlobal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BWGlobal.h; sourceTree = ""; }; - E41EB45C148D7BF50015DEDC /* BWGlobal.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BWGlobal.m; sourceTree = ""; }; - E41EB45D148D7BF50015DEDC /* BWHockeyManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BWHockeyManager.h; sourceTree = ""; }; - E41EB45E148D7BF50015DEDC /* BWHockeyManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BWHockeyManager.m; sourceTree = ""; }; - E41EB45F148D7BF50015DEDC /* BWHockeySettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BWHockeySettingsViewController.h; sourceTree = ""; }; - E41EB460148D7BF50015DEDC /* BWHockeySettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BWHockeySettingsViewController.m; sourceTree = ""; }; - E41EB461148D7BF50015DEDC /* BWHockeyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BWHockeyViewController.h; sourceTree = ""; }; - E41EB462148D7BF50015DEDC /* BWHockeyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BWHockeyViewController.m; sourceTree = ""; }; - E41EB463148D7BF50015DEDC /* BWQuincyManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BWQuincyManager.h; sourceTree = ""; }; - E41EB464148D7BF50015DEDC /* BWQuincyManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BWQuincyManager.m; sourceTree = ""; }; - E41EB465148D7BF50015DEDC /* CNSHockeyManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNSHockeyManager.h; sourceTree = ""; }; - E41EB466148D7BF50015DEDC /* CNSHockeyManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNSHockeyManager.m; sourceTree = ""; }; - E41EB467148D7BF50015DEDC /* NSString+HockeyAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+HockeyAdditions.h"; sourceTree = ""; }; - E41EB468148D7BF50015DEDC /* NSString+HockeyAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+HockeyAdditions.m"; sourceTree = ""; }; + E41EB459148D7BF50015DEDC /* BITAppVersionMetaInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITAppVersionMetaInfo.h; sourceTree = ""; }; + E41EB45A148D7BF50015DEDC /* BITAppVersionMetaInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITAppVersionMetaInfo.m; sourceTree = ""; }; + E41EB45D148D7BF50015DEDC /* BITUpdateManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = BITUpdateManager.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + E41EB45F148D7BF50015DEDC /* BITUpdateSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITUpdateSettingsViewController.h; sourceTree = ""; }; + E41EB460148D7BF50015DEDC /* BITUpdateSettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITUpdateSettingsViewController.m; sourceTree = ""; }; + E41EB464148D7BF50015DEDC /* BITCrashManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITCrashManager.m; sourceTree = ""; }; + E41EB465148D7BF50015DEDC /* BITHockeyManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITHockeyManager.h; sourceTree = ""; }; + E41EB466148D7BF50015DEDC /* BITHockeyManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITHockeyManager.m; sourceTree = ""; }; + E41EB468148D7BF50015DEDC /* NSString+BITHockeyAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+BITHockeyAdditions.m"; sourceTree = ""; }; E41EB469148D7BF50015DEDC /* PSAppStoreHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSAppStoreHeader.h; sourceTree = ""; }; E41EB46A148D7BF50015DEDC /* PSAppStoreHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSAppStoreHeader.m; sourceTree = ""; }; E41EB46B148D7BF50015DEDC /* PSStoreButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSStoreButton.h; sourceTree = ""; }; E41EB46C148D7BF50015DEDC /* PSStoreButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSStoreButton.m; sourceTree = ""; }; E41EB46D148D7BF50015DEDC /* PSWebTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSWebTableViewCell.h; sourceTree = ""; }; E41EB46E148D7BF50015DEDC /* PSWebTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSWebTableViewCell.m; sourceTree = ""; }; - E41EB46F148D7BF50015DEDC /* UIImage+HockeyAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+HockeyAdditions.h"; sourceTree = ""; }; - E41EB470148D7BF50015DEDC /* UIImage+HockeyAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+HockeyAdditions.m"; sourceTree = ""; }; + E41EB46F148D7BF50015DEDC /* UIImage+BITHockeyAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+BITHockeyAdditions.h"; sourceTree = ""; }; + E41EB470148D7BF50015DEDC /* UIImage+BITHockeyAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+BITHockeyAdditions.m"; sourceTree = ""; }; E41EB48B148D7C4E0015DEDC /* CrashReporter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CrashReporter.framework; path = ../Vendor/CrashReporter.framework; sourceTree = ""; }; E4E7335A148D7A5A00763A39 /* LICENSE.txt */ = {isa = PBXFileReference; lastKnownFileType = text; name = LICENSE.txt; path = ../LICENSE.txt; sourceTree = ""; }; E4E7335B148D7A5A00763A39 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; name = README.md; path = ../README.md; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 1E59543D15B6C3DC00A03429 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1E59546515B6C41300A03429 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E59546615B6C41300A03429 /* Foundation.framework in Frameworks */, + 1E59546715B6C41300A03429 /* CrashReporter.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1E5954DB15B6F24A00A03429 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E5954DC15B6F24A00A03429 /* Foundation.framework in Frameworks */, + 1E5954DD15B6F24A00A03429 /* CrashReporter.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1E59550715B6F45800A03429 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E59550C15B6F45800A03429 /* CoreFoundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; E4005617148D79B500EB22B9 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -92,6 +294,24 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 1E5955A415B71BDC00A03429 /* Images */ = { + isa = PBXGroup; + children = ( + 1E5955BB15B71C8600A03429 /* authorize_denied.png */, + 1E5955BC15B71C8600A03429 /* authorize_denied@2x.png */, + 1E5955BD15B71C8600A03429 /* authorize_request.png */, + 1E5955BE15B71C8600A03429 /* authorize_request@2x.png */, + 1E5955BF15B71C8600A03429 /* bg.png */, + 1E5955C015B71C8600A03429 /* buttonHighlight.png */, + 1E5955C115B71C8600A03429 /* buttonHighlight@2x.png */, + 1E5955C215B71C8600A03429 /* gear.png */, + 1E5955C315B71C8600A03429 /* gear@2x.png */, + 1E5955C415B71C8600A03429 /* IconGradient.png */, + 1E5955C515B71C8600A03429 /* IconGradient@2x.png */, + ); + name = Images; + sourceTree = ""; + }; E400560F148D79B500EB22B9 = { isa = PBXGroup; children = ( @@ -107,7 +327,11 @@ E400561B148D79B500EB22B9 /* Products */ = { isa = PBXGroup; children = ( - E400561A148D79B500EB22B9 /* libHockeySDK.a */, + E400561A148D79B500EB22B9 /* libHockeySDK-iphoneos.a */, + 1E59544115B6C3DC00A03429 /* HockeySDK.framework */, + 1E59547C15B6C41300A03429 /* libHockeySDK-iphonesimulator.a */, + 1E5954F215B6F24A00A03429 /* libHockeySDK.a */, + 1E59550A15B6F45800A03429 /* HockeySDKResources.bundle */, ); name = Products; sourceTree = ""; @@ -118,7 +342,7 @@ E41EB48B148D7C4E0015DEDC /* CrashReporter.framework */, E400561D148D79B500EB22B9 /* Foundation.framework */, E400562B148D79B500EB22B9 /* SenTestingKit.framework */, - E400562D148D79B500EB22B9 /* UIKit.framework */, + 1E59550B15B6F45800A03429 /* CoreFoundation.framework */, ); name = Frameworks; sourceTree = ""; @@ -126,8 +350,8 @@ E4005648148D7A3000EB22B9 /* Resources */ = { isa = PBXGroup; children = ( - E4005649148D7A3000EB22B9 /* Hockey.bundle */, - E400564A148D7A3000EB22B9 /* Quincy.bundle */, + 1E5955A415B71BDC00A03429 /* Images */, + 1E59555F15B6F80E00A03429 /* HockeySDK.strings */, ); name = Resources; path = ../Resources; @@ -137,23 +361,26 @@ isa = PBXGroup; children = ( E41EB48A148D7C150015DEDC /* Helper */, - E41EB459148D7BF50015DEDC /* BWApp.h */, - E41EB45A148D7BF50015DEDC /* BWApp.m */, - E41EB45B148D7BF50015DEDC /* BWGlobal.h */, - E41EB45C148D7BF50015DEDC /* BWGlobal.m */, - E41EB45D148D7BF50015DEDC /* BWHockeyManager.h */, - E41EB45E148D7BF50015DEDC /* BWHockeyManager.m */, - E41EB45F148D7BF50015DEDC /* BWHockeySettingsViewController.h */, - E41EB460148D7BF50015DEDC /* BWHockeySettingsViewController.m */, - E41EB461148D7BF50015DEDC /* BWHockeyViewController.h */, - E41EB462148D7BF50015DEDC /* BWHockeyViewController.m */, - E41EB463148D7BF50015DEDC /* BWQuincyManager.h */, - E41EB464148D7BF50015DEDC /* BWQuincyManager.m */, - 1E40BCB415A3487500BD64D9 /* BWQuincyManagerDelegate.h */, - 1E40BCB715A3494400BD64D9 /* CNSCrashReportTextFormatter.h */, - 1E40BCB815A3494400BD64D9 /* CNSCrashReportTextFormatter.m */, - E41EB465148D7BF50015DEDC /* CNSHockeyManager.h */, - E41EB466148D7BF50015DEDC /* CNSHockeyManager.m */, + 1E5955A015B70F6900A03429 /* HockeySDKPrivate.h */, + 1E59559C15B70F4D00A03429 /* HockeySDKPrivate.m */, + E41EB459148D7BF50015DEDC /* BITAppVersionMetaInfo.h */, + E41EB45A148D7BF50015DEDC /* BITAppVersionMetaInfo.m */, + E41EB45D148D7BF50015DEDC /* BITUpdateManager.h */, + 1E5955D515B72ED500A03429 /* BITUpdateManager.m */, + 1E5955EE15B7752200A03429 /* BITUpdateManagerDelegate.h */, + 1E5955E215B751ED00A03429 /* BITUpdateViewController.h */, + 1E5955E615B751FB00A03429 /* BITUpdateViewController.m */, + E41EB45F148D7BF50015DEDC /* BITUpdateSettingsViewController.h */, + E41EB460148D7BF50015DEDC /* BITUpdateSettingsViewController.m */, + 1E5955D115B72E5300A03429 /* BITCrashManager.h */, + E41EB464148D7BF50015DEDC /* BITCrashManager.m */, + 1E40BCB415A3487500BD64D9 /* BITCrashManagerDelegate.h */, + 1E40BCB715A3494400BD64D9 /* BITCrashReportTextFormatter.h */, + 1E40BCB815A3494400BD64D9 /* BITCrashReportTextFormatter.m */, + E41EB465148D7BF50015DEDC /* BITHockeyManager.h */, + E41EB466148D7BF50015DEDC /* BITHockeyManager.m */, + 1E5955FA15B7877A00A03429 /* BITHockeyManagerDelegate.h */, + 1E71509A15B5C76F004E88FF /* HockeySDK.h */, ); name = Classes; path = ../Classes; @@ -170,17 +397,16 @@ E41EB48A148D7C150015DEDC /* Helper */ = { isa = PBXGroup; children = ( - E41EB467148D7BF50015DEDC /* NSString+HockeyAdditions.h */, - E41EB468148D7BF50015DEDC /* NSString+HockeyAdditions.m */, + 1E5955EA15B7538B00A03429 /* NSString+BITHockeyAdditions.h */, + E41EB468148D7BF50015DEDC /* NSString+BITHockeyAdditions.m */, E41EB469148D7BF50015DEDC /* PSAppStoreHeader.h */, E41EB46A148D7BF50015DEDC /* PSAppStoreHeader.m */, E41EB46B148D7BF50015DEDC /* PSStoreButton.h */, E41EB46C148D7BF50015DEDC /* PSStoreButton.m */, E41EB46D148D7BF50015DEDC /* PSWebTableViewCell.h */, E41EB46E148D7BF50015DEDC /* PSWebTableViewCell.m */, - E41EB46F148D7BF50015DEDC /* UIImage+HockeyAdditions.h */, - E41EB470148D7BF50015DEDC /* UIImage+HockeyAdditions.m */, - 1E322DAC148FCE2100077977 /* CNSFixCategoryBug.h */, + E41EB46F148D7BF50015DEDC /* UIImage+BITHockeyAdditions.h */, + E41EB470148D7BF50015DEDC /* UIImage+BITHockeyAdditions.m */, ); name = Helper; sourceTree = ""; @@ -188,34 +414,182 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 1E59543E15B6C3DC00A03429 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E59548315B6C4EF00A03429 /* HockeySDK.h in Headers */, + 1E59548515B6C4FB00A03429 /* BITHockeyManager.h in Headers */, + 1E5955FE15B787D600A03429 /* BITHockeyManagerDelegate.h in Headers */, + 1E5955F915B77F8200A03429 /* BITCrashManager.h in Headers */, + 1E59548415B6C4F300A03429 /* BITCrashManagerDelegate.h in Headers */, + 1E5954B315B6E15300A03429 /* BITUpdateManager.h in Headers */, + 1E5955F715B77F7600A03429 /* BITUpdateManagerDelegate.h in Headers */, + 1E5955F815B77F7C00A03429 /* BITUpdateViewController.h in Headers */, + 1E5954B515B6E16300A03429 /* BITUpdateSettingsViewController.h in Headers */, + 1E5955F615B77F6500A03429 /* HockeySDKPrivate.h in Headers */, + 1E5955F215B77F5100A03429 /* NSString+BITHockeyAdditions.h in Headers */, + 1E5955F315B77F5600A03429 /* PSAppStoreHeader.h in Headers */, + 1E5954B615B6E17700A03429 /* PSStoreButton.h in Headers */, + 1E5955F415B77F5E00A03429 /* PSWebTableViewCell.h in Headers */, + 1E5955F515B77F6000A03429 /* UIImage+BITHockeyAdditions.h in Headers */, + 1E5954B815B6E19C00A03429 /* BITAppVersionMetaInfo.h in Headers */, + 1E59548715B6C51100A03429 /* BITCrashReportTextFormatter.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1E59546815B6C41300A03429 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E59547815B6C41300A03429 /* HockeySDK.h in Headers */, + 1E59547515B6C41300A03429 /* BITCrashManagerDelegate.h in Headers */, + 1E59546915B6C41300A03429 /* BITAppVersionMetaInfo.h in Headers */, + 1E59546B15B6C41300A03429 /* BITUpdateManager.h in Headers */, + 1E59546C15B6C41300A03429 /* BITUpdateSettingsViewController.h in Headers */, + 1E59546E15B6C41300A03429 /* BITHockeyManager.h in Headers */, + 1E59547015B6C41300A03429 /* PSAppStoreHeader.h in Headers */, + 1E59547115B6C41300A03429 /* PSStoreButton.h in Headers */, + 1E59547215B6C41300A03429 /* PSWebTableViewCell.h in Headers */, + 1E59547315B6C41300A03429 /* UIImage+BITHockeyAdditions.h in Headers */, + 1E59547615B6C41300A03429 /* BITCrashReportTextFormatter.h in Headers */, + 1E5955A215B70F6900A03429 /* HockeySDKPrivate.h in Headers */, + 1E5955D315B72E5400A03429 /* BITCrashManager.h in Headers */, + 1E5955E415B751EE00A03429 /* BITUpdateViewController.h in Headers */, + 1E5955EC15B7538B00A03429 /* NSString+BITHockeyAdditions.h in Headers */, + 1E5955F015B7752300A03429 /* BITUpdateManagerDelegate.h in Headers */, + 1E5955FC15B7877B00A03429 /* BITHockeyManagerDelegate.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1E59558B15B6FD8800A03429 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E59559A15B6FDA500A03429 /* BITHockeyManager.h in Headers */, + 1E59559815B6FDA500A03429 /* BITCrashManagerDelegate.h in Headers */, + 1E59559415B6FDA500A03429 /* BITUpdateManager.h in Headers */, + 1E59558D15B6FDA500A03429 /* PSAppStoreHeader.h in Headers */, + 1E59558E15B6FDA500A03429 /* PSStoreButton.h in Headers */, + 1E59558F15B6FDA500A03429 /* PSWebTableViewCell.h in Headers */, + 1E59559B15B6FDA500A03429 /* HockeySDK.h in Headers */, + 1E59559015B6FDA500A03429 /* UIImage+BITHockeyAdditions.h in Headers */, + 1E59559215B6FDA500A03429 /* BITAppVersionMetaInfo.h in Headers */, + 1E59559515B6FDA500A03429 /* BITUpdateSettingsViewController.h in Headers */, + 1E59559915B6FDA500A03429 /* BITCrashReportTextFormatter.h in Headers */, + 1E5955A315B70F6900A03429 /* HockeySDKPrivate.h in Headers */, + 1E5955D415B72E5400A03429 /* BITCrashManager.h in Headers */, + 1E5955E515B751EE00A03429 /* BITUpdateViewController.h in Headers */, + 1E5955ED15B7538B00A03429 /* NSString+BITHockeyAdditions.h in Headers */, + 1E5955F115B7752300A03429 /* BITUpdateManagerDelegate.h in Headers */, + 1E5955FD15B7877B00A03429 /* BITHockeyManagerDelegate.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; E4005618148D79B500EB22B9 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - E41EB471148D7BF50015DEDC /* BWApp.h in Headers */, - E41EB473148D7BF50015DEDC /* BWGlobal.h in Headers */, - E41EB475148D7BF50015DEDC /* BWHockeyManager.h in Headers */, - E41EB477148D7BF50015DEDC /* BWHockeySettingsViewController.h in Headers */, - E41EB479148D7BF50015DEDC /* BWHockeyViewController.h in Headers */, - E41EB47B148D7BF50015DEDC /* BWQuincyManager.h in Headers */, - E41EB47D148D7BF50015DEDC /* CNSHockeyManager.h in Headers */, - E41EB47F148D7BF50015DEDC /* NSString+HockeyAdditions.h in Headers */, + 1E71509B15B5C76F004E88FF /* HockeySDK.h in Headers */, + 1E40BCB515A3487500BD64D9 /* BITCrashManagerDelegate.h in Headers */, + E41EB471148D7BF50015DEDC /* BITAppVersionMetaInfo.h in Headers */, + E41EB475148D7BF50015DEDC /* BITUpdateManager.h in Headers */, + E41EB477148D7BF50015DEDC /* BITUpdateSettingsViewController.h in Headers */, + E41EB47D148D7BF50015DEDC /* BITHockeyManager.h in Headers */, E41EB481148D7BF50015DEDC /* PSAppStoreHeader.h in Headers */, E41EB483148D7BF50015DEDC /* PSStoreButton.h in Headers */, E41EB485148D7BF50015DEDC /* PSWebTableViewCell.h in Headers */, - E41EB487148D7BF50015DEDC /* UIImage+HockeyAdditions.h in Headers */, - 1E322DAD148FCE2100077977 /* CNSFixCategoryBug.h in Headers */, - 1E40BCB515A3487500BD64D9 /* BWQuincyManagerDelegate.h in Headers */, - 1E40BCB915A3494400BD64D9 /* CNSCrashReportTextFormatter.h in Headers */, + E41EB487148D7BF50015DEDC /* UIImage+BITHockeyAdditions.h in Headers */, + 1E40BCB915A3494400BD64D9 /* BITCrashReportTextFormatter.h in Headers */, + 1E5955A115B70F6900A03429 /* HockeySDKPrivate.h in Headers */, + 1E5955D215B72E5400A03429 /* BITCrashManager.h in Headers */, + 1E5955E315B751EE00A03429 /* BITUpdateViewController.h in Headers */, + 1E5955EB15B7538B00A03429 /* NSString+BITHockeyAdditions.h in Headers */, + 1E5955EF15B7752300A03429 /* BITUpdateManagerDelegate.h in Headers */, + 1E5955FB15B7877B00A03429 /* BITHockeyManagerDelegate.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - E4005619148D79B500EB22B9 /* HockeySDK */ = { + 1E59544015B6C3DC00A03429 /* HockeySDK */ = { isa = PBXNativeTarget; - buildConfigurationList = E400563E148D79B500EB22B9 /* Build configuration list for PBXNativeTarget "HockeySDK" */; + buildConfigurationList = 1E59545215B6C3DC00A03429 /* Build configuration list for PBXNativeTarget "HockeySDK" */; + buildPhases = ( + 1E59543E15B6C3DC00A03429 /* Headers */, + 1E59543F15B6C3DC00A03429 /* Resources */, + 1E59543C15B6C3DC00A03429 /* Sources */, + 1E59543D15B6C3DC00A03429 /* Frameworks */, + 1E59549D15B6D39500A03429 /* Lipo Binary */, + ); + buildRules = ( + ); + dependencies = ( + 1E59547E15B6C47900A03429 /* PBXTargetDependency */, + 1E59549415B6CBBE00A03429 /* PBXTargetDependency */, + 1E59554915B6F6F600A03429 /* PBXTargetDependency */, + ); + name = HockeySDK; + productName = HockeySDK; + productReference = 1E59544115B6C3DC00A03429 /* HockeySDK.framework */; + productType = "com.apple.product-type.framework"; + }; + 1E59545515B6C41300A03429 /* HockeySDK-Simulator */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1E59547915B6C41300A03429 /* Build configuration list for PBXNativeTarget "HockeySDK-Simulator" */; + buildPhases = ( + 1E59545615B6C41300A03429 /* Sources */, + 1E59546515B6C41300A03429 /* Frameworks */, + 1E59546815B6C41300A03429 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "HockeySDK-Simulator"; + productName = HockeySDK; + productReference = 1E59547C15B6C41300A03429 /* libHockeySDK-iphonesimulator.a */; + productType = "com.apple.product-type.library.static"; + }; + 1E5954CB15B6F24A00A03429 /* HockeySDKLib */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1E5954EF15B6F24A00A03429 /* Build configuration list for PBXNativeTarget "HockeySDKLib" */; + buildPhases = ( + 1E5954CC15B6F24A00A03429 /* Sources */, + 1E5954DB15B6F24A00A03429 /* Frameworks */, + 1E59558B15B6FD8800A03429 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 1E59557E15B6F97100A03429 /* PBXTargetDependency */, + ); + name = HockeySDKLib; + productName = HockeySDK; + productReference = 1E5954F215B6F24A00A03429 /* libHockeySDK.a */; + productType = "com.apple.product-type.library.static"; + }; + 1E59550915B6F45800A03429 /* HockeySDKResources */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1E59551415B6F45800A03429 /* Build configuration list for PBXNativeTarget "HockeySDKResources" */; + buildPhases = ( + 1E59550615B6F45800A03429 /* Sources */, + 1E59550715B6F45800A03429 /* Frameworks */, + 1E59550815B6F45800A03429 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HockeySDKResources; + productName = HockeySDKBundle; + productReference = 1E59550A15B6F45800A03429 /* HockeySDKResources.bundle */; + productType = "com.apple.product-type.bundle"; + }; + E4005619148D79B500EB22B9 /* HockeySDK-Device */ = { + isa = PBXNativeTarget; + buildConfigurationList = E400563E148D79B500EB22B9 /* Build configuration list for PBXNativeTarget "HockeySDK-Device" */; buildPhases = ( E4005616148D79B500EB22B9 /* Sources */, E4005617148D79B500EB22B9 /* Frameworks */, @@ -225,9 +599,9 @@ ); dependencies = ( ); - name = HockeySDK; + name = "HockeySDK-Device"; productName = HockeySDK; - productReference = E400561A148D79B500EB22B9 /* libHockeySDK.a */; + productReference = E400561A148D79B500EB22B9 /* libHockeySDK-iphoneos.a */; productType = "com.apple.product-type.library.static"; }; /* End PBXNativeTarget section */ @@ -244,41 +618,408 @@ hasScannedForEncodings = 0; knownRegions = ( en, + de, + es, + fr, + it, + ja, + nl, + "pt-PT", + pt, + ru, + sv, + tr, + zh_CN, + zh_TW, + "zh-Hans", + "zh-Hant", ); mainGroup = E400560F148D79B500EB22B9; productRefGroup = E400561B148D79B500EB22B9 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - E4005619148D79B500EB22B9 /* HockeySDK */, + 1E59544015B6C3DC00A03429 /* HockeySDK */, + E4005619148D79B500EB22B9 /* HockeySDK-Device */, + 1E59545515B6C41300A03429 /* HockeySDK-Simulator */, + 1E5954CB15B6F24A00A03429 /* HockeySDKLib */, + 1E59550915B6F45800A03429 /* HockeySDKResources */, ); }; /* End PBXProject section */ +/* Begin PBXResourcesBuildPhase section */ + 1E59543F15B6C3DC00A03429 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E59557C15B6F8CC00A03429 /* HockeySDKResources.bundle in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1E59550815B6F45800A03429 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E59556115B6F80E00A03429 /* HockeySDK.strings in Resources */, + 1E59556315B6F81500A03429 /* HockeySDK.strings in Resources */, + 1E59556515B6F81C00A03429 /* HockeySDK.strings in Resources */, + 1E59556715B6F82300A03429 /* HockeySDK.strings in Resources */, + 1E59556915B6F82A00A03429 /* HockeySDK.strings in Resources */, + 1E59556B15B6F83100A03429 /* HockeySDK.strings in Resources */, + 1E59556D15B6F83700A03429 /* HockeySDK.strings in Resources */, + 1E59556F15B6F84000A03429 /* HockeySDK.strings in Resources */, + 1E59557115B6F84700A03429 /* HockeySDK.strings in Resources */, + 1E59557315B6F84D00A03429 /* HockeySDK.strings in Resources */, + 1E59557515B6F85700A03429 /* HockeySDK.strings in Resources */, + 1E59557715B6F85E00A03429 /* HockeySDK.strings in Resources */, + 1E59557915B6F86600A03429 /* HockeySDK.strings in Resources */, + 1E5955C615B71C8600A03429 /* authorize_denied.png in Resources */, + 1E5955C715B71C8600A03429 /* authorize_denied@2x.png in Resources */, + 1E5955C815B71C8600A03429 /* authorize_request.png in Resources */, + 1E5955C915B71C8600A03429 /* authorize_request@2x.png in Resources */, + 1E5955CA15B71C8600A03429 /* bg.png in Resources */, + 1E5955CB15B71C8600A03429 /* buttonHighlight.png in Resources */, + 1E5955CC15B71C8600A03429 /* buttonHighlight@2x.png in Resources */, + 1E5955CD15B71C8600A03429 /* gear.png in Resources */, + 1E5955CE15B71C8600A03429 /* gear@2x.png in Resources */, + 1E5955CF15B71C8600A03429 /* IconGradient.png in Resources */, + 1E5955D015B71C8600A03429 /* IconGradient@2x.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 1E59549D15B6D39500A03429 /* Lipo Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Lipo Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "FRAMEWORK=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.framework\"\n\nlipo \\\n\"${BUILD_DIR}/${CONFIGURATION}-iphoneos/libHockeySDK-iphoneos.a\" \\\n\"${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/libHockeySDK-iphonesimulator.a\" \\\n-create -output \"${FRAMEWORK}/Versions/Current/${PRODUCT_NAME}\"\n\n# Strip debugging symbols\n#strip -S \"${FRAMEWORK}/Versions/Current/${PRODUCT_NAME}\"\n\ncd \"${FRAMEWORK}\" && ln -sf \"Versions/Current/${PRODUCT_NAME}\" ./\n\nif [ ! -e \"$TARGET_BUILD_DIR/HockeySDK.framework/Frameworks\" ];\nthen\ncd \"$TARGET_BUILD_DIR/HockeySDK.framework\"\nln -s \"Versions/Current/Frameworks\" \"Frameworks\"\nfi"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ + 1E59543C15B6C3DC00A03429 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1E59545615B6C41300A03429 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E59545715B6C41300A03429 /* BITAppVersionMetaInfo.m in Sources */, + 1E59545A15B6C41300A03429 /* BITUpdateSettingsViewController.m in Sources */, + 1E59545C15B6C41300A03429 /* BITCrashManager.m in Sources */, + 1E59545D15B6C41300A03429 /* BITHockeyManager.m in Sources */, + 1E59545E15B6C41300A03429 /* NSString+BITHockeyAdditions.m in Sources */, + 1E59545F15B6C41300A03429 /* PSAppStoreHeader.m in Sources */, + 1E59546015B6C41300A03429 /* PSStoreButton.m in Sources */, + 1E59546115B6C41300A03429 /* PSWebTableViewCell.m in Sources */, + 1E59546215B6C41300A03429 /* UIImage+BITHockeyAdditions.m in Sources */, + 1E59546315B6C41300A03429 /* BITCrashReportTextFormatter.m in Sources */, + 1E59559E15B70F4D00A03429 /* HockeySDKPrivate.m in Sources */, + 1E5955D715B72ED500A03429 /* BITUpdateManager.m in Sources */, + 1E5955E815B751FB00A03429 /* BITUpdateViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1E5954CC15B6F24A00A03429 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E5954CD15B6F24A00A03429 /* BITAppVersionMetaInfo.m in Sources */, + 1E5954D015B6F24A00A03429 /* BITUpdateSettingsViewController.m in Sources */, + 1E5954D215B6F24A00A03429 /* BITCrashManager.m in Sources */, + 1E5954D315B6F24A00A03429 /* BITHockeyManager.m in Sources */, + 1E5954D415B6F24A00A03429 /* NSString+BITHockeyAdditions.m in Sources */, + 1E5954D515B6F24A00A03429 /* PSAppStoreHeader.m in Sources */, + 1E5954D615B6F24A00A03429 /* PSStoreButton.m in Sources */, + 1E5954D715B6F24A00A03429 /* PSWebTableViewCell.m in Sources */, + 1E5954D815B6F24A00A03429 /* UIImage+BITHockeyAdditions.m in Sources */, + 1E5954D915B6F24A00A03429 /* BITCrashReportTextFormatter.m in Sources */, + 1E59559F15B70F4D00A03429 /* HockeySDKPrivate.m in Sources */, + 1E5955D815B72ED500A03429 /* BITUpdateManager.m in Sources */, + 1E5955E915B751FB00A03429 /* BITUpdateViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1E59550615B6F45800A03429 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; E4005616148D79B500EB22B9 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E41EB472148D7BF50015DEDC /* BWApp.m in Sources */, - E41EB474148D7BF50015DEDC /* BWGlobal.m in Sources */, - E41EB476148D7BF50015DEDC /* BWHockeyManager.m in Sources */, - E41EB478148D7BF50015DEDC /* BWHockeySettingsViewController.m in Sources */, - E41EB47A148D7BF50015DEDC /* BWHockeyViewController.m in Sources */, - E41EB47C148D7BF50015DEDC /* BWQuincyManager.m in Sources */, - E41EB47E148D7BF50015DEDC /* CNSHockeyManager.m in Sources */, - E41EB480148D7BF50015DEDC /* NSString+HockeyAdditions.m in Sources */, + E41EB472148D7BF50015DEDC /* BITAppVersionMetaInfo.m in Sources */, + E41EB478148D7BF50015DEDC /* BITUpdateSettingsViewController.m in Sources */, + E41EB47C148D7BF50015DEDC /* BITCrashManager.m in Sources */, + E41EB47E148D7BF50015DEDC /* BITHockeyManager.m in Sources */, + E41EB480148D7BF50015DEDC /* NSString+BITHockeyAdditions.m in Sources */, E41EB482148D7BF50015DEDC /* PSAppStoreHeader.m in Sources */, E41EB484148D7BF50015DEDC /* PSStoreButton.m in Sources */, E41EB486148D7BF50015DEDC /* PSWebTableViewCell.m in Sources */, - E41EB488148D7BF50015DEDC /* UIImage+HockeyAdditions.m in Sources */, - 1E40BCBA15A3494400BD64D9 /* CNSCrashReportTextFormatter.m in Sources */, + E41EB488148D7BF50015DEDC /* UIImage+BITHockeyAdditions.m in Sources */, + 1E40BCBA15A3494400BD64D9 /* BITCrashReportTextFormatter.m in Sources */, + 1E59559D15B70F4D00A03429 /* HockeySDKPrivate.m in Sources */, + 1E5955D615B72ED500A03429 /* BITUpdateManager.m in Sources */, + 1E5955E715B751FB00A03429 /* BITUpdateViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + 1E59547E15B6C47900A03429 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = E4005619148D79B500EB22B9 /* HockeySDK-Device */; + targetProxy = 1E59547D15B6C47900A03429 /* PBXContainerItemProxy */; + }; + 1E59549415B6CBBE00A03429 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 1E59545515B6C41300A03429 /* HockeySDK-Simulator */; + targetProxy = 1E59549315B6CBBE00A03429 /* PBXContainerItemProxy */; + }; + 1E59554915B6F6F600A03429 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 1E59550915B6F45800A03429 /* HockeySDKResources */; + targetProxy = 1E59554815B6F6F600A03429 /* PBXContainerItemProxy */; + }; + 1E59557E15B6F97100A03429 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 1E59550915B6F45800A03429 /* HockeySDKResources */; + targetProxy = 1E59557D15B6F97100A03429 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 1E59555F15B6F80E00A03429 /* HockeySDK.strings */ = { + isa = PBXVariantGroup; + children = ( + 1E59556015B6F80E00A03429 /* de */, + 1E59556215B6F81500A03429 /* en */, + 1E59556415B6F81C00A03429 /* es */, + 1E59556615B6F82300A03429 /* fr */, + 1E59556815B6F82A00A03429 /* it */, + 1E59556A15B6F83100A03429 /* ja */, + 1E59556C15B6F83700A03429 /* nl */, + 1E59556E15B6F84000A03429 /* pt-PT */, + 1E59557015B6F84700A03429 /* pt */, + 1E59557215B6F84D00A03429 /* ru */, + 1E59557415B6F85700A03429 /* sv */, + 1E59557615B6F85E00A03429 /* tr */, + 1E59557815B6F86600A03429 /* zh_CN */, + 1E59557A15B6F86E00A03429 /* zh_TW */, + ); + name = HockeySDK.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + /* Begin XCBuildConfiguration section */ + 1E59545315B6C3DC00A03429 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COMBINE_HIDPI_IMAGES = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../Vendor\"", + ); + FRAMEWORK_VERSION = A; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "HockeySDK/HockeySDK-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../Vendor\"", + ); + INFOPLIST_FILE = "HockeySDK/HockeySDK-Info.plist"; + INSTALL_PATH = "$(HOME)/Library/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + ONLY_ACTIVE_ARCH = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + WRAPPER_EXTENSION = framework; + }; + name = Debug; + }; + 1E59545415B6C3DC00A03429 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COMBINE_HIDPI_IMAGES = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../Vendor\"", + ); + FRAMEWORK_VERSION = A; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "HockeySDK/HockeySDK-Prefix.pch"; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../Vendor\"", + ); + INFOPLIST_FILE = "HockeySDK/HockeySDK-Info.plist"; + INSTALL_PATH = "$(HOME)/Library/Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + WRAPPER_EXTENSION = framework; + }; + name = Release; + }; + 1E59547A15B6C41300A03429 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + DSTROOT = /tmp/HockeySDK.dst; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../Vendor\"", + ); + GCC_THUMB_SUPPORT = NO; + HOCKEYSDK_STATIC_LIBRARY = 1; + PRODUCT_NAME = "HockeySDK${EFFECTIVE_PLATFORM_NAME}"; + SDKROOT = iphonesimulator; + SKIP_INSTALL = NO; + }; + name = Debug; + }; + 1E59547B15B6C41300A03429 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + DSTROOT = /tmp/HockeySDK.dst; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../Vendor\"", + ); + GCC_THUMB_SUPPORT = NO; + HOCKEYSDK_STATIC_LIBRARY = 1; + PRODUCT_NAME = "HockeySDK${EFFECTIVE_PLATFORM_NAME}"; + SDKROOT = iphonesimulator; + SKIP_INSTALL = NO; + }; + name = Release; + }; + 1E5954F015B6F24A00A03429 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DSTROOT = /tmp/HockeySDK.dst; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../Vendor\"", + ); + GCC_THUMB_SUPPORT = NO; + GENERATE_MASTER_OBJECT_FILE = YES; + PRODUCT_NAME = HockeySDK; + SKIP_INSTALL = NO; + VALID_ARCHS = "armv6 armv7"; + }; + name = Debug; + }; + 1E5954F115B6F24A00A03429 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DSTROOT = /tmp/HockeySDK.dst; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../Vendor\"", + ); + GCC_THUMB_SUPPORT = NO; + GENERATE_MASTER_OBJECT_FILE = YES; + PRODUCT_NAME = HockeySDK; + SKIP_INSTALL = NO; + VALID_ARCHS = "armv6 armv7"; + }; + name = Release; + }; + 1E59551515B6F45800A03429 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + armv6, + armv7, + ); + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COMBINE_HIDPI_IMAGES = YES; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ""; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; + MACOSX_DEPLOYMENT_TARGET = 10.8; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + WRAPPER_EXTENSION = bundle; + }; + name = Debug; + }; + 1E59551615B6F45800A03429 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + armv6, + armv7, + ); + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COMBINE_HIDPI_IMAGES = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ""; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Bundles"; + MACOSX_DEPLOYMENT_TARGET = 10.8; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + WRAPPER_EXTENSION = bundle; + }; + name = Release; + }; E400563C148D79B500EB22B9 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -288,6 +1029,7 @@ armv6, ); COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -304,10 +1046,14 @@ GCC_WARN_STRICT_SELECTOR_MATCH = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; + HOCKEYSDK_STATIC_LIBRARY = ""; + IPHONEOS_DEPLOYMENT_TARGET = 4.0; + MACOSX_DEPLOYMENT_TARGET = 10.5; OTHER_CFLAGS = ""; RUN_CLANG_STATIC_ANALYZER = YES; SDKROOT = iphoneos; + STRIP_STYLE = "non-global"; + VALID_ARCHS = "armv6 armv7 i386 x86_64"; }; name = Debug; }; @@ -319,7 +1065,8 @@ armv7, armv6, ); - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_PREPROCESSOR_DEFINITIONS = HOCKEYLIB_STATIC_LIBRARY; GCC_THUMB_SUPPORT = NO; @@ -329,47 +1076,99 @@ GCC_WARN_STRICT_SELECTOR_MATCH = YES; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 3.0; + HOCKEYSDK_STATIC_LIBRARY = ""; + IPHONEOS_DEPLOYMENT_TARGET = 4.0; + MACOSX_DEPLOYMENT_TARGET = 10.5; OTHER_CFLAGS = ""; RUN_CLANG_STATIC_ANALYZER = YES; SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; + STRIP_STYLE = "non-global"; + VALIDATE_PRODUCT = NO; + VALID_ARCHS = "armv6 armv7 i386 x86_64"; }; name = Release; }; E400563F148D79B500EB22B9 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = ( + armv6, + armv7, + ); DSTROOT = /tmp/HockeySDK.dst; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/../Vendor\"", ); GCC_THUMB_SUPPORT = NO; - OTHER_LDFLAGS = ""; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; + GENERATE_MASTER_OBJECT_FILE = YES; + HOCKEYSDK_STATIC_LIBRARY = 1; + PRODUCT_NAME = "HockeySDK${EFFECTIVE_PLATFORM_NAME}"; + SKIP_INSTALL = NO; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; E4005640148D79B500EB22B9 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = ( + armv6, + armv7, + ); DSTROOT = /tmp/HockeySDK.dst; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/../Vendor\"", ); GCC_THUMB_SUPPORT = NO; - OTHER_LDFLAGS = ""; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; + GENERATE_MASTER_OBJECT_FILE = YES; + HOCKEYSDK_STATIC_LIBRARY = 1; + PRODUCT_NAME = "HockeySDK${EFFECTIVE_PLATFORM_NAME}"; + SKIP_INSTALL = NO; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 1E59545215B6C3DC00A03429 /* Build configuration list for PBXNativeTarget "HockeySDK" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1E59545315B6C3DC00A03429 /* Debug */, + 1E59545415B6C3DC00A03429 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1E59547915B6C41300A03429 /* Build configuration list for PBXNativeTarget "HockeySDK-Simulator" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1E59547A15B6C41300A03429 /* Debug */, + 1E59547B15B6C41300A03429 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1E5954EF15B6F24A00A03429 /* Build configuration list for PBXNativeTarget "HockeySDKLib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1E5954F015B6F24A00A03429 /* Debug */, + 1E5954F115B6F24A00A03429 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1E59551415B6F45800A03429 /* Build configuration list for PBXNativeTarget "HockeySDKResources" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1E59551515B6F45800A03429 /* Debug */, + 1E59551615B6F45800A03429 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; E4005614148D79B500EB22B9 /* Build configuration list for PBXProject "HockeySDK" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -379,7 +1178,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - E400563E148D79B500EB22B9 /* Build configuration list for PBXNativeTarget "HockeySDK" */ = { + E400563E148D79B500EB22B9 /* Build configuration list for PBXNativeTarget "HockeySDK-Device" */ = { isa = XCConfigurationList; buildConfigurations = ( E400563F148D79B500EB22B9 /* Debug */,