Skip to content

Commit

Permalink
Merge remote-tracking branch 'kstenerud/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	Source/KSCrash/Recording/KSCrash.h
#	Source/KSCrash/Recording/KSCrash.m
#	Source/KSCrash/Recording/Sentry/KSCrashSentry.h
  • Loading branch information
CodeHex committed Dec 8, 2016
2 parents 774b4fb + 2e683a2 commit 1a9abf9
Show file tree
Hide file tree
Showing 301 changed files with 28,785 additions and 8,442 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ Thumbs.db
.~*
*.orig
*.xccheckout
Carthage/Build
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: objective-c
osx_image: xcode8
script:
- make test
- make lint
matrix:
include:
- env: SCHEME=KSCrash WORKSPACE=Mac.xcworkspace SDK=macosx10.12
- env: SCHEME=KSCrashLib WORKSPACE=iOS.xcworkspace SDK=iphonesimulator
- env: SCHEME=KSCrash-TVOS WORKSPACE=TVOS.xcworkspace SDK=appletvsimulator
17 changes: 17 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
1.11.2:

Added buffered report file writing, giving a significant performance boost.


1.11.0:

Re-implemented most Objective-C functionality in POSIX C to prepare for porting. The following APIs have been changed/removed:

- RENAMED [KSCrash redirectConsoleLogsToDefaultFile] TO [KSCrash redirectConsoleLogToFile]
- REMOVED [KSCrash redirectConsoleLogsToFile:(NSString*) fullPath overwrite:(BOOL) overwrite]
- CHANGED kscrash_install() now only takes an app name and an install path.
- CHANGED kscrash_reinstall() no longer takes arguments.
- REMOVED KSCrash.maxStoredReports. Now stores 5 max always (g_maxReports in KSCrashReportStore.c)
- REMOVED [KSCrash allReports]
- REMOVED [KSCrash initWithReportFilesDirectory]
- REMOVED KSCrash.crashReportStore
58 changes: 45 additions & 13 deletions KSCrash.podspec
Original file line number Diff line number Diff line change
@@ -1,29 +1,45 @@
Pod::Spec.new do |s|
IOS_DEPLOYMENT_TARGET = '6.0' unless defined? IOS_DEPLOYMENT_TARGET
s.name = "KSCrash"
s.version = "0.0.4"
s.version = "1.11.2"
s.summary = "The Ultimate iOS Crash Reporter"
s.homepage = "https://github.com/kstenerud/KSCrash"
s.license = { :type => 'KSCrash license agreement', :file => 'LICENSE' }
s.author = { "Karl Stenerud" => "kstenerud@gmail.com" }
s.platform = :ios, '5.0'
s.ios.deployment_target = IOS_DEPLOYMENT_TARGET
s.osx.deployment_target = '10.8'
s.tvos.deployment_target = '9.0'
s.watchos.deployment_target = '2.0'
s.source = { :git => "https://github.com/kstenerud/KSCrash.git", :tag=>s.version.to_s }
s.frameworks = 'Foundation'
s.libraries = 'c++', 'z'
s.xcconfig = { 'GCC_ENABLE_CPP_EXCEPTIONS' => 'YES' }

s.default_subspecs = 'Installations'

s.subspec 'Recording' do |recording|
recording.source_files = 'Source/KSCrash/Recording/**/*.{h,m,mm,c,cpp}',
'Source/KSCrash/Reporting/Filters/KSCrashReportFilter.h'
'Source/KSCrash/llvm/**/*.{h,m,mm,c,cpp}',
'Source/KSCrash/swift/**/*.{h,m,mm,c,cpp}',
'Source/KSCrash/Reporting/Filters/KSCrashReportFilter.h'
recording.public_header_files = 'Source/KSCrash/Recording/KSCrash.h',
'Source/KSCrash/Recording/KSCrashC.h',
'Source/KSCrash/Recording/KSCrashReportWriter.h',
'Source/KSCrash/Recording/KSCrashType.h',
'Source/KSCrash/Reporting/Filters/KSCrashReportFilter.h'

recording.subspec 'Tools' do |tools|
tools.source_files = 'Source/KSCrash/Recording/Tools/*.h'
end
end

s.subspec 'Reporting' do |reporting|
reporting.dependency 'KSCrash/Recording'

reporting.subspec 'Filters' do |filters|
reporting.subspec 'Filters' do |filters|
filters.subspec 'Base' do |base|
base.source_files = 'Source/KSCrash/Reporting/Filters/Tools/**/*.{h,m,mm,c,cpp}',
'Source/KSCrash/Reporting/Filters/KSCrashReportFilter.h',
'Source/KSCrash/Reporting/Filters/KSCrashReportFilter.m'
'Source/KSCrash/Reporting/Filters/KSCrashReportFilter.h'
base.public_header_files = 'Source/KSCrash/Reporting/Filters/KSCrashReportFilter.h'
end

filters.subspec 'Alert' do |alert|
Expand All @@ -44,6 +60,12 @@ Pod::Spec.new do |s|
'Source/KSCrash/Reporting/Filters/KSCrashReportFilterBasic.m'
end

filters.subspec 'Stringify' do |stringify|
stringify.dependency 'KSCrash/Reporting/Filters/Base'
stringify.source_files = 'Source/KSCrash/Reporting/Filters/KSCrashReportFilterStringify.h',
'Source/KSCrash/Reporting/Filters/KSCrashReportFilterStringify.m'
end

filters.subspec 'GZip' do |gzip|
gzip.dependency 'KSCrash/Reporting/Filters/Base'
gzip.source_files = 'Source/KSCrash/Reporting/Filters/KSCrashReportFilterGZip.h',
Expand All @@ -55,35 +77,45 @@ Pod::Spec.new do |s|
json.source_files = 'Source/KSCrash/Reporting/Filters/KSCrashReportFilterJSON.h',
'Source/KSCrash/Reporting/Filters/KSCrashReportFilterJSON.m'
end

filters.subspec 'Sets' do |sets|
sets.dependency 'KSCrash/Reporting/Filters/Base'
sets.dependency 'KSCrash/Reporting/Filters/AppleFmt'
sets.dependency 'KSCrash/Reporting/Filters/Basic'
sets.dependency 'KSCrash/Reporting/Filters/Stringify'
sets.dependency 'KSCrash/Reporting/Filters/GZip'
sets.dependency 'KSCrash/Reporting/Filters/JSON'

sets.source_files = 'Source/KSCrash/Reporting/Filters/KSCrashReportFilterSets.h',
'Source/KSCrash/Reporting/Filters/KSCrashReportFilterSets.m'
end

filters.subspec 'Tools' do |tools|
tools.source_files = 'Source/KSCrash/Reporting/Filters/Tools/**/*.{h,m,mm,c,cpp}'
end

end

reporting.subspec 'Tools' do |tools|
tools.frameworks = 'SystemConfiguration'
tools.source_files = 'Source/KSCrash/Reporting/Tools/**/*.{h,m,mm,c,cpp}'
tools.ios.frameworks = 'SystemConfiguration'
tools.tvos.frameworks = 'SystemConfiguration'
tools.osx.frameworks = 'SystemConfiguration'
tools.source_files = 'Source/KSCrash/Reporting/Tools/**/*.{h,m,mm,c,cpp}',
'Source/KSCrash/Recording/KSSystemCapabilities.h'
end

reporting.subspec 'MessageUI' do |messageui|
end

reporting.subspec 'Sinks' do |sinks|
sinks.frameworks = 'MessageUI'
sinks.ios.frameworks = 'MessageUI'
sinks.dependency 'KSCrash/Reporting/Filters'
sinks.dependency 'KSCrash/Reporting/Tools'
sinks.source_files = 'Source/KSCrash/Reporting/Sinks/**/*.{h,m,mm,c,cpp}'
end

end

s.subspec 'Installations' do |installations|
installations.dependency 'KSCrash/Recording'
installations.dependency 'KSCrash/Reporting'
Expand Down
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Copyright (c) 2012 Karl Stenerud

Licencing: MIT (https://opensource.org/licenses/MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in the documentation of any redistributions of the template files themselves (but not in projects built using the templates).
Expand Down
17 changes: 2 additions & 15 deletions Mac/Crash-Tester/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,11 @@
//

#import "AppDelegate.h"
#import "ARCSafe_MemMgmt.h"
#import "Crasher.h"
#import "CrashTesterCommands.h"
#import "Configuration.h"

#import <KSCrash/KSCrashAdvanced.h>
#import <KSCrash/KSCrashReportFilterSets.h>
#import <KSCrash/KSCrashReportFilter.h>
#import <KSCrash/KSCrashReportFilterAppleFmt.h>
#import <KSCrash/KSCrashReportFilterBasic.h>
#import <KSCrash/KSCrashReportFilterGZip.h>
#import <KSCrash/KSCrashReportFilterJSON.h>
#import <KSCrash/KSCrashReportSinkConsole.h>
#import <KSCrash/KSCrashReportSinkEMail.h>
#import <KSCrash/KSCrashReportSinkQuincyHockey.h>
#import <KSCrash/KSCrashReportSinkStandard.h>
#import <KSCrash/KSCrashReportSinkVictory.h>
#import <KSCrash/KSCrash.h>

@interface AppDelegate ()

Expand Down Expand Up @@ -69,7 +57,6 @@ - (void) installCrashHandler
[handler redirectConsoleLogsToDefaultFile];
#endif

handler.zombieCacheSize = 16384;
handler.deadlockWatchdogInterval = 5.0f;
handler.printTraceToStdout = YES;
handler.onCrash = onCrash;
Expand All @@ -90,7 +77,7 @@ - (void) installCrashHandler
- (void)applicationDidFinishLaunching:(__unused NSNotification *)aNotification
{
[self installCrashHandler];
self.crasher = as_autorelease([[Crasher alloc] init]);
self.crasher = [[Crasher alloc] init];
[self updateReportCount];
}

Expand Down
2 changes: 1 addition & 1 deletion Mac/Crash-Tester/Crash-Tester-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>org.stenerud.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
25 changes: 20 additions & 5 deletions Mac/Example-Apps-Mac.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
CB62412917EBCBA2006471F1 /* libKSCrashLib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CB62412817EBCBA2006471F1 /* libKSCrashLib.a */; };
CB62414417EBCC97006471F1 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = CB62414317EBCC97006471F1 /* libz.dylib */; };
CB62414617EBCC9E006471F1 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB62414517EBCC9E006471F1 /* SystemConfiguration.framework */; };
CB62414A17EBCCBC006471F1 /* libstdc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = CB62414917EBCCBC006471F1 /* libstdc++.dylib */; };
CB8F1DD71CCAF4050022CDF0 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CB8F1DD61CCAF4050022CDF0 /* libc++.tbd */; };
CBF3CE6517F578CC001AC307 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB62401617EBB430006471F1 /* Cocoa.framework */; };
CBF3CE6B17F578CC001AC307 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = CBF3CE6917F578CC001AC307 /* InfoPlist.strings */; };
CBF3CE6D17F578CC001AC307 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CBF3CE6C17F578CC001AC307 /* main.m */; };
Expand Down Expand Up @@ -56,6 +56,7 @@
CB62414517EBCC9E006471F1 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
CB62414717EBCCA9006471F1 /* libc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libc++.dylib"; path = "usr/lib/libc++.dylib"; sourceTree = SDKROOT; };
CB62414917EBCCBC006471F1 /* libstdc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libstdc++.dylib"; path = "usr/lib/libstdc++.dylib"; sourceTree = SDKROOT; };
CB8F1DD61CCAF4050022CDF0 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
CBF3CE6417F578CC001AC307 /* Crash-Tester.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Crash-Tester.app"; sourceTree = BUILT_PRODUCTS_DIR; };
CBF3CE6817F578CC001AC307 /* Crash-Tester-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Crash-Tester-Info.plist"; sourceTree = "<group>"; };
CBF3CE6A17F578CC001AC307 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
Expand All @@ -68,7 +69,6 @@
CBF3CE7817F578CC001AC307 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
CBF3CE9117F65857001AC307 /* Crasher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Crasher.h; path = "../../Source/Common-Examples/Crasher.h"; sourceTree = "<group>"; };
CBF3CE9217F65857001AC307 /* Crasher.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = Crasher.mm; path = "../../Source/Common-Examples/Crasher.mm"; sourceTree = "<group>"; };
CBF3CE9417F65B12001AC307 /* ARCSafe_MemMgmt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARCSafe_MemMgmt.h; path = "../../Source/Common-Examples/ARCSafe_MemMgmt.h"; sourceTree = "<group>"; };
CBF3CE9517F65B12001AC307 /* LoadableCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LoadableCategory.h; path = "../../Source/Common-Examples/LoadableCategory.h"; sourceTree = "<group>"; };
CBF3CE9617F65B51001AC307 /* libKSCrashLib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libKSCrashLib.a; path = "../../../Library/Developer/Xcode/DerivedData/Mac-beusbddefllzqoanxuparffwsspt/Build/Products/Debug/libKSCrashLib.a"; sourceTree = "<group>"; };
CBF3CEA217F67E9D001AC307 /* CrashTesterCommands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CrashTesterCommands.h; path = "../../Source/Common-Examples/CrashTesterCommands.h"; sourceTree = "<group>"; };
Expand All @@ -80,7 +80,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
CB62414A17EBCCBC006471F1 /* libstdc++.dylib in Frameworks */,
CB8F1DD71CCAF4050022CDF0 /* libc++.tbd in Frameworks */,
CB62414617EBCC9E006471F1 /* SystemConfiguration.framework in Frameworks */,
CB62414417EBCC97006471F1 /* libz.dylib in Frameworks */,
CB62412917EBCBA2006471F1 /* libKSCrashLib.a in Frameworks */,
Expand Down Expand Up @@ -125,6 +125,7 @@
CB62401517EBB430006471F1 /* Frameworks */ = {
isa = PBXGroup;
children = (
CB8F1DD61CCAF4050022CDF0 /* libc++.tbd */,
CBF3CE9617F65B51001AC307 /* libKSCrashLib.a */,
CB62414917EBCCBC006471F1 /* libstdc++.dylib */,
CB62414717EBCCA9006471F1 /* libc++.dylib */,
Expand Down Expand Up @@ -178,7 +179,6 @@
children = (
CBF3CE7217F578CC001AC307 /* AppDelegate.h */,
CBF3CE7317F578CC001AC307 /* AppDelegate.m */,
CBF3CE9417F65B12001AC307 /* ARCSafe_MemMgmt.h */,
CB02647617F69E79003E0AED /* Configuration.h */,
CBF3CE9117F65857001AC307 /* Crasher.h */,
CBF3CE9217F65857001AC307 /* Crasher.mm */,
Expand Down Expand Up @@ -247,7 +247,7 @@
CB62400B17EBB430006471F1 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Karl Stenerud";
};
buildConfigurationList = CB62400E17EBB430006471F1 /* Build configuration list for PBXProject "Example-Apps-Mac" */;
Expand Down Expand Up @@ -381,13 +381,19 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
Expand Down Expand Up @@ -418,14 +424,19 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand Down Expand Up @@ -454,6 +465,7 @@
);
INFOPLIST_FILE = "Simple-Example/Simple-Example-Info.plist";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "org.stenerud.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand All @@ -472,6 +484,7 @@
GCC_PREFIX_HEADER = "Simple-Example/Simple-Example-Prefix.pch";
INFOPLIST_FILE = "Simple-Example/Simple-Example-Info.plist";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "org.stenerud.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand Down Expand Up @@ -517,6 +530,7 @@
"$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/Mac-beusbddefllzqoanxuparffwsspt/Build/Products/Debug",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "org.stenerud.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand Down Expand Up @@ -558,6 +572,7 @@
"$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/Mac-beusbddefllzqoanxuparffwsspt/Build/Products/Debug",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "org.stenerud.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand Down

0 comments on commit 1a9abf9

Please sign in to comment.