diff --git a/OneDriveSDK/OneDriveCoreSDK/Core/ODCollectionRequest.h b/OneDriveSDK/OneDriveCoreSDK/Core/ODCollectionRequest.h index dd93416..5f87341 100644 --- a/OneDriveSDK/OneDriveCoreSDK/Core/ODCollectionRequest.h +++ b/OneDriveSDK/OneDriveCoreSDK/Core/ODCollectionRequest.h @@ -21,6 +21,9 @@ @class ODCollection; #import "ODRequest.h" +#import "ODItem.h" + +typedef void (^ODItemCompletionHandler)(ODItem *response, NSError *error); /** An `ODRequest` that is used to make collection requests from the service. diff --git a/OneDriveSDK/OneDriveCoreSDK/Core/ODURLSEssion/ODURLSessionDataTask.m b/OneDriveSDK/OneDriveCoreSDK/Core/ODURLSEssion/ODURLSessionDataTask.m index d6c7ba9..4645ab3 100644 --- a/OneDriveSDK/OneDriveCoreSDK/Core/ODURLSEssion/ODURLSessionDataTask.m +++ b/OneDriveSDK/OneDriveCoreSDK/Core/ODURLSEssion/ODURLSessionDataTask.m @@ -60,8 +60,8 @@ - (NSURLSessionDataTask *)taskWithRequest:(NSMutableURLRequest *)request } return [self.client.httpProvider dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error){ - - _state = ODTaskCompleted; + + self->_state = ODTaskCompleted; NSError *resolvedError = nil; NSDictionary *resolvedResponse = nil; if (!error && response){ diff --git a/OneDriveSDK/OneDriveCoreSDK/Core/ODURLSEssion/ODURLSessionDownloadTask.m b/OneDriveSDK/OneDriveCoreSDK/Core/ODURLSEssion/ODURLSessionDownloadTask.m index 99af7a6..b50079c 100644 --- a/OneDriveSDK/OneDriveCoreSDK/Core/ODURLSEssion/ODURLSessionDownloadTask.m +++ b/OneDriveSDK/OneDriveCoreSDK/Core/ODURLSEssion/ODURLSessionDownloadTask.m @@ -57,7 +57,7 @@ - (NSURLSessionDownloadTask *)taskWithRequest:(NSMutableURLRequest *)request [self.client.logger logWithLevel:ODLogVerbose message:@"Creating download task with request : %@", request]; NSProgress *progress = self.progress; return [self.client.httpProvider downloadTaskWithRequest:request progress:&progress completionHandler:^(NSURL *location, NSURLResponse *response, NSError *error){ - _state = ODTaskCompleted; + self->_state = ODTaskCompleted; NSInteger statusCode = ((NSHTTPURLResponse *)response).statusCode; [self.client.logger logWithLevel:ODLogVerbose message:@"Received download response with http status code %ld", statusCode]; if (!error && statusCode != ODOK && statusCode != ODPartialContent) { diff --git a/OneDriveSDK/OneDriveCoreSDK/Core/ODURLSEssion/ODURLSessionTask.m b/OneDriveSDK/OneDriveCoreSDK/Core/ODURLSEssion/ODURLSessionTask.m index ba91afb..08ea584 100644 --- a/OneDriveSDK/OneDriveCoreSDK/Core/ODURLSEssion/ODURLSessionTask.m +++ b/OneDriveSDK/OneDriveCoreSDK/Core/ODURLSEssion/ODURLSessionTask.m @@ -53,14 +53,14 @@ - (void)execute; [self.client.authProvider appendAuthHeaders:self.request completion:^(NSMutableURLRequest *request, NSError *error){ if (self.state != ODTaskCanceled){ if (!error){ - _state = ODTaskExecuting; - _innerTask = [self taskWithRequest:request]; + self->_state = ODTaskExecuting; + self->_innerTask = [self taskWithRequest:request]; [self.client.logger logWithLevel:ODLogInfo message:@"Created NSURLSessionTask"]; - [self.client.logger logWithLevel:ODLogVerbose message:@"Task Id : %ld", _innerTask.taskIdentifier]; - [_innerTask resume]; + [self.client.logger logWithLevel:ODLogVerbose message:@"Task Id : %ld", self->_innerTask.taskIdentifier]; + [self->_innerTask resume]; } else{ - _state = ODTaskAuthFailed; + self->_state = ODTaskAuthFailed; [self.client.logger logWithLevel:ODLogError message:@"Authentication Failed with error :%@", error]; [self authenticationFailedWithError:error]; } diff --git a/OneDriveSDK/OneDriveCoreSDK/requests/ODChildrenCollectionRequest.h b/OneDriveSDK/OneDriveCoreSDK/requests/ODChildrenCollectionRequest.h index 5fff88e..f496d6d 100755 --- a/OneDriveSDK/OneDriveCoreSDK/requests/ODChildrenCollectionRequest.h +++ b/OneDriveSDK/OneDriveCoreSDK/requests/ODChildrenCollectionRequest.h @@ -32,8 +32,6 @@ #import "ODModels.h" #import "ODCollectionRequest.h" -typedef void (^ODItemCompletionHandler)(ODItem *response, NSError *error); - typedef void (^ODChildrenCompletionHandler)(ODCollection *response, ODChildrenCollectionRequest *nextRequest, NSError *error); @interface ODChildrenCollectionRequest : ODCollectionRequest diff --git a/OneDriveSDK/OneDriveCoreSDK/requests/ODItemsCollectionRequest.h b/OneDriveSDK/OneDriveCoreSDK/requests/ODItemsCollectionRequest.h index c05392e..603d64c 100755 --- a/OneDriveSDK/OneDriveCoreSDK/requests/ODItemsCollectionRequest.h +++ b/OneDriveSDK/OneDriveCoreSDK/requests/ODItemsCollectionRequest.h @@ -32,8 +32,6 @@ #import "ODModels.h" #import "ODCollectionRequest.h" -typedef void (^ODItemCompletionHandler)(ODItem *response, NSError *error); - typedef void (^ODItemsCompletionHandler)(ODCollection *response, ODItemsCollectionRequest *nextRequest, NSError *error); @interface ODItemsCollectionRequest : ODCollectionRequest diff --git a/OneDriveSDK/OneDriveCoreSDK/requests/ODSharedCollectionRequest.h b/OneDriveSDK/OneDriveCoreSDK/requests/ODSharedCollectionRequest.h index d0727fd..424c744 100755 --- a/OneDriveSDK/OneDriveCoreSDK/requests/ODSharedCollectionRequest.h +++ b/OneDriveSDK/OneDriveCoreSDK/requests/ODSharedCollectionRequest.h @@ -32,8 +32,6 @@ #import "ODModels.h" #import "ODCollectionRequest.h" -typedef void (^ODItemCompletionHandler)(ODItem *response, NSError *error); - typedef void (^ODSharedCompletionHandler)(ODCollection *response, ODSharedCollectionRequest *nextRequest, NSError *error); @interface ODSharedCollectionRequest : ODCollectionRequest diff --git a/OneDriveSDK/OneDriveCoreSDK/requests/ODSpecialCollectionRequest.h b/OneDriveSDK/OneDriveCoreSDK/requests/ODSpecialCollectionRequest.h index 1e17653..a4322a6 100755 --- a/OneDriveSDK/OneDriveCoreSDK/requests/ODSpecialCollectionRequest.h +++ b/OneDriveSDK/OneDriveCoreSDK/requests/ODSpecialCollectionRequest.h @@ -32,8 +32,6 @@ #import "ODModels.h" #import "ODCollectionRequest.h" -typedef void (^ODItemCompletionHandler)(ODItem *response, NSError *error); - typedef void (^ODSpecialCompletionHandler)(ODCollection *response, ODSpecialCollectionRequest *nextRequest, NSError *error); @interface ODSpecialCollectionRequest : ODCollectionRequest diff --git a/OneDriveSDK/OneDriveCoreSDK/requests/ODVersionsCollectionRequest.h b/OneDriveSDK/OneDriveCoreSDK/requests/ODVersionsCollectionRequest.h index da4596d..8c2d87f 100755 --- a/OneDriveSDK/OneDriveCoreSDK/requests/ODVersionsCollectionRequest.h +++ b/OneDriveSDK/OneDriveCoreSDK/requests/ODVersionsCollectionRequest.h @@ -32,8 +32,6 @@ #import "ODModels.h" #import "ODCollectionRequest.h" -typedef void (^ODItemCompletionHandler)(ODItem *response, NSError *error); - typedef void (^ODVersionsCompletionHandler)(ODCollection *response, ODVersionsCollectionRequest *nextRequest, NSError *error); @interface ODVersionsCollectionRequest : ODCollectionRequest diff --git a/OneDriveSDK/OneDriveSDK.xcodeproj/project.pbxproj b/OneDriveSDK/OneDriveSDK.xcodeproj/project.pbxproj index db581c3..4dbb0c7 100644 --- a/OneDriveSDK/OneDriveSDK.xcodeproj/project.pbxproj +++ b/OneDriveSDK/OneDriveSDK.xcodeproj/project.pbxproj @@ -880,7 +880,7 @@ 1003AAC41B0BF3DF0039017A /* ODURLSessionProgressTask.h */, 1003AAC51B0BF3DF0039017A /* ODURLSessionProgressTask.m */, ); - path = ODURLSession; + path = ODURLSEssion; sourceTree = ""; }; 10B4D1691AF821C40083D86C /* Options */ = { @@ -1353,7 +1353,6 @@ 10B4D32A1AF827D80083D86C /* Frameworks */, 10B4D32B1AF827D80083D86C /* Resources */, 6571E6AB65E86A4F7FB685F3 /* [CP] Copy Pods Resources */, - C85DDFB8E2937AD6EFB526DE /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -1371,7 +1370,7 @@ 10B4D1171AF8215D0083D86C /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0900; + LastUpgradeCheck = 0930; ORGANIZATIONNAME = Microsoft; TargetAttributes = { 10B4D11F1AF8215D0083D86C = { @@ -1493,7 +1492,8 @@ ); name = "[CP] Copy Pods Resources"; outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ADAL_iPad_Storyboard.storyboardc", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ADAL_iPhone_Storyboard.storyboardc", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -1512,7 +1512,8 @@ ); name = "[CP] Copy Pods Resources"; outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ADAL_iPad_Storyboard.storyboardc", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ADAL_iPhone_Storyboard.storyboardc", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -1537,21 +1538,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - C85DDFB8E2937AD6EFB526DE /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-OneDriveSDKTests/Pods-OneDriveSDKTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -1736,12 +1722,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -1791,12 +1779,14 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; diff --git a/README.md b/README.md index 545ad3d..a5759ed 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ For a complete sample application, see [OneDriveAPIExplorer](Examples/iOSExplore For a more detailed documentation see: * [Overview](docs/overview.md) -* [Auth] (docs/auth.md) +* [Auth](docs/auth.md) * [Items](docs/items.md) * [Collections](docs/collections.md) * [Errors](docs/errors.md)