mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-31 23:47:01 +00:00
Remove customDeviceIdentifierForUpdateManager delegate
This is now replaced by BITAuthenticator for all iOS versions
This commit is contained in:
parent
5d8b42e92f
commit
72255ee4f0
@ -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
|
||||
|
@ -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 <UIAlertViewDelegate>
|
||||
@ -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;
|
||||
|
||||
|
@ -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];
|
||||
|
@ -37,29 +37,6 @@
|
||||
|
||||
@protocol BITUpdateManagerDelegate <NSObject>
|
||||
|
||||
///-----------------------------------------------------------------------------
|
||||
/// @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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user