From bbbd9c423c7668e05b05bf3d01fa0620c673bf9e Mon Sep 17 00:00:00 2001 From: "Benjamin Scholtysik (Reimold)" Date: Mon, 19 Jun 2017 14:53:40 -0700 Subject: [PATCH 1/7] Bump version to 0.10.1 --- Documentation/MobileCenter/.jazzy.yaml | 2 +- Documentation/MobileCenterAnalytics/.jazzy.yaml | 2 +- Documentation/MobileCenterCrashes/.jazzy.yaml | 2 +- Documentation/MobileCenterDistribute/.jazzy.yaml | 2 +- Documentation/MobileCenterPush/.jazzy.yaml | 2 +- Global.xcconfig | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/MobileCenter/.jazzy.yaml b/Documentation/MobileCenter/.jazzy.yaml index 80bbcd23ee..e6b204c3a6 100644 --- a/Documentation/MobileCenter/.jazzy.yaml +++ b/Documentation/MobileCenter/.jazzy.yaml @@ -5,7 +5,7 @@ sdk: iphonesimulator theme: ../Themes/apple module: MobileCenter -module_version: 0.10.0 +module_version: 0.10.1 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/MobileCenterAnalytics/.jazzy.yaml b/Documentation/MobileCenterAnalytics/.jazzy.yaml index 25ff8b02f2..3e29928573 100644 --- a/Documentation/MobileCenterAnalytics/.jazzy.yaml +++ b/Documentation/MobileCenterAnalytics/.jazzy.yaml @@ -5,7 +5,7 @@ sdk: iphonesimulator theme: ../Themes/apple module: MobileCenterAnalytics -module_version: 0.10.0 +module_version: 0.10.1 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/MobileCenterCrashes/.jazzy.yaml b/Documentation/MobileCenterCrashes/.jazzy.yaml index da47966b37..9d5f484cd8 100644 --- a/Documentation/MobileCenterCrashes/.jazzy.yaml +++ b/Documentation/MobileCenterCrashes/.jazzy.yaml @@ -5,7 +5,7 @@ sdk: iphonesimulator theme: ../Themes/apple module: Crashes -module_version: 0.10.0 +module_version: 0.10.1 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/MobileCenterDistribute/.jazzy.yaml b/Documentation/MobileCenterDistribute/.jazzy.yaml index e526a023f5..ed1a6cafc2 100644 --- a/Documentation/MobileCenterDistribute/.jazzy.yaml +++ b/Documentation/MobileCenterDistribute/.jazzy.yaml @@ -5,7 +5,7 @@ sdk: iphonesimulator theme: ../Themes/apple module: Distribute -module_version: 0.10.0 +module_version: 0.10.1 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/MobileCenterPush/.jazzy.yaml b/Documentation/MobileCenterPush/.jazzy.yaml index 12f4ec4952..aec9ad4f87 100644 --- a/Documentation/MobileCenterPush/.jazzy.yaml +++ b/Documentation/MobileCenterPush/.jazzy.yaml @@ -5,7 +5,7 @@ sdk: iphonesimulator theme: ../Themes/apple module: MobileCenterPush -module_version: 0.10.0 +module_version: 0.10.1 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Global.xcconfig b/Global.xcconfig index a422e701e5..26948d097b 100644 --- a/Global.xcconfig +++ b/Global.xcconfig @@ -1,5 +1,5 @@ BUILD_NUMBER = 1 -VERSION_STRING = 0.10.0 +VERSION_STRING = 0.10.1 SDK_NAME = mobilecenter.ios From 07289329d9cced475ea905024e24b55ae8ecd854 Mon Sep 17 00:00:00 2001 From: "Benjamin Scholtysik (Reimold)" Date: Mon, 19 Jun 2017 15:15:57 -0700 Subject: [PATCH 2/7] Fix validation of error attachment. --- .../MobileCenterCrashes/Model/MSErrorAttachmentLog.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MobileCenterCrashes/MobileCenterCrashes/Model/MSErrorAttachmentLog.m b/MobileCenterCrashes/MobileCenterCrashes/Model/MSErrorAttachmentLog.m index 4af78e0331..da53e662d1 100755 --- a/MobileCenterCrashes/MobileCenterCrashes/Model/MSErrorAttachmentLog.m +++ b/MobileCenterCrashes/MobileCenterCrashes/Model/MSErrorAttachmentLog.m @@ -84,7 +84,7 @@ - (BOOL)isEqual:(id)object { } - (BOOL)isValid { - return [super isValid] && self.errorId && self.attachmentId && self.data && self.contentType; + return self.errorId && self.attachmentId && self.data && self.contentType; } #pragma mark - NSCoding From 73bc6f01c2f404390f34c5ba971ac360fb4752c4 Mon Sep 17 00:00:00 2001 From: "Benjamin Scholtysik (Reimold)" Date: Mon, 19 Jun 2017 15:42:49 -0700 Subject: [PATCH 3/7] Revert "Fix validation of error attachment." and check properties directly This reverts commit 07289329d9cced475ea905024e24b55ae8ecd854. --- MobileCenterCrashes/MobileCenterCrashes/MSCrashes.mm | 11 ++++++++++- .../MobileCenterCrashes/Model/MSErrorAttachmentLog.m | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/MobileCenterCrashes/MobileCenterCrashes/MSCrashes.mm b/MobileCenterCrashes/MobileCenterCrashes/MSCrashes.mm index fb528af1b9..4e9ed77f72 100644 --- a/MobileCenterCrashes/MobileCenterCrashes/MSCrashes.mm +++ b/MobileCenterCrashes/MobileCenterCrashes/MSCrashes.mm @@ -201,7 +201,7 @@ + (void)notifyWithUserConfirmation:(MSUserConfirmation)userConfirmation { unsigned int totalProcessedAttachments = 0; for (MSErrorAttachmentLog *attachment in attachments) { attachment.errorId = log.errorId; - if(![attachment isValid]) { + if(![self validPropertiesForAttachment:attachment]) { MSLogError([MSCrashes logTag], @"Not all required fields are present in MSErrorAttachmentLog."); continue; } @@ -953,4 +953,13 @@ - (void)setCrashFiles:(NSMutableArray *)crashFiles { _crashFiles = [[NSMutableArray alloc] initWithArray:crashFiles]; } ++ (BOOL)validPropertiesForAttachment:(MSErrorAttachmentLog *)attachment { + BOOL errorIdValid = attachment.errorId && ([attachment.errorId length] > 0); + BOOL attachmentIdValid = attachment.attachmentId && ([attachment.attachmentId length] > 0); + BOOL attachmentDataValid = attachment.data && ([attachment.data length] > 0); + BOOL contentTypeValid = attachment.contentType && ([attachment.contentType length] > 0); + + return errorIdValid && attachmentIdValid && attachmentDataValid && contentTypeValid; +} + @end diff --git a/MobileCenterCrashes/MobileCenterCrashes/Model/MSErrorAttachmentLog.m b/MobileCenterCrashes/MobileCenterCrashes/Model/MSErrorAttachmentLog.m index da53e662d1..4af78e0331 100755 --- a/MobileCenterCrashes/MobileCenterCrashes/Model/MSErrorAttachmentLog.m +++ b/MobileCenterCrashes/MobileCenterCrashes/Model/MSErrorAttachmentLog.m @@ -84,7 +84,7 @@ - (BOOL)isEqual:(id)object { } - (BOOL)isValid { - return self.errorId && self.attachmentId && self.data && self.contentType; + return [super isValid] && self.errorId && self.attachmentId && self.data && self.contentType; } #pragma mark - NSCoding From e60c5896ca978cbd3a96652815597a84a8b63918 Mon Sep 17 00:00:00 2001 From: "Benjamin Scholtysik (Reimold)" Date: Mon, 19 Jun 2017 15:57:09 -0700 Subject: [PATCH 4/7] Change method name to match similar methods in other classes. --- MobileCenterCrashes/MobileCenterCrashes/MSCrashes.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MobileCenterCrashes/MobileCenterCrashes/MSCrashes.mm b/MobileCenterCrashes/MobileCenterCrashes/MSCrashes.mm index 4e9ed77f72..14621418fa 100644 --- a/MobileCenterCrashes/MobileCenterCrashes/MSCrashes.mm +++ b/MobileCenterCrashes/MobileCenterCrashes/MSCrashes.mm @@ -201,7 +201,7 @@ + (void)notifyWithUserConfirmation:(MSUserConfirmation)userConfirmation { unsigned int totalProcessedAttachments = 0; for (MSErrorAttachmentLog *attachment in attachments) { attachment.errorId = log.errorId; - if(![self validPropertiesForAttachment:attachment]) { + if(![self validatePropertiesForAttachment:attachment]) { MSLogError([MSCrashes logTag], @"Not all required fields are present in MSErrorAttachmentLog."); continue; } @@ -953,7 +953,7 @@ - (void)setCrashFiles:(NSMutableArray *)crashFiles { _crashFiles = [[NSMutableArray alloc] initWithArray:crashFiles]; } -+ (BOOL)validPropertiesForAttachment:(MSErrorAttachmentLog *)attachment { ++ (BOOL)validatePropertiesForAttachment:(MSErrorAttachmentLog *)attachment { BOOL errorIdValid = attachment.errorId && ([attachment.errorId length] > 0); BOOL attachmentIdValid = attachment.attachmentId && ([attachment.attachmentId length] > 0); BOOL attachmentDataValid = attachment.data && ([attachment.data length] > 0); From 4a7beebb1d1aeb65f4ebbd3151161779a5f7afd2 Mon Sep 17 00:00:00 2001 From: "Benjamin Scholtysik (Reimold)" Date: Mon, 19 Jun 2017 16:00:44 -0700 Subject: [PATCH 5/7] Update changelog --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf795e5ad7..a1d7a5b4c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Mobile Center SDK for iOS Change Log +## Version 0.10.1 + +This version contains a bugfix for crash attachments. + +### MobileCenterCrashes + +* **[Fix]** 0.10.0 broke sending of crash attachments and this release fixes it, so you can attach your custom data to crash reports. + +___ + ## Version 0.10.0 This version has **breaking changes**. @@ -21,6 +31,8 @@ It contains improvements and new features. * **[Bug]** Fix a potential crash that occured in case the request for updates returned a 200 but the data was empty. +___ + ## Version 0.9.0 This version has **breaking changes**. From 5a31f8f503c4c1ced2d2ec3267a5a8d0b638ad69 Mon Sep 17 00:00:00 2001 From: "Benjamin Scholtysik (Reimold)" Date: Mon, 19 Jun 2017 16:01:23 -0700 Subject: [PATCH 6/7] Bump version in podspec --- MobileCenter.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MobileCenter.podspec b/MobileCenter.podspec index 3eb35be402..763ea8c98b 100644 --- a/MobileCenter.podspec +++ b/MobileCenter.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'MobileCenter' - s.version = '0.10.0' + s.version = '0.10.1' s.summary = 'Mobile Center is mission control for mobile apps. Get faster release cycles, higher-quality apps, and the insights to build what users want.' s.description = <<-DESC From 3b47f4f43915aa3e81e5f3f9f5a6d3e3b70aac6e Mon Sep 17 00:00:00 2001 From: "Benjamin Scholtysik (Reimold)" Date: Mon, 19 Jun 2017 16:30:20 -0700 Subject: [PATCH 7/7] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1d7a5b4c1..caeed717a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ This version contains a bugfix for crash attachments. ### MobileCenterCrashes -* **[Fix]** 0.10.0 broke sending of crash attachments and this release fixes it, so you can attach your custom data to crash reports. +* **[Fix]** Fix crash attachments which were broken in 0.10.0. ___