From 5894249eed222d2682f20ccf57757285a3ec7a5a Mon Sep 17 00:00:00 2001 From: Andrey Kornich Date: Fri, 18 Feb 2022 14:31:10 -0800 Subject: [PATCH 1/3] docs: ref #127 Update RollbarNotifier public API doc comments so they are properly rendered by Xcode Quick Help --- .../RollbarNotifier/DTOs/RollbarAppLanguage.m | 8 --- .../RollbarNotifier/DTOs/RollbarBody.m | 8 --- .../DTOs/RollbarCallStackFrame.m | 9 ---- .../DTOs/RollbarCallStackFrameContext.m | 9 ---- .../DTOs/RollbarCaptureIpType.m | 8 --- .../RollbarNotifier/DTOs/RollbarClient.m | 9 ---- .../RollbarNotifier/DTOs/RollbarConfig.m | 8 --- .../RollbarNotifier/DTOs/RollbarCrashReport.m | 9 ---- .../RollbarNotifier/DTOs/RollbarData.m | 11 ---- .../RollbarNotifier/DTOs/RollbarDestination.m | 9 ---- .../DTOs/RollbarDeveloperOptions.m | 9 ---- .../RollbarNotifier/DTOs/RollbarException.m | 9 ---- .../RollbarNotifier/DTOs/RollbarHttpMethod.m | 8 --- .../RollbarNotifier/DTOs/RollbarJavascript.m | 10 ---- .../RollbarNotifier/DTOs/RollbarLevel.m | 2 - .../DTOs/RollbarLoggingOptions.m | 9 ---- .../RollbarNotifier/DTOs/RollbarMessage.m | 10 ---- .../RollbarNotifier/DTOs/RollbarModule.m | 9 ---- .../RollbarNotifier/DTOs/RollbarPayload.m | 9 ---- .../RollbarNotifier/DTOs/RollbarPerson.m | 9 ---- .../RollbarNotifier/DTOs/RollbarProxy.m | 9 ---- .../RollbarNotifier/DTOs/RollbarRequest.m | 9 ---- .../DTOs/RollbarScrubbingOptions.m | 9 ---- .../RollbarNotifier/DTOs/RollbarServer.m | 9 ---- .../DTOs/RollbarServerConfig.m | 9 ---- .../RollbarNotifier/DTOs/RollbarSource.m | 8 --- .../DTOs/RollbarTelemetryBody.m | 8 --- .../DTOs/RollbarTelemetryConnectivityBody.m | 9 ---- .../DTOs/RollbarTelemetryErrorBody.m | 8 --- .../DTOs/RollbarTelemetryEvent.m | 9 ---- .../DTOs/RollbarTelemetryLogBody.m | 9 ---- .../DTOs/RollbarTelemetryManualBody.m | 8 --- .../DTOs/RollbarTelemetryNavigationBody.m | 9 ---- .../DTOs/RollbarTelemetryNetworkBody.m | 9 ---- .../DTOs/RollbarTelemetryOptions.m | 8 --- .../DTOs/RollbarTelemetryType.m | 2 - .../DTOs/RollbarTelemetryViewBody.m | 9 ---- .../RollbarNotifier/DTOs/RollbarTrace.m | 10 ---- .../Sources/RollbarNotifier/Rollbar.m | 2 - .../RollbarNotifier/RollbarConfigUtil.m | 8 --- .../RollbarNotifier/RollbarCrashProcessor.h | 8 +-- .../RollbarNotifier/RollbarCrashProcessor.m | 7 --- .../Sources/RollbarNotifier/RollbarLog.m | 8 --- .../Sources/RollbarNotifier/RollbarLogger.m | 2 - .../RollbarNotifier/RollbarPayloadTruncator.m | 2 - .../RollbarNotifier/RollbarReachability.h | 53 ++++++++++++++++--- .../RollbarNotifier/RollbarReachability.m | 3 +- .../RollbarNotifier/RollbarTelemetry.m | 2 - .../RollbarTelemetryOptionsObserver.h | 15 ++++-- .../RollbarTelemetryOptionsObserver.m | 2 - .../Sources/RollbarNotifier/RollbarThread.h | 9 ++-- .../Sources/RollbarNotifier/RollbarThread.m | 2 - .../Sources/RollbarNotifier/include/Rollbar.h | 2 - .../include/RollbarAppLanguage.h | 8 --- .../RollbarNotifier/include/RollbarBody.h | 8 --- .../include/RollbarCallStackFrame.h | 8 --- .../include/RollbarCallStackFrameContext.h | 8 --- .../include/RollbarCaptureIpType.h | 8 --- .../RollbarNotifier/include/RollbarClient.h | 8 --- .../RollbarNotifier/include/RollbarConfig.h | 8 --- .../include/RollbarConfigUtil.h | 8 --- .../include/RollbarCrashReport.h | 8 --- .../RollbarNotifier/include/RollbarData.h | 8 --- .../include/RollbarDestination.h | 8 --- .../include/RollbarDeveloperOptions.h | 8 --- .../include/RollbarException.h | 8 --- .../include/RollbarHttpMethod.h | 8 --- .../include/RollbarJavascript.h | 8 --- .../RollbarNotifier/include/RollbarLevel.h | 2 - .../RollbarNotifier/include/RollbarLog.h | 8 --- .../RollbarNotifier/include/RollbarLogger.h | 2 - .../include/RollbarLoggingOptions.h | 8 --- .../RollbarNotifier/include/RollbarMessage.h | 8 --- .../RollbarNotifier/include/RollbarModule.h | 8 --- .../RollbarNotifier/include/RollbarPayload.h | 8 --- .../include/RollbarPayloadDTOs.h | 8 --- .../include/RollbarPayloadTruncator.h | 2 - .../RollbarNotifier/include/RollbarPerson.h | 8 --- .../RollbarNotifier/include/RollbarProxy.h | 8 --- .../RollbarNotifier/include/RollbarRequest.h | 8 --- .../include/RollbarScrubbingOptions.h | 8 --- .../RollbarNotifier/include/RollbarServer.h | 8 --- .../include/RollbarServerConfig.h | 8 --- .../RollbarNotifier/include/RollbarSource.h | 8 --- .../include/RollbarTelemetry.h | 2 - .../include/RollbarTelemetryBody.h | 8 --- .../RollbarTelemetryConnectivityBody.h | 8 --- .../include/RollbarTelemetryErrorBody.h | 8 --- .../include/RollbarTelemetryEvent.h | 9 ---- .../include/RollbarTelemetryLogBody.h | 8 --- .../include/RollbarTelemetryManualBody.h | 8 --- .../include/RollbarTelemetryNavigationBody.h | 8 --- .../include/RollbarTelemetryNetworkBody.h | 8 --- .../include/RollbarTelemetryOptions.h | 8 --- .../include/RollbarTelemetryType.h | 2 - .../include/RollbarTelemetryViewBody.h | 8 --- .../RollbarNotifier/include/RollbarTrace.h | 8 --- 97 files changed, 64 insertions(+), 707 deletions(-) diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarAppLanguage.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarAppLanguage.m index d9298e89..0004149d 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarAppLanguage.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarAppLanguage.m @@ -1,11 +1,3 @@ -// -// RollbarAppLanguage.m -// Rollbar -// -// Created by Andrey Kornich on 2019-12-16. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarAppLanguage.h" @implementation RollbarAppLanguageUtil diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarBody.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarBody.m index d0249897..e5a30013 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarBody.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarBody.m @@ -1,11 +1,3 @@ -// -// RollbarBody.m -// Rollbar -// -// Created by Andrey Kornich on 2019-11-27. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarBody.h" #import "RollbarMessage.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarCallStackFrame.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarCallStackFrame.m index e7c723fe..74ea64c0 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarCallStackFrame.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarCallStackFrame.m @@ -1,13 +1,4 @@ -// -// RollbarCallStackFrame.m -// Rollbar -// -// Created by Andrey Kornich on 2019-11-27. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarCallStackFrame.h" -//@import RollbarCommon; #import "RollbarCallStackFrameContext.h" static NSString * const DFK_FILENAME = @"filename"; diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarCallStackFrameContext.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarCallStackFrameContext.m index aed4c322..ee82f8ba 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarCallStackFrameContext.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarCallStackFrameContext.m @@ -1,13 +1,4 @@ -// -// RollbarCallStackFrameContext.m -// Rollbar -// -// Created by Andrey Kornich on 2019-12-10. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarCallStackFrameContext.h" -//@import RollbarCommon; static NSString * const DFK_PRE_CODE_LINES = @"pre"; static NSString * const DFK_POST_CODE_LINES = @"post"; diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarCaptureIpType.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarCaptureIpType.m index d6823fb4..6b85919e 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarCaptureIpType.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarCaptureIpType.m @@ -1,11 +1,3 @@ -// -// CaptureIpType.m -// Rollbar -// -// Created by Andrey Kornich on 2019-10-15. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarCaptureIpType.h" @implementation RollbarCaptureIpTypeUtil diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarClient.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarClient.m index 2cacd4df..efc351ea 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarClient.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarClient.m @@ -1,13 +1,4 @@ -// -// RollbarClient.m -// Rollbar -// -// Created by Andrey Kornich on 2019-12-02. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarClient.h" -//@import RollbarCommon; #import "RollbarJavascript.h" #pragma mark - data field keys diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarConfig.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarConfig.m index 1854337e..86370d4b 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarConfig.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarConfig.m @@ -1,11 +1,3 @@ -// -// RollbarConfig.m -// RollbarNotifier -// -// Created by Andrey Kornich on 2019-10-11. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarConfig.h" #import "RollbarCachesDirectory.h" #import "RollbarDestination.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarCrashReport.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarCrashReport.m index 9b6a1428..58481aaf 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarCrashReport.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarCrashReport.m @@ -1,13 +1,4 @@ -// -// RollbarCrashReport.m -// Rollbar -// -// Created by Andrey Kornich on 2019-11-27. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarCrashReport.h" -//@import RollbarCommon; #import static NSString * const DFK_RAW = @"raw"; diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarData.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarData.m index f2a1fb59..9c0e3d22 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarData.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarData.m @@ -1,21 +1,10 @@ -// -// RollbarData.m -// Rollbar -// -// Created by Andrey Kornich on 2019-10-10. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarData.h" -//#import "DataTransferObject.h" -//#import "DataTransferObject+Protected.h" #import "RollbarBody.h" #import "RollbarRequest.h" #import "RollbarPerson.h" #import "RollbarServer.h" #import "RollbarClient.h" #import "RollbarModule.h" -//#import "JSONSupport.h" #pragma mark - data field keys diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarDestination.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarDestination.m index 7d51d49a..fe259455 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarDestination.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarDestination.m @@ -1,13 +1,4 @@ -// -// RollbarDestination.m -// Rollbar -// -// Created by Andrey Kornich on 2019-10-23. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarDestination.h" -//#import "DataTransferObject+Protected.h" #pragma mark - constants diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarDeveloperOptions.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarDeveloperOptions.m index b1e1e304..968b8fac 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarDeveloperOptions.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarDeveloperOptions.m @@ -1,13 +1,4 @@ -// -// RollbarDeveloperOptions.m -// Rollbar -// -// Created by Andrey Kornich on 2019-10-23. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarDeveloperOptions.h" -//#import "DataTransferObject+Protected.h" #pragma mark - constants diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarException.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarException.m index a9221ebd..ccffa907 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarException.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarException.m @@ -1,13 +1,4 @@ -// -// RollbarException.m -// Rollbar -// -// Created by Andrey Kornich on 2019-11-27. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarException.h" -//#import "DataTransferObject+Protected.h" static NSString * const DFK_CLASS = @"class"; static NSString * const DFK_MESSAGE = @"message"; diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarHttpMethod.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarHttpMethod.m index 9b91b1a8..8b09fd9a 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarHttpMethod.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarHttpMethod.m @@ -1,11 +1,3 @@ -// -// RollbarHttpMethod.m -// Rollbar -// -// Created by Andrey Kornich on 2019-12-02. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarHttpMethod.h" @implementation RollbarHttpMethodUtil diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarJavascript.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarJavascript.m index 7859ce60..6c50ac6d 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarJavascript.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarJavascript.m @@ -1,14 +1,4 @@ -// -// RollbarJavascript.m -// Rollbar -// -// Created by Andrey Kornich on 2019-12-02. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarJavascript.h" -//#import "DataTransferObject+Protected.h" -//#import "TriStateFlag.h" #pragma mark - data field keys diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarLevel.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarLevel.m index c5cc9aaf..273d3037 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarLevel.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarLevel.m @@ -1,5 +1,3 @@ -// Copyright © 2018 Rollbar. All rights reserved. - #import "RollbarLevel.h" @implementation RollbarLevelUtil diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarLoggingOptions.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarLoggingOptions.m index 93c60141..8d010773 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarLoggingOptions.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarLoggingOptions.m @@ -1,13 +1,4 @@ -// -// RollbarLoggingOptions.m -// Rollbar -// -// Created by Andrey Kornich on 2019-10-28. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarLoggingOptions.h" -//#import "DataTransferObject+Protected.h" #pragma mark - constants diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarMessage.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarMessage.m index 3ee85e7c..958ffe6e 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarMessage.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarMessage.m @@ -1,14 +1,4 @@ -// -// RollbarMessage.m -// Rollbar -// -// Created by Andrey Kornich on 2019-11-27. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarMessage.h" -//#import "DataTransferObject.h" -//#import "DataTransferObject+Protected.h" #import static NSString * const DFK_BODY = @"body"; diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarModule.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarModule.m index a6b1ccdd..9acf0f3a 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarModule.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarModule.m @@ -1,13 +1,4 @@ -// -// RollbarModule.m -// Rollbar -// -// Created by Andrey Kornich on 2019-10-25. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarModule.h" -//@import RollbarCommon; #pragma mark - constants diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarPayload.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarPayload.m index 7ba10082..9abede88 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarPayload.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarPayload.m @@ -1,13 +1,4 @@ -// -// RollbarPayload.m -// Rollbar -// -// Created by Andrey Kornich on 2019-10-08. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarPayload.h" -//#import "DataTransferObject+Protected.h" #import "RollbarData.h" #pragma mark - data field keys diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarPerson.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarPerson.m index c8dc6280..4208154c 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarPerson.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarPerson.m @@ -1,13 +1,4 @@ -// -// RollbarPerson.m -// Rollbar -// -// Created by Andrey Kornich on 2019-10-25. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarPerson.h" -//#import "DataTransferObject+Protected.h" #pragma mark - constants diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarProxy.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarProxy.m index b585cf86..dc54804a 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarProxy.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarProxy.m @@ -1,14 +1,5 @@ -// -// RollbarProxy.m -// Rollbar -// -// Created by Andrey Kornich on 2019-10-24. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import #import "RollbarProxy.h" -//#import "DataTransferObject+Protected.h" #pragma mark - constants diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarRequest.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarRequest.m index ed04391d..75739901 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarRequest.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarRequest.m @@ -1,13 +1,4 @@ -// -// RollbarRequest.m -// Rollbar -// -// Created by Andrey Kornich on 2019-12-02. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarRequest.h" -//#import "DataTransferObject+Protected.h" static NSString * const DFK_URL = @"url"; static NSString * const DFK_METHOD = @"method"; diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarScrubbingOptions.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarScrubbingOptions.m index 4b539ed1..10417026 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarScrubbingOptions.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarScrubbingOptions.m @@ -1,13 +1,4 @@ -// -// RollbarScrubbingOptions.m -// Rollbar -// -// Created by Andrey Kornich on 2019-10-24. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarScrubbingOptions.h" -//#import "DataTransferObject+Protected.h" #pragma mark - constants diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarServer.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarServer.m index 47a3dfbb..bd35a179 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarServer.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarServer.m @@ -1,13 +1,4 @@ -// -// RollbarServer.m -// Rollbar -// -// Created by Andrey Kornich on 2019-12-02. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarServer.h" -//#import "DataTransferObject+Protected.h" static NSString *const DFK_CPU = @"cpu"; diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarServerConfig.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarServerConfig.m index 5349a814..e0ecf296 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarServerConfig.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarServerConfig.m @@ -1,13 +1,4 @@ -// -// RollbarServer.m -// Rollbar -// -// Created by Andrey Kornich on 2019-10-24. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarServerConfig.h" -//#import "DataTransferObject+Protected.h" #pragma mark - constants diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarSource.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarSource.m index 8e1a0301..e104e72d 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarSource.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarSource.m @@ -1,11 +1,3 @@ -// -// RollbarSource.m -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - #import "RollbarSource.h" @implementation RollbarSourceUtil diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryBody.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryBody.m index 54c12ffa..ea3b27bd 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryBody.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryBody.m @@ -1,11 +1,3 @@ -// -// RollbarTelemetryBody.m -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - #import "RollbarTelemetryBody.h" @implementation RollbarTelemetryBody diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryConnectivityBody.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryConnectivityBody.m index 4d935891..20047082 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryConnectivityBody.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryConnectivityBody.m @@ -1,13 +1,4 @@ -// -// RollbarTelemetryConnectivityBody.m -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - #import "RollbarTelemetryConnectivityBody.h" -//#import "DataTransferObject+Protected.h" #pragma mark - constants diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryErrorBody.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryErrorBody.m index 2fa2b31a..4e7c2ca7 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryErrorBody.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryErrorBody.m @@ -1,11 +1,3 @@ -// -// RollbarTelemetryErrorBody.m -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - #import "RollbarTelemetryErrorBody.h" @implementation RollbarTelemetryErrorBody diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryEvent.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryEvent.m index 0e41a1cc..81213011 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryEvent.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryEvent.m @@ -1,12 +1,3 @@ -// -// RollbarTelemetryEvent.m -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - -//#import "DataTransferObject+Protected.h" #import "RollbarTelemetryEvent.h" #import "RollbarTelemetryBody.h" #import "RollbarTelemetryConnectivityBody.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryLogBody.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryLogBody.m index 45b41bc6..a909ce36 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryLogBody.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryLogBody.m @@ -1,13 +1,4 @@ -// -// RollbarTelemetryLogBody.m -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - #import "RollbarTelemetryLogBody.h" -//#import "DataTransferObject+Protected.h" #pragma mark - constants diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryManualBody.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryManualBody.m index a98da87a..2cd99e75 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryManualBody.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryManualBody.m @@ -1,11 +1,3 @@ -// -// RollbarTelemetryManualBody.m -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - #import "RollbarTelemetryManualBody.h" @implementation RollbarTelemetryManualBody diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryNavigationBody.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryNavigationBody.m index cf7060b3..ff253702 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryNavigationBody.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryNavigationBody.m @@ -1,13 +1,4 @@ -// -// RollbarTelemetryNavigationBody.m -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - #import "RollbarTelemetryNavigationBody.h" -//@import RollbarCommon; #pragma mark - constants diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryNetworkBody.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryNetworkBody.m index c11c004b..e4b39df2 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryNetworkBody.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryNetworkBody.m @@ -1,13 +1,4 @@ -// -// RollbarTelemetryNetworkBody.m -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - #import "RollbarTelemetryNetworkBody.h" -//#import "DataTransferObject+Protected.h" #pragma mark - constants diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryOptions.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryOptions.m index 9b8842a9..183b2901 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryOptions.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryOptions.m @@ -1,13 +1,5 @@ -// -// RollbarTelemetryOptions.m -// Rollbar -// -// Created by Andrey Kornich on 2019-10-25. -// Copyright © 2019 Rollbar. All rights reserved. -// #import "RollbarTelemetryOptions.h" #import "RollbarScrubbingOptions.h" -//@import RollbarCommon; #pragma mark - constants diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryType.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryType.m index 5dea8ac6..3b857ee5 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryType.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryType.m @@ -1,5 +1,3 @@ -// Copyright (c) 2018 Rollbar, Inc. All rights reserved. - #import "RollbarTelemetryType.h" @implementation RollbarTelemetryTypeUtil diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryViewBody.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryViewBody.m index ff050185..c54102ea 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryViewBody.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryViewBody.m @@ -1,13 +1,4 @@ -// -// RollbarTelemetryViewBody.m -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - #import "RollbarTelemetryViewBody.h" -//#import "DataTransferObject+Protected.h" #pragma mark - constants diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTrace.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTrace.m index 2945232e..411c29df 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTrace.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTrace.m @@ -1,14 +1,4 @@ -// -// RollbarTrace.m -// Rollbar -// -// Created by Andrey Kornich on 2019-11-27. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarTrace.h" -//#import "DataTransferObject+Protected.h" -//#import "DataTransferObject+CustomData.h" #import "RollbarCallStackFrame.h" #import "RollbarException.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/Rollbar.m b/RollbarNotifier/Sources/RollbarNotifier/Rollbar.m index 3b6668b9..a0c87dfa 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/Rollbar.m +++ b/RollbarNotifier/Sources/RollbarNotifier/Rollbar.m @@ -1,5 +1,3 @@ -// Copyright (c) 2018 Rollbar, Inc. All rights reserved. - @import RollbarCommon; #import "Rollbar.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/RollbarConfigUtil.m b/RollbarNotifier/Sources/RollbarNotifier/RollbarConfigUtil.m index 03816ace..57690555 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/RollbarConfigUtil.m +++ b/RollbarNotifier/Sources/RollbarNotifier/RollbarConfigUtil.m @@ -1,11 +1,3 @@ -// -// RollbarConfig.m -// Rollbar -// -// Created by Andrey Kornich on 2019-10-11. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; #import "RollbarConfigUtil.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/RollbarCrashProcessor.h b/RollbarNotifier/Sources/RollbarNotifier/RollbarCrashProcessor.h index 9e730890..3c81d0af 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/RollbarCrashProcessor.h +++ b/RollbarNotifier/Sources/RollbarNotifier/RollbarCrashProcessor.h @@ -1,15 +1,9 @@ -// -// MyClass.h -// -// -// Created by Andrey Kornich on 2020-11-04. -// - @import Foundation; @import RollbarCommon; NS_ASSUME_NONNULL_BEGIN +/// A crash report processor @interface RollbarCrashProcessor : NSObject @end diff --git a/RollbarNotifier/Sources/RollbarNotifier/RollbarCrashProcessor.m b/RollbarNotifier/Sources/RollbarNotifier/RollbarCrashProcessor.m index 3c11baec..0be28afd 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/RollbarCrashProcessor.m +++ b/RollbarNotifier/Sources/RollbarNotifier/RollbarCrashProcessor.m @@ -1,10 +1,3 @@ -// -// MyClass.m -// -// -// Created by Andrey Kornich on 2020-11-04. -// - #import "RollbarCrashProcessor.h" #import "Rollbar.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/RollbarLog.m b/RollbarNotifier/Sources/RollbarNotifier/RollbarLog.m index 2d7c5234..e37547d4 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/RollbarLog.m +++ b/RollbarNotifier/Sources/RollbarNotifier/RollbarLog.m @@ -1,11 +1,3 @@ -// -// RollbarLog.m -// Rollbar -// -// Created by Andrey Kornich on 2019-11-12. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarLog.h" #import "RollbarTelemetry.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/RollbarLogger.m b/RollbarNotifier/Sources/RollbarNotifier/RollbarLogger.m index e566e5a2..7246fa95 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/RollbarLogger.m +++ b/RollbarNotifier/Sources/RollbarNotifier/RollbarLogger.m @@ -1,5 +1,3 @@ -// Copyright (c) 2018 Rollbar, Inc. All rights reserved. - @import Foundation; #if TARGET_OS_IOS | TARGET_OS_TV | TARGET_OS_MACCATALYST diff --git a/RollbarNotifier/Sources/RollbarNotifier/RollbarPayloadTruncator.m b/RollbarNotifier/Sources/RollbarNotifier/RollbarPayloadTruncator.m index b1d08fd7..6a698182 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/RollbarPayloadTruncator.m +++ b/RollbarNotifier/Sources/RollbarNotifier/RollbarPayloadTruncator.m @@ -1,5 +1,3 @@ -// Copyright (c) 2018 Rollbar, Inc. All rights reserved. - #import "RollbarPayloadTruncator.h" @import RollbarCommon; diff --git a/RollbarNotifier/Sources/RollbarNotifier/RollbarReachability.h b/RollbarNotifier/Sources/RollbarNotifier/RollbarReachability.h index 036ee11d..eff2e093 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/RollbarReachability.h +++ b/RollbarNotifier/Sources/RollbarNotifier/RollbarReachability.h @@ -25,7 +25,6 @@ POSSIBILITY OF SUCH DAMAGE. */ - @import Foundation; #if !TARGET_OS_WATCH @@ -67,43 +66,83 @@ typedef NS_ENUM(NSInteger, NetworkStatus) { typedef void (^NetworkReachable)(RollbarReachability *reachability); typedef void (^NetworkUnreachable)(RollbarReachability *reachability); +/// Network reachability helper @interface RollbarReachability : NSObject +/// Block to invoke when becomes reachable. @property (nonatomic, copy) NetworkReachable reachableBlock; + +/// Block to invoke when becomes unreachable. @property (nonatomic, copy) NetworkUnreachable unreachableBlock; +/// Flags reachability via wireless/cellular connection. @property (nonatomic, assign) BOOL reachableOnWWAN; +/// Detects reachability +/// @param hostname host name to reach +(RollbarReachability *)reachabilityWithHostname:(NSString *)hostname; + // This is identical to the function above, but is here to maintain //compatibility with Apples original code. (see .m) + +/// Detects reachability +/// @param hostname host name to reach +(RollbarReachability *)reachabilityWithHostName:(NSString *)hostname; + +/// Detects Internet reachability +(RollbarReachability *)reachabilityForInternetConnection; + +/// Detects reachability +/// @param hostAddress host's address +(RollbarReachability *)reachabilityWithAddress:(const struct sockaddr_in *)hostAddress; + +/// Detects reachability of local WiFi +(RollbarReachability *)reachabilityForLocalWiFi; +/// Initializer +/// @param ref reference to a SCNetworkReachability -(RollbarReachability *)initWithReachabilityRef:(SCNetworkReachabilityRef)ref; +/// Starts the notifier -(BOOL)startNotifier; + +/// Stops the notifier -(void)stopNotifier; +/// Flags reachability any status -(BOOL)isReachable; + +/// Flags reachability via cellular status -(BOOL)isReachableViaWWAN; + +/// Flags reachability via WiFi status -(BOOL)isReachableViaWiFi; -// WWAN may be available, but not active until a connection has been established. -// WiFi may require a connection for VPN on Demand. --(BOOL)isConnectionRequired; // Identical DDG variant. --(BOOL)connectionRequired; // Apple's routine. -// Dynamic, on demand connection? +/// WWAN may be available, but not active until a connection has been established. +/// WiFi may require a connection for VPN on Demand. +/// Identical DDG variant. +-(BOOL)isConnectionRequired; + +/// Apple's routine. +-(BOOL)connectionRequired; + +/// Dynamic, on demand connection? -(BOOL)isConnectionOnDemand; -// Is user intervention required? + +/// Is user intervention required? -(BOOL)isInterventionRequired; +/// Returns current reachability status -(NetworkStatus)currentReachabilityStatus; + +/// Returns current reachability flags -(SCNetworkReachabilityFlags)reachabilityFlags; + +/// Returns current reachability status as a String -(NSString *)currentReachabilityString; + +/// Returns current reachability flags as a String -(NSString *)currentReachabilityFlags; @end diff --git a/RollbarNotifier/Sources/RollbarNotifier/RollbarReachability.m b/RollbarNotifier/Sources/RollbarNotifier/RollbarReachability.m index a8d2a70c..a8ab1735 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/RollbarReachability.m +++ b/RollbarNotifier/Sources/RollbarNotifier/RollbarReachability.m @@ -36,7 +36,8 @@ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF #import #import -NSString *const kRollbarReachabilityChangedNotification = @"kRollbarReachabilityChangedNotification"; +NSString *const kRollbarReachabilityChangedNotification = +@"kRollbarReachabilityChangedNotification"; @interface RollbarReachability () diff --git a/RollbarNotifier/Sources/RollbarNotifier/RollbarTelemetry.m b/RollbarNotifier/Sources/RollbarNotifier/RollbarTelemetry.m index 4163f5eb..ca54d9bf 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/RollbarTelemetry.m +++ b/RollbarNotifier/Sources/RollbarNotifier/RollbarTelemetry.m @@ -1,5 +1,3 @@ -// Copyright (c) 2018 Rollbar, Inc. All rights reserved. - @import RollbarCommon; #import "RollbarTelemetry.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/RollbarTelemetryOptionsObserver.h b/RollbarNotifier/Sources/RollbarNotifier/RollbarTelemetryOptionsObserver.h index ce47e1ff..87fe5132 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/RollbarTelemetryOptionsObserver.h +++ b/RollbarNotifier/Sources/RollbarNotifier/RollbarTelemetryOptionsObserver.h @@ -1,21 +1,26 @@ -// Copyright (c) 2020 Rollbar, Inc. All rights reserved. - @import Foundation; @class RollbarTelemetryOptions; +/// Telemetry options observer @interface RollbarTelemetryOptionsObserver : NSObject +/// Registers with a Telemetry options object to observe its changes. +/// @param telemetryOptions the Telemetry options object. - (void)registerAsObserverForTelemetryOptions:(RollbarTelemetryOptions *)telemetryOptions; +/// Unregisters from observing Telemetry options object changes. +/// @param telemetryOptions the Telemetry options object. - (void)unregisterAsObserverForTelemetryOptions:(RollbarTelemetryOptions *)telemetryOptions; +/// Callback invoked when any keyed value of an observed object changes. +/// @param keyPath the key path of the change +/// @param object the observed object +/// @param change the observed change +/// @param context an extra context for the change - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context; -//- (instancetype)init -//NS_DESIGNATED_INITIALIZER; - @end diff --git a/RollbarNotifier/Sources/RollbarNotifier/RollbarTelemetryOptionsObserver.m b/RollbarNotifier/Sources/RollbarNotifier/RollbarTelemetryOptionsObserver.m index af3c93de..db547eb5 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/RollbarTelemetryOptionsObserver.m +++ b/RollbarNotifier/Sources/RollbarNotifier/RollbarTelemetryOptionsObserver.m @@ -1,5 +1,3 @@ -// Copyright (c) 2018 Rollbar, Inc. All rights reserved. - #import "RollbarTelemetryOptionsObserver.h" #import "RollbarTelemetryOptions.h" #import "RollbarTelemetry.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/RollbarThread.h b/RollbarNotifier/Sources/RollbarNotifier/RollbarThread.h index feadb667..38f12483 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/RollbarThread.h +++ b/RollbarNotifier/Sources/RollbarNotifier/RollbarThread.h @@ -1,19 +1,20 @@ -// Copyright (c) 2018 Rollbar, Inc. All rights reserved. - @import Foundation; @class RollbarLogger; @interface RollbarThread : NSThread -/// Disallowed initializer +/// Hides the initializer. - (instancetype)init NS_UNAVAILABLE; +/// Initializer +/// @param logger a Rollbar logger to use. +/// @param reportsPerMinute maximum allowed reporting rate. - (instancetype)initWithNotifier:(RollbarLogger*)logger reportingRate:(NSUInteger)reportsPerMinute; -//NS_DESIGNATED_INITIALIZER; +/// Signifies that the thread is active or not. @property(atomic) BOOL active; @end diff --git a/RollbarNotifier/Sources/RollbarNotifier/RollbarThread.m b/RollbarNotifier/Sources/RollbarNotifier/RollbarThread.m index ba35c036..bd95b8eb 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/RollbarThread.m +++ b/RollbarNotifier/Sources/RollbarNotifier/RollbarThread.m @@ -1,5 +1,3 @@ -// Copyright (c) 2018 Rollbar, Inc. All rights reserved. - @import RollbarCommon; #import "RollbarThread.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/Rollbar.h b/RollbarNotifier/Sources/RollbarNotifier/include/Rollbar.h index 6d18ad9b..3fe26f3c 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/Rollbar.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/Rollbar.h @@ -1,5 +1,3 @@ -// Copyright (c) 2018 Rollbar, Inc. All rights reserved. - #ifndef Rollbar_h #define Rollbar_h diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarAppLanguage.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarAppLanguage.h index 056c194b..4ce4845e 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarAppLanguage.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarAppLanguage.h @@ -1,11 +1,3 @@ -// -// RollbarAppLanguage.h -// Rollbar -// -// Created by Andrey Kornich on 2019-12-16. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import Foundation; NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarBody.h index 475b17ea..e58f5833 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarBody.h @@ -1,11 +1,3 @@ -// -// RollbarBody.h -// Rollbar -// -// Created by Andrey Kornich on 2019-11-27. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; @class RollbarTelemetry; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCallStackFrame.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCallStackFrame.h index 6b4412d7..22a8459e 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCallStackFrame.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCallStackFrame.h @@ -1,11 +1,3 @@ -// -// RollbarCallStackFrame.h -// Rollbar -// -// Created by Andrey Kornich on 2019-11-27. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; @class RollbarCallStackFrameContext; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCallStackFrameContext.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCallStackFrameContext.h index d7efa739..be520a8c 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCallStackFrameContext.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCallStackFrameContext.h @@ -1,11 +1,3 @@ -// -// RollbarCallStackFrameContext.h -// Rollbar -// -// Created by Andrey Kornich on 2019-12-10. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCaptureIpType.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCaptureIpType.h index 16303ea4..2adc5cc7 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCaptureIpType.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCaptureIpType.h @@ -1,11 +1,3 @@ -// -// RollbarCaptureIpType.h -// Rollbar -// -// Created by Andrey Kornich on 2019-10-15. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import Foundation; #pragma mark - RollbarCaptureIpType enum diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarClient.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarClient.h index d65a080c..a9891673 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarClient.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarClient.h @@ -1,11 +1,3 @@ -// -// RollbarClient.h -// Rollbar -// -// Created by Andrey Kornich on 2019-12-02. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; @class RollbarJavascript; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarConfig.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarConfig.h index 63b80f61..eca70441 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarConfig.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarConfig.h @@ -1,11 +1,3 @@ -// -// RollbarConfig.h -// RollbarNotifier -// -// Created by Andrey Kornich on 2019-10-11. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarCaptureIpType.h" #import "RollbarLevel.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarConfigUtil.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarConfigUtil.h index 23583cc8..3f3458c7 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarConfigUtil.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarConfigUtil.h @@ -1,11 +1,3 @@ -// -// RollbarConfig.h -// Rollbar -// -// Created by Andrey Kornich on 2019-10-11. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import Foundation; @class RollbarConfig; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCrashReport.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCrashReport.h index a5d328e1..735952f2 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCrashReport.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCrashReport.h @@ -1,11 +1,3 @@ -// -// RollbarCrashReport.h -// Rollbar -// -// Created by Andrey Kornich on 2019-11-27. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarData.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarData.h index f48d41da..2533b499 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarData.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarData.h @@ -1,11 +1,3 @@ -// -// RollbarData.h -// Rollbar -// -// Created by Andrey Kornich on 2019-10-10. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarLevel.h" #import "RollbarAppLanguage.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarDestination.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarDestination.h index c8e8cf90..c4215f23 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarDestination.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarDestination.h @@ -1,11 +1,3 @@ -// -// RollbarDestination.h -// Rollbar -// -// Created by Andrey Kornich on 2019-10-23. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarDeveloperOptions.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarDeveloperOptions.h index 36d4ad2f..0f790018 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarDeveloperOptions.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarDeveloperOptions.h @@ -1,11 +1,3 @@ -// -// RollbarDeveloperOptions.h -// Rollbar -// -// Created by Andrey Kornich on 2019-10-23. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarException.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarException.h index 50271d54..d06c7013 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarException.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarException.h @@ -1,11 +1,3 @@ -// -// RollbarException.h -// Rollbar -// -// Created by Andrey Kornich on 2019-11-27. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarHttpMethod.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarHttpMethod.h index 54b0c02f..3b47ba58 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarHttpMethod.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarHttpMethod.h @@ -1,11 +1,3 @@ -// -// RollbarHttpMethod.h -// Rollbar -// -// Created by Andrey Kornich on 2019-12-02. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import Foundation; #pragma mark - RollbarHttpMethod enum diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarJavascript.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarJavascript.h index 67847b57..e4ea25cf 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarJavascript.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarJavascript.h @@ -1,11 +1,3 @@ -// -// RollbarJavascript.h -// Rollbar -// -// Created by Andrey Kornich on 2019-12-02. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLevel.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLevel.h index 388d4512..5ef06577 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLevel.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLevel.h @@ -1,5 +1,3 @@ -// Copyright © 2018 Rollbar. All rights reserved. - @import Foundation; #pragma mark - RollbarLevel diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLog.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLog.h index 1ec6f853..230b0ade 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLog.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLog.h @@ -1,11 +1,3 @@ -// -// RollbarLog.h -// Rollbar -// -// Created by Andrey Kornich on 2019-11-12. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import Foundation; /// Rollbar equivalent of NSLog(...) that also allows capture of the log messages as part of RollbarTelemetry data. diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLogger.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLogger.h index 2c8342d5..9d5829fe 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLogger.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLogger.h @@ -1,5 +1,3 @@ -// Copyright (c) 2018 Rollbar, Inc. All rights reserved. - @import Foundation; @class RollbarConfig; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLoggingOptions.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLoggingOptions.h index b206506a..0796a60b 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLoggingOptions.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLoggingOptions.h @@ -1,11 +1,3 @@ -// -// RollbarLoggingOptions.h -// Rollbar -// -// Created by Andrey Kornich on 2019-10-28. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarLevel.h" #import "RollbarCaptureIpType.h" @import RollbarCommon; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarMessage.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarMessage.h index fc3605fa..5718dc30 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarMessage.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarMessage.h @@ -1,11 +1,3 @@ -// -// RollbarMessage.h -// Rollbar -// -// Created by Andrey Kornich on 2019-11-27. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarModule.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarModule.h index 446e4fed..b41fb1a0 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarModule.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarModule.h @@ -1,11 +1,3 @@ -// -// RollbarModule.h -// Rollbar -// -// Created by Andrey Kornich on 2019-10-25. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayload.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayload.h index d11c3771..792c97e0 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayload.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayload.h @@ -1,11 +1,3 @@ -// -// RollbarPayload.h -// Rollbar -// -// Created by Andrey Kornich on 2019-10-08. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; @class RollbarData; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayloadDTOs.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayloadDTOs.h index df93346f..b31382e4 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayloadDTOs.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayloadDTOs.h @@ -1,11 +1,3 @@ -// -// RollbarPayloadDTOs.h -// Rollbar -// -// Created by Andrey Kornich on 2019-12-16. -// Copyright © 2019 Rollbar. All rights reserved. -// - // The DTO abstraction: //#import "RollbarDTOAbstraction.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayloadTruncator.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayloadTruncator.h index ca51f874..33a6e4b4 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayloadTruncator.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayloadTruncator.h @@ -1,5 +1,3 @@ -// Copyright (c) 2018 Rollbar, Inc. All rights reserved. - @import Foundation; @interface RollbarPayloadTruncator : NSObject diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPerson.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPerson.h index 70ebe6a1..52d7e62e 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPerson.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPerson.h @@ -1,11 +1,3 @@ -// -// RollbarPerson.h -// Rollbar -// -// Created by Andrey Kornich on 2019-10-25. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarProxy.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarProxy.h index 5bdfe277..ccc52ae1 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarProxy.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarProxy.h @@ -1,11 +1,3 @@ -// -// RollbarProxy.h -// Rollbar -// -// Created by Andrey Kornich on 2019-10-24. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarRequest.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarRequest.h index babd3a05..501d0590 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarRequest.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarRequest.h @@ -1,11 +1,3 @@ -// -// RollbarRequest.h -// Rollbar -// -// Created by Andrey Kornich on 2019-12-02. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarHttpMethod.h" @import RollbarCommon; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarScrubbingOptions.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarScrubbingOptions.h index 105a39b4..de0b4b6e 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarScrubbingOptions.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarScrubbingOptions.h @@ -1,11 +1,3 @@ -// -// RollbarScrubbingOptions.h -// Rollbar -// -// Created by Andrey Kornich on 2019-10-24. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarServer.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarServer.h index f3332af6..d938b345 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarServer.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarServer.h @@ -1,11 +1,3 @@ -// -// RollbarServer.h -// Rollbar -// -// Created by Andrey Kornich on 2019-12-02. -// Copyright © 2019 Rollbar. All rights reserved. -// - #import "RollbarServerConfig.h" NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarServerConfig.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarServerConfig.h index c3da9ba0..f587ebce 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarServerConfig.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarServerConfig.h @@ -1,11 +1,3 @@ -// -// RollbarServer.h -// Rollbar -// -// Created by Andrey Kornich on 2019-10-24. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarSource.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarSource.h index 8a510d20..59c6e90e 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarSource.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarSource.h @@ -1,11 +1,3 @@ -// -// RollbarSource.h -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - @import Foundation; #pragma mark - RollbarSource enum diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetry.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetry.h index 8f4eb0e7..942a4651 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetry.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetry.h @@ -1,5 +1,3 @@ -// Copyright (c) 2018 Rollbar, Inc. All rights reserved. - @import Foundation; #import "RollbarLevel.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryBody.h index bfdad0c5..1ec3faa0 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryBody.h @@ -1,11 +1,3 @@ -// -// RollbarTelemetryBody.h -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - @import RollbarCommon; NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryConnectivityBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryConnectivityBody.h index 85ec6624..a3e8532f 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryConnectivityBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryConnectivityBody.h @@ -1,11 +1,3 @@ -// -// RollbarTelemetryConnectivityBody.h -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - #import "RollbarTelemetryBody.h" NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryErrorBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryErrorBody.h index 6d8e41a0..e2aa18c4 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryErrorBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryErrorBody.h @@ -1,11 +1,3 @@ -// -// RollbarTelemetryErrorBody.h -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - #import "RollbarTelemetryLogBody.h" NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryEvent.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryEvent.h index 39b61ad5..d7a462b2 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryEvent.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryEvent.h @@ -1,12 +1,3 @@ -// -// RollbarTelemetryEvent.h -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - - @import RollbarCommon; #import "RollbarLevel.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryLogBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryLogBody.h index b7b36735..381fe5df 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryLogBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryLogBody.h @@ -1,11 +1,3 @@ -// -// RollbarTelemetryLogBody.h -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - #import "RollbarTelemetryBody.h" NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryManualBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryManualBody.h index 10578916..6a864ca2 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryManualBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryManualBody.h @@ -1,11 +1,3 @@ -// -// RollbarTelemetryManualBody.h -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - #import "RollbarTelemetryBody.h" NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryNavigationBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryNavigationBody.h index 84c6f64c..f6111059 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryNavigationBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryNavigationBody.h @@ -1,11 +1,3 @@ -// -// RollbarTelemetryNavigationBody.h -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - #import "RollbarTelemetryBody.h" NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryNetworkBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryNetworkBody.h index add23577..3de50aee 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryNetworkBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryNetworkBody.h @@ -1,11 +1,3 @@ -// -// RollbarTelemetryNetworkBody.h -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - #import "RollbarTelemetryBody.h" #import "RollbarHttpMethod.h" diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryOptions.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryOptions.h index 77d963f5..0891e232 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryOptions.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryOptions.h @@ -1,11 +1,3 @@ -// -// RollbarTelemetryOptions.h -// Rollbar -// -// Created by Andrey Kornich on 2019-10-25. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; @class RollbarScrubbingOptions; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryType.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryType.h index 40e649d7..d6ef6731 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryType.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryType.h @@ -1,5 +1,3 @@ -// Copyright (c) 2018 Rollbar, Inc. All rights reserved. - @import Foundation; #pragma mark - RollbarTelemetryType diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryViewBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryViewBody.h index 3f214370..cfa2144f 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryViewBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryViewBody.h @@ -1,11 +1,3 @@ -// -// RollbarTelemetryViewBody.h -// Rollbar -// -// Created by Andrey Kornich on 2020-02-28. -// Copyright © 2020 Rollbar. All rights reserved. -// - #import "RollbarTelemetryBody.h" NS_ASSUME_NONNULL_BEGIN diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTrace.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTrace.h index ef2318f7..feb02c5f 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTrace.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTrace.h @@ -1,11 +1,3 @@ -// -// RollbarTrace.h -// Rollbar -// -// Created by Andrey Kornich on 2019-11-27. -// Copyright © 2019 Rollbar. All rights reserved. -// - @import RollbarCommon; @class RollbarCallStackFrame; From 9c2627e72e9da88f078697f1bf8ccdd1774fc13b Mon Sep 17 00:00:00 2001 From: Andrey Kornich Date: Fri, 18 Feb 2022 20:14:02 -0800 Subject: [PATCH 2/3] docs: ref #127 Update RollbarNotifier public API doc comments so they are properly rendered by Xcode Quick Help --- .../Sources/RollbarNotifier/include/Rollbar.h | 280 ++++++++++++++++++ .../RollbarNotifier/include/RollbarBody.h | 46 ++- .../include/RollbarCallStackFrame.h | 65 ++-- .../include/RollbarCallStackFrameContext.h | 12 +- .../RollbarNotifier/include/RollbarClient.h | 13 +- .../RollbarNotifier/include/RollbarConfig.h | 41 ++- .../include/RollbarConfigUtil.h | 26 ++ .../include/RollbarCrashReport.h | 9 +- 8 files changed, 433 insertions(+), 59 deletions(-) diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/Rollbar.h b/RollbarNotifier/Sources/RollbarNotifier/include/Rollbar.h index 3fe26f3c..c25923bb 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/Rollbar.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/Rollbar.h @@ -15,56 +15,116 @@ #pragma mark - Class Initializers +/// Class initializer. +/// @param accessToken Rollbar project access token + (void)initWithAccessToken:(nonnull NSString *)accessToken; +/// Class initializer. +/// @param configuration a Rollbar configuration + (void)initWithConfiguration:(nonnull RollbarConfig *)configuration; +/// Class initializer. +/// @param accessToken a Rollbar project access token +/// @param crashCollector a crash collector + (void)initWithAccessToken:(nonnull NSString *)accessToken crashCollector:(nullable id)crashCollector; +/// Class initializer. +/// @param configuration a Rollbar configuration +/// @param crashCollector a crash collector + (void)initWithConfiguration:(nonnull RollbarConfig *)configuration crashCollector:(nullable id)crashCollector; #pragma mark - Shared/global notifier +/// The shared singleton logger. + (nonnull RollbarLogger *)currentLogger; #pragma mark - Configuration +/// The shared Rollbar master configuration. + (nullable RollbarConfig *)currentConfiguration; +/// Updates with a shared configuration. +/// @param configuration a new Rollbar configuration + (void)updateConfiguration:(nonnull RollbarConfig *)configuration; + +/// Forces fundamental configuration update + (void)reapplyConfiguration; #pragma mark - Logging methods +/// Logs a crash report +/// @param crashReport a crash report + (void)logCrashReport:(nonnull NSString *)crashReport; +/// Logs a message +/// @param level a Rollbar log level +/// @param message a message to log + (void)log:(RollbarLevel)level message:(nonnull NSString *)message; + +/// Logs an exception +/// @param level a Rollbar log level +/// @param exception an exception to log + (void)log:(RollbarLevel)level exception:(nonnull NSException *)exception; + +/// Logs an error +/// @param level a Rollbar level +/// @param error an error to log + (void)log:(RollbarLevel)level error:(nonnull NSError *)error; +/// Logs a message +/// @param level a Rollbar log level +/// @param message a message to log +/// @param data an extra data + (void)log:(RollbarLevel)level message:(nonnull NSString *)message data:(nullable NSDictionary *)data; + +/// Logs an exception +/// @param level a Rollbar log level +/// @param exception an exception +/// @param data an extra data + (void)log:(RollbarLevel)level exception:(nonnull NSException *)exception data:(nullable NSDictionary *)data; + +/// Logs an error +/// @param level a Rollbar log level +/// @param error an error +/// @param data an extra data + (void)log:(RollbarLevel)level error:(nonnull NSError *)error data:(nullable NSDictionary *)data; +/// Logs a message +/// @param level a Rollbar log level +/// @param message a message +/// @param data an extra data +/// @param context an extra context + (void)log:(RollbarLevel)level message:(nonnull NSString *)message data:(nullable NSDictionary *)data context:(nullable NSString *)context; + +/// Logs an exception +/// @param level a Rollbar log level +/// @param exception an exception +/// @param data an extra data +/// @param context an extra context + (void)log:(RollbarLevel)level exception:(nonnull NSException *)exception data:(nullable NSDictionary *)data context:(nullable NSString *)context; + +/// Logs an error +/// @param level a Rollbar log level +/// @param error an error +/// @param data an extra data +/// @param context an extra context + (void)log:(RollbarLevel)level error:(nonnull NSError *)error data:(nullable NSDictionary *)data @@ -72,108 +132,273 @@ #pragma mark - Convenience logging methods +/// Performs debug level logging +/// @param message a message + (void)debugMessage:(nonnull NSString *)message; + +/// Performs debug level logging +/// @param exception an exception + (void)debugException:(nonnull NSException *)exception; + +/// Performs debug level logging +/// @param error an error + (void)debugError:(nonnull NSError *)error; +/// Performs debug level logging +/// @param message a message +/// @param data an extra data + (void)debugMessage:(nonnull NSString *)message data:(nullable NSDictionary *)data; + +/// Performs debug level logging +/// @param exception an exception +/// @param data an extra data + (void)debugException:(nonnull NSException *)exception data:(nullable NSDictionary *)data; + +/// Performs debug level logging +/// @param error an error +/// @param data an extra data + (void)debugError:(nonnull NSError *)error data:(nullable NSDictionary *)data; +/// Performs debug level logging +/// @param message a message +/// @param data an extra data +/// @param context an extra context + (void)debugMessage:(nonnull NSString *)message data:(nullable NSDictionary *)data context:(nullable NSString *)context; + +/// Performs debug level logging +/// @param exception an exception +/// @param data an extra data +/// @param context an extra context + (void)debugException:(nonnull NSException *)exception data:(nullable NSDictionary *)data context:(nullable NSString *)context; + +/// Performs debug level logging +/// @param error an error +/// @param data an extra data +/// @param context an extra context + (void)debugError:(nonnull NSError *)error data:(nullable NSDictionary *)data context:(nullable NSString *)context; +/// Performs info level logging +/// @param message a message + (void)infoMessage:(nonnull NSString *)message; + +/// Performs info level logging +/// @param exception an exception + (void)infoException:(nonnull NSException *)exception; + +/// Performs info level logging +/// @param error an error + (void)infoError:(nonnull NSError *)error; +/// Performs info level logging +/// @param message a message +/// @param data an extra data + (void)infoMessage:(nonnull NSString *)message data:(nullable NSDictionary *)data; + +/// Performs info level logging +/// @param exception an exception +/// @param data an extra data + (void)infoException:(nonnull NSException *)exception data:(nullable NSDictionary *)data; + +/// Performs info level logging +/// @param error an error +/// @param data an extra data + (void)infoError:(nonnull NSError *)error data:(nullable NSDictionary *)data; +/// Performs info level logging +/// @param message a message +/// @param data an extra data +/// @param context an extra context + (void)infoMessage:(nonnull NSString *)message data:(nullable NSDictionary *)data context:(nullable NSString *)context; + +/// Performs info level logging +/// @param exception an exception +/// @param data an extra data +/// @param context an extra context + (void)infoException:(nonnull NSException *)exception data:(nullable NSDictionary *)data context:(nullable NSString *)context; + +/// Performs info level logging +/// @param error an error +/// @param data an extra data +/// @param context an extra context + (void)infoError:(nonnull NSError *)error data:(nullable NSDictionary *)data context:(nullable NSString *)context; +/// Performs warning level logging +/// @param message a message + (void)warningMessage:(nonnull NSString *)message; + +/// Performs warning level logging +/// @param exception an exception + (void)warningException:(nonnull NSException *)exception; + +/// Performs warning level logging +/// @param error an error + (void)warningError:(nonnull NSError *)error; +/// Performs warning level logging +/// @param message a message +/// @param data an extra data + (void)warningMessage:(nonnull NSString *)message data:(nullable NSDictionary *)data; + +/// Performs warning level logging +/// @param exception an exception +/// @param data an extra data + (void)warningException:(nonnull NSException *)exception data:(nullable NSDictionary *)data; + +/// Performs warning level logging +/// @param error an error +/// @param data an extra data + (void)warningError:(nonnull NSError *)error data:(nullable NSDictionary *)data; +/// Performs warning level logging +/// @param message a message +/// @param data an extra data +/// @param context an extra context + (void)warningMessage:(nonnull NSString *)message data:(nullable NSDictionary *)data context:(nullable NSString *)context; + +/// Performs warning level logging +/// @param exception an exception +/// @param data an extra data +/// @param context an extra context + (void)warningException:(nonnull NSException *)exception data:(nullable NSDictionary *)data context:(nullable NSString *)context; + +/// Performs warning level logging +/// @param error an error +/// @param data an extra data +/// @param context an extra context + (void)warningError:(nonnull NSError *)error data:(nullable NSDictionary *)data context:(nullable NSString *)context; +/// Performs error level logging +/// @param message a message + (void)errorMessage:(nonnull NSString *)message; + +/// Performs error level logging +/// @param exception an exception + (void)errorException:(nonnull NSException *)exception; + +/// Performs error level logging +/// @param error an error + (void)errorError:(nonnull NSError *)error; +/// Performs error level logging +/// @param message a message +/// @param data an extra data + (void)errorMessage:(nonnull NSString *)message data:(nullable NSDictionary *)data; + +/// Performs error level logging +/// @param exception an exception +/// @param data an extra data + (void)errorException:(nonnull NSException *)exception data:(nullable NSDictionary *)data; + +/// Performs error level logging +/// @param error an error +/// @param data an extra data + (void)errorError:(nonnull NSError *)error data:(nullable NSDictionary *)data; +/// Performs error level logging +/// @param message a message +/// @param data an extra data +/// @param context an extra context + (void)errorMessage:(nonnull NSString *)message data:(nullable NSDictionary *)data context:(nullable NSString *)context; + +/// Performs error level logging +/// @param exception an exception +/// @param data an extra data +/// @param context an extra context + (void)errorException:(nonnull NSException *)exception data:(nullable NSDictionary *)data context:(nullable NSString *)context; + +/// Performs error level logging +/// @param error an error +/// @param data an extra data +/// @param context an extra context + (void)errorError:(nonnull NSError *)error data:(nullable NSDictionary *)data context:(nullable NSString *)context; +/// Performs critical level logging +/// @param message a message + (void)criticalMessage:(nonnull NSString *)message; + +/// Performs critical level logging +/// @param exception an exception + (void)criticalException:(nonnull NSException *)exception; + +/// Performs critical level logging +/// @param error an error + (void)criticalError:(nonnull NSError *)error; +/// Performs critical level logging +/// @param message a message +/// @param data an extra data + (void)criticalMessage:(nonnull NSString *)message data:(nullable NSDictionary *)data; + +/// Performs critical level logging +/// @param exception an exception +/// @param data an extra data + (void)criticalException:(nonnull NSException *)exception data:(nullable NSDictionary *)data; + +/// Performs critical level logging +/// @param error an error +/// @param data an extra data + (void)criticalError:(nonnull NSError *)error data:(nullable NSDictionary *)data; +/// Performs critical level logging +/// @param message a message +/// @param data an extra data +/// @param context an extra context + (void)criticalMessage:(nonnull NSString *)message data:(nullable NSDictionary *)data context:(nullable NSString *)context; + +/// Performs critical level logging +/// @param exception an exception +/// @param data an extra data +/// @param context an extra context + (void)criticalException:(nonnull NSException *)exception data:(nullable NSDictionary *)data context:(nullable NSString *)context; + +/// Performs critical level logging +/// @param error an error +/// @param data an extra data +/// @param context an extra context + (void)criticalError:(nonnull NSError *)error data:(nullable NSDictionary *)data context:(nullable NSString *)context; @@ -181,48 +406,103 @@ #pragma mark - Send manually constructed JSON payload +/// Posts a Json payload +/// @param payload a Json payload + (void)sendJsonPayload:(nonnull NSData *)payload; #pragma mark - Telemetry API +/// Captures a view telemetry event +/// @param level Rollbar log level +/// @param element a view element + (void)recordViewEventForLevel:(RollbarLevel)level element:(nonnull NSString *)element; + +/// Captures a view telemetry event +/// @param level Rollbar log level +/// @param element a view element +/// @param extraData an extra data + (void)recordViewEventForLevel:(RollbarLevel)level element:(nonnull NSString *)element extraData:(nullable NSDictionary *)extraData; +/// Captures a network telemetry event +/// @param level Rollbar log level +/// @param method an HTTP method +/// @param url a URL +/// @param statusCode a status code + (void)recordNetworkEventForLevel:(RollbarLevel)level method:(nullable NSString *)method url:(nullable NSString *)url statusCode:(nullable NSString *)statusCode; + +/// Captures a network telemetry event +/// @param level Rollbar log level +/// @param method an HTTP method +/// @param url a URL +/// @param statusCode a status code +/// @param extraData and extra data + (void)recordNetworkEventForLevel:(RollbarLevel)level method:(nullable NSString *)method url:(nullable NSString *)url statusCode:(nullable NSString *)statusCode extraData:(nullable NSDictionary *)extraData; +/// Captures a connectivity telemetry event +/// @param level Rollbar log level +/// @param status a connectivity status + (void)recordConnectivityEventForLevel:(RollbarLevel)level status:(nonnull NSString *)status; + +/// Captures a connectivity telemetry event +/// @param level Rollbar log level +/// @param status a connectivity status +/// @param extraData an extra data + (void)recordConnectivityEventForLevel:(RollbarLevel)level status:(nonnull NSString *)status extraData:(nullable NSDictionary *)extraData; +/// Captures a error telemetry event +/// @param level Rollbar log level +/// @param message a message + (void)recordErrorEventForLevel:(RollbarLevel)level message:(nonnull NSString *)message; + +/// Captures a error telemetry event +/// @param level Rollbar log level +/// @param exception an exception + (void)recordErrorEventForLevel:(RollbarLevel)level exception:(nonnull NSException *)exception; + +/// Captures a error telemetry event +/// @param level Rollbar log level +/// @param message a message +/// @param extraData an extra data + (void)recordErrorEventForLevel:(RollbarLevel)level message:(nonnull NSString *)message extraData:(nullable NSDictionary *)extraData; +/// Captures a navigation telemetry event +/// @param level Rollbar log level +/// @param from from point +/// @param to to point + (void)recordNavigationEventForLevel:(RollbarLevel)level from:(nonnull NSString *)from to:(nonnull NSString *)to; + +/// Captures a navigation telemetry event +/// @param level Rollbar log level +/// @param from from point +/// @param to to point +/// @param extraData an extra data + (void)recordNavigationEventForLevel:(RollbarLevel)level from:(nonnull NSString *)from to:(nonnull NSString *)to extraData:(nullable NSDictionary *)extraData; +/// Captures a manual telemetry event +/// @param level Rollbar log level +/// @param extraData an extra data + (void)recordManualEventForLevel:(RollbarLevel)level withData:(nullable NSDictionary *)extraData; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarBody.h index e58f5833..4ef7a1f6 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarBody.h @@ -8,44 +8,58 @@ NS_ASSUME_NONNULL_BEGIN +/// RollbarBody payload element +/// +/// @note: +/// Required: "trace", "trace_chain", "message", or "crash_report" (exactly one) +/// If this payload is a single exception, use "trace" +/// If a chain of exceptions (for languages that support inner exceptions), use "trace_chain" +/// If a message with no stack trace, use "message" +/// If an application crash report, use "crash_report" @interface RollbarBody : RollbarDTO #pragma mark - Required but mutually exclusive properties -// Required: "trace", "trace_chain", "message", or "crash_report" (exactly one) -// If this payload is a single exception, use "trace" -// If a chain of exceptions (for languages that support inner exceptions), use "trace_chain" -// If a message with no stack trace, use "message" -// If an iOS crash report, use "crash_report" - -// Option 1: "trace" +/// Payload Option 1: "trace" @property (nonatomic, strong, nullable) RollbarTrace *trace; -// Option 2: "trace_chain" -// Used for exceptions with inner exceptions or causes -// Each element in the list should be a "trace" object, as shown above. -// Must contain at least one element. +/// Payload Option 2: "trace_chain" +/// Used for exceptions with inner exceptions or causes +/// Each element in the list should be a "trace" object, as shown above. +/// Must contain at least one element. @property (nonatomic,strong, nullable) NSArray *traceChain; -// Option 3: "message" -// Only one of "trace", "trace_chain", "message", or "crash_report" should be present. -// Presence of a "message" key means that this payload is a log message. +/// Payload Option 3: "message" +/// Only one of "trace", "trace_chain", "message", or "crash_report" should be present. +/// Presence of a "message" key means that this payload is a log message. @property (nonatomic, strong, nullable) RollbarMessage *message; -// Option 4: "crash_report" +// Payload Option 4: "crash_report" // Only one of "trace", "trace_chain", "message", or "crash_report" should be present. @property (nonatomic, strong, nullable) RollbarCrashReport *crashReport; #pragma mark - Optional properties -// Optional: "telemetry". Only applicable if you are sending telemetry data. +/// Optional: "telemetry". +/// Only applicable if you are sending telemetry data. @property (readonly, nonatomic, strong, nullable) NSArray *telemetry; #pragma mark - Initializers +/// Initializer +/// @param message a message -(instancetype)initWithMessage:(nonnull NSString *)message; + +/// Initializer +/// @param exception an exception -(instancetype)initWithException:(nonnull NSException *)exception; + +/// Initializer +/// @param error an error -(instancetype)initWithError:(nonnull NSError *)error; + +/// Initializer +/// @param crashReport a crash report -(instancetype)initWithCrashReport:(nonnull NSString *)crashReport; @end diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCallStackFrame.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCallStackFrame.h index 22a8459e..b1ec578e 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCallStackFrame.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCallStackFrame.h @@ -4,67 +4,70 @@ NS_ASSUME_NONNULL_BEGIN +/// RollbarCallStackFrame payload element @interface RollbarCallStackFrame : RollbarDTO #pragma mark - Required properties -// Required: filename -// The filename including its full path. +/// Required: filename +/// The filename including its full path. @property (nonatomic, copy, nonnull) NSString *filename; #pragma mark - Optional properties -// Optional: lineno -// The line number as an integer +/// Optional: lineno +/// The line number as an integer @property (nonatomic, nullable) NSNumber *lineno; -// Optional: colno -// The column number as an integer +/// Optional: colno +/// The column number as an integer @property (nonatomic, nullable) NSNumber *colno; -// Optional: method -// The method or function name +/// Optional: method +/// The method or function name @property (nonatomic, copy, nullable) NSString *method; -// Optional: code -// The line of code +/// Optional: code +/// The line of code @property (nonatomic, copy, nullable) NSString *code; -// Optional: class_name -// A string containing the class name. -// Used in the UI when the payload's top-level "language" key has the value "java" +/// Optional: class_name +/// A string containing the class name. +/// Used in the UI when the payload's top-level "language" key has the value "java" @property (nonatomic, copy, nullable) NSString *className; -// Optional: context -// Additional code before and after the "code" line +/// Optional: context +/// Additional code before and after the "code" line @property (nonatomic, nullable) RollbarCallStackFrameContext *context; -// Optional: argspec -// List of the names of the arguments to the method/function call. +/// Optional: argspec +/// List of the names of the arguments to the method/function call. @property (nonatomic, nullable) NSArray *argspec; -// Optional: varargspec -// If the function call takes an arbitrary number of unnamed positional arguments, -// the name of the argument that is the list containing those arguments. -// For example, in Python, this would typically be "args" when "*args" is used. -// The actual list will be found in locals. +/// Optional: varargspec +/// If the function call takes an arbitrary number of unnamed positional arguments, +/// the name of the argument that is the list containing those arguments. +/// For example, in Python, this would typically be "args" when "*args" is used. +/// The actual list will be found in locals. @property (nonatomic, nullable) NSArray *varargspec; -// Optional: keywordspec -// If the function call takes an arbitrary number of keyword arguments, the name -// of the argument that is the object containing those arguments. -// For example, in Python, this would typically be "kwargs" when "**kwargs" is used. -// The actual object will be found in locals. +/// Optional: keywordspec +/// If the function call takes an arbitrary number of keyword arguments, the name +/// of the argument that is the object containing those arguments. +/// For example, in Python, this would typically be "kwargs" when "**kwargs" is used. +/// The actual object will be found in locals. @property (nonatomic, nullable) NSArray *keywordspec; -// Optional: locals -// Object of local variables for the method/function call. -// The values of variables from argspec, vararspec and keywordspec -// can be found in locals. +/// Optional: locals +/// Object of local variables for the method/function call. +/// The values of variables from argspec, vararspec and keywordspec +/// can be found in locals. @property (nonatomic, nullable) NSDictionary *locals; #pragma mark - Initializers +/// Initializer +/// @param filename file name -(instancetype)initWithFileName:(nonnull NSString *)filename; @end diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCallStackFrameContext.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCallStackFrameContext.h index be520a8c..e6bd9747 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCallStackFrameContext.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCallStackFrameContext.h @@ -2,20 +2,24 @@ NS_ASSUME_NONNULL_BEGIN +/// RollbarCallStackFrameContext payload element @interface RollbarCallStackFrameContext : RollbarDTO #pragma mark - Properties -// Optional: pre -// List of lines of code before the "code" line +/// Optional: pre +/// List of lines of code before the "code" line @property (nonatomic, nullable) NSArray *preCodeLines; -// Optional: post -// List of lines of code after the "code" line +/// Optional: post +/// List of lines of code after the "code" line @property (nonatomic, nullable) NSArray *postCodeLines; #pragma mark - Initializers +/// Initializer +/// @param pre preceding lines of code +/// @param post post/trailing lines of code -(instancetype)initWithPreCodeLines:(nullable NSArray *)pre postCodeLines:(nullable NSArray *)post; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarClient.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarClient.h index a9891673..8b4d6822 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarClient.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarClient.h @@ -4,19 +4,26 @@ NS_ASSUME_NONNULL_BEGIN +/// RollbarClient payload element +/// +/// @note: +/// Can contain any arbitrary keys. Rollbar understands the following: @interface RollbarClient : RollbarDTO #pragma mark - Properties -// Can contain any arbitrary keys. Rollbar understands the following: -// Optional: cpu -// A string up to 255 characters +/// Optional: cpu +/// A string up to 255 characters @property (nonatomic, copy, nullable) NSString *cpu; +/// javaScript @property (nonatomic, strong, nullable) RollbarJavascript *javaScript; #pragma mark - Initializers +/// Initializer +/// @param cpu CPU +/// @param javaScript javaScript -(instancetype)initWithCpu:(nullable NSString *)cpu javaScript:(nullable RollbarJavascript *)javaScript; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarConfig.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarConfig.h index eca70441..dbfdf747 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarConfig.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarConfig.h @@ -16,20 +16,40 @@ NS_ASSUME_NONNULL_BEGIN +/// Rollbar configuration structured model @interface RollbarConfig : RollbarDTO { BOOL _isRootConfiguration; } #pragma mark - properties +/// Destination related settings @property (nonnull, nonatomic, strong) RollbarDestination *destination; + +/// Developer related settings @property (nonnull, nonatomic, strong) RollbarDeveloperOptions *developerOptions; + +/// Logging related settings @property (nonnull, nonatomic, strong) RollbarLoggingOptions *loggingOptions; + +/// HTTP proxy related settings @property (nonnull, nonatomic, strong) RollbarProxy *httpProxy; + +/// HTTPS proxy related settings @property (nonnull, nonatomic, strong) RollbarProxy *httpsProxy; + +/// Data scrubbing related settings @property (nonnull, nonatomic, strong) RollbarScrubbingOptions *dataScrubber; + +/// Server related settings @property (nonnull, nonatomic, strong) RollbarServerConfig *server; + +/// Person/user related settings @property (nonnull, nonatomic, strong) RollbarPerson *person; + +/// Notifier related settings @property (nonnull, nonatomic, strong) RollbarModule *notifier; + +/// Telemetry related settings @property (nonnull, nonatomic, strong) RollbarTelemetryOptions *telemetry; #pragma mark - Custom data @@ -37,20 +57,37 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Payload Content Related -// Decides whether or not to send provided payload data. Returns true to ignore, false to send + +/// Decides whether or not to send provided payload data. Returns true to ignore, false to send @property (nullable, nonatomic, copy) BOOL (^checkIgnoreRollbarData)(RollbarData *rollbarData); -// Modify payload data +/// Modifies payload data before sending @property (nullable, nonatomic, copy) RollbarData *(^modifyRollbarData)(RollbarData *rollbarData); #pragma mark - Convenience Methods + +/// Sets person/user related information to be sent with each payload +/// @param personId person ID +/// @param username person username +/// @param email person email - (void)setPersonId:(nonnull NSString *)personId username:(nullable NSString *)username email:(nullable NSString *)email; + +/// Sets server related information to be sent with each payload +/// @param host host name +/// @param root codebase root +/// @param branch codebase branch +/// @param codeVersion code version - (void)setServerHost:(nullable NSString *)host root:(nullable NSString *)root branch:(nullable NSString *)branch codeVersion:(nullable NSString *)codeVersion; + +/// Sets notifier related information to be sent with every payload +/// @note use it only if you need to override these values auto-captured by the SDK internally +/// @param name notifier name +/// @param version notifier version - (void)setNotifierName:(nullable NSString *)name version:(nullable NSString *)version; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarConfigUtil.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarConfigUtil.h index 3f3458c7..8f25506e 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarConfigUtil.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarConfigUtil.h @@ -4,24 +4,50 @@ NS_ASSUME_NONNULL_BEGIN +/// Configuration utility @interface RollbarConfigUtil : NSObject +/// Returns default configuration file name + (nonnull NSString *)getDefaultConfigFileName; + +/// Returns default configuration files directory + (nonnull NSString *)getDefaultConfigDirectory; + +/// Returns default configuration file path + (nonnull NSString *)getDefaultConfigFilePath; +/// Creates configuration object +/// @param filePath configuration file path +/// @param error loading error (if any) + (nullable RollbarConfig *)createRollbarConfigFromFile:(nonnull NSString *)filePath error:(NSError * _Nullable *)error; + +/// Creates configuration object from the default configuration file +/// @param error error (if any) + (nullable RollbarConfig *)createRollbarConfigFromDefaultFile:(NSError * _Nullable *)error; +/// Saves a config object into a file +/// @param rollbarConfig a config object +/// @param filePath file path to save to +/// @param error erorr (if any) + (BOOL)saveRollbarConfig:(RollbarConfig *)rollbarConfig toFile:(nonnull NSString *)filePath error:(NSError * _Nullable *)error; + +/// Saves a config object into the default configuration file +/// @param rollbarConfig a config object +/// @param error erorr (if any) + (BOOL)saveRollbarConfig:(RollbarConfig *)rollbarConfig error:(NSError * _Nullable *)error; +/// Deletes a file +/// @param filePath file path +/// @param error error (if any) + (BOOL)deleteFile:(nonnull NSString *)filePath error:(NSError * _Nullable *)error; + +/// Deletes the default configuration file +/// @param error error (if any) + (BOOL)deleteDefaultRollbarConfigFile:(NSError * _Nullable *)error; @end diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCrashReport.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCrashReport.h index 735952f2..9df03c82 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCrashReport.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarCrashReport.h @@ -2,17 +2,20 @@ NS_ASSUME_NONNULL_BEGIN +/// Crash report payload element @interface RollbarCrashReport : RollbarDTO #pragma mark - Properties -// Required: raw -// The raw crash report, as a string -// Rollbar expects the format generated by this SDK +/// Required: raw crash report content +/// The raw crash report, as a string +/// Rollbar expects the format generated by this SDK @property (nonatomic, nonnull) NSString *rawCrashReport; #pragma mark - Initializers +/// Initializer +/// @param rawCrashReport raw crash report content -(instancetype)initWithRawCrashReport:(nonnull NSString *)rawCrashReport; @end From e8cdeed9c20256ec83d004e6536bb7339d347b8e Mon Sep 17 00:00:00 2001 From: Andrey Kornich Date: Mon, 21 Feb 2022 15:38:21 -0800 Subject: [PATCH 3/3] docs: resolve #127 - Update RollbarNotifier public API doc comments so they are properly rendered by Xcode Quick Help - General code cleanup --- .../DTOs/RollbarTelemetryConnectivityBody.m | 5 - .../DTOs/RollbarTelemetryLogBody.m | 5 - .../DTOs/RollbarTelemetryNavigationBody.m | 5 - .../DTOs/RollbarTelemetryNetworkBody.m | 5 - .../DTOs/RollbarTelemetryOptions.m | 30 +--- .../DTOs/RollbarTelemetryViewBody.m | 5 - .../RollbarNotifier/include/RollbarData.h | 150 +++++++++--------- .../include/RollbarDestination.h | 17 ++ .../include/RollbarDeveloperOptions.h | 20 +++ .../include/RollbarException.h | 21 ++- .../include/RollbarHttpMethod.h | 1 + .../include/RollbarJavascript.h | 28 ++-- .../RollbarNotifier/include/RollbarLogger.h | 18 +-- .../include/RollbarLoggingOptions.h | 49 ++++++ .../RollbarNotifier/include/RollbarMessage.h | 21 ++- .../RollbarNotifier/include/RollbarModule.h | 14 +- .../RollbarNotifier/include/RollbarPayload.h | 18 ++- .../include/RollbarPayloadTruncator.h | 18 +++ .../RollbarNotifier/include/RollbarProxy.h | 11 ++ .../RollbarNotifier/include/RollbarRequest.h | 30 ++-- .../include/RollbarScrubbingOptions.h | 31 +++- .../RollbarNotifier/include/RollbarServer.h | 18 ++- .../include/RollbarServerConfig.h | 13 ++ .../RollbarNotifier/include/RollbarSource.h | 1 + .../include/RollbarTelemetryBody.h | 1 + .../RollbarTelemetryConnectivityBody.h | 18 ++- .../include/RollbarTelemetryErrorBody.h | 22 +-- .../include/RollbarTelemetryEvent.h | 61 ++++--- .../include/RollbarTelemetryLogBody.h | 18 ++- .../include/RollbarTelemetryManualBody.h | 1 + .../include/RollbarTelemetryNavigationBody.h | 22 ++- .../include/RollbarTelemetryNetworkBody.h | 26 ++- .../include/RollbarTelemetryOptions.h | 24 ++- .../include/RollbarTelemetryViewBody.h | 18 ++- .../RollbarNotifier/include/RollbarTrace.h | 16 +- 35 files changed, 509 insertions(+), 252 deletions(-) diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryConnectivityBody.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryConnectivityBody.m index 20047082..7eb3f5e1 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryConnectivityBody.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryConnectivityBody.m @@ -28,11 +28,6 @@ -(instancetype)initWithStatus:(nonnull NSString *)status { return [self initWithStatus:status extraData:nil]; } -- (instancetype)initWithArray:(NSArray *)data { - - return [super initWithArray:data]; -} - - (instancetype)initWithDictionary:(NSDictionary *)data { return [super initWithDictionary:data]; diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryLogBody.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryLogBody.m index a909ce36..80119b33 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryLogBody.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryLogBody.m @@ -28,11 +28,6 @@ -(instancetype)initWithMessage:(nonnull NSString *)message { return [self initWithMessage:message extraData:nil]; } -- (instancetype)initWithArray:(NSArray *)data { - - return [super initWithArray:data]; -} - - (instancetype)initWithDictionary:(NSDictionary *)data { return [super initWithDictionary:data]; diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryNavigationBody.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryNavigationBody.m index ff253702..711e1976 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryNavigationBody.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryNavigationBody.m @@ -34,11 +34,6 @@ -(instancetype)initWithFromLocation:(nonnull NSString *)from extraData:nil]; } -- (instancetype)initWithArray:(NSArray *)data { - - return [super initWithArray:data]; -} - - (instancetype)initWithDictionary:(NSDictionary *)data { return [super initWithDictionary:data]; diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryNetworkBody.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryNetworkBody.m index e4b39df2..f5d3699c 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryNetworkBody.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryNetworkBody.m @@ -39,11 +39,6 @@ -(instancetype)initWithMethod:(RollbarHttpMethod)method extraData:nil]; } -- (instancetype)initWithArray:(NSArray *)data { - - return [super initWithArray:data]; -} - - (instancetype)initWithDictionary:(NSDictionary *)data { return [super initWithDictionary:data]; diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryOptions.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryOptions.m index 183b2901..4f5c3289 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryOptions.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryOptions.m @@ -59,23 +59,12 @@ - (instancetype)init { return [self initWithEnabled:DEFAULT_ENABLED_FLAG captureLog:DEFAULT_CAPTURE_LOG_FLAG captureConnectivity:DEFAULT_CAPTURE_CONNECTIVITY_FLAG - viewInputsScrubber:[RollbarScrubbingOptions new]]; + viewInputsScrubber:[RollbarScrubbingOptions new] + ]; } #pragma mark - property accessors -//- (void)setNilValueForKey:(NSString *)key -//{ -// if ([key isEqualToString:@"enabled"]) { -// [self setValue:@(NO) forKey:@"enabled"]; -// } else if ([key isEqualToString:@"captureLog"]) { -// [self setValue:@(NO) forKey:@"captureLog"]; -// } -// else { -// [super setNilValueForKey:key]; -// } -//} - - (BOOL)enabled { NSNumber *result = [self safelyGetNumberByKey:DFK_ENABLED_FLAG]; return result.boolValue; @@ -85,16 +74,7 @@ - (void)setEnabled:(BOOL)value { [self setNumber:[NSNumber numberWithBool:value] forKey:DFK_ENABLED_FLAG - ]; - -// if (value != self.enabled) { -// NSString *propertyName = NSStringFromSelector(@selector(enabled)); -// [self willChangeValueForKey:propertyName]; -// [self setNumber:[NSNumber numberWithBool:value] -// forKey:DFK_ENABLED_FLAG -// ]; -// [self didChangeValueForKey:propertyName]; -// } + ]; } - (BOOL)captureLog { @@ -105,7 +85,7 @@ - (BOOL)captureLog { - (void)setCaptureLog:(BOOL)value { [self setNumber:[NSNumber numberWithBool:value] forKey:DFK_CAPTURE_LOG_FLAG - ]; + ]; } - (BOOL)captureConnectivity { @@ -116,7 +96,7 @@ - (BOOL)captureConnectivity { - (void)setCaptureConnectivity:(BOOL)value { [self setNumber:[NSNumber numberWithBool:value] forKey:DFK_CAPTURE_CONNECTIVITY_FLAG - ]; + ]; } - (NSUInteger)maximumTelemetryData { diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryViewBody.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryViewBody.m index c54102ea..1fbfa06f 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryViewBody.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarTelemetryViewBody.m @@ -28,11 +28,6 @@ -(instancetype)initWithElement:(nonnull NSString *)element { return [self initWithElement:element extraData:nil]; } -- (instancetype)initWithArray:(NSArray *)data { - - return [super initWithArray:data]; -} - - (instancetype)initWithDictionary:(NSDictionary *)data { return [super initWithDictionary:data]; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarData.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarData.h index 2533b499..1ee686ca 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarData.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarData.h @@ -12,119 +12,123 @@ NS_ASSUME_NONNULL_BEGIN +/// Data element of a Rollbar payload @interface RollbarData : RollbarDTO -// Required: environment -// The name of the environment in which this occurrence was seen. -// A string up to 255 characters. For best results, use "production" or "prod" for your -// production environment. -// You don't need to configure anything in the Rollbar UI for new environment names; -// we'll detect them automatically. +/// Required: environment +/// The name of the environment in which this occurrence was seen. +/// A string up to 255 characters. For best results, use "production" or "prod" for your +/// production environment. +/// You don't need to configure anything in the Rollbar UI for new environment names; +/// we'll detect them automatically. @property (nonatomic, copy) NSString *environment; -// Required: body -// The main data being sent. It can either be a message, an exception, or a crash report. +/// Required: body +/// The main data being sent. It can either be a message, an exception, or a crash report. @property (nonatomic, nonnull) RollbarBody *body; -// Optional: level -// The severity level. One of: "critical", "error", "warning", "info", "debug" -// Defaults to "error" for exceptions and "info" for messages. -// The level of the *first* occurrence of an item is used as the item's level. +/// Optional: level +/// The severity level. One of: "critical", "error", "warning", "info", "debug" +/// Defaults to "error" for exceptions and "info" for messages. +/// The level of the *first* occurrence of an item is used as the item's level. @property (nonatomic) RollbarLevel level; //optional. default: error for exceptions and info for messages. -// Optional: timestamp -// When this occurred, as a unix timestamp. +/// Optional: timestamp +/// When this occurred, as a unix timestamp. @property (nonatomic) NSTimeInterval timestamp; //stored in JSON as long -// Optional: code_version -// A string, up to 40 characters, describing the version of the application code -// Rollbar understands these formats: -// - semantic version (i.e. "2.1.12") -// - integer (i.e. "45") -// - git SHA (i.e. "3da541559918a808c2402bba5012f6c60b27661c") -// If you have multiple code versions that are relevant, those can be sent inside "client" and "server" -// (see those sections below) -// For most cases, just send it here. +/// Optional: code_version +/// A string, up to 40 characters, describing the version of the application code +/// Rollbar understands these formats: +/// - semantic version (i.e. "2.1.12") +/// - integer (i.e. "45") +/// - git SHA (i.e. "3da541559918a808c2402bba5012f6c60b27661c") +/// If you have multiple code versions that are relevant, those can be sent inside "client" and "server" +/// (see those sections below) +/// For most cases, just send it here. @property (nonatomic, copy) NSString *codeVersion; -// Optional: platform -// The platform on which this occurred. Meaningful platform names: -// "browser", "android", "ios", "flash", "client", "heroku", "google-app-engine" -// If this is a client-side event, be sure to specify the platform and use a post_client_item access token. +/// Optional: platform +/// The platform on which this occurred. Meaningful platform names: +/// "browser", "android", "ios", "flash", "client", "heroku", "google-app-engine" +/// If this is a client-side event, be sure to specify the platform and use a post_client_item access token. @property (nonatomic, copy, nullable) NSString *platform; -// Optional: language -// The name of the language your code is written in. -// This can affect the order of the frames in the stack trace. The following languages set the most -// recent call first - 'ruby', 'javascript', 'php', 'java', 'objective-c', 'lua' -// It will also change the way the individual frames are displayed, with what is most consistent with -// users of the language. +/// Optional: language +/// The name of the language your code is written in. +/// This can affect the order of the frames in the stack trace. The following languages set the most +/// recent call first - 'ruby', 'javascript', 'php', 'java', 'objective-c', 'lua' +/// It will also change the way the individual frames are displayed, with what is most consistent with +/// users of the language. @property (nonatomic) RollbarAppLanguage language; -// Optional: framework -// The name of the framework your code uses +/// Optional: framework +/// The name of the framework your code uses @property (nonatomic, copy, nullable) NSString *framework; -// Optional: context -// An identifier for which part of your application this event came from. -// Items can be searched by context (prefix search) -// For example, in a Rails app, this could be `controller#action`. -// In a single-page javascript app, it could be the name of the current screen or route. +/// Optional: context +/// An identifier for which part of your application this event came from. +/// Items can be searched by context (prefix search) +/// For example, in a Rails app, this could be `controller#action`. +/// In a single-page javascript app, it could be the name of the current screen or route. @property (nonatomic, copy, nullable) NSString *context; -// Optional: request -// Data about the request this event occurred in. +/// Optional: request +/// Data about the request this event occurred in. @property (nonatomic, nullable) RollbarRequest *request; -// Optional: person -// The user affected by this event. Will be indexed by ID, username, and email. -// People are stored in Rollbar keyed by ID. If you send a multiple different usernames/emails for the -// same ID, the last received values will overwrite earlier ones. +/// Optional: person +/// The user affected by this event. Will be indexed by ID, username, and email. +/// People are stored in Rollbar keyed by ID. If you send a multiple different usernames/emails for the +/// same ID, the last received values will overwrite earlier ones. @property (nonatomic, nullable) RollbarPerson *person; -// Optional: server -// Data about the server related to this event. +/// Optional: server +/// Data about the server related to this event. @property (nonatomic, nullable) RollbarServer *server; -// Optional: client -// Data about the client device this event occurred on. -// As there can be multiple client environments for a given event (i.e. Flash running inside -// an HTML page), data should be namespaced by platform. +/// Optional: client +/// Data about the client device this event occurred on. +/// As there can be multiple client environments for a given event (i.e. Flash running inside +/// an HTML page), data should be namespaced by platform. @property (nonatomic, nullable) RollbarClient *client; -// Optional: custom -// Any arbitrary metadata you want to send. "custom" itself should be an object. +/// Optional: custom +/// Any arbitrary metadata you want to send. "custom" itself should be an object. @property (nonatomic, nullable) NSObject *custom; -// Optional: fingerprint -// A string controlling how this occurrence should be grouped. Occurrences with the same -// fingerprint are grouped together. See the "Grouping" guide for more information. -// Should be a string up to 40 characters long; if longer than 40 characters, we'll use its SHA1 hash. -// If omitted, we'll determine this on the backend. +/// Optional: fingerprint +/// A string controlling how this occurrence should be grouped. Occurrences with the same +/// fingerprint are grouped together. See the "Grouping" guide for more information. +/// Should be a string up to 40 characters long; if longer than 40 characters, we'll use its SHA1 hash. +/// If omitted, we'll determine this on the backend. @property (nonatomic, copy, nullable) NSString *fingerprint; -// Optional: title -// A string that will be used as the title of the Item occurrences will be grouped into. -// Max length 255 characters. -// If omitted, we'll determine this on the backend. +/// Optional: title +/// A string that will be used as the title of the Item occurrences will be grouped into. +/// Max length 255 characters. +/// If omitted, we'll determine this on the backend. @property (nonatomic, copy, nullable) NSString *title; -// Optional: uuid -// A string, up to 36 characters, that uniquely identifies this occurrence. -// While it can now be any latin1 string, this may change to be a 16 byte field in the future. -// We recommend using a UUID4 (16 random bytes). -// The UUID space is unique to each project, and can be used to look up an occurrence later. -// It is also used to detect duplicate requests. If you send the same UUID in two payloads, the second -// one will be discarded. -// While optional, it is recommended that all clients generate and provide this field +/// Optional: uuid +/// A string, up to 36 characters, that uniquely identifies this occurrence. +/// While it can now be any latin1 string, this may change to be a 16 byte field in the future. +/// We recommend using a UUID4 (16 random bytes). +/// The UUID space is unique to each project, and can be used to look up an occurrence later. +/// It is also used to detect duplicate requests. If you send the same UUID in two payloads, the second +/// one will be discarded. +/// While optional, it is recommended that all clients generate and provide this field @property (nonatomic, nullable) NSUUID *uuid; -// Optional: notifier -// Describes the library used to send this event. +/// Optional: notifier +/// Describes the library used to send this event. @property (nonatomic, nullable) RollbarModule *notifier; #pragma mark - initialization +/// Initializer +/// @param environment environment name +/// @param body a bodyelement of the payload -(instancetype)initWithEnvironment:(nonnull NSString *)environment body:(nonnull RollbarBody *)body; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarDestination.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarDestination.h index c4215f23..78972345 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarDestination.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarDestination.h @@ -2,21 +2,38 @@ NS_ASSUME_NONNULL_BEGIN +/// Models destination settings of a configuration @interface RollbarDestination : RollbarDTO #pragma mark - properties +/// Endpoint URI @property (nonatomic, copy) NSString *endpoint; + +/// Project access token @property (nonatomic, copy) NSString *accessToken; + +/// Environment name @property (nonatomic, copy) NSString *environment; #pragma mark - initializers +/// Initializer +/// @param endpoint endpoint URI +/// @param accessToken Rollbar project access token +/// @param environment environment name - (instancetype)initWithEndpoint:(NSString *)endpoint accessToken:(NSString *)accessToken environment:(NSString *)environment; + +/// Initializer +/// @param accessToken Rollbar project access token +/// @param environment environment name - (instancetype)initWithAccessToken:(NSString *)accessToken environment:(NSString *)environment; + +/// Initializer +/// @param accessToken Rollbar project access token - (instancetype)initWithAccessToken:(NSString *)accessToken; @end diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarDeveloperOptions.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarDeveloperOptions.h index 0f790018..d709b194 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarDeveloperOptions.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarDeveloperOptions.h @@ -2,22 +2,42 @@ NS_ASSUME_NONNULL_BEGIN +/// Models developer settings of a configuration @interface RollbarDeveloperOptions : RollbarDTO #pragma mark - properties +/// Rollbar operation enabled flag @property (nonatomic) BOOL enabled; + +/// Enables/disables actual transmission of the payloads @property (nonatomic) BOOL transmit; + +/// A flag to suppress internal SDK's informational logging @property (nonatomic) BOOL suppressSdkInfoLogging; + +/// Flags if the processed payloads to be logged locally @property (nonatomic) BOOL logPayload; + +/// Log file to use for local logged payloads @property (nonatomic, copy) NSString *payloadLogFile; #pragma mark - initializers +/// Initializer +/// @param enabled enabled flag +/// @param transmit payloads transmission flag +/// @param logPayload local payloads logging flag +/// @param logPayloadFile pocal payloads logging file - (instancetype)initWithEnabled:(BOOL)enabled transmit:(BOOL)transmit logPayload:(BOOL)logPayload payloadLogFile:(NSString *)logPayloadFile; + +/// Initializer +/// @param enabled enabled flag +/// @param transmit payloads transmission flag +/// @param logPayload local payloads logging flag - (instancetype)initWithEnabled:(BOOL)enabled transmit:(BOOL)transmit logPayload:(BOOL)logPayload; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarException.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarException.h index d06c7013..b79b47ef 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarException.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarException.h @@ -2,26 +2,31 @@ NS_ASSUME_NONNULL_BEGIN +/// Exception specifc data element of a payload @interface RollbarException : RollbarDTO #pragma mark - Properties -// Required: class -// The exception class name. +/// Required: class +/// The exception class name. @property (nonatomic, copy, nonnull) NSString *exceptionClass; -// Optional: message -// The exception message, as a string +/// Optional: message +/// The exception message, as a string @property (nonatomic, copy, nullable) NSString *exceptionMessage; -// Optional: description -// An alternate human-readable string describing the exception -// Usually the original exception message will have been machine-generated; -// you can use this to send something custom +/// Optional: description +/// An alternate human-readable string describing the exception +/// Usually the original exception message will have been machine-generated; +/// you can use this to send something custom @property (nonatomic, copy, nullable) NSString *exceptionDescription; #pragma mark - Initializers +/// Initializer +/// @param exceptionClass exception class +/// @param exceptionMessage exception message +/// @param exceptionDescription exception description - (instancetype)initWithExceptionClass:(nonnull NSString *)exceptionClass exceptionMessage:(nullable NSString *)exceptionMessage exceptionDescription:(nullable NSString *)exceptionDescription; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarHttpMethod.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarHttpMethod.h index 3b47ba58..ad91d420 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarHttpMethod.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarHttpMethod.h @@ -18,6 +18,7 @@ typedef NS_ENUM(NSUInteger, RollbarHttpMethod) { NS_ASSUME_NONNULL_BEGIN +/// HTTP method enum converter unitilty @interface RollbarHttpMethodUtil : NSObject /// Convert RollbarHttpMethod to a string diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarJavascript.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarJavascript.h index e4ea25cf..609e72de 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarJavascript.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarJavascript.h @@ -2,31 +2,37 @@ NS_ASSUME_NONNULL_BEGIN +/// JavaScript data element of a payload @interface RollbarJavascript : RollbarDTO #pragma mark - Properties -// Optional: browser -// The user agent string +/// Optional: browser +/// The user agent string @property (nonatomic, nullable, copy) NSString *browser; -// Optional: code_version -// String describing the running code version in javascript -// See note about "code_version" above +/// Optional: code_version +/// String describing the running code version in javascript +/// See note about "code_version" above @property (nonatomic, nullable, copy) NSString *codeVersion; -// Optional: source_map_enabled -// Set to true to enable source map deobfuscation -// See the "Source Maps" guide for more details. +/// Optional: source_map_enabled +/// Set to true to enable source map deobfuscation +/// See the "Source Maps" guide for more details. @property (nonatomic) RollbarTriStateFlag sourceMapEnabled; -// Optional: guess_uncaught_frames -// Set to true to enable frame guessing -// See the "Source Maps" guide for more details. +/// Optional: guess_uncaught_frames +/// Set to true to enable frame guessing +/// See the "Source Maps" guide for more details. @property (nonatomic) RollbarTriStateFlag guessUncaughtFrames; #pragma mark - Initializers +/// Initializer +/// @param browser browser description +/// @param codeVersion code version +/// @param sourceMapEnabled source maps enabled flag +/// @param guessUncaughtFrames a flag to guess uncaught exceptions -(instancetype)initWithBrowser:(nullable NSString *)browser codeVersion:(nullable NSString *)codeVersion sourceMapEnabled:(RollbarTriStateFlag)sourceMapEnabled diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLogger.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLogger.h index 9d5829fe..4bf34235 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLogger.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLogger.h @@ -6,6 +6,7 @@ NS_ASSUME_NONNULL_BEGIN +/// Models interface of a Rollbar logger @interface RollbarLogger : NSObject /// The shared instance of the logger @@ -58,11 +59,11 @@ NS_DESIGNATED_INITIALIZER; data:(nullable NSDictionary *)data context:(nullable NSString *)context; - /// Capture a log entry based on an NSError - /// @param level Rollbar error/log level - /// @param error an NSError - /// @param data extra data - /// @param context extra context +/// Capture a log entry based on an NSError +/// @param level Rollbar error/log level +/// @param error an NSError +/// @param data extra data +/// @param context extra context - (void)log:(RollbarLevel)level error:(nonnull NSError *)error data:(nullable NSDictionary *)data @@ -82,13 +83,6 @@ NS_DESIGNATED_INITIALIZER; /// @return YES if successful. NO if not. - (BOOL)sendPayload:(nonnull NSData *)payload; -/// Updates key configuration elements -/// @param accessToken the Rollbar project access token -/// @param configuration the Rollbar configuration object -//- (void)updateAccessToken:(NSString *)accessToken -// configuration:(RollbarConfig *)configuration -// isRoot:(BOOL)isRoot; - /// Updates key configuration elements /// @param configuration the Rollbar configuration object - (void)updateConfiguration:(nonnull RollbarConfig *)configuration; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLoggingOptions.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLoggingOptions.h index 0796a60b..aeaa29cf 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLoggingOptions.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarLoggingOptions.h @@ -4,20 +4,42 @@ NS_ASSUME_NONNULL_BEGIN +/// Models logging settings of a configuration @interface RollbarLoggingOptions : RollbarDTO #pragma mark - Properties +/// A minimum threshold level to log from @property (nonatomic) RollbarLevel logLevel; + +/// A log level to use for crsh reports @property (nonatomic) RollbarLevel crashLevel; + +/// Reporting rate limit @property (nonatomic) NSUInteger maximumReportsPerMinute; + +/// A way of capturing IP addresses @property (nonatomic) RollbarCaptureIpType captureIp; + +/// A code version to mark payloads with @property (nonatomic, copy, nullable) NSString *codeVersion; + +/// A framework tag to mark payloads with @property (nonatomic, copy, nullable) NSString *framework; + +/// A request ID to mark payloads with @property (nonatomic, copy, nullable) NSString *requestId; #pragma mark - Initializers +/// Initializer +/// @param logLevel minimum log level to start logging from +/// @param crashLevel log level to mark crash reports with +/// @param maximumReportsPerMinute Reporting rate limit +/// @param captureIp a way of capturing IP addresses +/// @param codeVersion a code version to mark payloads with +/// @param framework A framework tag to mark payloads with +/// @param requestId A request ID to mark payloads with - (instancetype)initWithLogLevel:(RollbarLevel)logLevel crashLevel:(RollbarLevel)crashLevel maximumReportsPerMinute:(NSUInteger)maximumReportsPerMinute @@ -26,6 +48,13 @@ NS_ASSUME_NONNULL_BEGIN framework:(nullable NSString *)framework requestId:(nullable NSString *)requestId; +/// Initializer +/// @param logLevel minimum log level to start logging from +/// @param crashLevel log level to mark crash reports with +/// @param maximumReportsPerMinute Reporting rate limit +/// @param codeVersion a code version to mark payloads with +/// @param framework A framework tag to mark payloads with +/// @param requestId A request ID to mark payloads with - (instancetype)initWithLogLevel:(RollbarLevel)logLevel crashLevel:(RollbarLevel)crashLevel maximumReportsPerMinute:(NSUInteger)maximumReportsPerMinute @@ -33,6 +62,13 @@ NS_ASSUME_NONNULL_BEGIN framework:(nullable NSString *)framework requestId:(nullable NSString *)requestId; +/// Initializer +/// @param logLevel minimum log level to start logging from +/// @param crashLevel log level to mark crash reports with +/// @param captureIp a way of capturing IP addresses +/// @param codeVersion a code version to mark payloads with +/// @param framework A framework tag to mark payloads with +/// @param requestId A request ID to mark payloads with - (instancetype)initWithLogLevel:(RollbarLevel)logLevel crashLevel:(RollbarLevel)crashLevel captureIp:(RollbarCaptureIpType)captureIp @@ -40,16 +76,29 @@ NS_ASSUME_NONNULL_BEGIN framework:(nullable NSString *)framework requestId:(nullable NSString *)requestId; +/// Initializer +/// @param logLevel minimum log level to start logging from +/// @param crashLevel log level to mark crash reports with +/// @param codeVersion a code version to mark payloads with +/// @param framework A framework tag to mark payloads with +/// @param requestId A request ID to mark payloads with - (instancetype)initWithLogLevel:(RollbarLevel)logLevel crashLevel:(RollbarLevel)crashLevel codeVersion:(nullable NSString *)codeVersion framework:(nullable NSString *)framework requestId:(nullable NSString *)requestId; +/// Initializer +/// @param logLevel minimum log level to start logging from +/// @param crashLevel log level to mark crash reports with +/// @param maximumReportsPerMinute Reporting rate limit - (instancetype)initWithLogLevel:(RollbarLevel)logLevel crashLevel:(RollbarLevel)crashLevel maximumReportsPerMinute:(NSUInteger)maximumReportsPerMinute; +/// Initializer +/// @param logLevel minimum log level to start logging from +/// @param crashLevel log level to mark crash reports with - (instancetype)initWithLogLevel:(RollbarLevel)logLevel crashLevel:(RollbarLevel)crashLevel; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarMessage.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarMessage.h index 5718dc30..65678b14 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarMessage.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarMessage.h @@ -2,22 +2,27 @@ NS_ASSUME_NONNULL_BEGIN +/// Message element of a payload +/// @note: +/// Can also contain any arbitrary keys of metadata. Their values can be any valid JSON. +/// For example: +/// "route": "home#index", +/// "time_elapsed": 15.23 @interface RollbarMessage : RollbarDTO -// Required: body -// The primary message text, as a string +/// Required: body +/// The primary message text, as a string @property (nonatomic, copy, nonnull) NSString *body; -// NOTE: -// ===== -// Can also contain any arbitrary keys of metadata. Their values can be any valid JSON. -// For example: -// "route": "home#index", -// "time_elapsed": 15.23 #pragma mark - Initializers +/// Initializer +/// @param messageBody message content -(instancetype)initWithBody:(nonnull NSString *)messageBody; + +/// Initializer +/// @param error an error to use as the message content -(instancetype)initWithNSError:(nonnull NSError *)error; @end diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarModule.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarModule.h index b41fb1a0..f08ec715 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarModule.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarModule.h @@ -2,23 +2,29 @@ NS_ASSUME_NONNULL_BEGIN +/// Module element of a payload @interface RollbarModule : RollbarDTO #pragma mark - properties -// Optional: name -// Name of the library +/// Optional: name +/// Name of the library @property (nonatomic, copy, nullable) NSString *name; -// Optional: version -// Library version string +/// Optional: version +/// Library version string @property (nonatomic, copy, nullable) NSString *version; #pragma mark - initializers +/// Initializer +/// @param name module name +/// @param version module version - (instancetype)initWithName:(nullable NSString *)name version:(nullable NSString *)version; +/// Initializer +/// @param name module name - (instancetype)initWithName:(nullable NSString *)name; @end diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayload.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayload.h index 792c97e0..2655c87e 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayload.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayload.h @@ -4,17 +4,25 @@ NS_ASSUME_NONNULL_BEGIN +/// The payload root model @interface RollbarPayload : RollbarDTO -// Required: access_token -// An access token with scope "post_server_item" or "post_client_item". -// A post_client_item token must be used if the "platform" is "browser", "android", "ios", "flash", or "client" -// A post_server_item token should be used for other platforms. +#pragma mark - properties + +/// Required: access_token +/// An access token with scope "post_server_item" or "post_client_item". +/// A post_client_item token must be used if the "platform" is "browser", "android", "ios", "flash", or "client" +/// A post_server_item token should be used for other platforms. @property (nonatomic, copy, nonnull) NSString *accessToken; -// Required: data +/// Required: data @property (nonatomic, nonnull) RollbarData *data; +#pragma mark - initializers + +/// Initializer +/// @param token Rollbar project access token +/// @param data data element of the payload -(instancetype)initWithAccessToken:(nonnull NSString *)token data:(nonnull RollbarData *)data; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayloadTruncator.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayloadTruncator.h index 33a6e4b4..68a668d8 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayloadTruncator.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarPayloadTruncator.h @@ -1,19 +1,37 @@ @import Foundation; +/// Payload truncation utility @interface RollbarPayloadTruncator : NSObject +/// Truncates a provided payload +/// @param payload the payload to truncate +(void)truncatePayload:(NSMutableDictionary *)payload; +/// Truncates multiple payloads to provided byte size +/// @param payloads payloads to truncate +/// @param maxByteSize max payload byte sixe to achieve +(void)truncatePayloads:(NSArray *)payloads toMaxByteSize:(unsigned long)maxByteSize; +/// Truncates a payload to a total bytes limit +/// @param payload a payload to truncate +/// @param limit total bytes limit to truncate to +(void)truncatePayload:(NSMutableDictionary *)payload toTotalBytes:(unsigned long) limit; +/// Measures byte size of a string using specified encoding +/// @param string a string to measure +/// @param encoding string encoding to use +(unsigned long)measureTotalEncodingBytes:(NSString *)string usingEncoding:(NSStringEncoding)encoding; + +/// Measures byte size of a string using default encoding +/// @param string a string to measure +(unsigned long)measureTotalEncodingBytes:(NSString *)string; +/// Truncates a string to a total bytes limit +/// @param inputString a string to truncate +/// @param totalBytesLimit a limit to truncate to +(NSString*)truncateString:(NSString *)inputString toTotalBytes:(unsigned long)totalBytesLimit; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarProxy.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarProxy.h index ccc52ae1..6f9c942e 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarProxy.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarProxy.h @@ -2,15 +2,26 @@ NS_ASSUME_NONNULL_BEGIN +/// Proxy settings of a configuration @interface RollbarProxy : RollbarDTO #pragma mark - properties + +/// Enables/disables usage of these proxy settings @property (nonatomic) BOOL enabled; + +/// Proxy URI to use @property (nonatomic, copy) NSString *proxyUrl; + +/// Proxy port to use @property (nonatomic) NSUInteger proxyPort; #pragma mark - initializers +/// Initializer +/// @param enabled rnables/disables usage of these proxy settings +/// @param proxyUrl proxy URI +/// @param proxyPort proxy port - (instancetype)initWithEnabled:(BOOL)enabled proxyUrl:(NSString *)proxyUrl proxyPort:(NSUInteger)proxyPort; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarRequest.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarRequest.h index 501d0590..486a1139 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarRequest.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarRequest.h @@ -4,39 +4,43 @@ NS_ASSUME_NONNULL_BEGIN +/// Request element of a payload DTO +/// @note: +// Can contain any additional arbitrary keys. @interface RollbarRequest : RollbarDTO -// Can contain any arbitrary keys. Rollbar understands the following: #pragma mark - Properties -// url: full URL where this event occurred +/// url: full URL where this event occurred @property (nonatomic, copy, nullable) NSString *url; -// method: the request method +/// method: the request method @property (nonatomic) RollbarHttpMethod method; -// headers: object containing the request headers. -// Header names should be formatted like they are in HTTP. +/// headers: object containing the request headers. +/// @note: +/// Header names should be formatted like they are in HTTP. @property (nonatomic, strong, nullable) NSDictionary *headers; -// params: any routing parameters (i.e. for use with Rails Routes) +/// params: any routing parameters (i.e. for use with Rails Routes) @property (nonatomic, strong, nullable) NSDictionary *params; -// GET: query string params +/// GET: query string params @property (nonatomic, strong, nullable) NSDictionary *getParams; -// query_string: the raw query string +/// query_string: the raw query string @property (nonatomic, copy, nullable) NSString *queryString; -// POST: POST params +/// POST: POST params @property (nonatomic, strong, nullable) NSDictionary *postParams; -// body: the raw POST body +/// body: the raw POST body @property (nonatomic, copy, nullable) NSString *postBody; -// user_ip: the user's IP address as a string. -// Can also be the special value "$remote_ip", which will be replaced with the source IP of the API request. -// Will be indexed, as long as it is a valid IPv4 address. +/// user_ip: the user's IP address as a string. +/// @note: +/// Can also be the special value "$remote_ip", which will be replaced with the source IP of the API request. +/// Will be indexed, as long as it is a valid IPv4 address. @property (nonatomic, copy, nullable) NSString *userIP; #pragma mark - Initializers diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarScrubbingOptions.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarScrubbingOptions.h index de0b4b6e..e421b804 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarScrubbingOptions.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarScrubbingOptions.h @@ -2,27 +2,54 @@ NS_ASSUME_NONNULL_BEGIN +/// Scrubbing setting of a configuration @interface RollbarScrubbingOptions : RollbarDTO #pragma mark - properties +/// Enables scrubbing @property (nonatomic) BOOL enabled; -// Fields to scrub from the payload + +/// Fields to scrub from the payload @property (nonnull, nonatomic, strong) NSArray *scrubFields; + +/// Adds a scrubbing field to use +/// @param field a scrubbing field - (void)addScrubField:(NSString *)field; + +/// Removes a scrubbing field from usage +/// @param field a scrubbing field - (void)removeScrubField:(NSString *)field; -// Fields to not scrub from the payload even if they mention among scrubFields: + +/// Fields to not scrub from the payload even if they mention among scrubFields @property (nonnull, nonatomic, strong) NSArray *safeListFields; + +/// Adds a scrubbing field to the safe list +/// @param field a scrubbing field - (void)addScrubSafeListField:(NSString *)field; + +/// Removes a scrubbing field from the safe list +/// @param field a scrubbing field - (void)removeScrubSafeListField:(NSString *)field; #pragma mark - initializers +/// Initializer +/// @param enabled scrubbing enabling flag +/// @param scrubFields scrubbing fields +/// @param safeListFields safe list of fields (to never scrub) - (instancetype)initWithEnabled:(BOOL)enabled scrubFields:(NSArray *)scrubFields safeListFields:(NSArray *)safeListFields; + +/// Initializer +/// @param scrubFields scrubbing fields +/// @param safeListFields safe list of fields (to never scrub) - (instancetype)initWithScrubFields:(NSArray *)scrubFields safeListFields:(NSArray *)safeListFields; + +/// Initializer +/// @param scrubFields scrubbing fields - (instancetype)initWithScrubFields:(NSArray *)scrubFields; @end diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarServer.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarServer.h index d938b345..7483bc3c 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarServer.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarServer.h @@ -2,23 +2,35 @@ NS_ASSUME_NONNULL_BEGIN +/// Server element of a payload DTO. +/// @note: +/// Can contain any additional arbitrary keys. @interface RollbarServer : RollbarServerConfig -// Can contain any arbitrary keys. Rollbar understands the following: #pragma mark - Properties -// Optional: cpu -// A string up to 255 characters +/// Optional: cpu +/// @note: +/// A string up to 255 characters @property (nonatomic, copy, nullable) NSString *cpu; #pragma mark - Initializers +/// Initializer +/// @param cpu server CPU +/// @param host server host +/// @param root server code root +/// @param branch code branch +/// @param codeVersion code version - (instancetype)initWithCpu:(nullable NSString *)cpu host:(nullable NSString *)host root:(nullable NSString *)root branch:(nullable NSString *)branch codeVersion:(nullable NSString *)codeVersion; +/// Initializer +/// @param cpu server CPU +/// @param serverConfig server config element of a RollbarConfig - (instancetype)initWithCpu:(nullable NSString *)cpu serverConfig:(nullable RollbarServerConfig *)serverConfig; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarServerConfig.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarServerConfig.h index f587ebce..61b500ba 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarServerConfig.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarServerConfig.h @@ -2,17 +2,30 @@ NS_ASSUME_NONNULL_BEGIN +/// Server config setting of a configuration @interface RollbarServerConfig : RollbarDTO #pragma mark - properties +/// Servef host @property (nonatomic, copy, nullable) NSString *host; + +/// Server code root @property (nonatomic, copy, nullable) NSString *root; + +/// Server code branch @property (nonatomic, copy, nullable) NSString *branch; + +/// Server code version @property (nonatomic, copy, nullable) NSString *codeVersion; #pragma mark - initializers +/// Initializer +/// @param host server host +/// @param root server code root +/// @param branch code branch +/// @param codeVersion code version - (instancetype)initWithHost:(nullable NSString *)host root:(nullable NSString *)root branch:(nullable NSString *)branch diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarSource.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarSource.h index 59c6e90e..4f3efac1 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarSource.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarSource.h @@ -11,6 +11,7 @@ typedef NS_ENUM(NSUInteger, RollbarSource) { NS_ASSUME_NONNULL_BEGIN +/// RollbarSource conversion utility @interface RollbarSourceUtil : NSObject /// Convert RollbarSource to a string diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryBody.h index 1ec3faa0..02f8812f 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryBody.h @@ -2,6 +2,7 @@ NS_ASSUME_NONNULL_BEGIN +/// Telemetry body DTO @interface RollbarTelemetryBody : RollbarDTO @end diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryConnectivityBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryConnectivityBody.h index a3e8532f..abe1bcbb 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryConnectivityBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryConnectivityBody.h @@ -2,26 +2,38 @@ NS_ASSUME_NONNULL_BEGIN +/// Telemetry connectivity event's body @interface RollbarTelemetryConnectivityBody : RollbarTelemetryBody #pragma mark - Properties +/// Connectivity status @property (nonatomic, copy) NSString *status; #pragma mark - Initializers +/// Designated initializer +/// @param status connectivity status +/// @param extraData extra data -(instancetype)initWithStatus:(nonnull NSString *)status extraData:(nullable NSDictionary *)extraData NS_DESIGNATED_INITIALIZER; +/// Initializer +/// @param status connectivity status -(instancetype)initWithStatus:(nonnull NSString *)status; -- (instancetype)initWithArray:(NSArray *)data -NS_DESIGNATED_INITIALIZER; - +/// Designated serializer +/// @param data seeding data dictionary - (instancetype)initWithDictionary:(nullable NSDictionary *)data NS_DESIGNATED_INITIALIZER; +/// Hides the initializer +/// @param data seeding data array +- (instancetype)initWithArray:(NSArray *)data +NS_UNAVAILABLE; + +/// Hides the initializer - (instancetype)init NS_UNAVAILABLE; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryErrorBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryErrorBody.h index e2aa18c4..dfcaefb7 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryErrorBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryErrorBody.h @@ -2,29 +2,9 @@ NS_ASSUME_NONNULL_BEGIN +/// Telemetry error event's body @interface RollbarTelemetryErrorBody : RollbarTelemetryLogBody -//#pragma mark - Properties -// -//@property (nonatomic, copy) NSString *message; -// -//#pragma mark - Initializers -// -//-(instancetype)initWithMessage:(nonnull NSString *)message -// extraData:(nullable NSDictionary *)extraData -//NS_DESIGNATED_INITIALIZER; -// -//-(instancetype)initWithMessage:(nonnull NSString *)message; -// -//- (instancetype)initWithArray:(NSArray *)data -//NS_DESIGNATED_INITIALIZER; -// -//- (instancetype)initWithDictionary:(NSDictionary *)data -//NS_DESIGNATED_INITIALIZER; -// -//- (instancetype)init -//NS_UNAVAILABLE; - @end NS_ASSUME_NONNULL_END diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryEvent.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryEvent.h index d7a462b2..c96c41eb 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryEvent.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryEvent.h @@ -8,61 +8,78 @@ NS_ASSUME_NONNULL_BEGIN +/// Telemetry event DTO +/// @note: +/// Can contain any arbitrary keys. @interface RollbarTelemetryEvent : RollbarDTO #pragma mark - Properties -// Can contain any arbitrary keys. Rollbar understands the following: -// Required: level -// The severity level of the telemetry data. One of: "critical", "error", "warning", "info", "debug". +/// Required: level +/// The severity level of the telemetry data. One of: "critical", "error", "warning", "info", "debug". @property (nonatomic, readonly) RollbarLevel level; -// Required: type -// The type of telemetry data. One of: "log", "network", "dom", "navigation", "error", "manual". +/// Required: type +/// The type of telemetry data. One of: "log", "network", "dom", "navigation", "error", "manual". @property (nonatomic, readonly) RollbarTelemetryType type; -// Required: source -// The source of the telemetry data. Usually "client" or "server". +/// Required: source +/// The source of the telemetry data. Usually "client" or "server". @property (nonatomic, readonly) RollbarSource source; -// Required: timestamp_ms -// When this occurred, as a unix timestamp in milliseconds. +/// Required: timestamp_ms +/// When this occurred, as a unix timestamp in milliseconds. @property (nonatomic, readonly) NSTimeInterval timestamp; //stored in JSON as long -// Required: body -// The key-value pairs for the telemetry data point. See "body" key below. -// If type above is "log", body should contain "message" key. -// If type above is "network", body should contain "method", "url", and "status_code" keys. -// If type above is "dom", body should contain "element" key. -// If type above is "navigation", body should contain "from" and "to" keys. -// If type above is "error", body should contain "message" key. +/// Required: body +/// The key-value pairs for the telemetry data point. See "body" key below. +/// @note: +/// If type above is "log", body should contain "message" key. +/// If type above is "network", body should contain "method", "url", and "status_code" keys. +/// If type above is "dom", body should contain "element" key. +/// If type above is "navigation", body should contain "from" and "to" keys. +/// If type above is "error", body should contain "message" key. @property (nonatomic, strong, readonly) RollbarTelemetryBody *body; #pragma mark - Initializers +/// Initializer +/// @param level event level +/// @param type event type +/// @param source event source - (instancetype)initWithLevel:(RollbarLevel)level telemetryType:(RollbarTelemetryType)type source:(RollbarSource)source; -//NS_DESIGNATED_INITIALIZER; +/// Initializer +/// @param level event level +/// @param source event source +/// @param body event body - (instancetype)initWithLevel:(RollbarLevel)level source:(RollbarSource)source body:(nonnull RollbarTelemetryBody *)body; -//NS_DESIGNATED_INITIALIZER; - -- (instancetype)initWithArray:(NSArray *)data -NS_UNAVAILABLE; +/// Designated initializer +/// @param data seeding data dictionary - (instancetype)initWithDictionary:(nullable NSDictionary *)data NS_DESIGNATED_INITIALIZER; +/// Hides the initializer +/// @param data seeding data array +- (instancetype)initWithArray:(NSArray *)data +NS_UNAVAILABLE; + +/// Hides the initializer - (instancetype)init NS_UNAVAILABLE; #pragma mark - Class utility +/// Creates a telemetry body DTO by its type and seeding data dictionary +/// @param type telemetry body type +/// @param data seeding data dictionary + (RollbarTelemetryBody *)createTelemetryBodyWithType:(RollbarTelemetryType)type - data:(nullable NSDictionary *)data; + data:(nullable NSDictionary *)data; @end diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryLogBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryLogBody.h index 381fe5df..6b5ca774 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryLogBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryLogBody.h @@ -2,26 +2,38 @@ NS_ASSUME_NONNULL_BEGIN +/// Telemetry log event body DTO @interface RollbarTelemetryLogBody : RollbarTelemetryBody #pragma mark - Properties +/// Log message @property (nonatomic, copy) NSString *message; #pragma mark - Initializers +/// Designated initializer +/// @param message log message +/// @param extraData extra data -(instancetype)initWithMessage:(nonnull NSString *)message extraData:(nullable NSDictionary *)extraData NS_DESIGNATED_INITIALIZER; +/// Initializer +/// @param message log message -(instancetype)initWithMessage:(nonnull NSString *)message; -- (instancetype)initWithArray:(NSArray *)data -NS_DESIGNATED_INITIALIZER; - +/// Designated initializer +/// @param data seeding data dictionary - (instancetype)initWithDictionary:(nullable NSDictionary *)data NS_DESIGNATED_INITIALIZER; +/// Hides the initializer +/// @param data seeding data array +- (instancetype)initWithArray:(NSArray *)data +NS_UNAVAILABLE; + +/// Hides the initializer - (instancetype)init NS_UNAVAILABLE; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryManualBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryManualBody.h index 6a864ca2..19ad92e3 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryManualBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryManualBody.h @@ -2,6 +2,7 @@ NS_ASSUME_NONNULL_BEGIN +/// Telemetry manual event body DTO @interface RollbarTelemetryManualBody : RollbarTelemetryBody @end diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryNavigationBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryNavigationBody.h index f6111059..601ed18d 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryNavigationBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryNavigationBody.h @@ -2,29 +2,45 @@ NS_ASSUME_NONNULL_BEGIN +/// Telemetry navigation event body DTO @interface RollbarTelemetryNavigationBody : RollbarTelemetryBody #pragma mark - Properties +/// Navigation from @property (nonatomic, copy) NSString *from; + +/// Navigation to. @property (nonatomic, copy) NSString *to; #pragma mark - Initializers +/// Designated initializer +/// @param from navigation from +/// @param to navigation to +/// @param extraData extra data -(instancetype)initWithFromLocation:(nonnull NSString *)from toLocation:(nonnull NSString *)to extraData:(nullable NSDictionary *)extraData NS_DESIGNATED_INITIALIZER; +/// Initializer +/// @param from navigation from +/// @param to navigation to -(instancetype)initWithFromLocation:(nonnull NSString *)from toLocation:(nonnull NSString *)to; -- (instancetype)initWithArray:(NSArray *)data -NS_DESIGNATED_INITIALIZER; - +/// Designated initializer +/// @param data seeding data dictionary - (instancetype)initWithDictionary:(nullable NSDictionary *)data NS_DESIGNATED_INITIALIZER; +/// Hides the initializer +/// @param data seeding data array +- (instancetype)initWithArray:(NSArray *)data +NS_UNAVAILABLE; + +/// Hides the initializer - (instancetype)init NS_UNAVAILABLE; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryNetworkBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryNetworkBody.h index 3de50aee..17cc61b7 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryNetworkBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryNetworkBody.h @@ -3,32 +3,52 @@ NS_ASSUME_NONNULL_BEGIN +/// Telemetry network event body DTO @interface RollbarTelemetryNetworkBody : RollbarTelemetryBody #pragma mark - Properties +/// HTTP method @property (nonatomic) RollbarHttpMethod method; + +/// URL @property (nonatomic, copy) NSString *url; + +/// Status code @property (nonatomic, copy) NSString *statusCode; #pragma mark - Initializers +/// Designated initializer +/// @param method HTTP method +/// @param url URL +/// @param statusCode status code +/// @param extraData extra data -(instancetype)initWithMethod:(RollbarHttpMethod)method url:(nonnull NSString *)url statusCode:(nonnull NSString *)statusCode extraData:(nullable NSDictionary *)extraData NS_DESIGNATED_INITIALIZER; +/// Initializer +/// @param method HTTP method +/// @param url URL +/// @param statusCode status code -(instancetype)initWithMethod:(RollbarHttpMethod)method url:(nonnull NSString *)url statusCode:(nonnull NSString *)statusCode; -- (instancetype)initWithArray:(NSArray *)data -NS_DESIGNATED_INITIALIZER; - +/// Designated initializer +/// @param data seedind data dictionary - (instancetype)initWithDictionary:(nullable NSDictionary *)data NS_DESIGNATED_INITIALIZER; +/// Hides the initializer +/// @param data seeding data array +- (instancetype)initWithArray:(NSArray *)data +NS_UNAVAILABLE; + +/// Hides the initializer - (instancetype)init NS_UNAVAILABLE; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryOptions.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryOptions.h index 0891e232..f16fd02f 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryOptions.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryOptions.h @@ -4,25 +4,47 @@ NS_ASSUME_NONNULL_BEGIN +/// Telemetry related settings of a configuration @interface RollbarTelemetryOptions : RollbarDTO #pragma mark - properties +/// Telemetry enabled flag @property (nonatomic) BOOL enabled; + +/// Capture OS log as Telemetry events flag @property (nonatomic) BOOL captureLog; + +/// Capture connectivity flag @property (nonatomic) BOOL captureConnectivity; + +/// Telemtry events buffer limit @property (nonatomic) NSUInteger maximumTelemetryData; + +/// Telemetry scrubbing options @property (nonatomic, strong) RollbarScrubbingOptions *viewInputsScrubber; #pragma mark - initializers +/// Initializer +/// @param enabled telemetry enabled +/// @param captureLog OS log capture enabled +/// @param captureConnectivity connectivity capture enabled +/// @param viewInputsScrubber telemetry scrubbing options - (instancetype)initWithEnabled:(BOOL)enabled captureLog:(BOOL)captureLog captureConnectivity:(BOOL)captureConnectivity viewInputsScrubber:(RollbarScrubbingOptions *)viewInputsScrubber; -//NS_DESIGNATED_INITIALIZER; + +/// Initializer +/// @param enabled telemetry enabled +/// @param captureLog OS log capture enabled +/// @param captureConnectivity connectivity capture enabled - (instancetype)initWithEnabled:(BOOL)enabled captureLog:(BOOL)captureLog captureConnectivity:(BOOL)captureConnectivity; + +/// Initializer +/// @param enabled telemetry enabled - (instancetype)initWithEnabled:(BOOL)enabled; @end diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryViewBody.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryViewBody.h index cfa2144f..183cae7a 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryViewBody.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTelemetryViewBody.h @@ -2,26 +2,38 @@ NS_ASSUME_NONNULL_BEGIN +/// Telemetry view event body DTO @interface RollbarTelemetryViewBody : RollbarTelemetryBody #pragma mark - Properties +/// View element name @property (nonatomic, copy) NSString *element; #pragma mark - Initializers +/// Designated initializer +/// @param element view element name +/// @param extraData extra data -(instancetype)initWithElement:(nonnull NSString *)element extraData:(nullable NSDictionary *)extraData NS_DESIGNATED_INITIALIZER; +/// Initializer +/// @param element view element name -(instancetype)initWithElement:(nonnull NSString *)element; -- (instancetype)initWithArray:(NSArray *)data -NS_DESIGNATED_INITIALIZER; - +/// Designated initializer +/// @param data seeding data dictionary - (instancetype)initWithDictionary:(nullable NSDictionary *)data NS_DESIGNATED_INITIALIZER; +/// Hides the initializer +/// @param data seeding data array +- (instancetype)initWithArray:(NSArray *)data +NS_UNAVAILABLE; + +/// Hides the initializer - (instancetype)init NS_UNAVAILABLE; diff --git a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTrace.h b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTrace.h index feb02c5f..31b085d5 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTrace.h +++ b/RollbarNotifier/Sources/RollbarNotifier/include/RollbarTrace.h @@ -5,25 +5,33 @@ NS_ASSUME_NONNULL_BEGIN +/// Trace data element of a payload @interface RollbarTrace : RollbarDTO #pragma mark - Properties -// Required: frames -// A list of stack frames, ordered such that the most recent call is last in the list. +/// Required: frames +/// A list of stack frames, ordered such that the most recent call is last in the list. @property (nonatomic, nonnull) NSArray *frames; -// Required: exception -// An object describing the exception instance. +/// Required: exception +/// An object describing the exception instance. @property (nonatomic, nonnull) RollbarException *exception; #pragma mark - Initializers +/// Initializer +/// @param exception exception +/// @param frames exception call stack frames -(instancetype)initWithRollbarException:(nonnull RollbarException *)exception rollbarCallStackFrames:(nonnull NSArray *)frames; +/// Initializer +/// @param exception exception -(instancetype)initWithException:(nonnull NSException *)exception; +/// Initializer +/// @param crashReport crash report content -(instancetype)initWithCrashReport:(nonnull NSString *)crashReport; @end