Skip to content

Commit

Permalink
Merge pull request #99 from WideSpectrumComputing/master
Browse files Browse the repository at this point in the history
fix: resolve #88, resolve #89, resolve #90, resolve #91
  • Loading branch information
akornich authored May 20, 2021
2 parents b88c90f + e9f8114 commit 81390e0
Show file tree
Hide file tree
Showing 36 changed files with 143 additions and 37 deletions.
7 changes: 7 additions & 0 deletions Demos/macosAppObjC/macosAppObjC.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -43,6 +44,7 @@
55684F5A2553981600F82F34 /* RollbarKSCrash in Frameworks */,
55FD0711247860F1000BBC22 /* RollbarDeploys in Frameworks */,
5547273924903EB7005018BD /* RollbarNotifier in Frameworks */,
55847E682655C2990062C242 /* RollbarAUL in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -112,6 +114,7 @@
5547273824903EB7005018BD /* RollbarNotifier */,
55684F592553981600F82F34 /* RollbarKSCrash */,
55A02A5F259AAAE40071D60D /* RollbarPLCrashReporter */,
55847E672655C2990062C242 /* RollbarAUL */,
);
productName = macosAppObjC;
productReference = 55759A692477560D00ED3F04 /* macosAppObjC.app */;
Expand Down Expand Up @@ -370,6 +373,10 @@
isa = XCSwiftPackageProductDependency;
productName = RollbarKSCrash;
};
55847E672655C2990062C242 /* RollbarAUL */ = {
isa = XCSwiftPackageProductDependency;
productName = RollbarAUL;
};
55A02A5F259AAAE40071D60D /* RollbarPLCrashReporter */ = {
isa = XCSwiftPackageProductDependency;
productName = RollbarPLCrashReporter;
Expand Down
5 changes: 4 additions & 1 deletion Demos/macosAppObjC/macosAppObjC/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#import "RollbarDeploysDemoClient.h"

@import RollbarNotifier;

@import RollbarAUL;
@import RollbarKSCrash;
@import RollbarPLCrashReporter;

Expand Down Expand Up @@ -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<RollbarCrashCollector> crashCollector =
Expand Down
3 changes: 0 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ let package = Package(
.target(
name: "RollbarAUL",
dependencies: ["RollbarCommon", "RollbarNotifier"],
platforms: [
.macOS(.v10_15),
],
path: "RollbarAUL/Sources/RollbarAUL",
publicHeadersPath: "include",
cSettings: [
Expand Down
2 changes: 1 addition & 1 deletion RollbarAUL.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions RollbarAUL/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions RollbarAUL/Sources/RollbarAUL/RollbarAulClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
//

#import "RollbarAulClient.h"

#if TARGET_OS_OSX

#import "RollbarAulPredicateBuilder.h"

API_AVAILABLE(macos(10.15))
Expand Down Expand Up @@ -126,3 +129,5 @@ + (nullable OSLogEnumerator *)buildAulLogEnumeratorWithinLogStore:(nullable OSLo
}

@end

#endif //TARGET_OS_OSX
8 changes: 7 additions & 1 deletion RollbarAUL/Sources/RollbarAUL/RollbarAulEntrySnapper.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -118,3 +122,5 @@ - (void)captureOSLogEntryWithPayload:(nullable OSLogEntry<OSLogEntryWithPayload>
}

@end

#endif //TARGET_OS_OSX
4 changes: 4 additions & 0 deletions RollbarAUL/Sources/RollbarAUL/RollbarAulLogLevelConverter.m
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -45,3 +47,5 @@ + (RollbarLevel) RollbarLevelFromAulLevel:(os_log_type_t)value
}

@end

#endif //TARGET_OS_OSX
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#import "RollbarAulOSLogEntryLogLevelConverter.h"

#if TARGET_OS_OSX

API_AVAILABLE(macos(10.15))
API_UNAVAILABLE(ios, tvos, watchos)
@implementation RollbarAulOSLogEntryLogLevelConverter
Expand Down Expand Up @@ -72,3 +74,5 @@ + (NSString *) OSLogEntryLogLevelToString:(OSLogEntryLogLevel)value
}

@end

#endif //TARGET_OS_OSX
11 changes: 9 additions & 2 deletions RollbarAUL/Sources/RollbarAUL/RollbarAulPredicateBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
#ifndef RollbarAulPredicateBuilder_h
#define RollbarAulPredicateBuilder_h

#import <Foundation/Foundation.h>
@import Foundation;

#if TARGET_OS_OSX

NS_ASSUME_NONNULL_BEGIN

Expand Down Expand Up @@ -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...

Expand All @@ -47,3 +52,5 @@ API_UNAVAILABLE(ios, tvos, watchos)
NS_ASSUME_NONNULL_END

#endif //RollbarAulPredicateBuilder_h

#endif //TARGET_OS_OSX
9 changes: 7 additions & 2 deletions RollbarAUL/Sources/RollbarAUL/RollbarAulPredicateBuilder.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#import "RollbarAulPredicateBuilder.h"

#if TARGET_OS_OSX

//@import OSLog;
#if __has_include(<OSLog/OSLog.h>)
#include <OSLog/OSLog.h>
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -182,3 +185,5 @@ + (nullable NSPredicate *)safelyCombinePredicate:(nullable NSPredicate *)leftPre
}

@end

#endif //TARGET_OS_OSX
5 changes: 5 additions & 0 deletions RollbarAUL/Sources/RollbarAUL/RollbarAulStoreMonitor.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
//

#import "RollbarAulStoreMonitor.h"

#if TARGET_OS_OSX

#import "RollbarAulStoreMonitorOptions.h"
#import "RollbarAulPredicateBuilder.h"
#import "RollbarAulClient.h"
Expand Down Expand Up @@ -278,3 +281,5 @@ - (void)dealloc {
}

@end

#endif //TARGET_OS_OSX
4 changes: 4 additions & 0 deletions RollbarAUL/Sources/RollbarAUL/RollbarAulStoreMonitorOptions.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#import "RollbarAulStoreMonitorOptions.h"

#if TARGET_OS_OSX

#pragma mark - data field keys

API_AVAILABLE(macos(10.15))
Expand Down Expand Up @@ -108,3 +110,5 @@ - (void)removeAulCategory:(NSString *)category {
}

@end

#endif //TARGET_OS_OSX
4 changes: 4 additions & 0 deletions RollbarAUL/Sources/RollbarAUL/include/RollbarAulClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

@import Foundation;

#if TARGET_OS_OSX

//@import OSLog;
#if __has_include(<OSLog/OSLog.h>)
#include <OSLog/OSLog.h>
Expand Down Expand Up @@ -55,3 +57,5 @@ API_UNAVAILABLE(ios, tvos, watchos)
NS_ASSUME_NONNULL_END

#endif //RollbarAulClient_h

#endif //TARGET_OS_OSX
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

@import Foundation;

#if TARGET_OS_OSX

//@import OSLog;
#if __has_include(<OSLog/OSLog.h>)
#include <OSLog/OSLog.h>
Expand All @@ -23,10 +25,15 @@ API_UNAVAILABLE(ios, tvos, watchos)
@interface RollbarAulEntrySnapper : NSObject

- (void)captureOSLogEntry:(nullable OSLogEntry *)entry
intoSnapshot:(nonnull NSMutableDictionary<NSString *, id> *)snapshot;
intoSnapshot:(nonnull NSMutableDictionary<NSString *, id> *)snapshot
API_AVAILABLE(macos(10.15))
API_UNAVAILABLE(ios, tvos, watchos)
;

@end

NS_ASSUME_NONNULL_END

#endif //RollbarAulEntrySnapper_h

#endif //TARGET_OS_OSX
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
#define RollbarAulLogLevelConverter_h

@import Foundation;

#if TARGET_OS_OSX

@import RollbarNotifier;

#if __has_include(<os/log.h>)
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
#define RollbarAulOSLogEntryLogLevelConverter_h

@import Foundation;

#if TARGET_OS_OSX

@import RollbarNotifier;

#if __has_include(<oslog/OSLog.h>)
Expand Down Expand Up @@ -42,3 +45,5 @@ API_UNAVAILABLE(ios, tvos, watchos)
NS_ASSUME_NONNULL_END

#endif //RollbarAulOSLogEntryLogLevelConverter_h

#endif //TARGET_OS_OSX
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
#define RollbarAulStoreMonitor_h

@import Foundation;

#if TARGET_OS_OSX

@import RollbarCommon;
@import RollbarNotifier;

Expand Down Expand Up @@ -46,3 +49,5 @@ API_UNAVAILABLE(ios, tvos, watchos)
NS_ASSUME_NONNULL_END

#endif //RollbarAulStoreMonitor_h

#endif //TARGET_OS_OSX
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
#define RollbarAulStoreMonitorOptions_h

@import Foundation;

#if TARGET_OS_OSX

@import RollbarCommon;

NS_ASSUME_NONNULL_BEGIN
Expand Down Expand Up @@ -51,3 +54,5 @@ NS_UNAVAILABLE;
NS_ASSUME_NONNULL_END

#endif //RollbarAulStoreMonitorOptions_h

#endif //TARGET_OS_OSX
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
@import Foundation;

#if TARGET_OS_OSX

@import OSLog;
@import RollbarAUL;
@import RollbarNotifier;


#if !TARGET_OS_WATCH
#import <XCTest/XCTest.h>

Expand Down Expand Up @@ -64,4 +66,7 @@ - (void)testRollbarLevelToAulLevel {
}

@end
#endif

#endif // !TARGET_OS_WATCH

#endif //TARGET_OS_OSX
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
@import Foundation;

#if TARGET_OS_OSX

@import OSLog;
@import RollbarNotifier;
@import RollbarAUL;
Expand Down Expand Up @@ -51,4 +54,7 @@ - (void)testRollbarLevelToOSLogEntryLogLevel {
}

@end
#endif

#endif //!TARGET_OS_WATCH

#endif //TARGET_OS_OSX
Loading

0 comments on commit 81390e0

Please sign in to comment.