diff --git a/Classes/BITHockeyManager.h b/Classes/BITHockeyManager.h index 8a7a4a20d3..f8e2ca6b6c 100644 --- a/Classes/BITHockeyManager.h +++ b/Classes/BITHockeyManager.h @@ -68,22 +68,8 @@ [[BITHockeyManager sharedHockeyManager] startManager]; @warning When also using the SDK for updating app versions (AdHoc or Enterprise) and collecting - beta usage analytics, you also have to to set `[BITUpdateManager delegate]` and - implement `[BITUpdateManagerDelegate customDeviceIdentifierForUpdateManager:]`! + beta usage analytics, you also have to use `[BITAuthenticator]`! - - Example implementation if your Xcode configuration for the App Store is called "AppStore": - - (NSString *)customDeviceIdentifierForUpdateManager:(BITUpdateManager *)updateManager { - #ifndef (CONFIGURATION_AppStore) - if ([[UIDevice currentDevice] respondsToSelector:@selector(uniqueIdentifier)]) - return [[UIDevice currentDevice] performSelector:@selector(uniqueIdentifier)]; - #endif - return nil; - } - - [[BITHockeyManager sharedHockeyManager].updateManager setDelegate:self]; - - */ @interface BITHockeyManager : NSObject diff --git a/Classes/BITUpdateManager.h b/Classes/BITUpdateManager.h index 90c19e6e49..baf4ffe09c 100644 --- a/Classes/BITUpdateManager.h +++ b/Classes/BITUpdateManager.h @@ -53,21 +53,6 @@ typedef enum { This module automatically disables itself when running in an App Store build by default! If you integrate the Atlassian JMC client this module is used to automatically configure JMC, but will not do anything else. - To use this module, it is important to implement set the `delegate` property and implement - `[BITUpdateManagerDelegate customDeviceIdentifierForUpdateManager:]`. - - Example implementation if your Xcode configuration for the App Store is called "AppStore": - - (NSString *)customDeviceIdentifierForUpdateManager:(BITUpdateManager *)updateManager { - #ifndef (CONFIGURATION_AppStore) - if ([[UIDevice currentDevice] respondsToSelector:@selector(uniqueIdentifier)]) - return [[UIDevice currentDevice] performSelector:@selector(uniqueIdentifier)]; - #endif - - return nil; - } - - [[BITHockeyManager sharedHockeyManager].updateManager setDelegate:self]; - */ @interface BITUpdateManager : BITHockeyBaseManager @@ -78,11 +63,7 @@ typedef enum { ///----------------------------------------------------------------------------- /** - Sets the `BITUpdateManagerDelegate` delegate. - - When using `BITUpdateManager` to distribute updates of your beta or enterprise - application, it is _REQUIRED_ to set this delegate and implement - `[BITUpdateManagerDelegate customDeviceIdentifierForUpdateManager:]`! + Sets the `BITUpdateManagerDelegate` delegate. */ @property (nonatomic, weak) id delegate; diff --git a/Classes/BITUpdateManager.m b/Classes/BITUpdateManager.m index 6ac1c1c4b0..135b5ffaeb 100644 --- a/Classes/BITUpdateManager.m +++ b/Classes/BITUpdateManager.m @@ -211,19 +211,6 @@ typedef NS_ENUM(NSInteger, BITUpdateAlertViewTag) { } } -#pragma mark - Device identifier - -- (NSString *)deviceIdentifier { - if ([_delegate respondsToSelector:@selector(customDeviceIdentifierForUpdateManager:)]) { - NSString *identifier = [_delegate performSelector:@selector(customDeviceIdentifierForUpdateManager:) withObject:self]; - if (identifier && [identifier length] > 0) { - return identifier; - } - } - - return @"invalid"; -} - #pragma mark - Cache @@ -567,9 +554,9 @@ typedef NS_ENUM(NSInteger, BITUpdateAlertViewTag) { return; } - NSMutableString *parameter = [NSMutableString stringWithFormat:@"api/2/apps/%@?format=json&extended=true&udid=%@&sdk=%@&sdk_version=%@&uuid=%@", + NSMutableString *parameter = [NSMutableString stringWithFormat:@"api/2/apps/%@?format=json&extended=true%@&sdk=%@&sdk_version=%@&uuid=%@", bit_URLEncodedString([self encodedAppIdentifier]), - ([self isAppStoreEnvironment] ? @"appstore" : bit_URLEncodedString([self deviceIdentifier])), + ([self isAppStoreEnvironment] ? @"&udid=appstore" : @""), BITHOCKEY_NAME, BITHOCKEY_VERSION, _uuid]; @@ -631,8 +618,11 @@ typedef NS_ENUM(NSInteger, BITUpdateAlertViewTag) { #endif NSString *extraParameter = [NSString string]; - if (_sendUsageData) { - extraParameter = [NSString stringWithFormat:@"&udid=%@", [self deviceIdentifier]]; + if (_sendUsageData && self.installationIdentification && self.installationIdentificationType) { + extraParameter = [NSString stringWithFormat:@"&%@=%@", + bit_URLEncodedString(self.installationIdentificationType), + bit_URLEncodedString(self.installationIdentification) + ]; } NSString *hockeyAPIURL = [NSString stringWithFormat:@"%@api/2/apps/%@?format=plist%@", self.serverURL, [self encodedAppIdentifier], extraParameter]; diff --git a/Classes/BITUpdateManagerDelegate.h b/Classes/BITUpdateManagerDelegate.h index ef86d37659..4f30187215 100644 --- a/Classes/BITUpdateManagerDelegate.h +++ b/Classes/BITUpdateManagerDelegate.h @@ -37,29 +37,6 @@ @protocol BITUpdateManagerDelegate -///----------------------------------------------------------------------------- -/// @name Configuration -///----------------------------------------------------------------------------- - -/** - Return the unique device identifier - - Return the device UDID which is required for beta testing, should return nil for app store configuration! - Example implementation if your Xcode configuration for the App Store is called "AppStore": - - - (NSString *)customDeviceIdentifierForUpdateManager:(BITUpdateManager *)updateManager { - #ifndef (CONFIGURATION_AppStore) - if ([[UIDevice currentDevice] respondsToSelector:@selector(uniqueIdentifier)]) - return [[UIDevice currentDevice] performSelector:@selector(uniqueIdentifier)]; - #endif - - return nil; - } - - @param updateManager The `BITUpdateManager` instance invoking this delegate - */ -- (NSString *)customDeviceIdentifierForUpdateManager:(BITUpdateManager *)updateManager; - @optional