diff --git a/CHANGELOG.md b/CHANGELOG.md index 34da10b5..0435d8eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,10 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co ## Release Notes **2.0.0** Preliminary Notes -- feat: added RollbarKSCrash +- feat: added RollbarPLCrashReporter module +- feat: added RollbarKSCrash module +- feat: explicit reporting of NSErrors +- feat: defined default scrub fields - refactor: split out RollbarCommon, RollbarNotifier, RollbarDeploys - refactor: added use of lightweight generics - refactor: added use nullability attributes @@ -35,5 +38,3 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co - refactor: removed all the deprecated API - refactor: replace NSString-like log level parameters in RollbarLogger interface with RollbarLevel enum - refactor: replace sync-all log methods of Rollbar and RolbarLogger with ones dedicated to each type of payload: string-message, NSException, NSError, etc. -- feat: defined default scrub fields -- feat: explicit reporting of NSErrors diff --git a/Demos/macosAppObjC/macosAppObjC.xcodeproj/project.pbxproj b/Demos/macosAppObjC/macosAppObjC.xcodeproj/project.pbxproj index 5015feab..74ce6382 100644 --- a/Demos/macosAppObjC/macosAppObjC.xcodeproj/project.pbxproj +++ b/Demos/macosAppObjC/macosAppObjC.xcodeproj/project.pbxproj @@ -14,6 +14,7 @@ 55759A732477561100ED3F04 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 55759A722477561100ED3F04 /* Assets.xcassets */; }; 55759A762477561100ED3F04 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 55759A742477561100ED3F04 /* Main.storyboard */; }; 55759A792477561100ED3F04 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 55759A782477561100ED3F04 /* main.m */; }; + 55A02A60259AAAE40071D60D /* RollbarPLCrashReporter in Frameworks */ = {isa = PBXBuildFile; productRef = 55A02A5F259AAAE40071D60D /* RollbarPLCrashReporter */; }; 55FD0711247860F1000BBC22 /* RollbarDeploys in Frameworks */ = {isa = PBXBuildFile; productRef = 55FD0710247860F1000BBC22 /* RollbarDeploys */; }; 55FD07142478614B000BBC22 /* RollbarDeploysDemoClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 55FD07132478614B000BBC22 /* RollbarDeploysDemoClient.m */; }; /* End PBXBuildFile section */ @@ -38,6 +39,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 55A02A60259AAAE40071D60D /* RollbarPLCrashReporter in Frameworks */, 55684F5A2553981600F82F34 /* RollbarKSCrash in Frameworks */, 55FD0711247860F1000BBC22 /* RollbarDeploys in Frameworks */, 5547273924903EB7005018BD /* RollbarNotifier in Frameworks */, @@ -109,6 +111,7 @@ 55FD0710247860F1000BBC22 /* RollbarDeploys */, 5547273824903EB7005018BD /* RollbarNotifier */, 55684F592553981600F82F34 /* RollbarKSCrash */, + 55A02A5F259AAAE40071D60D /* RollbarPLCrashReporter */, ); productName = macosAppObjC; productReference = 55759A692477560D00ED3F04 /* macosAppObjC.app */; @@ -367,6 +370,10 @@ isa = XCSwiftPackageProductDependency; productName = RollbarKSCrash; }; + 55A02A5F259AAAE40071D60D /* RollbarPLCrashReporter */ = { + isa = XCSwiftPackageProductDependency; + productName = RollbarPLCrashReporter; + }; 55FD0710247860F1000BBC22 /* RollbarDeploys */ = { isa = XCSwiftPackageProductDependency; productName = RollbarDeploys; diff --git a/Demos/macosAppObjC/macosAppObjC/AppDelegate.m b/Demos/macosAppObjC/macosAppObjC/AppDelegate.m index 48ef02ed..40d4d59a 100644 --- a/Demos/macosAppObjC/macosAppObjC/AppDelegate.m +++ b/Demos/macosAppObjC/macosAppObjC/AppDelegate.m @@ -11,7 +11,14 @@ #import "RollbarDeploysDemoClient.h" @import RollbarNotifier; -@import RollbarKSCrash; + +//@import RollbarKSCrash; +@import RollbarPLCrashReporter; + +__attribute__((noinline)) static void crashIt (void) { + /* Trigger a crash */ + ((char *)NULL)[1] = 0; +} @interface AppDelegate () @@ -20,6 +27,7 @@ @interface AppDelegate () @implementation AppDelegate - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { + // Insert code here to initialize your application [self initRollbar]; @@ -36,7 +44,6 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { context:nil ]; } - @try { [self callTroublemaker]; @@ -51,13 +58,15 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { // @throw NSInternalInconsistencyException; // [self performSelector:@selector(die_die)]; // [self performSelector:NSSelectorFromString(@"crashme:") withObject:nil afterDelay:10]; - assert(NO); + //assert(NO); //exit(0); + crashIt(); } - (void)applicationWillTerminate:(NSNotification *)aNotification { + // Insert code here to tear down your application [Rollbar infoMessage:@"The hosting application is terminating..."]; @@ -72,7 +81,9 @@ - (void)initRollbar { config.destination.environment = @"samples"; config.customData = @{ @"someKey": @"someValue", }; // init Rollbar shared instance: - id crashCollector = [[RollbarKSCrashCollector alloc] init]; + id crashCollector = + //[[RollbarKSCrashCollector alloc] init]; + [[RollbarPLCrashCollector alloc] init]; [Rollbar initWithConfiguration:config crashCollector:crashCollector]; [Rollbar infoMessage:@"Rollbar is up and running! Enjoy your remote error and log monitoring..."]; diff --git a/README.md b/README.md index d3c41392..dbce6931 100644 --- a/README.md +++ b/README.md @@ -43,11 +43,13 @@ All the active development will be done within this SDK repository. [![Platform](https://img.shields.io/cocoapods/p/RollbarDeploys.svg?label=RollbarDeploys)](https://docs.rollbar.com/docs/apple) [![Platform](https://img.shields.io/cocoapods/p/RollbarCommon.svg?label=RollbarCommon)](https://docs.rollbar.com/docs/apple) [![Platform](https://img.shields.io/cocoapods/p/RollbarKSCrash.svg?label=RollbarKSCrash)](https://docs.rollbar.com/docs/apple) +[![Platform](https://img.shields.io/cocoapods/p/RollbarPLCrashReporter.svg?label=RollbarPLCrashReporter)](https://docs.rollbar.com/docs/apple) [![CocoaPods](https://img.shields.io/cocoapods/v/RollbarNotifier?label=RollbarNotifier)](https://cocoapods.org/pods/RollbarNotifier) [![CocoaPods](https://img.shields.io/cocoapods/v/RollbarDeploys?label=RollbarDeploys)](https://cocoapods.org/pods/RollbarDeploys) [![CocoaPods](https://img.shields.io/cocoapods/v/RollbarCommon?label=RollbarCommon)](https://cocoapods.org/pods/RollbarCommon) [![CocoaPods](https://img.shields.io/cocoapods/v/RollbarKSCrash?label=RollbarKSCrash)](https://cocoapods.org/pods/RollbarKSCrash) +[![CocoaPods](https://img.shields.io/cocoapods/v/RollbarPLCrashReporter?label=RollbarPLCrashReporter)](https://cocoapods.org/pods/RollbarPLCrashReporter) ## Setup Instructions diff --git a/RollbarCommon.podspec b/RollbarCommon.podspec index 1fb518a8..155e3ccf 100644 --- a/RollbarCommon.podspec +++ b/RollbarCommon.podspec @@ -7,9 +7,9 @@ Pod::Spec.new do |s| - s.version = "2.0.0-alpha27" + s.version = "2.0.0-alpha28" s.name = "RollbarCommon" - s.summary = "Application or client side SDK for accessing the Rollbar API Server." + s.summary = "Application or client side SDK for interacting with the Rollbar API Server." s.description = <<-DESC Find, fix, and resolve errors with Rollbar. Easily send error data using Rollbar API. diff --git a/RollbarCommon/README.md b/RollbarCommon/README.md index b2dcb916..b94d4202 100644 --- a/RollbarCommon/README.md +++ b/RollbarCommon/README.md @@ -1,5 +1,5 @@ # RollbarCommon -This is an SDK module declaring protocols and implementing classes/types commonly used across the other SDK modules. +This is an SDK module declaring abstractions/concepts (protocols, abstract classes, etc.) and implementing classes/types commonly used across the other SDK modules. If any data type is used by more than one SDK module - place it here. diff --git a/RollbarDeploys.podspec b/RollbarDeploys.podspec index d581da67..11d3ec8a 100644 --- a/RollbarDeploys.podspec +++ b/RollbarDeploys.podspec @@ -7,9 +7,9 @@ Pod::Spec.new do |s| - s.version = "2.0.0-alpha27" + s.version = "2.0.0-alpha28" s.name = "RollbarDeploys" - s.summary = "Application or client side SDK for accessing the Rollbar API Server." + s.summary = "Application or client side SDK for interacting with the Rollbar API Server." s.description = <<-DESC Find, fix, and resolve errors with Rollbar. Easily send error data using Rollbar API. diff --git a/RollbarKSCrash.podspec b/RollbarKSCrash.podspec index 3944bfce..63e2a717 100644 --- a/RollbarKSCrash.podspec +++ b/RollbarKSCrash.podspec @@ -7,9 +7,9 @@ Pod::Spec.new do |s| - s.version = "2.0.0-alpha27" + s.version = "2.0.0-alpha28" s.name = "RollbarKSCrash" - s.summary = "Application or client side SDK for accessing the Rollbar API Server." + s.summary = "Application or client side SDK for interacting with the Rollbar API Server." s.description = <<-DESC Find, fix, and resolve errors with Rollbar. Easily send error data using Rollbar API. diff --git a/RollbarKSCrash/README.md b/RollbarKSCrash/README.md index a3ba34f9..4ae10182 100644 --- a/RollbarKSCrash/README.md +++ b/RollbarKSCrash/README.md @@ -1,3 +1,4 @@ # RollbarKSCrash -This is an SDK module implementing integration with [KSCrash reporter](https://github.com/kstenerud/KSCrash). +This is an SDK module implements a RollbarCrashCollector based on the [KSCrash reporter](https://github.com/kstenerud/KSCrash). + diff --git a/RollbarNotifier.podspec b/RollbarNotifier.podspec index bfc4c26d..b521bcd3 100644 --- a/RollbarNotifier.podspec +++ b/RollbarNotifier.podspec @@ -7,9 +7,9 @@ Pod::Spec.new do |s| - s.version = "2.0.0-alpha27" + s.version = "2.0.0-alpha28" s.name = "RollbarNotifier" - s.summary = "Application or client side SDK for accessing the Rollbar API Server." + s.summary = "Application or client side SDK for interacting with the Rollbar API Server." s.description = <<-DESC Find, fix, and resolve errors with Rollbar. Easily send error data using Rollbar API. diff --git a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarConfig.m b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarConfig.m index d55ba80b..618a5d31 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarConfig.m +++ b/RollbarNotifier/Sources/RollbarNotifier/DTOs/RollbarConfig.m @@ -22,7 +22,7 @@ #pragma mark - constants -static NSString * const NOTIFIER_VERSION = @"2.0.0-alpha27"; +static NSString * const NOTIFIER_VERSION = @"2.0.0-alpha28"; static NSString * const NOTIFIER_NAME = @"rollbar-apple"; diff --git a/RollbarNotifier/Sources/RollbarNotifier/RollbarLogger.m b/RollbarNotifier/Sources/RollbarNotifier/RollbarLogger.m index b3d3e1d0..6df1e55c 100644 --- a/RollbarNotifier/Sources/RollbarNotifier/RollbarLogger.m +++ b/RollbarNotifier/Sources/RollbarNotifier/RollbarLogger.m @@ -10,7 +10,6 @@ #import "RollbarThread.h" #import "RollbarReachability.h" #import -//#import "KSCrash.h" #import "RollbarTelemetry.h" #import "RollbarPayloadTruncator.h" #import "RollbarConfig.h" @@ -54,9 +53,6 @@ - (void)_test_doNothing; @end -//#define IS_IOS7_OR_HIGHER (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) -//#define IS_MACOS10_10_OR_HIGHER (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber10_10) - @implementation RollbarLogger { NSDate *nextSendTime; diff --git a/RollbarPLCrashReporter.podspec b/RollbarPLCrashReporter.podspec new file mode 100644 index 00000000..d46ac484 --- /dev/null +++ b/RollbarPLCrashReporter.podspec @@ -0,0 +1,64 @@ +# +# Be sure to run `pod spec lint RollbarPLCrashReporter.podspec' to ensure this is a valid spec. +# +# To learn more about Podspec attributes see https://guides.cocoapods.org/syntax/podspec.html +# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ +# + +Pod::Spec.new do |s| + + s.version = "2.0.0-alpha28" + s.name = "RollbarPLCrashReporter" + s.summary = "Application or client side SDK for interacting with the Rollbar API Server." + s.description = <<-DESC + Find, fix, and resolve errors with Rollbar. + Easily send error data using Rollbar API. + Analyze, de-dupe, send alerts, and prepare the data for further analysis. + Search, sort, and prioritize via the Rollbar dashboard. + DESC + s.homepage = "https://rollbar.com" + # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" + s.license = { :type => "MIT", :file => "LICENSE" } + # s.license = "MIT (example)" + s.documentation_url = "https://docs.rollbar.com/docs/ios" + s.authors = { "Andrey Kornich (Wide Spectrum Computing LLC)" => "akornich@gmail.com", + "Rollbar" => "support@rollbar.com" } + # s.author = { "Andrey Kornich" => "akornich@gmail.com" } + # Or just: s.author = "Andrey Kornich" + s.social_media_url = "http://twitter.com/rollbar" + s.source = { :git => "https://github.com/rollbar/rollbar-apple.git", + :tag => "v#{s.version}" + } + s.resource = "rollbar-logo.png" + # s.resources = "Resources/*.png" + + # When using multiple platforms: + s.ios.deployment_target = "9.0" + s.osx.deployment_target = "10.10" + s.tvos.deployment_target = "11.0" + s.watchos.deployment_target = "4.0" + # Any platform, if omitted: + # s.platform = :ios + # s.platform = :ios, "5.0" + + s.source_files = "#{s.name}/Sources/#{s.name}/**/*.{h,m}" + s.public_header_files = "#{s.name}/Sources/#{s.name}/include/*.h" + s.module_map = "#{s.name}/Sources/#{s.name}/include/module.modulemap" + # s.exclude_files = "Classes/Exclude" + # s.preserve_paths = "FilesToSave", "MoreFilesToSave" + + s.framework = "Foundation" + s.dependency "RollbarCommon", "~> #{s.version}" + s.dependency "PLCrashReporter", "~> 1.8.1" + # s.frameworks = "SomeFramework", "AnotherFramework" + # s.library = "iconv" + # s.libraries = "iconv", "xml2" + # s.dependency "JSONKit", "~> 1.4" + + s.requires_arc = true + # s.xcconfig = { + # "USE_HEADERMAP" => "NO", + # "HEADER_SEARCH_PATHS" => "$(PODS_ROOT)/Sources/#{s.name}/**" + # } + +end diff --git a/RollbarPLCrashReporter/.gitignore b/RollbarPLCrashReporter/.gitignore new file mode 100644 index 00000000..95c43209 --- /dev/null +++ b/RollbarPLCrashReporter/.gitignore @@ -0,0 +1,5 @@ +.DS_Store +/.build +/Packages +/*.xcodeproj +xcuserdata/ diff --git a/RollbarPLCrashReporter/.swiftpm/xcode/xcshareddata/xcschemes/RollbarPLCrashReporter.xcscheme b/RollbarPLCrashReporter/.swiftpm/xcode/xcshareddata/xcschemes/RollbarPLCrashReporter.xcscheme new file mode 100644 index 00000000..45fb7456 --- /dev/null +++ b/RollbarPLCrashReporter/.swiftpm/xcode/xcshareddata/xcschemes/RollbarPLCrashReporter.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RollbarPLCrashReporter/Package.swift b/RollbarPLCrashReporter/Package.swift new file mode 100644 index 00000000..ca11ad4a --- /dev/null +++ b/RollbarPLCrashReporter/Package.swift @@ -0,0 +1,79 @@ +// swift-tools-version:5.3 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "RollbarPLCrashReporter", + platforms: [ + // Oldest targeted platform versions that are supported by this product. + .macOS(.v10_10), + .iOS(.v9), + .tvOS(.v11), + .watchOS(.v4), + ], + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "RollbarPLCrashReporter", + targets: ["RollbarPLCrashReporter"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + .package(name:"RollbarCommon", + path: "../RollbarCommon" + ), + .package(name:"PLCrashReporter", + url: "https://github.com/microsoft/plcrashreporter.git", + Package.Dependency.Requirement.branch("master") + ), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + .target( + name: "RollbarPLCrashReporter", + dependencies: ["RollbarCommon", .product(name: "CrashReporter", package: "PLCrashReporter")], + publicHeadersPath: "include", + cSettings: [ + .headerSearchPath("Sources/RollbarPLCrashReporter/**"), + // .headerSearchPath("Sources/RollbarPLCrashReporter"), + // .headerSearchPath("Sources/RollbarPLCrashReporter/include"), + // .headerSearchPath("Sources/RollbarPLCrashReporter/DTOs"), + + // .define("DEFINES_MODULE"), + ] + ), + .testTarget( + name: "RollbarPLCrashReporterTests", + dependencies: ["RollbarPLCrashReporter"], + cSettings: [ + .headerSearchPath("Tests/RollbarKSCrashTests/**"), + // .headerSearchPath("Sources/RollbarKSCrash"), + // .headerSearchPath("Sources/RollbarKSCrash/include"), + // .headerSearchPath("Sources/RollbarKSCrash/DTOs"), + + // .define("DEFINES_MODULE"), + ] + ), + .testTarget( + name: "RollbarPLCrashReporterTests-ObjC", + dependencies: ["RollbarPLCrashReporter"], + cSettings: [ + .headerSearchPath("Tests/RollbarPLCrashReporterTests-ObjC/**"), + // .headerSearchPath("Sources/RollbarKSCrash"), + // .headerSearchPath("Sources/RollbarKSCrash/include"), + // .headerSearchPath("Sources/RollbarKSCrash/DTOs"), + + // .define("DEFINES_MODULE"), + ] + ), + ], + swiftLanguageVersions: [ + SwiftVersion.v4, + SwiftVersion.v4_2, + SwiftVersion.v5, + ] +) + diff --git a/RollbarPLCrashReporter/README.md b/RollbarPLCrashReporter/README.md new file mode 100644 index 00000000..16676b77 --- /dev/null +++ b/RollbarPLCrashReporter/README.md @@ -0,0 +1,3 @@ +# RollbarPLCrashReporter + +This is an SDK module implements a RollbarCrashCollector based on the [PLCrashReporter] (https://github.com/microsoft/plcrashreporter.git). diff --git a/RollbarPLCrashReporter/Sources/RollbarPLCrashReporter/RollbarPLCrashCollector.m b/RollbarPLCrashReporter/Sources/RollbarPLCrashReporter/RollbarPLCrashCollector.m new file mode 100644 index 00000000..b4b42b12 --- /dev/null +++ b/RollbarPLCrashReporter/Sources/RollbarPLCrashReporter/RollbarPLCrashCollector.m @@ -0,0 +1,100 @@ +// +// RollbarPLCrashCollector.m +// +// +// Created by Andrey Kornich on 2020-12-21. +// +@import CrashReporter; +@import RollbarCommon; + +#import "RollbarPLCrashCollector.h" +#import "RollbarCrashReportData.h" + +@implementation RollbarPLCrashCollector + +static PLCrashReporter *sharedPLCrashReporter = nil; + ++(void)initialize { + + if (self == [RollbarPLCrashCollector class]) { + + // Configure our reporter: + PLCrashReporterSignalHandlerType signalHandlerType = +#if !TARGET_OS_TV + PLCrashReporterSignalHandlerTypeMach; +#else + PLCrashReporterSignalHandlerTypeBSD; +#endif + PLCrashReporterConfig *config = + [[PLCrashReporterConfig alloc] initWithSignalHandlerType: signalHandlerType + symbolicationStrategy: PLCrashReporterSymbolicationStrategyAll + ]; + + // Allocate and init the PLCrashReporter: + sharedPLCrashReporter = + [[PLCrashReporter alloc] initWithConfiguration: config]; + + // Enable the reporter: + BOOL success = [sharedPLCrashReporter enableCrashReporter]; + if (!success) { + RollbarSdkLog(@"Couldn't enable PLCrashReporter!"); + } + } +} + +-(void)collectCrashReportsWithObserver:(NSObject *)observer { + + if (!sharedPLCrashReporter || ![sharedPLCrashReporter hasPendingCrashReport]) { + return; + } + + NSFileManager *fm = [NSFileManager defaultManager]; + NSError *error; + + NSArray *paths = + NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); + NSString *documentsDirectory = [paths objectAtIndex:0]; + if (![fm createDirectoryAtPath: documentsDirectory + withIntermediateDirectories: YES + attributes:nil + error: &error]) { + NSLog(@"Could not create documents directory: %@", error); + return; + } + + NSData *data = + [sharedPLCrashReporter loadPendingCrashReportDataAndReturnError: &error]; + if (data == nil) { + NSLog(@"Failed to load crash report data: %@", error); + return; + } + [sharedPLCrashReporter purgePendingCrashReport]; + + PLCrashReport *report = + [[PLCrashReport alloc] initWithData: data + error: &error]; + if (report == nil) { + NSLog(@"Failed to parse crash report: %@", error); + return; + } + + NSString *crashReport = + [PLCrashReportTextFormatter stringValueForCrashReport: report + withTextFormat: PLCrashReportTextFormatiOS]; + NSLog(@"%@", crashReport); + + if (!crashReport) { + return; + } + + NSMutableArray *crashReports = [[NSMutableArray alloc] init]; + + RollbarCrashReportData *crashReportData = + [[RollbarCrashReportData alloc] initWithCrashReport:crashReport]; + + [crashReports addObject:crashReportData]; + + [observer onCrashReportsCollectionCompletion:crashReports]; +} + +@end diff --git a/RollbarPLCrashReporter/Sources/RollbarPLCrashReporter/include/RollbarPLCrashCollector.h b/RollbarPLCrashReporter/Sources/RollbarPLCrashReporter/include/RollbarPLCrashCollector.h new file mode 100644 index 00000000..eb4ddfec --- /dev/null +++ b/RollbarPLCrashReporter/Sources/RollbarPLCrashReporter/include/RollbarPLCrashCollector.h @@ -0,0 +1,17 @@ +// +// RollbarPLCrashCollector.h +// +// +// Created by Andrey Kornich on 2020-12-21. +// + +@import Foundation; +@import RollbarCommon; + +NS_ASSUME_NONNULL_BEGIN + +@interface RollbarPLCrashCollector : RollbarCrashCollectorBase + +@end + +NS_ASSUME_NONNULL_END diff --git a/RollbarPLCrashReporter/Sources/RollbarPLCrashReporter/include/module.modulemap b/RollbarPLCrashReporter/Sources/RollbarPLCrashReporter/include/module.modulemap new file mode 100644 index 00000000..1cc60bd8 --- /dev/null +++ b/RollbarPLCrashReporter/Sources/RollbarPLCrashReporter/include/module.modulemap @@ -0,0 +1,8 @@ +module RollbarPLCrashReporter { + umbrella "." + + export * + module * { export * } + + requires objc +} diff --git a/RollbarPLCrashReporter/Tests/LinuxMain.swift b/RollbarPLCrashReporter/Tests/LinuxMain.swift new file mode 100644 index 00000000..f982a071 --- /dev/null +++ b/RollbarPLCrashReporter/Tests/LinuxMain.swift @@ -0,0 +1,7 @@ +import XCTest + +import RollbarPLCrashReporterTests + +var tests = [XCTestCaseEntry]() +tests += RollbarPLCrashReporterTests.allTests() +XCTMain(tests) diff --git a/RollbarPLCrashReporter/Tests/RollbarPLCrashReporterTests-ObjC/RollbarPLCrashReporterTests.m b/RollbarPLCrashReporter/Tests/RollbarPLCrashReporterTests-ObjC/RollbarPLCrashReporterTests.m new file mode 100644 index 00000000..48a39c4a --- /dev/null +++ b/RollbarPLCrashReporter/Tests/RollbarPLCrashReporterTests-ObjC/RollbarPLCrashReporterTests.m @@ -0,0 +1,16 @@ +// Copyright (c) 2018 Rollbar, Inc. All rights reserved. + +#import + +@import RollbarPLCrashReporter; + +@interface RollbarPLCrashReporterTests : XCTestCase +@end + +@implementation RollbarPLCrashReporterTests + +- (void)testBasics { +} + +@end + diff --git a/RollbarPLCrashReporter/Tests/RollbarPLCrashReporterTests/RollbarPLCrashReporterTests.swift b/RollbarPLCrashReporter/Tests/RollbarPLCrashReporterTests/RollbarPLCrashReporterTests.swift new file mode 100644 index 00000000..7957bf2c --- /dev/null +++ b/RollbarPLCrashReporter/Tests/RollbarPLCrashReporterTests/RollbarPLCrashReporterTests.swift @@ -0,0 +1,15 @@ +import XCTest +@testable import RollbarPLCrashReporter + +final class RollbarPLCrashReporterTests: XCTestCase { + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct + // results. + XCTAssertEqual(RollbarPLCrashReporter().text, "Hello, World!") + } + + static var allTests = [ + ("testExample", testExample), + ] +} diff --git a/RollbarPLCrashReporter/Tests/RollbarPLCrashReporterTests/XCTestManifests.swift b/RollbarPLCrashReporter/Tests/RollbarPLCrashReporterTests/XCTestManifests.swift new file mode 100644 index 00000000..d18e782f --- /dev/null +++ b/RollbarPLCrashReporter/Tests/RollbarPLCrashReporterTests/XCTestManifests.swift @@ -0,0 +1,9 @@ +import XCTest + +#if !canImport(ObjectiveC) +public func allTests() -> [XCTestCaseEntry] { + return [ + testCase(RollbarPLCrashReporterTests.allTests), + ] +} +#endif diff --git a/RollbarSDK.podspec b/RollbarSDK.podspec index 3619c45a..58f71b68 100644 --- a/RollbarSDK.podspec +++ b/RollbarSDK.podspec @@ -9,9 +9,9 @@ Pod::Spec.new do |sdk| # Rollbar SDK: # ============ - sdk.version = "2.0.0-alpha27" + sdk.version = "2.0.0-alpha28" sdk.name = "RollbarSDK" - sdk.summary = "Application or client side SDK for accessing the Rollbar API Server." + s.summary = "Application or client side SDK for interacting with the Rollbar API Server." sdk.description = <<-DESC Find, fix, and resolve errors with Rollbar. Easily send error data using Rollbar API. diff --git a/RollbarSDK.xcworkspace/contents.xcworkspacedata b/RollbarSDK.xcworkspace/contents.xcworkspacedata index 4ced4179..87d2b0ca 100644 --- a/RollbarSDK.xcworkspace/contents.xcworkspacedata +++ b/RollbarSDK.xcworkspace/contents.xcworkspacedata @@ -34,6 +34,9 @@ + + @@ -50,6 +53,9 @@ + + diff --git a/RollbarSDK.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/RollbarSDK.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 00000000..a6f6fb21 --- /dev/null +++ b/RollbarSDK.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,10 @@ + + + + + IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded + + PreviewsEnabled + + + diff --git a/RollbarSDK.xcworkspace/xcshareddata/swiftpm/Package.resolved b/RollbarSDK.xcworkspace/xcshareddata/swiftpm/Package.resolved index c586b0e8..99a99d90 100644 --- a/RollbarSDK.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/RollbarSDK.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,7 +6,16 @@ "repositoryURL": "https://github.com/kstenerud/KSCrash.git", "state": { "branch": "master", - "revision": "64229cfa482d135c109dc3c66db7b30d1da855fc", + "revision": "498aa21d23541b0bb4990f8d3d20bea2c280a18b", + "version": null + } + }, + { + "package": "PLCrashReporter", + "repositoryURL": "https://github.com/microsoft/plcrashreporter.git", + "state": { + "branch": "master", + "revision": "280cf16a19d85b707b6cc9fc235dde7457f6f7cc", "version": null } }