Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Commit

Permalink
Merge branch 'develop' into remove-nsurlconnection
Browse files Browse the repository at this point in the history
# Conflicts:
#	Support/HockeySDKTests/BITAuthenticatorTests.m
#	Support/HockeySDKTests/BITHockeyAppClientTests.m
#	Support/HockeySDKTests/BITSenderTests.m
  • Loading branch information
Murat Baysangurov committed Aug 3, 2017
2 parents f265ebb + 377ecab commit 1b71957
Show file tree
Hide file tree
Showing 25 changed files with 431 additions and 387 deletions.
4 changes: 3 additions & 1 deletion Classes/BITBlurImageAnnotation.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ - (void)layoutSubviews {
[super layoutSubviews];

[CATransaction begin];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wcast-qual"
[CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions];
#pragma clang diagnostic pop
self.imageLayer.frame = self.imageFrame;
self.imageLayer.masksToBounds = YES;

Expand Down
6 changes: 6 additions & 0 deletions Classes/BITCategoryContainer.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ - (NSData *)bit_gzippedDataWithCompressionLevel:(float)level
stream.zfree = Z_NULL;
stream.opaque = Z_NULL;
stream.avail_in = (uint)[self length];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wcast-qual"
stream.next_in = (Bytef *)[self bytes];
#pragma clang diagnostic pop
stream.total_out = 0;
stream.avail_out = 0;

Expand Down Expand Up @@ -102,7 +105,10 @@ - (NSData *)bit_gunzippedData
stream.zalloc = Z_NULL;
stream.zfree = Z_NULL;
stream.avail_in = (uint)[self length];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wcast-qual"
stream.next_in = (Bytef *)[self bytes];
#pragma clang diagnostic pop
stream.total_out = 0;
stream.avail_out = 0;

Expand Down
10 changes: 6 additions & 4 deletions Classes/BITFeedbackActivity.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ @interface BITFeedbackActivity()

@implementation BITFeedbackActivity

@synthesize activityViewController = _activityViewController;

#pragma mark - NSObject

- (instancetype)init {
Expand Down Expand Up @@ -123,19 +125,19 @@ - (void)prepareWithActivityItems:(NSArray *)activityItems {
}

- (UIViewController *)activityViewController {
if (!self.activityViewController) {
if (!_activityViewController) {
// TODO: return compose controller with activity content added
BITFeedbackManager *manager = [BITHockeyManager sharedHockeyManager].feedbackManager;

BITFeedbackComposeViewController *composeViewController = [manager feedbackComposeViewController];
composeViewController.delegate = self;
[composeViewController prepareWithItems:self.items];

self.activityViewController = [manager customNavigationControllerWithRootViewController:composeViewController
_activityViewController = [manager customNavigationControllerWithRootViewController:composeViewController
presentationStyle:UIModalPresentationFormSheet];
self.activityViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
_activityViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
}
return self.activityViewController;
return _activityViewController;
}

- (void)feedbackComposeViewController:(BITFeedbackComposeViewController *) __unused composeViewController didFinishWithResult:(BITFeedbackComposeResult)composeResult {
Expand Down
4 changes: 3 additions & 1 deletion Classes/BITFeedbackComposeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -441,12 +441,14 @@ - (UIInterfaceOrientationMask)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskAll;
}

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation) __unused fromInterfaceOrientation {
[self removeAttachmentScrollView];

[self refreshAttachmentScrollview];
}

#pragma clang diagnostic pop

#pragma mark - Private methods

Expand Down
3 changes: 3 additions & 0 deletions Classes/BITFeedbackListViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ - (void)feedbackComposeViewController:(BITFeedbackComposeViewController *)compos

#pragma mark - UIViewController Rotation

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
self.numberOfSectionsBeforeRotation = [self numberOfSectionsInTableView:self.tableView];
self.numberOfMessagesBeforeRotation = [self.manager numberOfMessages];
Expand All @@ -425,6 +427,7 @@ - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrie

[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
}
#pragma clang diagnostic pop

- (UIInterfaceOrientationMask)supportedInterfaceOrientations{
return UIInterfaceOrientationMaskAll;
Expand Down
25 changes: 12 additions & 13 deletions Classes/BITHockeyHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ + (BOOL)isPhotoAccessPossible {

@end

#if __IPHONE_OS_VERSION_MAX_ALLOWED < 70000
@interface NSData (BITHockeySDKiOS7)
- (NSString *)base64Encoding;
@end
#endif

typedef struct {
uint8_t info_version;
const char bit_version[16];
Expand Down Expand Up @@ -165,13 +159,18 @@ void bit_fixBackupAttributeForURL(NSURL *directoryURL) {
}

if (directoryURL) {
NSError *getResourceError = nil;
NSNumber *appSupportDirExcludedValue;

if ([directoryURL getResourceValue:&appSupportDirExcludedValue forKey:NSURLIsExcludedFromBackupKey error:&getResourceError] && appSupportDirExcludedValue) {
NSError *setResourceError = nil;
[directoryURL setResourceValue:@NO forKey:NSURLIsExcludedFromBackupKey error:&setResourceError];
}
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSError *getResourceError = nil;
NSNumber *appSupportDirExcludedValue;
if ([directoryURL getResourceValue:&appSupportDirExcludedValue forKey:NSURLIsExcludedFromBackupKey error:&getResourceError] && appSupportDirExcludedValue) {
NSError *setResourceError = nil;
if(![directoryURL setResourceValue:@NO forKey:NSURLIsExcludedFromBackupKey error:&setResourceError]) {
BITHockeyLogError(@"ERROR: Error while setting resource value: %@", setResourceError.localizedDescription);
}
} else {
BITHockeyLogError(@"ERROR: Error while retrieving resource value: %@", getResourceError.localizedDescription);
}
});
}
}

Expand Down
4 changes: 2 additions & 2 deletions Classes/BITHockeyManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -558,9 +558,9 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N

- (BITHockeyAppClient *)hockeyAppClient {
if (!_hockeyAppClient) {
self.hockeyAppClient = [[BITHockeyAppClient alloc] initWithBaseURL:[NSURL URLWithString:self.serverURL]];
_hockeyAppClient = [[BITHockeyAppClient alloc] initWithBaseURL:[NSURL URLWithString:self.serverURL]];
}
return self.hockeyAppClient;
return _hockeyAppClient;
}

- (NSString *)integrationFlowTimeString {
Expand Down
3 changes: 3 additions & 0 deletions Classes/BITImageAnnotationViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ - (void)pinched:(UIPinchGestureRecognizer *)gestureRecognizer {
}

- (void)tapped:(UIGestureRecognizer *) __unused tapRecognizer {

// TODO: remove pre-iOS 8 code.

// This toggles the nav and status bar. Since iOS7 and pre-iOS7 behave weirdly different,
// this might look rather hacky, but hiding the navbar under iOS6 leads to some ugly
// animation effect which is avoided by simply hiding the navbar setting it's alpha to 0. // moritzh
Expand Down
6 changes: 6 additions & 0 deletions Classes/BITKeychainUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ + (NSString *) getPasswordForUsername: (NSString *) username andServiceName: (NS
// version of this code (which set the password as a generic attribute instead of password data).

NSMutableDictionary *attributeQuery = [query mutableCopy];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wcast-qual"
[attributeQuery setObject: (id) kCFBooleanTrue forKey:(__bridge_transfer id) kSecReturnAttributes];
#pragma clang diagnostic pop
CFTypeRef attrResult = NULL;
OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef) attributeQuery, &attrResult);
// NSDictionary *attributeResult = (__bridge_transfer NSDictionary *)attrResult;
Expand All @@ -78,7 +81,10 @@ + (NSString *) getPasswordForUsername: (NSString *) username andServiceName: (NS
// We have an existing item, now query for the password data associated with it.

NSMutableDictionary *passwordQuery = [query mutableCopy];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wcast-qual"
[passwordQuery setObject: (id) kCFBooleanTrue forKey: (__bridge_transfer id) kSecReturnData];
#pragma clang diagnostic pop
CFTypeRef resData = NULL;
status = SecItemCopyMatching((__bridge CFDictionaryRef) passwordQuery, (CFTypeRef *) &resData);
NSData *resultData = (__bridge_transfer NSData *)resData;
Expand Down
3 changes: 3 additions & 0 deletions Classes/BITStoreButton.m
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@ - (void)setButtonData:(BITStoreButtonData *)aButtonData {

- (void)setButtonData:(BITStoreButtonData *)aButtonData animated:(BOOL)animated {
if (self.buttonData != aButtonData) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdirect-ivar-access"
_buttonData = aButtonData;
#pragma clang diagnostic pop
}

[self updateButtonAnimated:animated];
Expand Down
8 changes: 7 additions & 1 deletion Classes/BITUpdateViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -477,11 +477,13 @@ - (UITableViewCell *)tableView:(UITableView *) __unused tableView cellForRowAtIn

#pragma mark - Rotation

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation) __unused interfaceOrientation duration:(NSTimeInterval) __unused duration {
// update all cells
[self.cells makeObjectsPerformSelector:@selector(addWebView)];
}

#pragma clang diagnostic pop

#pragma mark - PSAppStoreHeaderDelegate

Expand All @@ -490,7 +492,11 @@ - (void)setAppStoreButtonState:(AppStoreButtonState)anAppStoreButtonState {
}

- (void)setAppStoreButtonState:(AppStoreButtonState)anAppStoreButtonState animated:(BOOL)animated {

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdirect-ivar-access"
_appStoreButtonState = anAppStoreButtonState;
#pragma clang diagnostic pop

switch (anAppStoreButtonState) {
case AppStoreButtonStateOffline:
Expand Down
2 changes: 1 addition & 1 deletion HockeySDK-Source.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Pod::Spec.new do |s|
s.author = { 'Microsoft' => 'support@hockeyapp.net' }
s.source = { :git => 'https://github.com/bitstadium/HockeySDK-iOS.git', :tag => s.version.to_s }

s.platform = :ios, '7.0'
s.platform = :ios, '8.0'
s.source_files = 'Classes'
s.requires_arc = true

Expand Down
2 changes: 1 addition & 1 deletion HockeySDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Pod::Spec.new do |s|
s.license = { :type => 'MIT', :file => 'HockeySDK-iOS/LICENSE' }
s.author = { 'Microsoft' => 'support@hockeyapp.net' }

s.platform = :ios, '7.0'
s.platform = :ios, '8.0'
s.requires_arc = true

s.preserve_path = 'HockeySDK-iOS/README.md'
Expand Down
33 changes: 18 additions & 15 deletions Support/HockeySDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@
6EA5DEA61CC05E7600D44206 /* live_report_xamarin.plcrash in Resources */ = {isa = PBXBuildFile; fileRef = 6EA5DEA41CC05E7600D44206 /* live_report_xamarin.plcrash */; };
6EA5DEAE1CC0670000D44206 /* log_report_xamarin in Resources */ = {isa = PBXBuildFile; fileRef = 6EA5DEAD1CC0670000D44206 /* log_report_xamarin */; };
6EA5DEAF1CC0670000D44206 /* log_report_xamarin in Resources */ = {isa = PBXBuildFile; fileRef = 6EA5DEAD1CC0670000D44206 /* log_report_xamarin */; };
8007E2A51F29FCAB001649AE /* HockeySDKTest.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 8007E2A41F29FCAB001649AE /* HockeySDKTest.xcconfig */; };
802C45B31BD9629B000D043C /* HockeySDKNullability.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E3A260E1B2B207900D59683 /* HockeySDKNullability.h */; settings = {ATTRIBUTES = (Public, ); }; };
802C45B41BD9629C000D043C /* HockeySDKNullability.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E3A260E1B2B207900D59683 /* HockeySDKNullability.h */; settings = {ATTRIBUTES = (Public, ); }; };
8034E6271BA31AD600D83A30 /* BITTelemetryContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 8034E61E1BA31AD500D83A30 /* BITTelemetryContext.h */; };
Expand Down Expand Up @@ -630,6 +631,7 @@
628B7B9B7E7741C3D85B1159 /* BITHockeyLoggerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITHockeyLoggerTests.m; sourceTree = "<group>"; };
6EA5DEA41CC05E7600D44206 /* live_report_xamarin.plcrash */ = {isa = PBXFileReference; lastKnownFileType = file; path = live_report_xamarin.plcrash; sourceTree = "<group>"; };
6EA5DEAD1CC0670000D44206 /* log_report_xamarin */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = log_report_xamarin; sourceTree = "<group>"; };
8007E2A41F29FCAB001649AE /* HockeySDKTest.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = HockeySDKTest.xcconfig; sourceTree = "<group>"; };
8034E61E1BA31AD500D83A30 /* BITTelemetryContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITTelemetryContext.h; sourceTree = "<group>"; };
8034E61F1BA31AD500D83A30 /* BITTelemetryContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITTelemetryContext.m; sourceTree = "<group>"; };
8034E6201BA31AD500D83A30 /* BITTelemetryData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITTelemetryData.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -926,6 +928,7 @@
1E85C5A11B35BD7000CE2C0D /* module_crashonly.modulemap */,
1E91D84619B924E600E9616D /* module_default.modulemap */,
1E754DC61621BC170070AB92 /* HockeySDKBase.xcconfig */,
8007E2A41F29FCAB001649AE /* HockeySDKTest.xcconfig */,
B29855421D85EB5D007FF452 /* allfeatures.xcconfig */,
1E7DE39619D44DC6009AB8E5 /* crashonly.xcconfig */,
1E27E60A1B74F01400192AE2 /* crashonlyextensions.xcconfig */,
Expand Down Expand Up @@ -1719,6 +1722,7 @@
1E70A23217F2F982001BB32D /* live_report_empty.plcrash in Resources */,
1E494AED19491943001EFF74 /* AppIcon@2x.png in Resources */,
8085BB8A1CBF216E0023FD9B /* Icon.png in Resources */,
8007E2A51F29FCAB001649AE /* HockeySDKTest.xcconfig in Resources */,
1EA1170916F53E3A001C015C /* StoreBundleIdentifierKnown.json in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -2092,9 +2096,6 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = "../Resources/HockeySDK-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
"IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 7.0;
MACOSX_DEPLOYMENT_TARGET = 10.5;
RUN_CLANG_STATIC_ANALYZER = YES;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = NO;
Expand Down Expand Up @@ -2434,6 +2435,7 @@
};
1E5A45A016F0DFC200B55C04 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8007E2A41F29FCAB001649AE /* HockeySDKTest.xcconfig */;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -2590,9 +2592,9 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = "../Resources/HockeySDK-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
"IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 7.0;
MACOSX_DEPLOYMENT_TARGET = 10.5;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
"IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.9;
RUN_CLANG_STATIC_ANALYZER = YES;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = NO;
Expand Down Expand Up @@ -2884,6 +2886,7 @@
};
1EB617581B0A30480035A986 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8007E2A41F29FCAB001649AE /* HockeySDKTest.xcconfig */;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -3121,9 +3124,9 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = "../Resources/HockeySDK-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
"IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 7.0;
MACOSX_DEPLOYMENT_TARGET = 10.5;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
"IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.9;
RUN_CLANG_STATIC_ANALYZER = YES;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = NO;
Expand Down Expand Up @@ -3406,9 +3409,9 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = "../Resources/HockeySDK-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
"IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 7.0;
MACOSX_DEPLOYMENT_TARGET = 10.5;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
"IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.9;
ONLY_ACTIVE_ARCH = YES;
RUN_CLANG_STATIC_ANALYZER = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -3450,9 +3453,9 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = "../Resources/HockeySDK-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
"IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 7.0;
MACOSX_DEPLOYMENT_TARGET = 10.5;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
"IPHONEOS_DEPLOYMENT_TARGET[arch=arm64]" = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.9;
RUN_CLANG_STATIC_ANALYZER = YES;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = NO;
Expand Down
3 changes: 3 additions & 0 deletions Support/HockeySDKTest.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "HockeySDKBase.xcconfig"

WARNING_CFLAGS = -Wno-partial-availability
Loading

0 comments on commit 1b71957

Please sign in to comment.