mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Fix iOS 9 warnings
- Require iOS 7 as base SDK (for compiling) - Hide deprecation message for NSURLConnection calls, these will be refactored soon - Remove statusbar adjustment code (which isn't needed any longer) - Remove kBITTextLabel... defines and use NSText.. instead - Remove a few `#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1` since we require iOS 7 as base now (for real)
This commit is contained in:
@@ -34,7 +34,6 @@
|
||||
#import "BITHockeyAppClient.h"
|
||||
|
||||
@interface BITAuthenticationViewController ()<UITextFieldDelegate> {
|
||||
UIStatusBarStyle _statusBarStyle;
|
||||
__weak UITextField *_emailField;
|
||||
}
|
||||
|
||||
@@ -66,24 +65,11 @@
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
_statusBarStyle = [[UIApplication sharedApplication] statusBarStyle];
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:(self.navigationController.navigationBar.barStyle == UIBarStyleDefault) ? UIStatusBarStyleDefault : UIStatusBarStyleLightContent];
|
||||
#else
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:(self.navigationController.navigationBar.barStyle == UIBarStyleDefault) ? UIStatusBarStyleDefault : UIStatusBarStyleBlackOpaque];
|
||||
#endif
|
||||
|
||||
[self updateBarButtons];
|
||||
|
||||
self.navigationItem.rightBarButtonItem.enabled = [self allRequiredFieldsEntered];
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:_statusBarStyle];
|
||||
}
|
||||
|
||||
#pragma mark - Property overrides
|
||||
|
||||
- (void) updateBarButtons {
|
||||
@@ -242,7 +228,7 @@
|
||||
textField.backgroundColor = [UIColor whiteColor];
|
||||
textField.autocorrectionType = UITextAutocorrectionTypeNo;
|
||||
textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
|
||||
textField.textAlignment = kBITTextLabelAlignmentLeft;
|
||||
textField.textAlignment = NSTextAlignmentLeft;
|
||||
textField.delegate = self;
|
||||
textField.tag = indexPath.row;
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
|
||||
|
||||
@interface BITFeedbackComposeViewController () <BITFeedbackUserDataDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIActionSheetDelegate, BITImageAnnotationDelegate> {
|
||||
UIStatusBarStyle _statusBarStyle;
|
||||
}
|
||||
|
||||
@property (nonatomic, weak) BITFeedbackManager *manager;
|
||||
@@ -275,19 +274,20 @@
|
||||
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
_statusBarStyle = [[UIApplication sharedApplication] statusBarStyle];
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:(self.navigationController.navigationBar.barStyle == UIBarStyleDefault) ? UIStatusBarStyleDefault : UIStatusBarStyleLightContent];
|
||||
#else
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:(self.navigationController.navigationBar.barStyle == UIBarStyleDefault) ? UIStatusBarStyleDefault : UIStatusBarStyleBlackOpaque];
|
||||
#endif
|
||||
|
||||
if (_text && self.textView.text.length == 0) {
|
||||
self.textView.text = _text;
|
||||
}
|
||||
|
||||
if (self.isStatusBarHiddenBeforeShowingPhotoPicker) {
|
||||
[[UIApplication sharedApplication] setStatusBarHidden:self.isStatusBarHiddenBeforeShowingPhotoPicker.boolValue];
|
||||
// requires iOS 7
|
||||
if ([self respondsToSelector:@selector(prefersStatusBarHidden)]) {
|
||||
[self setNeedsStatusBarAppearanceUpdate];
|
||||
} else {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
[[UIApplication sharedApplication] setStatusBarHidden:self.isStatusBarHiddenBeforeShowingPhotoPicker.boolValue];
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
}
|
||||
|
||||
self.isStatusBarHiddenBeforeShowingPhotoPicker = nil;
|
||||
@@ -295,6 +295,14 @@
|
||||
[self updateBarButtonState];
|
||||
}
|
||||
|
||||
- (BOOL)prefersStatusBarHidden {
|
||||
if (self.isStatusBarHiddenBeforeShowingPhotoPicker) {
|
||||
return self.isStatusBarHiddenBeforeShowingPhotoPicker.boolValue;
|
||||
}
|
||||
|
||||
return [super prefersStatusBarHidden];
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
@@ -318,8 +326,6 @@
|
||||
self.manager.currentFeedbackComposeViewController = nil;
|
||||
|
||||
[super viewWillDisappear:animated];
|
||||
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:_statusBarStyle];
|
||||
}
|
||||
|
||||
- (void)viewDidDisappear:(BOOL)animated {
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
_labelText = [[BITAttributedLabel alloc] init];
|
||||
_labelText.font = [UIFont systemFontOfSize:TEXT_FONTSIZE];
|
||||
_labelText.numberOfLines = 0;
|
||||
_labelText.textAlignment = kBITTextLabelAlignmentLeft;
|
||||
_labelText.textAlignment = NSTextAlignmentLeft;
|
||||
_labelText.dataDetectorTypes = UIDataDetectorTypeAll;
|
||||
|
||||
_attachmentViews = [NSMutableArray new];
|
||||
@@ -214,7 +214,6 @@
|
||||
+ (CGFloat) heightForTextInRowWithMessage:(BITFeedbackMessage *)message tableViewWidth:(CGFloat)width {
|
||||
CGFloat calculatedHeight;
|
||||
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1
|
||||
if ([message.text respondsToSelector:@selector(boundingRectWithSize:options:attributes:context:)]) {
|
||||
CGRect calculatedRect = [message.text boundingRectWithSize:CGSizeMake(width - (2 * FRAME_SIDE_BORDER), CGFLOAT_MAX)
|
||||
options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading
|
||||
@@ -226,7 +225,6 @@
|
||||
|
||||
|
||||
} else {
|
||||
#endif
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
calculatedHeight = [message.text sizeWithFont:[UIFont systemFontOfSize:TEXT_FONTSIZE]
|
||||
@@ -234,9 +232,7 @@
|
||||
].height + FRAME_TOP_BORDER + LABEL_TEXT_Y + FRAME_BOTTOM_BORDER;
|
||||
|
||||
#pragma clang diagnostic pop
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1
|
||||
}
|
||||
#endif
|
||||
|
||||
return ceil(calculatedHeight);
|
||||
}
|
||||
@@ -312,11 +308,11 @@
|
||||
[self.labelTitle setFrame:CGRectMake(FRAME_SIDE_BORDER, FRAME_TOP_BORDER + LABEL_TITLE_Y, self.frame.size.width - (2 * FRAME_SIDE_BORDER), LABEL_TITLE_HEIGHT)];
|
||||
|
||||
if (_message.userMessage) {
|
||||
self.labelTitle.textAlignment = kBITTextLabelAlignmentRight;
|
||||
self.labelText.textAlignment = kBITTextLabelAlignmentRight;
|
||||
self.labelTitle.textAlignment = NSTextAlignmentRight;
|
||||
self.labelText.textAlignment = NSTextAlignmentRight;
|
||||
} else {
|
||||
self.labelTitle.textAlignment = kBITTextLabelAlignmentLeft;
|
||||
self.labelText.textAlignment = kBITTextLabelAlignmentLeft;
|
||||
self.labelTitle.textAlignment = NSTextAlignmentLeft;
|
||||
self.labelText.textAlignment = NSTextAlignmentLeft;
|
||||
}
|
||||
|
||||
[self addSubview:self.labelTitle];
|
||||
|
||||
@@ -494,7 +494,7 @@
|
||||
cell.textLabel.textColor = DEFAULT_TEXTCOLOR;
|
||||
cell.accessoryType = UITableViewCellAccessoryNone;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
cell.textLabel.textAlignment = kBITTextLabelAlignmentCenter;
|
||||
cell.textLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
|
||||
cell.textLabel.text = [NSString stringWithFormat:BITHockeyLocalizedString(@"HockeyFeedbackListLastUpdated"),
|
||||
@@ -619,7 +619,7 @@
|
||||
|
||||
statusLabel.font = [UIFont systemFontOfSize:10];
|
||||
statusLabel.textColor = DEFAULT_TEXTCOLOR;
|
||||
statusLabel.textAlignment = kBITTextLabelAlignmentCenter;
|
||||
statusLabel.textAlignment = NSTextAlignmentCenter;
|
||||
if ([self.manager isPreiOS7Environment]) {
|
||||
statusLabel.backgroundColor = DEFAULT_BACKGROUNDCOLOR;
|
||||
} else {
|
||||
@@ -672,7 +672,10 @@
|
||||
if (attachment.needsLoadingFromURL && !attachment.isLoading){
|
||||
attachment.isLoading = YES;
|
||||
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:attachment.sourceURL]];
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
[NSURLConnection sendAsynchronousRequest:request queue:self.thumbnailQueue completionHandler:^(NSURLResponse *response, NSData *responseData, NSError *err) {
|
||||
#pragma clang diagnostic pop
|
||||
attachment.isLoading = NO;
|
||||
if (responseData.length) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
@@ -873,7 +876,10 @@
|
||||
if (attachment.needsLoadingFromURL && !attachment.isLoading) {
|
||||
attachment.isLoading = YES;
|
||||
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:attachment.sourceURL]];
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
[NSURLConnection sendAsynchronousRequest:request queue:self.thumbnailQueue completionHandler:^(NSURLResponse *response, NSData *responseData, NSError *err) {
|
||||
#pragma clang diagnostic pop
|
||||
attachment.isLoading = NO;
|
||||
if (responseData.length) {
|
||||
[attachment replaceData:responseData];
|
||||
|
||||
@@ -921,7 +921,10 @@ NSString *const kBITFeedbackUpdateAttachmentThumbnail = @"BITFeedbackUpdateAttac
|
||||
[request setHTTPBody:postBody];
|
||||
}
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *responseData, NSError *err) {
|
||||
#pragma clang diagnostic pop
|
||||
_networkRequestInProgress = NO;
|
||||
|
||||
if (err) {
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#import "BITFeedbackManagerPrivate.h"
|
||||
|
||||
@interface BITFeedbackUserDataViewController () {
|
||||
UIStatusBarStyle _statusBarStyle;
|
||||
}
|
||||
|
||||
@property (nonatomic, weak) BITFeedbackManager *manager;
|
||||
@@ -74,13 +73,6 @@
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
_statusBarStyle = [[UIApplication sharedApplication] statusBarStyle];
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:(self.navigationController.navigationBar.barStyle == UIBarStyleDefault) ? UIStatusBarStyleDefault : UIStatusBarStyleLightContent];
|
||||
#else
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:(self.navigationController.navigationBar.barStyle == UIBarStyleDefault) ? UIStatusBarStyleDefault : UIStatusBarStyleBlackOpaque];
|
||||
#endif
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
|
||||
target:self
|
||||
@@ -101,12 +93,6 @@
|
||||
self.navigationItem.rightBarButtonItem.enabled = [self allRequiredFieldsEntered];
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:_statusBarStyle];
|
||||
}
|
||||
|
||||
#pragma mark - UIViewController Rotation
|
||||
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
|
||||
@@ -227,7 +213,7 @@
|
||||
|
||||
textField.backgroundColor = [UIColor whiteColor];
|
||||
textField.autocorrectionType = UITextAutocorrectionTypeNo;
|
||||
textField.textAlignment = kBITTextLabelAlignmentLeft;
|
||||
textField.textAlignment = NSTextAlignmentLeft;
|
||||
textField.delegate = self;
|
||||
textField.tag = indexPath.row;
|
||||
|
||||
|
||||
@@ -77,9 +77,12 @@
|
||||
_isExecuting = YES;
|
||||
[self didChangeValueForKey:@"isExecuting"];
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
_connection = [[NSURLConnection alloc] initWithRequest:_URLRequest
|
||||
delegate:self
|
||||
startImmediately:YES];
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
- (void) finish {
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
@implementation BITHockeyBaseViewController {
|
||||
BOOL _modal;
|
||||
UIStatusBarStyle _statusBarStyle;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,30 +81,6 @@
|
||||
} else {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:_statusBarStyle];
|
||||
}
|
||||
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
_statusBarStyle = [[UIApplication sharedApplication] statusBarStyle];
|
||||
if ([self.navigationController.navigationBar.tintColor isEqual:BIT_RGBCOLOR(25, 25, 25)]) {
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:(self.navigationController.navigationBar.barStyle == UIBarStyleDefault) ? UIStatusBarStyleDefault : UIStatusBarStyleLightContent];
|
||||
#else
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:(self.navigationController.navigationBar.barStyle == UIBarStyleDefault) ? UIStatusBarStyleDefault : UIStatusBarStyleBlackOpaque];
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
|
||||
if ([self.navigationController.navigationBar.tintColor isEqual:BIT_RGBCOLOR(25, 25, 25)]) {
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:_statusBarStyle];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -34,46 +34,52 @@
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 70000
|
||||
@interface NSData (BITHockeySDKiOS7)
|
||||
- (NSString *)base64Encoding;
|
||||
@end
|
||||
#endif
|
||||
|
||||
|
||||
#pragma mark NSString helpers
|
||||
|
||||
NSString *bit_URLEncodedString(NSString *inputString) {
|
||||
return CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
|
||||
(__bridge CFStringRef)inputString,
|
||||
NULL,
|
||||
CFSTR("!*'();:@&=+$,/?%#[]"),
|
||||
kCFStringEncodingUTF8)
|
||||
);
|
||||
// Requires iOS 7
|
||||
if ([inputString respondsToSelector:@selector(stringByAddingPercentEncodingWithAllowedCharacters:)]) {
|
||||
NSCharacterSet *allowedSet = [NSCharacterSet characterSetWithCharactersInString:@"!*'();:@&=+$,/?%#[]"];
|
||||
return [inputString stringByAddingPercentEncodingWithAllowedCharacters:allowedSet];
|
||||
} else {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
return CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
|
||||
(__bridge CFStringRef)inputString,
|
||||
NULL,
|
||||
CFSTR("!*'();:@&=+$,/?%#[]"),
|
||||
kCFStringEncodingUTF8)
|
||||
);
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
}
|
||||
|
||||
NSString *bit_URLDecodedString(NSString *inputString) {
|
||||
return CFBridgingRelease(CFURLCreateStringByReplacingPercentEscapesUsingEncoding(kCFAllocatorDefault,
|
||||
(__bridge CFStringRef)inputString,
|
||||
CFSTR(""),
|
||||
kCFStringEncodingUTF8)
|
||||
);
|
||||
// Requires iOS 7
|
||||
if ([inputString respondsToSelector:@selector(stringByRemovingPercentEncoding)]) {
|
||||
return [inputString stringByRemovingPercentEncoding];
|
||||
} else {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
return CFBridgingRelease(CFURLCreateStringByReplacingPercentEscapesUsingEncoding(kCFAllocatorDefault,
|
||||
(__bridge CFStringRef)inputString,
|
||||
CFSTR(""),
|
||||
kCFStringEncodingUTF8)
|
||||
);
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
}
|
||||
|
||||
NSString *bit_base64String(NSData * data, unsigned long length) {
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1
|
||||
SEL base64EncodingSelector = NSSelectorFromString(@"base64EncodedStringWithOptions:");
|
||||
if ([data respondsToSelector:base64EncodingSelector]) {
|
||||
return [data base64EncodedStringWithOptions:0];
|
||||
} else {
|
||||
#endif
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
return [data base64Encoding];
|
||||
#pragma clang diagnostic pop
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
NSString *bit_settingsDir(void) {
|
||||
|
||||
@@ -221,7 +221,6 @@
|
||||
CGSize constr = (CGSize){.height = self.frame.size.height, .width = BIT_MAX_WIDTH};
|
||||
CGSize newSize;
|
||||
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1
|
||||
if ([self.buttonData.label respondsToSelector:@selector(boundingRectWithSize:options:attributes:context:)]) {
|
||||
CGRect calculatedRect = [self.buttonData.label boundingRectWithSize:constr
|
||||
options:NSStringDrawingUsesFontLeading
|
||||
@@ -229,16 +228,13 @@
|
||||
context:nil];
|
||||
newSize = calculatedRect.size;
|
||||
} else {
|
||||
#endif
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
newSize = [self.buttonData.label sizeWithFont:self.titleLabel.font
|
||||
constrainedToSize:constr
|
||||
lineBreakMode:kBITLineBreakModeMiddleTruncation];
|
||||
lineBreakMode:NSLineBreakByTruncatingMiddle];
|
||||
#pragma clang diagnostic pop
|
||||
#if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1
|
||||
}
|
||||
#endif
|
||||
|
||||
CGFloat newWidth = newSize.width + (BIT_PADDING * 2);
|
||||
CGFloat newHeight = BIT_MIN_HEIGHT > newSize.height ? BIT_MIN_HEIGHT : newSize.height;
|
||||
|
||||
@@ -352,7 +352,10 @@
|
||||
[request setHTTPMethod:@"GET"];
|
||||
[request setValue:@"gzip" forHTTPHeaderField:@"Accept-Encoding"];
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *responseData, NSError *error){
|
||||
#pragma clang diagnostic pop
|
||||
self.checkInProgress = NO;
|
||||
|
||||
if (error) {
|
||||
|
||||
@@ -591,7 +591,7 @@ typedef NS_ENUM(NSInteger, BITUpdateAlertViewTag) {
|
||||
|
||||
UILabel *label = [[UILabel alloc] initWithFrame:frame];
|
||||
label.text = message;
|
||||
label.textAlignment = kBITTextLabelAlignmentCenter;
|
||||
label.textAlignment = NSTextAlignmentCenter;
|
||||
label.numberOfLines = 3;
|
||||
label.adjustsFontSizeToFitWidth = YES;
|
||||
label.backgroundColor = [UIColor clearColor];
|
||||
@@ -720,7 +720,10 @@ typedef NS_ENUM(NSInteger, BITUpdateAlertViewTag) {
|
||||
[request setValue:@"Hockey/iOS" forHTTPHeaderField:@"User-Agent"];
|
||||
[request setValue:@"gzip" forHTTPHeaderField:@"Accept-Encoding"];
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
self.urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
|
||||
#pragma clang diagnostic pop
|
||||
if (!_urlConnection) {
|
||||
self.checkInProgress = NO;
|
||||
[self reportError:[NSError errorWithDomain:kBITUpdateErrorDomain
|
||||
|
||||
@@ -79,21 +79,6 @@ NSString *BITHockeyMD5(NSString *str);
|
||||
#define __IPHONE_8_0 80000
|
||||
#endif
|
||||
|
||||
#ifdef __IPHONE_6_0
|
||||
|
||||
#define kBITTextLabelAlignmentCenter NSTextAlignmentCenter
|
||||
#define kBITTextLabelAlignmentLeft NSTextAlignmentLeft
|
||||
#define kBITTextLabelAlignmentRight NSTextAlignmentRight
|
||||
#define kBITLineBreakModeMiddleTruncation NSLineBreakByTruncatingMiddle
|
||||
|
||||
#else
|
||||
|
||||
#define kBITTextLabelAlignmentCenter UITextAlignmentCenter
|
||||
#define kBITTextLabelAlignmentLeft UITextAlignmentLeft
|
||||
#define kBITTextLabelAlignmentRight UITextAlignmentRight
|
||||
#define kBITLineBreakModeMiddleTruncation UILineBreakModeMiddleTruncation
|
||||
|
||||
#endif /* __IPHONE_6_0 */
|
||||
|
||||
#if __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_6_1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user