Skip to content

Commit

Permalink
pushing additional changes to PLCrashReporter framework
Browse files Browse the repository at this point in the history
  • Loading branch information
mtjhax committed May 19, 2015
1 parent cba5943 commit f4b8d1a
Show file tree
Hide file tree
Showing 157 changed files with 1,215 additions and 6,654 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.TXT
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2015-05-18 Michael Johnson <mike@appblade.com>
iOS
* Version 0.6.3
* Updated PLCrashReporter to latest version, compatible with Xcode 6.3.
* Compiler settings and tweaks to compile properly with Xcode 6.3.1 and the iOS 8.3 SDK
Android
* No changes

2014-09-16 Michael Johnson <mike@appblade.com>
iOS
* Version 0.6.2
Expand Down
2 changes: 1 addition & 1 deletion iOS/Examples/CrashSample/CrashSample/AppBlade/AppBlade.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// AppBlade.h
// AppBlade iOS SDK v0.6.2
// AppBlade iOS SDK
//
// Created by Craig Spitzkoff on 6/1/11.
// Copyright 2011 AppBlade. All rights reserved.
Expand Down
34 changes: 15 additions & 19 deletions iOS/Framework/AppBlade.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@
CBF479EF13969C2B00949297 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
LastUpgradeCheck = 0630;
ORGANIZATIONNAME = "Raizlabs Corporation";
};
buildConfigurationList = CBF479F213969C2B00949297 /* Build configuration list for PBXProject "AppBlade" */;
Expand Down Expand Up @@ -853,7 +853,6 @@
62CD7F0B1406E994006201C7 /* Release_Production */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_THUMB_SUPPORT = NO;
Expand All @@ -872,15 +871,17 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
DSTROOT = /tmp/AppBlade.dst;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "AppBlade/AppBlade-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = "PLCF_RELEASE_BUILD=1";
GCC_PREPROCESSOR_DEFINITIONS = (
"PLCF_RELEASE_BUILD=1",
"PLCR_PRIVATE=1",
);
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
HEADER_SEARCH_PATHS = "$(SRCROOT)/AppBlade/CrashReporter/**";
LIBRARY_SEARCH_PATHS = (
Expand All @@ -899,7 +900,6 @@
62CD7F0D1406E9E8006201C7 /* Debug_Staging */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
Expand All @@ -921,7 +921,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
DSTROOT = /tmp/AppBlade.dst;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -932,6 +931,7 @@
GCC_PREPROCESSOR_DEFINITIONS = (
"PLCF_RELEASE_BUILD=1",
"DEBUG=1",
"PLCR_PRIVATE=1",
);
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
HEADER_SEARCH_PATHS = "$(SRCROOT)/AppBlade/CrashReporter/**";
Expand All @@ -951,7 +951,6 @@
62CD7F0F1406E9FC006201C7 /* Release_Staging */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_THUMB_SUPPORT = NO;
Expand All @@ -970,15 +969,17 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
DSTROOT = /tmp/AppBlade.dst;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "AppBlade/AppBlade-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = "PLCF_RELEASE_BUILD=1";
GCC_PREPROCESSOR_DEFINITIONS = (
"PLCF_RELEASE_BUILD=1",
"PLCR_PRIVATE=1",
);
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
HEADER_SEARCH_PATHS = "$(SRCROOT)/AppBlade/CrashReporter/**";
LIBRARY_SEARCH_PATHS = (
Expand All @@ -998,7 +999,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
COPY_PHASE_STRIP = NO;
DSTROOT = /tmp/AppBladeUniversal.dst;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand All @@ -1022,15 +1022,14 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
VALID_ARCHS = "armv7 armv7s i386 arm64";
VALID_ARCHS = "armv7 armv7s arm64";
};
name = Debug_Production;
};
CB51D3051429274C00A43CB5 /* Debug_Staging */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
COPY_PHASE_STRIP = NO;
DSTROOT = /tmp/AppBladeUniversal.dst;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand All @@ -1054,15 +1053,14 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
VALID_ARCHS = "armv7 armv7s i386 arm64";
VALID_ARCHS = "armv7 armv7s arm64";
};
name = Debug_Staging;
};
CB51D3061429274C00A43CB5 /* Release_Production */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
COPY_PHASE_STRIP = YES;
DSTROOT = /tmp/AppBladeUniversal.dst;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand All @@ -1080,15 +1078,14 @@
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
VALIDATE_PRODUCT = YES;
VALID_ARCHS = "armv7 armv7s i386 arm64";
VALID_ARCHS = "armv7 armv7s arm64";
};
name = Release_Production;
};
CB51D3071429274C00A43CB5 /* Release_Staging */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
COPY_PHASE_STRIP = YES;
DSTROOT = /tmp/AppBladeUniversal.dst;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand All @@ -1106,14 +1103,13 @@
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
VALIDATE_PRODUCT = YES;
VALID_ARCHS = "armv7 armv7s i386 arm64";
VALID_ARCHS = "armv7 armv7s arm64";
};
name = Release_Staging;
};
CBF47A0013969C2B00949297 /* Debug_Production */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
Expand All @@ -1135,7 +1131,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
DSTROOT = /tmp/AppBlade.dst;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -1146,6 +1141,7 @@
GCC_PREPROCESSOR_DEFINITIONS = (
"PLCF_RELEASE_BUILD=1",
"DEBUG=1",
"PLCR_PRIVATE=1",
);
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
HEADER_SEARCH_PATHS = "$(SRCROOT)/AppBlade/CrashReporter/**";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0500"
LastUpgradeVersion = "0630"
version = "1.8">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -41,6 +41,15 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CBF479F713969C2B00949297"
BuildableName = "libAppBlade.a"
BlueprintName = "AppBlade"
ReferencedContainer = "container:AppBlade.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0500"
LastUpgradeVersion = "0630"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -39,6 +39,15 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CB51D2FB1429274C00A43CB5"
BuildableName = "libAppBladeUniversal.a"
BlueprintName = "AppBladeUniversal"
ReferencedContainer = "container:AppBlade.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0500"
LastUpgradeVersion = "0630"
version = "1.8">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -41,6 +41,15 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CBF479F713969C2B00949297"
BuildableName = "libAppBlade.a"
BlueprintName = "AppBlade"
ReferencedContainer = "container:AppBlade.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
Expand Down
2 changes: 1 addition & 1 deletion iOS/Framework/AppBlade/AppBlade.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// AppBlade.h
// AppBlade iOS SDK v0.6.2
// AppBlade iOS SDK v0.6.3
//
// Created by Craig Spitzkoff on 6/1/11.
// Copyright 2011 AppBlade. All rights reserved.
Expand Down
23 changes: 12 additions & 11 deletions iOS/Framework/AppBlade/AppBlade.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@



static NSString* const s_sdkVersion = @"0.6.2";
static NSString* const s_sdkVersion = @"0.6.3";

NSString* const kAppBladeErrorDomain = @"com.appblade.sdk";
const int kAppBladeOfflineError = 1200;
Expand Down Expand Up @@ -106,6 +106,8 @@ @interface AppBlade () <AppBladeWebClientDelegate, FeedbackDialogueDelegate>
@property (nonatomic, retain) NSOperationQueue* pendingRequests;
@property (nonatomic, retain) NSOperationQueue* tokenRequests;

@property (nonatomic, retain) PLCrashReporter* crashReporter;

- (void)raiseConfigurationExceptionWithMessage:(NSString *)message;

- (void)validateProjectConfiguration;
Expand Down Expand Up @@ -543,13 +545,13 @@ - (void)catchAndReportCrashes
}
ABDebugLog_internal(@"Catch and report crashes");

PLCrashReporter *crashReporter = [PLCrashReporter sharedReporter];
self.crashReporter = [[PLCrashReporter alloc] init];
NSError *error;

[self checkForExistingCrashReports];

// Enable the Crash Reporter
if (![crashReporter enableCrashReporterAndReturnError: &error])
if (![self.crashReporter enableCrashReporterAndReturnError: &error])
ABErrorLog(@"Warning: Could not enable crash reporter: %@", error);
}

Expand All @@ -568,7 +570,7 @@ - (void)checkForExistingCrashReports
- (BOOL)hasPendingCrashReport
{
/* Check for a live crash report file */
if(![[NSFileManager defaultManager] fileExistsAtPath: [[PLCrashReporter sharedReporter] crashReportPath]]){
if(![[NSFileManager defaultManager] fileExistsAtPath: [self.crashReporter crashReportPath]]){
return ([self hasQueuedCrashReports]); //check queue
}
return YES;
Expand All @@ -590,7 +592,7 @@ - (NSArray *) queuedCrashReportFiles
}

- (NSString *) queuedCrashReportDirectory {
return [[[PLCrashReporter sharedReporter] crashReportDirectory] stringByAppendingPathComponent: PLCRASH_QUEUED_DIR];
return [[self.crashReporter crashReportDirectory] stringByAppendingPathComponent: PLCRASH_QUEUED_DIR];
}


Expand All @@ -603,13 +605,12 @@ - (void)handleCrashReport
return;
}

PLCrashReporter *crashReporter = [PLCrashReporter sharedReporter];
NSData *crashData;
NSError *error;
NSString* reportString = nil;
NSString *queuedFilePath = nil;
// Try loading the crash report from the live file
crashData = [crashReporter loadPendingCrashReportDataAndReturnError: &error];
crashData = [self.crashReporter loadPendingCrashReportDataAndReturnError: &error];
if (crashData != nil) {
PLCrashReport *report = [[PLCrashReport alloc] initWithData: crashData error: &error];
if (report != nil) {
Expand All @@ -633,11 +634,11 @@ - (void)handleCrashReport
{
ABErrorLog(@"Could not load a crash report from live file");
}
[crashReporter purgePendingCrashReport]; //remove crash report from immediate file, we have it in the queue now
[self.crashReporter purgePendingCrashReport]; //remove crash report from immediate file, we have it in the queue now

if(queuedFilePath == nil){
//we had no immediate crash, or an invalid save, grab any stored crash report
[[PLCrashReporter sharedReporter] loadPendingCrashReportData];
[self.crashReporter loadPendingCrashReportData];

reportString = [NSString stringWithContentsOfFile:queuedFilePath encoding:NSUTF8StringEncoding error:&error];
}
Expand Down Expand Up @@ -979,12 +980,12 @@ - (void)appBladeWebClientCrashReported:(AppBladeWebClient *)client
BOOL success = (status == 201 || status == 200);
if(success){ //we don't need to hold onto this crash.
ABDebugLog_internal(@"Appblade: success sending crash report, response status code: %d", status);
[[PLCrashReporter sharedReporter] purgePendingCrashReport];
[self.crashReporter purgePendingCrashReport];
NSString *pathOfCrashReport = [client.userInfo valueForKey:kAppBladeCrashReportKeyFilePath];
[[NSFileManager defaultManager] removeItemAtPath:pathOfCrashReport error:nil];
ABDebugLog_internal(@"Appblade: removed crash report, %@", pathOfCrashReport);

if ([[PLCrashReporter sharedReporter] hasPendingCrashReport]){
if ([self.crashReporter hasPendingCrashReport]){
ABDebugLog_internal(@"Appblade: PLCrashReporter has more crash reports");
[self handleCrashReport];
}
Expand Down
Loading

0 comments on commit f4b8d1a

Please sign in to comment.