Skip to content

Commit

Permalink
fix: resolve #14
Browse files Browse the repository at this point in the history
  • Loading branch information
akornich committed Dec 3, 2020
1 parent 619c657 commit f9e8c42
Show file tree
Hide file tree
Showing 10 changed files with 183 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1220"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "55684F6A2553B4C400F82F34"
BuildableName = "iosAppObjC.app"
BlueprintName = "iosAppObjC"
ReferencedContainer = "container:iosAppObjC.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "55684F6A2553B4C400F82F34"
BuildableName = "iosAppObjC.app"
BlueprintName = "iosAppObjC"
ReferencedContainer = "container:iosAppObjC.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "55684F6A2553B4C400F82F34"
BuildableName = "iosAppObjC.app"
BlueprintName = "iosAppObjC"
ReferencedContainer = "container:iosAppObjC.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
2 changes: 1 addition & 1 deletion 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-alpha26"
s.version = "2.0.0-alpha27"
s.name = "RollbarCommon"
s.summary = "Application or client side SDK for accessing the Rollbar API Server."
s.description = <<-DESC
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1220"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "RollbarCommon"
BuildableName = "RollbarCommon"
BlueprintName = "RollbarCommon"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "RollbarCommonTests"
BuildableName = "RollbarCommonTests"
BlueprintName = "RollbarCommonTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "RollbarCommon"
BuildableName = "RollbarCommon"
BlueprintName = "RollbarCommon"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
2 changes: 1 addition & 1 deletion RollbarDeploys.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-alpha26"
s.version = "2.0.0-alpha27"
s.name = "RollbarDeploys"
s.summary = "Application or client side SDK for accessing the Rollbar API Server."
s.description = <<-DESC
Expand Down
2 changes: 1 addition & 1 deletion RollbarKSCrash.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-alpha26"
s.version = "2.0.0-alpha27"
s.name = "RollbarKSCrash"
s.summary = "Application or client side SDK for accessing the Rollbar API Server."
s.description = <<-DESC
Expand Down
2 changes: 1 addition & 1 deletion RollbarNotifier.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-alpha26"
s.version = "2.0.0-alpha27"
s.name = "RollbarNotifier"
s.summary = "Application or client side SDK for accessing the Rollbar API Server."
s.description = <<-DESC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#pragma mark - constants

static NSString * const NOTIFIER_VERSION = @"2.0.0-alpha26";
static NSString * const NOTIFIER_VERSION = @"2.0.0-alpha27";

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

Expand Down
8 changes: 8 additions & 0 deletions RollbarNotifier/Sources/RollbarNotifier/Rollbar.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#import "RollbarLogger.h"
#import "RollbarConfig.h"
#import "RollbarDestination.h"
#import "RollbarLoggingOptions.h"
#import "RollbarTelemetryOptions.h"
#import "RollbarTelemetryOptionsObserver.h"
#import "RollbarScrubbingOptions.h"
Expand Down Expand Up @@ -92,13 +93,20 @@ + (void)updateConfiguration:(RollbarConfig *)configuration {
// [telemetryOptionsObserver unregisterAsObserverForTelemetryOptions:logger.configuration.telemetry];
// }

NSUInteger oldReportingRate = 0;

if (logger) {
oldReportingRate = logger.configuration.loggingOptions.maximumReportsPerMinute;
[logger updateConfiguration:configuration];
}
else {
logger = [[RollbarLogger alloc] initWithConfiguration:configuration];
}

if (oldReportingRate != configuration.loggingOptions.maximumReportsPerMinute) {
[logger updateReportingRate:configuration.loggingOptions.maximumReportsPerMinute];
}

// if (logger && logger.configuration && logger.configuration.telemetry) {
// [telemetryOptionsObserver registerAsObserverForTelemetryOptions:logger.configuration.telemetry];
// }
Expand Down
25 changes: 14 additions & 11 deletions RollbarNotifier/Tests/RollbarNotifierTests-ObjC/RollbarTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,25 @@ @interface RollbarTests : XCTestCase
@implementation RollbarTests

- (void)setUp {

[super setUp];

RollbarClearLogFile();

if (!Rollbar.currentConfiguration) {
//[Rollbar initWithAccessToken:@""];
[Rollbar initWithAccessToken:@"2ffc7997ed864dda94f63e7b7daae0f3"];
Rollbar.currentConfiguration.destination.accessToken = @"2ffc7997ed864dda94f63e7b7daae0f3";
Rollbar.currentConfiguration.destination.environment = @"unit-tests";
Rollbar.currentConfiguration.developerOptions.transmit = YES;
Rollbar.currentConfiguration.developerOptions.logPayload = YES;
Rollbar.currentConfiguration.loggingOptions.maximumReportsPerMinute = 5000;

RollbarConfig *config = [[RollbarConfig alloc] init];
config.destination.accessToken = @"2ffc7997ed864dda94f63e7b7daae0f3";
config.destination.environment = @"unit-tests";
config.developerOptions.transmit = YES;
config.developerOptions.logPayload = YES;
config.loggingOptions.maximumReportsPerMinute = 5000;
// for the stress test specifically:
Rollbar.currentConfiguration.telemetry.enabled = YES;
Rollbar.currentConfiguration.loggingOptions.captureIp = RollbarCaptureIpType_Full;

id config = Rollbar.currentConfiguration;
config.telemetry.enabled = YES;
config.loggingOptions.captureIp = RollbarCaptureIpType_Full;
NSLog(@"%@", config)

[Rollbar initWithConfiguration:config];
}
}

Expand Down
2 changes: 1 addition & 1 deletion RollbarSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Pod::Spec.new do |sdk|

# Rollbar SDK:
# ============
sdk.version = "2.0.0-alpha26"
sdk.version = "2.0.0-alpha27"
sdk.name = "RollbarSDK"
sdk.summary = "Application or client side SDK for accessing the Rollbar API Server."
sdk.description = <<-DESC
Expand Down

0 comments on commit f9e8c42

Please sign in to comment.