Skip to content

Commit

Permalink
Merge pull request #319 from WideSpectrumComputing/ref#285-Multiproje…
Browse files Browse the repository at this point in the history
…ctWorkspace

Release candidate: v2.0.0-alpha13
  • Loading branch information
akornich authored Sep 26, 2020
2 parents ceaca9a + 9773f26 commit e6a090c
Show file tree
Hide file tree
Showing 28 changed files with 600 additions and 357 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co
- refactor: removed RollbarConfiguration and replaced it with RollbarConfig
- refactor: changed WhitelistFields into SafeListFields when it comes to the RollbarScrubbingOptions
- refactor: removed all the deprecated API
- refactor: replace NSString-like log level parameters in RollbarLogger interface with RollbarLevel enum
- refactor: replace sync-all log methods of Rollbar and RolbarLogger with ones dedicated to each type of payload: string-message, NSException, NSError, etc.
- feat: defined default scrub fields
- feat: explicit reporting of NSErrors

**1.12.8**
- fix: resolve #283: Add RollbarFramework/* to source_files
Expand Down
4 changes: 3 additions & 1 deletion Demos/macosAppObjC/macosAppObjC.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
55759A612477560D00ED3F04 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1160;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = "Andrey Kornich (Wide Spectrum Computing LLC)";
TargetAttributes = {
55759A682477560D00ED3F04 = {
Expand Down Expand Up @@ -207,6 +207,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -265,6 +266,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down
23 changes: 19 additions & 4 deletions Demos/macosAppObjC/macosAppObjC/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,35 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// Insert code here to initialize your application
[self initRollbar];

NSData *data = [[NSData alloc] init];
NSError *error;
NSJSONReadingOptions serializationOptions = (NSJSONReadingMutableContainers | NSJSONReadingMutableLeaves);
NSDictionary *payload = [NSJSONSerialization JSONObjectWithData:data
options:serializationOptions
error:&error];
if (!payload && error) {
[Rollbar log:RollbarLevel_Error
error:error
data:nil
context:nil
];
}


@try {
[self callTroublemaker];
} @catch (NSException *exception) {
[Rollbar error:@"Got an exception!" exception:exception];
[Rollbar errorException:exception];
} @finally {
[Rollbar info:@"Post-trouble notification!"];
[Rollbar infoMessage:@"Post-trouble notification!"];
}
}


- (void)applicationWillTerminate:(NSNotification *)aNotification {
// Insert code here to tear down your application

[Rollbar info:@"The hosting application is terminating..."];
[Rollbar infoMessage:@"The hosting application is terminating..."];
}

- (void)initRollbar {
Expand All @@ -49,7 +64,7 @@ - (void)initRollbar {
// init Rollbar shared instance:
[Rollbar initWithConfiguration:config];

[Rollbar info:@"Rollbar is up and running! Enjoy your remote error and log monitoring..."];
[Rollbar infoMessage:@"Rollbar is up and running! Enjoy your remote error and log monitoring..."];
}

- (void)demonstrateDeployApiUsage {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1150;
LastUpgradeCheck = 1150;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = "Andrey Kornich (Wide Spectrum Computing LLC)";
TargetAttributes = {
55E8B5DD24A57B920082B70B = {
Expand Down Expand Up @@ -196,6 +196,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -256,6 +257,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -288,6 +290,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = macosAppSwiftSPM/macosAppSwiftSPM.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = LDX6L68VZJ;
Expand All @@ -308,6 +311,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = macosAppSwiftSPM/macosAppSwiftSPM.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = LDX6L68VZJ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"repositoryURL": "https://github.com/rollbar/rollbar-ios",
"state": {
"branch": "vNext-2.0.0",
"revision": "a5490469570974f9b385b8307f2e6684a210f11d",
"revision": "ceaca9ad83411d8661918aa6ed0929ee1796ee53",
"version": null
}
}
Expand Down
13 changes: 7 additions & 6 deletions Demos/macosAppSwiftSPM/macosAppSwiftSPM/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {

func applicationDidFinishLaunching(_ aNotification: Notification) {
// Insert code here to initialize your application
self.demonstrateDeployApiUasege();
self.demonstrateDeployApiUsage();
self.initRollbar();

// SwiftTryCatch.tryRun({
Expand All @@ -39,17 +39,18 @@ class AppDelegate: NSObject, NSApplicationDelegate {
func initRollbar() {

// configure Rollbar:
let config = RollbarConfiguration.init();
let config = RollbarConfig.init();

//config.crashLevel = @"critical";
config.environment = "samples";
config.asRollbarConfig().customData = [ "someKey": "someValue", ];
config.destination.accessToken = "2ffc7997ed864dda94f63e7b7daae0f3";
config.destination.environment = "samples";
config.customData = [ "someKey": "someValue", ];
// init Rollbar shared instance:
Rollbar.initWithAccessToken("2ffc7997ed864dda94f63e7b7daae0f3", configuration: config);
Rollbar.initWithConfiguration(config);
Rollbar.info("Rollbar is up and running! Enjoy your remote error and log monitoring...");
}

func demonstrateDeployApiUasege() {
func demonstrateDeployApiUsage() {

let rollbarDeploysIntro = RollbarDeploysDemoClient();
rollbarDeploysIntro.demoDeploymentRegistration();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class RollbarDeploysDemoClient {
deploymentRegistrationObserver: (observer as! NSObjectProtocol & RollbarDeploymentRegistrationObserver),
deploymentDetailsObserver: (observer as! NSObjectProtocol & RollbarDeploymentDetailsObserver),
deploymentDetailsPageObserver: (observer as! NSObjectProtocol & RollbarDeploymentDetailsPageObserver));
deploysManager!.register(deployment!)
deploysManager.register(deployment!)
}

func demoGetDeploymentDetailsById() {
Expand All @@ -83,7 +83,7 @@ class RollbarDeploysDemoClient {
deploymentRegistrationObserver: (observer as! NSObjectProtocol & RollbarDeploymentRegistrationObserver),
deploymentDetailsObserver: (observer as! NSObjectProtocol & RollbarDeploymentDetailsObserver),
deploymentDetailsPageObserver: (observer as! NSObjectProtocol & RollbarDeploymentDetailsPageObserver));
deploysManager!.getDeploymentWithDeployId(testDeploymentId);
deploysManager.getDeploymentWithDeployId(testDeploymentId);
}

func demoGetDeploymentsPage() {
Expand All @@ -95,7 +95,7 @@ class RollbarDeploysDemoClient {
deploymentRegistrationObserver: (observer as! NSObjectProtocol & RollbarDeploymentRegistrationObserver),
deploymentDetailsObserver: (observer as! NSObjectProtocol & RollbarDeploymentDetailsObserver),
deploymentDetailsPageObserver: (observer as! NSObjectProtocol & RollbarDeploymentDetailsPageObserver));
deploysManager!.getDeploymentsPageNumber(1);
deploysManager.getDeploymentsPageNumber(1);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let package = Package(
platforms: [
// Oldest targeted platform versions that are supported by this product.
.macOS(.v10_10),
.iOS(.v8),
.iOS(.v9),
.tvOS(.v11),
// .watchOS(.v4),
],
Expand Down
4 changes: 2 additions & 2 deletions RollbarCommon.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-alpha12'
s.version = '2.0.0-alpha13'
s.name = 'RollbarCommon'
s.summary = 'Application/client side SDK for accessing the Rollbar API Server.'
s.description = <<-DESC
Expand All @@ -33,7 +33,7 @@ Pod::Spec.new do |s|
# s.resources = "Resources/*.png"

# When using multiple platforms:
s.ios.deployment_target = '8.0'
s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.10'
s.tvos.deployment_target = '11.0'
s.watchos.deployment_target = '4.0'
Expand Down
2 changes: 1 addition & 1 deletion RollbarCommon/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let package = Package(
platforms: [
// Oldest targeted platform versions that are supported by this product.
.macOS(.v10_10),
.iOS(.v8),
.iOS(.v9),
.tvOS(.v11),
.watchOS(.v4),
],
Expand Down
4 changes: 2 additions & 2 deletions RollbarDeploys.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Pod::Spec.new do |s|


s.version = '2.0.0-alpha12'
s.version = '2.0.0-alpha13'
s.name = 'RollbarDeploys'
s.summary = 'Application/client side SDK for accessing the Rollbar API Server.'
s.description = <<-DESC
Expand All @@ -34,7 +34,7 @@ Pod::Spec.new do |s|
# s.resources = "Resources/*.png"

# When using multiple platforms:
s.ios.deployment_target = '8.0'
s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.10'
s.tvos.deployment_target = '11.0'
# s.watchos.deployment_target = '4.0'
Expand Down
2 changes: 1 addition & 1 deletion RollbarDeploys/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let package = Package(
platforms: [
// Oldest targeted platform versions that are supported by this product.
.macOS(.v10_10),
.iOS(.v8),
.iOS(.v9),
.tvOS(.v11),
.watchOS(.v4),
],
Expand Down
4 changes: 2 additions & 2 deletions RollbarNotifier.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Pod::Spec.new do |s|


s.version = '2.0.0-alpha12'
s.version = '2.0.0-alpha13'
s.name = 'RollbarNotifier'
s.summary = 'Application/client side SDK for accessing the Rollbar API Server.'
s.description = <<-DESC
Expand All @@ -34,7 +34,7 @@ Pod::Spec.new do |s|
# s.resources = "Resources/*.png"

# When using multiple platforms:
s.ios.deployment_target = '8.0'
s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.10'
s.tvos.deployment_target = '11.0'
s.watchos.deployment_target = '4.0'
Expand Down
2 changes: 1 addition & 1 deletion RollbarNotifier/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let package = Package(
platforms: [
// Oldest targeted platform versions that are supported by this product.
.macOS(.v10_10),
.iOS(.v8),
.iOS(.v9),
.tvOS(.v11),
.watchOS(.v4),
],
Expand Down
9 changes: 4 additions & 5 deletions RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarConfig.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

#import "RollbarConfig.h"
//#import "DataTransferObject+Protected.h"
#import "RollbarCachesDirectory.h"
#import "RollbarDestination.h"
#import "RollbarDeveloperOptions.h"
Expand All @@ -23,21 +22,21 @@

#pragma mark - constants

static NSString * const NOTIFIER_VERSION = @"2.0.0-alpha12";
static NSString * const NOTIFIER_VERSION = @"2.0.0-alpha13";

static NSString * const NOTIFIER_NAME = @"rollbar-*os";

#define NOTIFIER_NAME_PREFIX = @"rollbar-";
#if TARGET_OS_IPHONE | TARGET_OS_IOS
static NSString * const OPERATING_SYSTEM = @"ios";
//static NSString * const NOTIFIER_NAME = @"rollbar-ios";
#elseif TARGET_OS_OSX
#elif TARGET_OS_OSX
static NSString * const OPERATING_SYSTEM = @"macos";
//static NSString * const NOTIFIER_NAME = @"rollbar-macos";
#elseif TARGET_OS_TV
#elif TARGET_OS_TV
static NSString * const OPERATING_SYSTEM = @"tvos";
//static NSString * const NOTIFIER_NAME = @"rollbar-tvos";
#elseif TARGET_OS_WATCH
#elif TARGET_OS_WATCH
static NSString * const OPERATING_SYSTEM = @"watchos";
//static NSString * const NOTIFIER_NAME = @"rollbar-watchos";
#else
Expand Down
Loading

0 comments on commit e6a090c

Please sign in to comment.