From e9f8114db4043cc868537ab066f691375128ce94 Mon Sep 17 00:00:00 2001 From: Andrey Kornich Date: Wed, 19 May 2021 17:45:31 -0700 Subject: [PATCH] fix: resolve #88, resolve #89, resolve #90, resolve #91 --- .../macosAppObjC.xcodeproj/project.pbxproj | 7 +++++++ Demos/macosAppObjC/macosAppObjC/AppDelegate.m | 5 ++++- Package.swift | 3 --- RollbarAUL.podspec | 2 +- RollbarAUL/Package.swift | 6 +++--- RollbarAUL/Sources/RollbarAUL/RollbarAulClient.m | 5 +++++ .../Sources/RollbarAUL/RollbarAulEntrySnapper.m | 8 +++++++- .../Sources/RollbarAUL/RollbarAulLogLevelConverter.m | 4 ++++ .../RollbarAulOSLogEntryLogLevelConverter.m | 4 ++++ .../Sources/RollbarAUL/RollbarAulPredicateBuilder.h | 11 +++++++++-- .../Sources/RollbarAUL/RollbarAulPredicateBuilder.m | 9 +++++++-- .../Sources/RollbarAUL/RollbarAulStoreMonitor.m | 5 +++++ .../RollbarAUL/RollbarAulStoreMonitorOptions.m | 4 ++++ .../Sources/RollbarAUL/include/RollbarAulClient.h | 4 ++++ .../RollbarAUL/include/RollbarAulEntrySnapper.h | 9 ++++++++- .../RollbarAUL/include/RollbarAulLogLevelConverter.h | 5 +++++ .../include/RollbarAulOSLogEntryLogLevelConverter.h | 5 +++++ .../RollbarAUL/include/RollbarAulStoreMonitor.h | 5 +++++ .../include/RollbarAulStoreMonitorOptions.h | 5 +++++ .../RollbarAulLogLevelConverterTests.m | 9 +++++++-- .../RollbarAulOSLogEntryLogLevelConverterTests.m | 8 +++++++- .../RollbarAULTests-ObjC/RollbarAulStoreMonitorTest.m | 10 +++++++++- .../Tests/RollbarAULTests-ObjC/RollbarAulTests.m | 9 ++++++++- RollbarCommon.podspec | 2 +- .../RollbarCommonTests-ObjC/RollbarCommonTests.m | 3 ++- .../RollbarCommonTests/NSDictionary+RollbarTest.swift | 9 +++++---- .../NSJSONSerialization+RollbarTests.swift | 4 ++-- RollbarDeploys.podspec | 2 +- RollbarKSCrash.podspec | 2 +- RollbarNotifier.podspec | 2 +- .../Sources/RollbarNotifier/DTOs/RollbarConfig.m | 2 +- .../Sources/RollbarNotifier/RollbarLogger.m | 4 +++- .../Tests/RollbarNotifierTests-ObjC/DTOsTests.m | 2 -- RollbarPLCrashReporter.podspec | 2 +- RollbarSDK.experimental_podspec | 2 +- RollbarSwift.podspec | 2 +- 36 files changed, 143 insertions(+), 37 deletions(-) diff --git a/Demos/macosAppObjC/macosAppObjC.xcodeproj/project.pbxproj b/Demos/macosAppObjC/macosAppObjC.xcodeproj/project.pbxproj index 74ce6382..01fd1f83 100644 --- a/Demos/macosAppObjC/macosAppObjC.xcodeproj/project.pbxproj +++ b/Demos/macosAppObjC/macosAppObjC.xcodeproj/project.pbxproj @@ -14,6 +14,7 @@ 55759A732477561100ED3F04 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 55759A722477561100ED3F04 /* Assets.xcassets */; }; 55759A762477561100ED3F04 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 55759A742477561100ED3F04 /* Main.storyboard */; }; 55759A792477561100ED3F04 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 55759A782477561100ED3F04 /* main.m */; }; + 55847E682655C2990062C242 /* RollbarAUL in Frameworks */ = {isa = PBXBuildFile; productRef = 55847E672655C2990062C242 /* RollbarAUL */; }; 55A02A60259AAAE40071D60D /* RollbarPLCrashReporter in Frameworks */ = {isa = PBXBuildFile; productRef = 55A02A5F259AAAE40071D60D /* RollbarPLCrashReporter */; }; 55FD0711247860F1000BBC22 /* RollbarDeploys in Frameworks */ = {isa = PBXBuildFile; productRef = 55FD0710247860F1000BBC22 /* RollbarDeploys */; }; 55FD07142478614B000BBC22 /* RollbarDeploysDemoClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 55FD07132478614B000BBC22 /* RollbarDeploysDemoClient.m */; }; @@ -43,6 +44,7 @@ 55684F5A2553981600F82F34 /* RollbarKSCrash in Frameworks */, 55FD0711247860F1000BBC22 /* RollbarDeploys in Frameworks */, 5547273924903EB7005018BD /* RollbarNotifier in Frameworks */, + 55847E682655C2990062C242 /* RollbarAUL in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -112,6 +114,7 @@ 5547273824903EB7005018BD /* RollbarNotifier */, 55684F592553981600F82F34 /* RollbarKSCrash */, 55A02A5F259AAAE40071D60D /* RollbarPLCrashReporter */, + 55847E672655C2990062C242 /* RollbarAUL */, ); productName = macosAppObjC; productReference = 55759A692477560D00ED3F04 /* macosAppObjC.app */; @@ -370,6 +373,10 @@ isa = XCSwiftPackageProductDependency; productName = RollbarKSCrash; }; + 55847E672655C2990062C242 /* RollbarAUL */ = { + isa = XCSwiftPackageProductDependency; + productName = RollbarAUL; + }; 55A02A5F259AAAE40071D60D /* RollbarPLCrashReporter */ = { isa = XCSwiftPackageProductDependency; productName = RollbarPLCrashReporter; diff --git a/Demos/macosAppObjC/macosAppObjC/AppDelegate.m b/Demos/macosAppObjC/macosAppObjC/AppDelegate.m index 5ad66bc4..bb82586e 100644 --- a/Demos/macosAppObjC/macosAppObjC/AppDelegate.m +++ b/Demos/macosAppObjC/macosAppObjC/AppDelegate.m @@ -11,7 +11,7 @@ #import "RollbarDeploysDemoClient.h" @import RollbarNotifier; - +@import RollbarAUL; @import RollbarKSCrash; @import RollbarPLCrashReporter; @@ -81,6 +81,9 @@ - (void)initRollbar { config.destination.environment = @"samples"; //config.developerOptions.suppressSdkInfoLogging = YES; config.customData = @{ @"someKey": @"someValue", }; + + [RollbarAulStoreMonitor.sharedInstance configureRollbarLogger:Rollbar.currentLogger]; + [RollbarAulStoreMonitor.sharedInstance start]; // optional crash reporter: id crashCollector = diff --git a/Package.swift b/Package.swift index f4e7e0ba..47f18524 100644 --- a/Package.swift +++ b/Package.swift @@ -104,9 +104,6 @@ let package = Package( .target( name: "RollbarAUL", dependencies: ["RollbarCommon", "RollbarNotifier"], - platforms: [ - .macOS(.v10_15), - ], path: "RollbarAUL/Sources/RollbarAUL", publicHeadersPath: "include", cSettings: [ diff --git a/RollbarAUL.podspec b/RollbarAUL.podspec index 081c6714..5b524ae3 100644 --- a/RollbarAUL.podspec +++ b/RollbarAUL.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| - s.version = "2.0.0-beta.20" + s.version = "2.0.0-beta.21" s.name = "RollbarAUL" s.summary = "Application or client side SDK for interacting with the Rollbar API Server." s.description = <<-DESC diff --git a/RollbarAUL/Package.swift b/RollbarAUL/Package.swift index 502e967f..bc0998d0 100644 --- a/RollbarAUL/Package.swift +++ b/RollbarAUL/Package.swift @@ -8,9 +8,9 @@ let package = Package( platforms: [ // Oldest targeted platform versions that are supported by this product. .macOS(.v10_15), - //.iOS(.v9), - //.tvOS(.v11), - //.watchOS(.v4), + .iOS(.v9), + .tvOS(.v11), + .watchOS(.v4), ], products: [ // Products define the executables and libraries produced by a package, and make them visible to other packages. diff --git a/RollbarAUL/Sources/RollbarAUL/RollbarAulClient.m b/RollbarAUL/Sources/RollbarAUL/RollbarAulClient.m index 9a0adc58..d6337c2d 100644 --- a/RollbarAUL/Sources/RollbarAUL/RollbarAulClient.m +++ b/RollbarAUL/Sources/RollbarAUL/RollbarAulClient.m @@ -6,6 +6,9 @@ // #import "RollbarAulClient.h" + +#if TARGET_OS_OSX + #import "RollbarAulPredicateBuilder.h" API_AVAILABLE(macos(10.15)) @@ -126,3 +129,5 @@ + (nullable OSLogEnumerator *)buildAulLogEnumeratorWithinLogStore:(nullable OSLo } @end + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Sources/RollbarAUL/RollbarAulEntrySnapper.m b/RollbarAUL/Sources/RollbarAUL/RollbarAulEntrySnapper.m index d8815f66..01e42e2c 100644 --- a/RollbarAUL/Sources/RollbarAUL/RollbarAulEntrySnapper.m +++ b/RollbarAUL/Sources/RollbarAUL/RollbarAulEntrySnapper.m @@ -6,9 +6,13 @@ // #import "RollbarAulEntrySnapper.h" -#import "RollbarAulOSLogEntryLogLevelConverter.h" + +#if TARGET_OS_OSX + @import RollbarCommon; +#import "RollbarAulOSLogEntryLogLevelConverter.h" + API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, tvos, watchos) @implementation RollbarAulEntrySnapper @@ -118,3 +122,5 @@ - (void)captureOSLogEntryWithPayload:(nullable OSLogEntry } @end + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Sources/RollbarAUL/RollbarAulLogLevelConverter.m b/RollbarAUL/Sources/RollbarAUL/RollbarAulLogLevelConverter.m index 407ec19e..9422d696 100644 --- a/RollbarAUL/Sources/RollbarAUL/RollbarAulLogLevelConverter.m +++ b/RollbarAUL/Sources/RollbarAUL/RollbarAulLogLevelConverter.m @@ -7,6 +7,8 @@ #import "RollbarAulLogLevelConverter.h" +#if TARGET_OS_OSX + API_AVAILABLE(macos(10.11), ios(9.0), tvos(9.0), watchos(2.0)) @implementation RollbarAulLogLevelConverter @@ -45,3 +47,5 @@ + (RollbarLevel) RollbarLevelFromAulLevel:(os_log_type_t)value } @end + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Sources/RollbarAUL/RollbarAulOSLogEntryLogLevelConverter.m b/RollbarAUL/Sources/RollbarAUL/RollbarAulOSLogEntryLogLevelConverter.m index fc90ef60..767afe9a 100644 --- a/RollbarAUL/Sources/RollbarAUL/RollbarAulOSLogEntryLogLevelConverter.m +++ b/RollbarAUL/Sources/RollbarAUL/RollbarAulOSLogEntryLogLevelConverter.m @@ -7,6 +7,8 @@ #import "RollbarAulOSLogEntryLogLevelConverter.h" +#if TARGET_OS_OSX + API_AVAILABLE(macos(10.15)) API_UNAVAILABLE(ios, tvos, watchos) @implementation RollbarAulOSLogEntryLogLevelConverter @@ -72,3 +74,5 @@ + (NSString *) OSLogEntryLogLevelToString:(OSLogEntryLogLevel)value } @end + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Sources/RollbarAUL/RollbarAulPredicateBuilder.h b/RollbarAUL/Sources/RollbarAUL/RollbarAulPredicateBuilder.h index 136f290f..7794199b 100644 --- a/RollbarAUL/Sources/RollbarAUL/RollbarAulPredicateBuilder.h +++ b/RollbarAUL/Sources/RollbarAUL/RollbarAulPredicateBuilder.h @@ -8,7 +8,9 @@ #ifndef RollbarAulPredicateBuilder_h #define RollbarAulPredicateBuilder_h -#import +@import Foundation; + +#if TARGET_OS_OSX NS_ASSUME_NONNULL_BEGIN @@ -38,7 +40,10 @@ API_UNAVAILABLE(ios, tvos, watchos) + (nullable NSPredicate *)buildAulProcessPredicate; -+ (nullable NSPredicate *)buildAulFaultsPredicate; ++ (nullable NSPredicate *)buildAulFaultsPredicate +API_AVAILABLE(macos(10.15)) +API_UNAVAILABLE(ios, tvos, watchos) +; - (instancetype)init NS_UNAVAILABLE; // This is static utility class. No instances needed... @@ -47,3 +52,5 @@ API_UNAVAILABLE(ios, tvos, watchos) NS_ASSUME_NONNULL_END #endif //RollbarAulPredicateBuilder_h + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Sources/RollbarAUL/RollbarAulPredicateBuilder.m b/RollbarAUL/Sources/RollbarAUL/RollbarAulPredicateBuilder.m index 3cd9559e..36b570d7 100644 --- a/RollbarAUL/Sources/RollbarAUL/RollbarAulPredicateBuilder.m +++ b/RollbarAUL/Sources/RollbarAUL/RollbarAulPredicateBuilder.m @@ -7,6 +7,8 @@ #import "RollbarAulPredicateBuilder.h" +#if TARGET_OS_OSX + //@import OSLog; #if __has_include() #include @@ -130,8 +132,9 @@ + (nullable NSPredicate *)buildAulProcessPredicate { + (nullable NSPredicate *)buildAulFaultsPredicate { - NSPredicate *faultsPredicate = [RollbarPredicateBuilder buildIntegerPredicateWithValue:OSLogEntryLogLevelFault - forProperty:@"level"]; + NSPredicate *faultsPredicate = + [RollbarPredicateBuilder buildIntegerPredicateWithValue:OSLogEntryLogLevelFault + forProperty:@"level"]; return faultsPredicate; } @@ -182,3 +185,5 @@ + (nullable NSPredicate *)safelyCombinePredicate:(nullable NSPredicate *)leftPre } @end + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Sources/RollbarAUL/RollbarAulStoreMonitor.m b/RollbarAUL/Sources/RollbarAUL/RollbarAulStoreMonitor.m index 373c85bb..a59f6d7e 100644 --- a/RollbarAUL/Sources/RollbarAUL/RollbarAulStoreMonitor.m +++ b/RollbarAUL/Sources/RollbarAUL/RollbarAulStoreMonitor.m @@ -6,6 +6,9 @@ // #import "RollbarAulStoreMonitor.h" + +#if TARGET_OS_OSX + #import "RollbarAulStoreMonitorOptions.h" #import "RollbarAulPredicateBuilder.h" #import "RollbarAulClient.h" @@ -278,3 +281,5 @@ - (void)dealloc { } @end + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Sources/RollbarAUL/RollbarAulStoreMonitorOptions.m b/RollbarAUL/Sources/RollbarAUL/RollbarAulStoreMonitorOptions.m index 4bb66b5b..97844503 100644 --- a/RollbarAUL/Sources/RollbarAUL/RollbarAulStoreMonitorOptions.m +++ b/RollbarAUL/Sources/RollbarAUL/RollbarAulStoreMonitorOptions.m @@ -7,6 +7,8 @@ #import "RollbarAulStoreMonitorOptions.h" +#if TARGET_OS_OSX + #pragma mark - data field keys API_AVAILABLE(macos(10.15)) @@ -108,3 +110,5 @@ - (void)removeAulCategory:(NSString *)category { } @end + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Sources/RollbarAUL/include/RollbarAulClient.h b/RollbarAUL/Sources/RollbarAUL/include/RollbarAulClient.h index 31feae6c..6749af94 100644 --- a/RollbarAUL/Sources/RollbarAUL/include/RollbarAulClient.h +++ b/RollbarAUL/Sources/RollbarAUL/include/RollbarAulClient.h @@ -10,6 +10,8 @@ @import Foundation; +#if TARGET_OS_OSX + //@import OSLog; #if __has_include() #include @@ -55,3 +57,5 @@ API_UNAVAILABLE(ios, tvos, watchos) NS_ASSUME_NONNULL_END #endif //RollbarAulClient_h + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Sources/RollbarAUL/include/RollbarAulEntrySnapper.h b/RollbarAUL/Sources/RollbarAUL/include/RollbarAulEntrySnapper.h index d4a65e4a..2098bc0e 100644 --- a/RollbarAUL/Sources/RollbarAUL/include/RollbarAulEntrySnapper.h +++ b/RollbarAUL/Sources/RollbarAUL/include/RollbarAulEntrySnapper.h @@ -10,6 +10,8 @@ @import Foundation; +#if TARGET_OS_OSX + //@import OSLog; #if __has_include() #include @@ -23,10 +25,15 @@ API_UNAVAILABLE(ios, tvos, watchos) @interface RollbarAulEntrySnapper : NSObject - (void)captureOSLogEntry:(nullable OSLogEntry *)entry - intoSnapshot:(nonnull NSMutableDictionary *)snapshot; + intoSnapshot:(nonnull NSMutableDictionary *)snapshot +API_AVAILABLE(macos(10.15)) +API_UNAVAILABLE(ios, tvos, watchos) +; @end NS_ASSUME_NONNULL_END #endif //RollbarAulEntrySnapper_h + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Sources/RollbarAUL/include/RollbarAulLogLevelConverter.h b/RollbarAUL/Sources/RollbarAUL/include/RollbarAulLogLevelConverter.h index 063caae2..a5eb640c 100644 --- a/RollbarAUL/Sources/RollbarAUL/include/RollbarAulLogLevelConverter.h +++ b/RollbarAUL/Sources/RollbarAUL/include/RollbarAulLogLevelConverter.h @@ -9,6 +9,9 @@ #define RollbarAulLogLevelConverter_h @import Foundation; + +#if TARGET_OS_OSX + @import RollbarNotifier; #if __has_include() @@ -34,3 +37,5 @@ API_AVAILABLE(macos(10.11), ios(9.0), tvos(9.0), watchos(2.0)) NS_ASSUME_NONNULL_END #endif //RollbarAulLogLevelConverter_h + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Sources/RollbarAUL/include/RollbarAulOSLogEntryLogLevelConverter.h b/RollbarAUL/Sources/RollbarAUL/include/RollbarAulOSLogEntryLogLevelConverter.h index 28c519f9..34dbcc56 100644 --- a/RollbarAUL/Sources/RollbarAUL/include/RollbarAulOSLogEntryLogLevelConverter.h +++ b/RollbarAUL/Sources/RollbarAUL/include/RollbarAulOSLogEntryLogLevelConverter.h @@ -9,6 +9,9 @@ #define RollbarAulOSLogEntryLogLevelConverter_h @import Foundation; + +#if TARGET_OS_OSX + @import RollbarNotifier; #if __has_include() @@ -42,3 +45,5 @@ API_UNAVAILABLE(ios, tvos, watchos) NS_ASSUME_NONNULL_END #endif //RollbarAulOSLogEntryLogLevelConverter_h + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Sources/RollbarAUL/include/RollbarAulStoreMonitor.h b/RollbarAUL/Sources/RollbarAUL/include/RollbarAulStoreMonitor.h index 5933d911..689c0faa 100644 --- a/RollbarAUL/Sources/RollbarAUL/include/RollbarAulStoreMonitor.h +++ b/RollbarAUL/Sources/RollbarAUL/include/RollbarAulStoreMonitor.h @@ -9,6 +9,9 @@ #define RollbarAulStoreMonitor_h @import Foundation; + +#if TARGET_OS_OSX + @import RollbarCommon; @import RollbarNotifier; @@ -46,3 +49,5 @@ API_UNAVAILABLE(ios, tvos, watchos) NS_ASSUME_NONNULL_END #endif //RollbarAulStoreMonitor_h + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Sources/RollbarAUL/include/RollbarAulStoreMonitorOptions.h b/RollbarAUL/Sources/RollbarAUL/include/RollbarAulStoreMonitorOptions.h index bb9620fb..22d284ee 100644 --- a/RollbarAUL/Sources/RollbarAUL/include/RollbarAulStoreMonitorOptions.h +++ b/RollbarAUL/Sources/RollbarAUL/include/RollbarAulStoreMonitorOptions.h @@ -9,6 +9,9 @@ #define RollbarAulStoreMonitorOptions_h @import Foundation; + +#if TARGET_OS_OSX + @import RollbarCommon; NS_ASSUME_NONNULL_BEGIN @@ -51,3 +54,5 @@ NS_UNAVAILABLE; NS_ASSUME_NONNULL_END #endif //RollbarAulStoreMonitorOptions_h + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Tests/RollbarAULTests-ObjC/RollbarAulLogLevelConverterTests.m b/RollbarAUL/Tests/RollbarAULTests-ObjC/RollbarAulLogLevelConverterTests.m index e6cf648a..107339b1 100644 --- a/RollbarAUL/Tests/RollbarAULTests-ObjC/RollbarAulLogLevelConverterTests.m +++ b/RollbarAUL/Tests/RollbarAULTests-ObjC/RollbarAulLogLevelConverterTests.m @@ -1,9 +1,11 @@ @import Foundation; + +#if TARGET_OS_OSX + @import OSLog; @import RollbarAUL; @import RollbarNotifier; - #if !TARGET_OS_WATCH #import @@ -64,4 +66,7 @@ - (void)testRollbarLevelToAulLevel { } @end -#endif + +#endif // !TARGET_OS_WATCH + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Tests/RollbarAULTests-ObjC/RollbarAulOSLogEntryLogLevelConverterTests.m b/RollbarAUL/Tests/RollbarAULTests-ObjC/RollbarAulOSLogEntryLogLevelConverterTests.m index ef4d7aeb..c2650f30 100644 --- a/RollbarAUL/Tests/RollbarAULTests-ObjC/RollbarAulOSLogEntryLogLevelConverterTests.m +++ b/RollbarAUL/Tests/RollbarAULTests-ObjC/RollbarAulOSLogEntryLogLevelConverterTests.m @@ -1,4 +1,7 @@ @import Foundation; + +#if TARGET_OS_OSX + @import OSLog; @import RollbarNotifier; @import RollbarAUL; @@ -51,4 +54,7 @@ - (void)testRollbarLevelToOSLogEntryLogLevel { } @end -#endif + +#endif //!TARGET_OS_WATCH + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Tests/RollbarAULTests-ObjC/RollbarAulStoreMonitorTest.m b/RollbarAUL/Tests/RollbarAULTests-ObjC/RollbarAulStoreMonitorTest.m index e2700531..843508db 100644 --- a/RollbarAUL/Tests/RollbarAULTests-ObjC/RollbarAulStoreMonitorTest.m +++ b/RollbarAUL/Tests/RollbarAULTests-ObjC/RollbarAulStoreMonitorTest.m @@ -5,7 +5,12 @@ // Created by Andrey Kornich on 2021-05-03. // +//#import + @import Foundation; + +#if TARGET_OS_OSX + @import OSLog; #if !TARGET_OS_WATCH @@ -99,4 +104,7 @@ - (void)testPerformanceExample { } @end -#endif + +#endif //!TARGET_OS_WATCH + +#endif //TARGET_OS_OSX diff --git a/RollbarAUL/Tests/RollbarAULTests-ObjC/RollbarAulTests.m b/RollbarAUL/Tests/RollbarAULTests-ObjC/RollbarAulTests.m index f932ab93..1ed644a3 100644 --- a/RollbarAUL/Tests/RollbarAULTests-ObjC/RollbarAulTests.m +++ b/RollbarAUL/Tests/RollbarAULTests-ObjC/RollbarAulTests.m @@ -1,4 +1,7 @@ @import Foundation; + +#if TARGET_OS_OSX + @import OSLog; #if !TARGET_OS_WATCH @@ -129,4 +132,8 @@ - (void)traceTimestamp:(nonnull NSDate *)timestamp { } @end -#endif + +#endif //!TARGET_OS_WATCH + +#endif //TARGET_OS_OSX + diff --git a/RollbarCommon.podspec b/RollbarCommon.podspec index 237e9245..39ae380b 100644 --- a/RollbarCommon.podspec +++ b/RollbarCommon.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| - s.version = "2.0.0-beta.20" + s.version = "2.0.0-beta.21" s.name = "RollbarCommon" s.summary = "Application or client side SDK for interacting with the Rollbar API Server." s.description = <<-DESC diff --git a/RollbarCommon/Tests/RollbarCommonTests-ObjC/RollbarCommonTests.m b/RollbarCommon/Tests/RollbarCommonTests-ObjC/RollbarCommonTests.m index e6fa954f..17ec4299 100644 --- a/RollbarCommon/Tests/RollbarCommonTests-ObjC/RollbarCommonTests.m +++ b/RollbarCommon/Tests/RollbarCommonTests-ObjC/RollbarCommonTests.m @@ -7,10 +7,11 @@ // +@import Foundation; + #if !TARGET_OS_WATCH #import -@import Foundation; @import RollbarCommon; #import "Mocks/Calculator.h" diff --git a/RollbarCommon/Tests/RollbarCommonTests/NSDictionary+RollbarTest.swift b/RollbarCommon/Tests/RollbarCommonTests/NSDictionary+RollbarTest.swift index a9ffed79..592b39d0 100644 --- a/RollbarCommon/Tests/RollbarCommonTests/NSDictionary+RollbarTest.swift +++ b/RollbarCommon/Tests/RollbarCommonTests/NSDictionary+RollbarTest.swift @@ -7,6 +7,7 @@ import XCTest import Foundation +import RollbarCommon @testable import RollbarCommon final class NSDictionaryRollbarTests: XCTestCase { @@ -19,10 +20,10 @@ final class NSDictionaryRollbarTests: XCTestCase { "key3": NSNull(), ]; - XCTAssertTrue(data.rollbar_valuePresent(forKey: "key1", className: self.className)); - XCTAssertTrue(data.rollbar_valuePresent(forKey: "key2", className: self.className)); - XCTAssertFalse(data.rollbar_valuePresent(forKey: "key3", className: self.className)); - XCTAssertFalse(data.rollbar_valuePresent(forKey: "non-existent-key", className: self.className)); + XCTAssertTrue(data.rollbar_valuePresent(forKey: "key1", className: self.rollbar_objectClassName())); + XCTAssertTrue(data.rollbar_valuePresent(forKey: "key2", className: self.rollbar_objectClassName())); + XCTAssertFalse(data.rollbar_valuePresent(forKey: "key3", className: self.rollbar_objectClassName())); + XCTAssertFalse(data.rollbar_valuePresent(forKey: "non-existent-key", className: self.rollbar_objectClassName())); } static var allTests = [ diff --git a/RollbarCommon/Tests/RollbarCommonTests/NSJSONSerialization+RollbarTests.swift b/RollbarCommon/Tests/RollbarCommonTests/NSJSONSerialization+RollbarTests.swift index 68ee70ec..599d36e9 100644 --- a/RollbarCommon/Tests/RollbarCommonTests/NSJSONSerialization+RollbarTests.swift +++ b/RollbarCommon/Tests/RollbarCommonTests/NSJSONSerialization+RollbarTests.swift @@ -56,7 +56,7 @@ final class NSJSONSerializationRollbarTests: XCTestCase { "scrubFields": NSSet.init(array: ["password", "secret", "CCV"]), ] as [String : Any]; - if #available(OSX 10.13, *) { + if #available(OSX 10.13, iOS 11.0, *) { data["innerData"] = JSONSerialization.rollbar_data( withJSONObject: data, options: .sortedKeys, @@ -75,7 +75,7 @@ final class NSJSONSerializationRollbarTests: XCTestCase { let safeJson = JSONSerialization.rollbar_safeData(fromJSONObject: payload); do { - if #available(OSX 10.13, *) { + if #available(OSX 10.13, iOS 11.0, *) { let jsonData = try JSONSerialization.data(withJSONObject: safeJson, options: .sortedKeys) let result = String.init(data: jsonData, encoding: .utf8); XCTAssertEqual(goldenStandard, result); diff --git a/RollbarDeploys.podspec b/RollbarDeploys.podspec index 3abe8b04..4e1bad9b 100644 --- a/RollbarDeploys.podspec +++ b/RollbarDeploys.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| - s.version = "2.0.0-beta.20" + s.version = "2.0.0-beta.21" s.name = "RollbarDeploys" s.summary = "Application or client side SDK for interacting with the Rollbar API Server." s.description = <<-DESC diff --git a/RollbarKSCrash.podspec b/RollbarKSCrash.podspec index f970e134..4a2a9162 100644 --- a/RollbarKSCrash.podspec +++ b/RollbarKSCrash.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| - s.version = "2.0.0-beta.20" + s.version = "2.0.0-beta.21" s.name = "RollbarKSCrash" s.summary = "Application or client side SDK for interacting with the Rollbar API Server." s.description = <<-DESC diff --git a/RollbarNotifier.podspec b/RollbarNotifier.podspec index 34831a73..0668d857 100644 --- a/RollbarNotifier.podspec +++ b/RollbarNotifier.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| - s.version = "2.0.0-beta.20" + s.version = "2.0.0-beta.21" s.name = "RollbarNotifier" s.summary = "Application or client side SDK for interacting with the Rollbar API Server." s.description = <<-DESC diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarConfig.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarConfig.m index 72133c6c..d1099c55 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarConfig.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarConfig.m @@ -22,7 +22,7 @@ #pragma mark - constants -static NSString * const NOTIFIER_VERSION = @"2.0.0-beta.20"; +static NSString * const NOTIFIER_VERSION = @"2.0.0-beta.21"; static NSString * const NOTIFIER_NAME = @"rollbar-apple"; diff --git a/RollbarNotifier/Sources/RollbarNotifier/RollbarLogger.m b/RollbarNotifier/Sources/RollbarNotifier/RollbarLogger.m index e7bd9fcb..66372066 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/RollbarLogger.m +++ b/RollbarNotifier/Sources/RollbarNotifier/RollbarLogger.m @@ -1,11 +1,13 @@ // Copyright (c) 2018 Rollbar, Inc. All rights reserved. -@import RollbarCommon; +@import Foundation; #if TARGET_OS_IOS | TARGET_OS_TV | TARGET_OS_MACCATALYST @import UIKit; #endif +@import RollbarCommon; + #import "RollbarLogger.h" #import "RollbarThread.h" #import "RollbarReachability.h" diff --git a/RollbarNotifier/Tests/RollbarNotifierTests-ObjC/DTOsTests.m b/RollbarNotifier/Tests/RollbarNotifierTests-ObjC/DTOsTests.m index 27528e73..7a235d34 100644 --- a/RollbarNotifier/Tests/RollbarNotifierTests-ObjC/DTOsTests.m +++ b/RollbarNotifier/Tests/RollbarNotifierTests-ObjC/DTOsTests.m @@ -8,8 +8,6 @@ @import Foundation; -#import "TestData/CrashReports.h" - #if !TARGET_OS_WATCH #import diff --git a/RollbarPLCrashReporter.podspec b/RollbarPLCrashReporter.podspec index 2c679ff5..df6e3188 100644 --- a/RollbarPLCrashReporter.podspec +++ b/RollbarPLCrashReporter.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| - s.version = "2.0.0-beta.20" + s.version = "2.0.0-beta.21" s.name = "RollbarPLCrashReporter" s.summary = "Application or client side SDK for interacting with the Rollbar API Server." s.description = <<-DESC diff --git a/RollbarSDK.experimental_podspec b/RollbarSDK.experimental_podspec index a2d0ce9b..94ff7479 100644 --- a/RollbarSDK.experimental_podspec +++ b/RollbarSDK.experimental_podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |sdk| # Rollbar SDK: # ============ - sdk.version = "2.0.0-beta.20" + sdk.version = "2.0.0-beta.21" sdk.name = "RollbarSDK" s.summary = "Application or client side SDK for interacting with the Rollbar API Server." sdk.description = <<-DESC diff --git a/RollbarSwift.podspec b/RollbarSwift.podspec index ac3e132e..54358f15 100644 --- a/RollbarSwift.podspec +++ b/RollbarSwift.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| - s.version = "2.0.0-beta.20" + s.version = "2.0.0-beta.21" s.name = "RollbarSwift" s.summary = "Application or client side SDK for interacting with the Rollbar API Server." s.description = <<-DESC