diff --git a/CHANGELOG.md b/CHANGELOG.md index e98afc79dc..aacc17419c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Mobile Center SDK for iOS Change Log +## Version 0.11.2 + +This version contains a bug fix that wasn't properly fixed in the previous release. + +## MobileCenterCrashes + +* **[Fix]** Fixed a bug that the Crashes picked up one next session after previous crash. + +___ + ## Version 0.11.1 This version contains bug fixes and an improvement that changes the current behavior. @@ -15,6 +25,7 @@ This version contains bug fixes and an improvement that changes the current beha ## MobileCenterCrashes * **[Fix]** Fixes two bugs that caused error logs to be assiciated with wrong session information. + ___ ## Version 0.11.0 diff --git a/Documentation/MobileCenter/.jazzy.yaml b/Documentation/MobileCenter/.jazzy.yaml index 06fa500017..0027e7b7d4 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.11.1 +module_version: 0.11.2 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/MobileCenterAnalytics/.jazzy.yaml b/Documentation/MobileCenterAnalytics/.jazzy.yaml index 7a1801303f..4499c4a279 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.11.1 +module_version: 0.11.2 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/MobileCenterCrashes/.jazzy.yaml b/Documentation/MobileCenterCrashes/.jazzy.yaml index 63d73736c5..1c27b9122b 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.11.1 +module_version: 0.11.2 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/MobileCenterDistribute/.jazzy.yaml b/Documentation/MobileCenterDistribute/.jazzy.yaml index d66c2e5dcc..91467e54d0 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.11.1 +module_version: 0.11.2 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Documentation/MobileCenterPush/.jazzy.yaml b/Documentation/MobileCenterPush/.jazzy.yaml index ced18e81f1..975a6d693d 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.11.1 +module_version: 0.11.2 author: Microsoft Corp author_url: http://www.microsoft.com diff --git a/Global.xcconfig b/Global.xcconfig index b28b873b4b..d78b95600e 100644 --- a/Global.xcconfig +++ b/Global.xcconfig @@ -1,5 +1,5 @@ BUILD_NUMBER = 1 -VERSION_STRING = 0.11.1 +VERSION_STRING = 0.11.2 SDK_NAME = mobilecenter.ios diff --git a/MobileCenter.podspec b/MobileCenter.podspec index 2e3c76d43f..fe20e06a7a 100644 --- a/MobileCenter.podspec +++ b/MobileCenter.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'MobileCenter' - s.version = '0.11.1' + s.version = '0.11.2' 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 diff --git a/MobileCenter/MobileCenter/Internals/Device/MSDeviceTracker.m b/MobileCenter/MobileCenter/Internals/Device/MSDeviceTracker.m index d73025c95a..897c376c27 100644 --- a/MobileCenter/MobileCenter/Internals/Device/MSDeviceTracker.m +++ b/MobileCenter/MobileCenter/Internals/Device/MSDeviceTracker.m @@ -189,7 +189,10 @@ - (MSDevice *)deviceForToffset:(NSNumber *)toffset { return [((MSDeviceHistoryInfo *)a).tOffset compare:((MSDeviceHistoryInfo *)b).tOffset]; }]; - // All tOffsets are larger. + /* + * All tOffsets are larger. + * For now, the SDK picks up the oldest which is closer to the device info at the crash time. + */ if (index == 0) { return self.deviceHistory[0].device; } @@ -197,14 +200,11 @@ - (MSDevice *)deviceForToffset:(NSNumber *)toffset { // All toffsets are smaller. else if (index == self.deviceHistory.count) { return [self.deviceHistory lastObject].device; - } else { - // Either the deviceHistory contains the exact toffset or we pick the smallest delta. - long long leftDifference = [toffset longLongValue] - [self.deviceHistory[index - 1].tOffset longLongValue]; - long long rightDifference = [self.deviceHistory[index].tOffset longLongValue] - [toffset longLongValue]; - if (leftDifference < rightDifference) { - --index; - } - return self.deviceHistory[index].device; + } + + // [index - 1] should be the right index for the toffset. + else { + return self.deviceHistory[index - 1].device; } } } diff --git a/MobileCenterAnalytics/MobileCenterAnalytics/Internals/Session/MSSessionTracker.m b/MobileCenterAnalytics/MobileCenterAnalytics/Internals/Session/MSSessionTracker.m index 80994f6e25..52ad24c023 100644 --- a/MobileCenterAnalytics/MobileCenterAnalytics/Internals/Session/MSSessionTracker.m +++ b/MobileCenterAnalytics/MobileCenterAnalytics/Internals/Session/MSSessionTracker.m @@ -212,14 +212,9 @@ - (void)onEnqueuingLog:(id)log withInternalId:(NSString *)internalId { log.sid = [self.pastSessions lastObject].sessionId; } - // Either the pastSessions contains the exact toffset or we pick the smallest delta. + // [index - 1] should be the right index for the toffset. else { - long long leftDifference = [log.toffset longLongValue] - [self.pastSessions[index - 1].toffset longLongValue]; - long long rightDifference = [self.pastSessions[index].toffset longLongValue] - [log.toffset longLongValue]; - if (leftDifference < rightDifference) { - --index; - } - log.sid = self.pastSessions[index].sessionId; + log.sid = self.pastSessions[index - 1].sessionId; } } diff --git a/MobileCenterCrashes/MobileCenterCrashes.xcodeproj/project.pbxproj b/MobileCenterCrashes/MobileCenterCrashes.xcodeproj/project.pbxproj index 9bf15d6ed5..df2222a5c9 100644 --- a/MobileCenterCrashes/MobileCenterCrashes.xcodeproj/project.pbxproj +++ b/MobileCenterCrashes/MobileCenterCrashes.xcodeproj/project.pbxproj @@ -33,6 +33,8 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ + 045C99931F3D0F7D00E9ED58 /* MSWrapperCrashesHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 350B29E81F1929A1009B91CF /* MSWrapperCrashesHelper.h */; }; + 045C99941F3D0F8500E9ED58 /* MSCrashHandlerSetupDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 350B29E71F192554009B91CF /* MSCrashHandlerSetupDelegate.h */; }; 3507AE3D1DD14C240030878F /* MSException.h in Headers */ = {isa = PBXBuildFile; fileRef = 3507AE3A1DD14C240030878F /* MSException.h */; }; 3507AE3E1DD14C240030878F /* MSStackFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 3507AE3B1DD14C240030878F /* MSStackFrame.h */; }; 350B29F21F1D67EE009B91CF /* MSWrapperCrashesHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 350B29F11F1D67EE009B91CF /* MSWrapperCrashesHelper.m */; }; @@ -43,7 +45,7 @@ 353FD1621F29209000E1DF78 /* MSWrapperException.m in Sources */ = {isa = PBXBuildFile; fileRef = 353FD15F1F29209000E1DF78 /* MSWrapperException.m */; }; 353FD1631F29209000E1DF78 /* MSWrapperExceptionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 353FD1601F29209000E1DF78 /* MSWrapperExceptionInternal.h */; }; 35B7D87A1DE4D4A300C846CD /* MSWrapperExceptionManagerInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 35B7D8791DE4CB6D00C846CD /* MSWrapperExceptionManagerInternal.h */; }; - 35D504CF1DDD140500D58B40 /* MSWrapperExceptionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 35D504CD1DDD140500D58B40 /* MSWrapperExceptionManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 35D504CF1DDD140500D58B40 /* MSWrapperExceptionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 35D504CD1DDD140500D58B40 /* MSWrapperExceptionManager.h */; }; 35D504D01DDD140500D58B40 /* MSWrapperExceptionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 35D504CE1DDD140500D58B40 /* MSWrapperExceptionManager.m */; }; 35EF18E01DDBCF6C00731CA8 /* MSWrapperExceptionManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 35EF18DF1DDBCF6C00731CA8 /* MSWrapperExceptionManagerTests.m */; }; 380B81321E8C540E001C76C9 /* MSLogWithProperties.h in Headers */ = {isa = PBXBuildFile; fileRef = 380B81311E8C540E001C76C9 /* MSLogWithProperties.h */; }; @@ -583,6 +585,7 @@ 3507AE3D1DD14C240030878F /* MSException.h in Headers */, B2F120E71D657F4F0060DED7 /* MSErrorReportPrivate.h in Headers */, 353FD1631F29209000E1DF78 /* MSWrapperExceptionInternal.h in Headers */, + 045C99941F3D0F8500E9ED58 /* MSCrashHandlerSetupDelegate.h in Headers */, 380B81341E8C565E001C76C9 /* MSAbstractLog.h in Headers */, 6E7D5C6B1D3E9332009EC9AC /* MSAppleErrorLog.h in Headers */, 6E7D5C731D3E9381009EC9AC /* MSThread.h in Headers */, @@ -594,6 +597,7 @@ 3858A2181E93F37E00535A69 /* MSErrorAttachmentLog+Utility.h in Headers */, 387C77071D6CC41100D68CC1 /* MSServiceAbstract.h in Headers */, B24F3F121D9341BC00827213 /* MSErrorLogFormatterPrivate.h in Headers */, + 045C99931F3D0F7D00E9ED58 /* MSWrapperCrashesHelper.h in Headers */, 6E0401771D1C9EBE0051BCFA /* MobileCenter+Internal.h in Headers */, 6E73FE731D4059E7008CDC15 /* MSCrashesCXXExceptionWrapperException.h in Headers */, 6E73FE6A1D402F79008CDC15 /* MSCrashesCXXExceptionHandler.h in Headers */,