summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Holgate <matt@emobix.co.uk>2014-07-10 16:42:38 +0100
committerMatt Holgate <matt@emobix.co.uk>2014-07-10 16:42:38 +0100
commite6e38d4b92ed797f708b54594de02de9a7cff030 (patch)
tree3282e3ff5d3f4c1d5998ce19bbcc8f3e82d64cdb
parentea2cb63eb91784fe2e0cdcfb621d95e6a6ec6c71 (diff)
downloadmupdf-e6e38d4b92ed797f708b54594de02de9a7cff030.tar.xz
Crashlytics support for official builds.
Add hooks to allow us to pass in the Crashlytics SDK location and the API key from the command line. The SDK and API key will be held in a separate private repository. Should have no effect on regular builds.
-rw-r--r--platform/ios/Classes/MuAppDelegate.m9
-rw-r--r--platform/ios/MuPDF.xcodeproj/project.pbxproj26
2 files changed, 35 insertions, 0 deletions
diff --git a/platform/ios/Classes/MuAppDelegate.m b/platform/ios/Classes/MuAppDelegate.m
index b88de1cb..2c7c1d7b 100644
--- a/platform/ios/Classes/MuAppDelegate.m
+++ b/platform/ios/Classes/MuAppDelegate.m
@@ -3,6 +3,10 @@
#import "MuAppDelegate.h"
+#ifdef CRASHLYTICS_ENABLE
+#import <Crashlytics/Crashlytics.h>
+#endif
+
@implementation MuAppDelegate
{
BOOL _isInBackground;
@@ -17,6 +21,11 @@
ctx = fz_new_context(NULL, NULL, ResourceCacheMaxSize);
fz_register_document_handlers(ctx);
+#ifdef CRASHLYTICS_ENABLE
+ NSLog(@"Starting Crashlytics");
+ [Crashlytics startWithAPIKey:CRASHLYTICS_API_KEY];
+#endif
+
screenScale = [[UIScreen mainScreen] scale];
library = [[MuLibraryController alloc] initWithStyle: UITableViewStylePlain];
diff --git a/platform/ios/MuPDF.xcodeproj/project.pbxproj b/platform/ios/MuPDF.xcodeproj/project.pbxproj
index b572eac3..e2fc55bb 100644
--- a/platform/ios/MuPDF.xcodeproj/project.pbxproj
+++ b/platform/ios/MuPDF.xcodeproj/project.pbxproj
@@ -327,6 +327,7 @@
968E1E391779A54F0050CEA3 /* Sources */,
968E1E3A1779A54F0050CEA3 /* Frameworks */,
968E1E3B1779A54F0050CEA3 /* Resources */,
+ C9E0CC68196EE93F006EB94D /* ShellScript */,
);
buildRules = (
);
@@ -434,6 +435,19 @@
shellPath = /bin/sh;
shellScript = "bash build_libs.sh";
};
+ C9E0CC68196EE93F006EB94D /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "if [ \"$COMMAND_LINE_POSTBUILD_SCRIPT\" != \"\" ] ;\nthen\n exec $COMMAND_LINE_POSTBUILD_SCRIPT\nfi\n";
+ };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -495,8 +509,14 @@
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_MODULES_AUTOLINK = YES;
+ COMMAND_LINE_DEFINES = "";
+ COMMAND_LINE_FRAMEWORK_SEARCH_PATHS = "";
+ COMMAND_LINE_LINKER_FLAGS = "";
+ FRAMEWORK_SEARCH_PATHS = "$(COMMAND_LINE_FRAMEWORKS_SEARCH_PATH)";
+ GCC_PREPROCESSOR_DEFINITIONS = "$(COMMAND_LINE_DEFINES)";
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
ONLY_ACTIVE_ARCH = YES;
+ OTHER_LDFLAGS = "$(COMMAND_LINE_LINKER_FLAGS)";
};
name = Debug;
};
@@ -505,7 +525,13 @@
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_MODULES_AUTOLINK = YES;
+ COMMAND_LINE_DEFINES = "";
+ COMMAND_LINE_FRAMEWORK_SEARCH_PATHS = "";
+ COMMAND_LINE_LINKER_FLAGS = "";
+ FRAMEWORK_SEARCH_PATHS = "$(COMMAND_LINE_FRAMEWORKS_SEARCH_PATH)";
+ GCC_PREPROCESSOR_DEFINITIONS = "$(COMMAND_LINE_DEFINES)";
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
+ OTHER_LDFLAGS = "$(COMMAND_LINE_LINKER_FLAGS)";
};
name = Release;
};