diff --git a/App Reviews.xcodeproj/project.pbxproj b/App Reviews.xcodeproj/project.pbxproj index bf05a6b..fc73044 100644 --- a/App Reviews.xcodeproj/project.pbxproj +++ b/App Reviews.xcodeproj/project.pbxproj @@ -65,6 +65,8 @@ 49FD79D91B166B4D00E99F4B /* 3dPartyLicenses.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 49FD79D81B166B4D00E99F4B /* 3dPartyLicenses.rtf */; }; 49FD79DB1B17248A00E99F4B /* LaunchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49FD79DA1B17248A00E99F4B /* LaunchViewController.swift */; }; 49FD79DD1B17327500E99F4B /* NSUserDefaults+AppReviews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49FD79DC1B17327500E99F4B /* NSUserDefaults+AppReviews.swift */; }; + 49FD79E11B17CBF700E99F4B /* Fabric.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49FD79DF1B17CBF700E99F4B /* Fabric.framework */; }; + 49FD79E21B17CBF700E99F4B /* Crashlytics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 49FD79E01B17CBF700E99F4B /* Crashlytics.framework */; }; 67821E35AE9AB2E4F46170D4 /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5083B9909F1AD9259C461DBD /* Pods.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; /* End PBXBuildFile section */ @@ -144,6 +146,8 @@ 49FD79D81B166B4D00E99F4B /* 3dPartyLicenses.rtf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.rtf; path = 3dPartyLicenses.rtf; sourceTree = ""; }; 49FD79DA1B17248A00E99F4B /* LaunchViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LaunchViewController.swift; path = AppReviews/LaunchViewController.swift; sourceTree = SOURCE_ROOT; }; 49FD79DC1B17327500E99F4B /* NSUserDefaults+AppReviews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NSUserDefaults+AppReviews.swift"; path = "AppReviews/NSUserDefaults+AppReviews.swift"; sourceTree = SOURCE_ROOT; }; + 49FD79DF1B17CBF700E99F4B /* Fabric.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Fabric.framework; sourceTree = ""; }; + 49FD79E01B17CBF700E99F4B /* Crashlytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Crashlytics.framework; sourceTree = ""; }; 5083B9909F1AD9259C461DBD /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8E9E3A98AF3DC476EF9A0809 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; F9CE0DF35CA051BD774393CD /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; @@ -155,6 +159,8 @@ buildActionMask = 2147483647; files = ( 67821E35AE9AB2E4F46170D4 /* Pods.framework in Frameworks */, + 49FD79E21B17CBF700E99F4B /* Crashlytics.framework in Frameworks */, + 49FD79E11B17CBF700E99F4B /* Fabric.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -353,6 +359,8 @@ 7147F03F6DDA32E9CC0315BF /* Frameworks */ = { isa = PBXGroup; children = ( + 49FD79DF1B17CBF700E99F4B /* Fabric.framework */, + 49FD79E01B17CBF700E99F4B /* Crashlytics.framework */, 5083B9909F1AD9259C461DBD /* Pods.framework */, ); name = Frameworks; @@ -381,6 +389,7 @@ 9AFDC626376EE7DF95EFFC02 /* Embed Pods Frameworks */, 4190A1B1813032D096277609 /* Copy Pods Resources */, 49D09E541B0FF4C8006B39C9 /* Sign Sparkle */, + 49FD79DE1B17CA4C00E99F4B /* Crashalytics */, ); buildRules = ( ); @@ -545,6 +554,20 @@ shellPath = /bin/sh; shellScript = "LOCATION=\"${BUILT_PRODUCTS_DIR}\"/\"${FRAMEWORKS_FOLDER_PATH}\"\n\n# Usually set by Xcode\nCODE_SIGN_IDENTITY=\"Developer ID Application: Knut Inge Grosland\"\n\ncodesign --verbose --force --sign \"$CODE_SIGN_IDENTITY\" \"$LOCATION/Sparkle.framework/Versions/A\""; }; + 49FD79DE1B17CA4C00E99F4B /* Crashalytics */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = Crashalytics; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "./Fabric.framework/run 975b8be9fe2f4dfd2f635a7b54ac52b4c49e023b cdb27eb87742e8cc0001dee929df20f6c8c18c09130ea5df80c17cfd68ae8a80"; + }; 72B401262D76AFCCD7B98C00 /* Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -784,6 +807,11 @@ CODE_SIGN_IDENTITY = "Developer ID Application"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer: Knut Inge Grosland (BV7ZH22G55)"; COMBINE_HIDPI_IMAGES = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)", + ); INFOPLIST_FILE = AppReviews/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; ONLY_ACTIVE_ARCH = YES; @@ -802,6 +830,10 @@ CODE_SIGN_IDENTITY = "Developer ID Application"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "3rd Party Mac Developer Application: Knut Inge Grosland (2PRW676NCQ)"; COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)", + ); INFOPLIST_FILE = AppReviews/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_NAME = "App Reviews"; diff --git a/AppReviews/AppDelegate.swift b/AppReviews/AppDelegate.swift index 0956d60..d8f0dfc 100644 --- a/AppReviews/AppDelegate.swift +++ b/AppReviews/AppDelegate.swift @@ -9,6 +9,8 @@ import Cocoa import AppKit import SimpleCocoaAnalytics +import Fabric +import Crashlytics @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { @@ -23,7 +25,11 @@ class AppDelegate: NSObject, NSApplicationDelegate { // MARK: Application Process func applicationDidFinishLaunching(aNotification: NSNotification) { - + + // Fabric CrashAlytics + Fabric.with([Crashlytics()]) + + // Google Analytics var analyticsHelper = AnalyticsHelper.sharedInstance() analyticsHelper.recordScreenWithName("Launch") analyticsHelper.beginPeriodicReportingWithAccount("UA-62792522-3", name: "App Reviews OSX", version: NSApplication.v_versionBuild()) diff --git a/AppReviews/Info.plist b/AppReviews/Info.plist index 03a428a..5cda1ac 100644 --- a/AppReviews/Info.plist +++ b/AppReviews/Info.plist @@ -22,6 +22,20 @@ ???? CFBundleVersion 7 + Fabric + + APIKey + 975b8be9fe2f4dfd2f635a7b54ac52b4c49e023b + Kits + + + KitInfo + + KitName + Crashlytics + + + LSApplicationCategoryType public.app-category.developer-tools LSMinimumSystemVersion diff --git a/Crashlytics.framework/Crashlytics b/Crashlytics.framework/Crashlytics new file mode 120000 index 0000000..7074275 --- /dev/null +++ b/Crashlytics.framework/Crashlytics @@ -0,0 +1 @@ +Versions/Current/Crashlytics \ No newline at end of file diff --git a/Crashlytics.framework/Headers b/Crashlytics.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/Crashlytics.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/Crashlytics.framework/Modules b/Crashlytics.framework/Modules new file mode 120000 index 0000000..5736f31 --- /dev/null +++ b/Crashlytics.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/Crashlytics.framework/Resources b/Crashlytics.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Crashlytics.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Crashlytics.framework/Versions/A/Crashlytics b/Crashlytics.framework/Versions/A/Crashlytics new file mode 100755 index 0000000..961c4fe Binary files /dev/null and b/Crashlytics.framework/Versions/A/Crashlytics differ diff --git a/Crashlytics.framework/Versions/A/Headers/CLSLogging.h b/Crashlytics.framework/Versions/A/Headers/CLSLogging.h new file mode 100644 index 0000000..fe1ece6 --- /dev/null +++ b/Crashlytics.framework/Versions/A/Headers/CLSLogging.h @@ -0,0 +1,62 @@ +// +// CLSLogging.h +// Crashlytics +// +// Copyright (c) 2015 Crashlytics, Inc. All rights reserved. +// + +#import +#ifdef __OBJC__ +#import +#endif + +FAB_START_NONNULL + +/** + * + * The CLS_LOG macro provides as easy way to gather more information in your log messages that are + * sent with your crash data. CLS_LOG prepends your custom log message with the function name and + * line number where the macro was used. If your app was built with the DEBUG preprocessor macro + * defined CLS_LOG uses the CLSNSLog function which forwards your log message to NSLog and CLSLog. + * If the DEBUG preprocessor macro is not defined CLS_LOG uses CLSLog only. + * + * Example output: + * -[AppDelegate login:] line 134 $ login start + * + * If you would like to change this macro, create a new header file, unset our define and then define + * your own version. Make sure this new header file is imported after the Crashlytics header file. + * + * #undef CLS_LOG + * #define CLS_LOG(__FORMAT__, ...) CLSNSLog... + * + **/ +#ifdef __OBJC__ +#ifdef DEBUG +#define CLS_LOG(__FORMAT__, ...) CLSNSLog((@"%s line %d $ " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) +#else +#define CLS_LOG(__FORMAT__, ...) CLSLog((@"%s line %d $ " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) +#endif +#endif + +/** + * + * Add logging that will be sent with your crash data. This logging will not show up in the system.log + * and will only be visible in your Crashlytics dashboard. + * + **/ + +#ifdef __OBJC__ +OBJC_EXTERN void CLSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2); +OBJC_EXTERN void CLSLogv(NSString *format, va_list ap) NS_FORMAT_FUNCTION(1,0); + +/** + * + * Add logging that will be sent with your crash data. This logging will show up in the system.log + * and your Crashlytics dashboard. It is not recommended for Release builds. + * + **/ +OBJC_EXTERN void CLSNSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2); +OBJC_EXTERN void CLSNSLogv(NSString *format, va_list ap) NS_FORMAT_FUNCTION(1,0); +#endif + +FAB_END_NONNULL diff --git a/Crashlytics.framework/Versions/A/Headers/CLSReport.h b/Crashlytics.framework/Versions/A/Headers/CLSReport.h new file mode 100644 index 0000000..bae34e6 --- /dev/null +++ b/Crashlytics.framework/Versions/A/Headers/CLSReport.h @@ -0,0 +1,103 @@ +// +// CLSReport.h +// Crashlytics +// +// Copyright (c) 2015 Crashlytics, Inc. All rights reserved. +// + +#import +#import + +FAB_START_NONNULL + +/** + * The CLSCrashReport protocol is deprecated. See the CLSReport class and the CrashyticsDelegate changes for details. + **/ +@protocol CLSCrashReport + +@property (nonatomic, copy, readonly) NSString *identifier; +@property (nonatomic, copy, readonly) NSDictionary *customKeys; +@property (nonatomic, copy, readonly) NSString *bundleVersion; +@property (nonatomic, copy, readonly) NSString *bundleShortVersionString; +@property (nonatomic, copy, readonly) NSDate *crashedOnDate; +@property (nonatomic, copy, readonly) NSString *OSVersion; +@property (nonatomic, copy, readonly) NSString *OSBuildVersion; + +@end + +/** + * The CLSReport exposes an interface to the phsyical report that Crashlytics has created. You can + * use this class to get information about the event, and can also set some values after the + * event has occured. + **/ +@interface CLSReport : NSObject + +- (instancetype)init NS_UNAVAILABLE; + +/** + * Returns the session identifier for the report. + **/ +@property (nonatomic, copy, readonly) NSString *identifier; + +/** + * Returns the custom key value data for the report. + **/ +@property (nonatomic, copy, readonly) NSDictionary *customKeys; + +/** + * Returns the CFBundleVersion of the application that generated the report. + **/ +@property (nonatomic, copy, readonly) NSString *bundleVersion; + +/** + * Returns the CFBundleShortVersionString of the application that generated the report. + **/ +@property (nonatomic, copy, readonly) NSString *bundleShortVersionString; + +/** + * Returns the date that the report was created. + **/ +@property (nonatomic, copy, readonly) NSDate *dateCreated; + +/** + * Returns the os version that the application crashed on. + **/ +@property (nonatomic, copy, readonly) NSString *OSVersion; + +/** + * Returns the os build version that the application crashed on. + **/ +@property (nonatomic, copy, readonly) NSString *OSBuildVersion; + +/** + * Returns YES if the report contains any crash information. If the report + * contains only NSErrors, this will return NO. + **/ +@property (nonatomic, assign, readonly) BOOL isCrash; + +/** + * You can use this method to set, after the event, additional custom keys. The rules + * and semantics for this method are the same as those documented in Crashlytics.h. Be aware + * that the maximum size and count of custom keys is still enforced, and you can overwrite keys + * and/or cause excess keys to be deleted by using this method. + **/ +- (void)setObjectValue:(id FAB_NULLABLE)value forKey:(NSString *)key; + +/** + * Record an application-specific user identifier. See Crashlytics.h for details. + **/ +@property (nonatomic, copy) NSString * FAB_NULLABLE userIdentifier; + +/** + * Record a user name. See Crashlytics.h for details. + **/ +@property (nonatomic, copy) NSString * FAB_NULLABLE userName; + +/** + * Record a user email. See Crashlytics.h for details. + **/ +@property (nonatomic, copy) NSString * FAB_NULLABLE userEmail; + +@end + +FAB_END_NONNULL diff --git a/Crashlytics.framework/Versions/A/Headers/CLSStackFrame.h b/Crashlytics.framework/Versions/A/Headers/CLSStackFrame.h new file mode 100644 index 0000000..3744791 --- /dev/null +++ b/Crashlytics.framework/Versions/A/Headers/CLSStackFrame.h @@ -0,0 +1,37 @@ +// +// CLSStackFrame.h +// Crashlytics +// +// Copyright 2015 Crashlytics, Inc. All rights reserved. +// + +#import +#import + +FAB_START_NONNULL + +/** + * + * This class is used in conjunction with -[Crashlytics recordCustomExceptionName:reason:frameArray:] to + * record information about non-ObjC/C++ exceptions. All information included here will be displayed + * in the Crashlytics UI, and can influence crash grouping. Be particularly careful with the use of the + * address property. If set, Crashlytics will attempt symbolication and could overwrite other properities + * in the process. + * + **/ +@interface CLSStackFrame : NSObject + ++ (instancetype)stackFrame; ++ (instancetype)stackFrameWithAddress:(NSUInteger)address; ++ (instancetype)stackFrameWithSymbol:(NSString *)symbol; + +@property (nonatomic, copy) NSString * FAB_NULLABLE symbol; +@property (nonatomic, copy) NSString * FAB_NULLABLE library; +@property (nonatomic, copy) NSString * FAB_NULLABLE fileName; +@property (nonatomic, assign) uint32_t lineNumber; +@property (nonatomic, assign) uint64_t offset; +@property (nonatomic, assign) uint64_t address; + +@end + +FAB_END_NONNULL diff --git a/Crashlytics.framework/Versions/A/Headers/Crashlytics.h b/Crashlytics.framework/Versions/A/Headers/Crashlytics.h new file mode 100644 index 0000000..07ab722 --- /dev/null +++ b/Crashlytics.framework/Versions/A/Headers/Crashlytics.h @@ -0,0 +1,246 @@ +// +// Crashlytics.h +// Crashlytics +// +// Copyright (c) 2015 Crashlytics, Inc. All rights reserved. +// + +#import + +#import +#import "CLSLogging.h" +#import "CLSReport.h" +#import "CLSStackFrame.h" + +#define CLS_DEPRECATED(x) __attribute__ ((deprecated(x))) + +FAB_START_NONNULL + +@protocol CrashlyticsDelegate; + +@interface Crashlytics : NSObject + +@property (nonatomic, readonly, copy) NSString *apiKey; +@property (nonatomic, readonly, copy) NSString *version; +@property (nonatomic, assign) BOOL debugMode; + +/** + * + * The delegate can be used to influence decisions on reporting and behavior, as well as reacting + * to previous crashes. + * + * Make certain that the delegate is setup before starting Crashlytics with startWithAPIKey:... or + * via +[Fabric with:...]. Failure to do will result in missing any delegate callbacks that occur + * synchronously during start. + * + **/ +@property (nonatomic, assign) id FAB_NULLABLE delegate; + +/** + * + * The recommended way to install Crashlytics into your application is to place a call + * to +startWithAPIKey: in your -application:didFinishLaunchingWithOptions:/-applicationDidFinishLaunching: + * method. + * + * Note: Starting with 3.0, the submission process has been significantly improved. The delay parameter + * is no longer required to throttle submissions on launch, performance will be great without it. + * + **/ ++ (Crashlytics *)startWithAPIKey:(NSString *)apiKey; ++ (Crashlytics *)startWithAPIKey:(NSString *)apiKey afterDelay:(NSTimeInterval)delay CLS_DEPRECATED("Crashlytics no longer needs or uses the delay parameter. Please use +startWithAPIKey: instead."); + +/** + * + * If you need the functionality provided by the CrashlyticsDelegate protocol, you can use + * these convenience methods to activate the framework and set the delegate in one call. + * + **/ ++ (Crashlytics *)startWithAPIKey:(NSString *)apiKey delegate:(id FAB_NULLABLE)delegate; ++ (Crashlytics *)startWithAPIKey:(NSString *)apiKey delegate:(id FAB_NULLABLE)delegate afterDelay:(NSTimeInterval)delay CLS_DEPRECATED("Crashlytics no longer needs or uses the delay parameter. Please use +startWithAPIKey:delegate: instead."); + +/** + * + * Access the singleton Crashlytics instance. + * + **/ ++ (Crashlytics *)sharedInstance; + +/** + * + * The easiest ways to cause a crash - great for testing! + * + **/ +- (void)crash; +- (void)throwException; + +/** + * + * Many of our customers have requested the ability to tie crashes to specific end-users of their + * application in order to facilitate responses to support requests or permit the ability to reach + * out for more information. We allow you to specify up to three separate values for display within + * the Crashlytics UI - but please be mindful of your end-user's privacy. + * + * We recommend specifying a user identifier - an arbitrary string that ties an end-user to a record + * in your system. This could be a database id, hash, or other value that is meaningless to a + * third-party observer but can be indexed and queried by you. + * + * Optionally, you may also specify the end-user's name or username, as well as email address if you + * do not have a system that works well with obscured identifiers. + * + * Pursuant to our EULA, this data is transferred securely throughout our system and we will not + * disseminate end-user data unless required to by law. That said, if you choose to provide end-user + * contact information, we strongly recommend that you disclose this in your application's privacy + * policy. Data privacy is of our utmost concern. + * + **/ +- (void)setUserIdentifier:(NSString * FAB_NULLABLE)identifier; +- (void)setUserName:(NSString * FAB_NULLABLE)name; +- (void)setUserEmail:(NSString * FAB_NULLABLE)email; + ++ (void)setUserIdentifier:(NSString * FAB_NULLABLE)identifier CLS_DEPRECATED("Please access this method via +sharedInstance"); ++ (void)setUserName:(NSString * FAB_NULLABLE)name CLS_DEPRECATED("Please access this method via +sharedInstance"); ++ (void)setUserEmail:(NSString * FAB_NULLABLE)email CLS_DEPRECATED("Please access this method via +sharedInstance"); + +/** + * + * Set a value for a key to be associated with your crash data. When setting an object value, the object + * is converted to a string. This is typically done by calling -[NSObject description]. + * + **/ +- (void)setObjectValue:(id FAB_NULLABLE)value forKey:(NSString *)key; +- (void)setIntValue:(int)value forKey:(NSString *)key; +- (void)setBoolValue:(BOOL)value forKey:(NSString *)key; +- (void)setFloatValue:(float)value forKey:(NSString *)key; + ++ (void)setObjectValue:(id FAB_NULLABLE)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance"); ++ (void)setIntValue:(int)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance"); ++ (void)setBoolValue:(BOOL)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance"); ++ (void)setFloatValue:(float)value forKey:(NSString *)key CLS_DEPRECATED("Please access this method via +sharedInstance"); + +/** + * + * This method can be used to record a single exception structure in a report. This is particularly useful + * when your code interacts with non-native languages like Lua, C#, or Javascript. This call can be + # expensive and should only be used shortly before process termination. This API is not intended be to used + * to log NSException objects. All safely-reportable NSExceptions are automatically captured by + * Crashlytics. + * + * The frameArray argument should contain only CLSStackFrame instances. + * + **/ +- (void)recordCustomExceptionName:(NSString *)name reason:(NSString * FAB_NULLABLE)reason frameArray:(NSArray *)frameArray; + + + +/** + * In Beta. Sign up at http://answers.io/labs to get on the list! + * + * @brief Log an event to be sent to Answers. + * @param eventName The event name as it will be shown in the dashboard. + * @discussion Example usage: + * @code [CrashlyticsKit logEvent:@"Tweet Viewed"]; + * + */ +- (void)logEvent:(NSString *)eventName; + +/** + * In Beta. Sign up at http://answers.io/labs to get on the list! + * + * @brief Log an event to be sent to Answers, optionally providing a dictionary of attributes. Attribute keys + * must be NSString and and values must be NSNumber or NSString. + * @param eventName The event name as it will be shown in the dashboard. + * @param attributes An NSDictionary with keys of type NSString, and values of type NSNumber + * or NSString. There may be at most 20 attributes for a particular event. + * @discussion How we treat NSNumber: + * We will provide information about the distribution of values over time. + * + * How we treat NSStrings: + * NSStrings are used as categorical data, allowing comparison across different category values. + * Strings are limited to a maximum length of 100 characters, attributes over this length will be + * truncated. + * + * When tracking the Tweet views to better understand user engagement, sending the tweet's length + * and the type of media present in the tweet allows you to track how tweet length and the type of media influence + * engagement. + * Example usage: + * @code [CrashlyticsKit logEvent:@"Tweet Viewed" attributes:@{ + * @"Media Type": @"Image", + * @"Length": @120 + * }]; + */ +- (void)logEvent:(NSString *)eventName attributes:(NSDictionary * FAB_NULLABLE) attributes; + ++ (void)logEvent:(NSString *)eventName CLS_DEPRECATED("Please refer to -logEvent:"); ++ (void)logEvent:(NSString *)eventName attributes:(NSDictionary * FAB_NULLABLE) attributes CLS_DEPRECATED("Please refer to -logEvent:attributes:"); +@end + +/** + * + * The CrashlyticsDelegate protocol provides a mechanism for your application to take + * action on events that occur in the Crashlytics crash reporting system. You can make + * use of these calls by assigning an object to the Crashlytics' delegate property directly, + * or through the convenience +startWithAPIKey:delegate: method. + * + **/ +@protocol CrashlyticsDelegate +@optional + +/** + * + * Called once a Crashlytics instance has determined that the last execution of the + * application ended in a crash. This is called some time after the crash reporting + * process has begun. If you have specified a delay in one of the + * startWithAPIKey:... calls, this will take at least that long to be invoked. + * + **/ +- (void)crashlyticsDidDetectCrashDuringPreviousExecution:(Crashlytics *)crashlytics CLS_DEPRECATED("Please refer to -crashlyticsDidDetectReportForLastExecution:"); + +/** + * + * Just like crashlyticsDidDetectCrashDuringPreviousExecution this delegate method is + * called once a Crashlytics instance has determined that the last execution of the + * application ended in a crash. A CLSCrashReport is passed back that contains data about + * the last crash report that was generated. See the CLSCrashReport protocol for method details. + * This method is called after crashlyticsDidDetectCrashDuringPreviousExecution. + * + **/ +- (void)crashlytics:(Crashlytics *)crashlytics didDetectCrashDuringPreviousExecution:(id )crash CLS_DEPRECATED("Please refer to -crashlyticsDidDetectReportForLastExecution:"); + +/** + * + * Called when a Crashlytics instance has determined that the last execution of the + * application ended in a crash. This is called synchronously on Crashlytics + * initialization. Your delegate must invoke the completionHandler, but does not need to do so + * synchronously, or even on the main thread. Invoking completionHandler with NO will cause the + * detected report to be deleted and not submitted to Crashlytics. This is useful for + * implementing permission prompts, or other more-complex forms of logic around submitting crashes. + * + * Failure to invoke the completionHandler will prevent submissions from being reported. Watch out. + * + * Just implementing this delegate method will disable all forms of synchronous report submission. This can + * impact the reliability of reporting crashes very early in application launch. + * + **/ + +- (void)crashlyticsDidDetectReportForLastExecution:(CLSReport *)report completionHandler:(void (^)(BOOL submit))completionHandler; + +/** + * + * If your app is running on an OS that supports it (OS X 10.9+, iOS 7.0+), Crashlytics will submit + * most reports using out-of-process background networking operations. This results in a significant + * improvement in reliability of reporting, as well as power and performance wins for your users. + * If you don't want this functionality, you can disable by returning NO from this method. + * + * Note: background submission is not supported for extensions on iOS or OS X. + * + **/ +- (BOOL)crashlyticsCanUseBackgroundSessions:(Crashlytics *)crashlytics; + +@end + +/** + * `CrashlyticsKit` can be used as a parameter to `[Fabric with:@[CrashlyticsKit]];` in Objective-C. In Swift, use Crashlytics.sharedInstance() + */ +#define CrashlyticsKit [Crashlytics sharedInstance] + +FAB_END_NONNULL diff --git a/Crashlytics.framework/Versions/A/Modules/module.modulemap b/Crashlytics.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 0000000..7c8ea5c --- /dev/null +++ b/Crashlytics.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,11 @@ +framework module Crashlytics { + header "Crashlytics.h" + header "CLSLogging.h" + header "CLSReport.h" + header "CLSStackFrame.h" + + export * + + link "z" + link "c++" +} diff --git a/Crashlytics.framework/Versions/A/Resources/Info.plist b/Crashlytics.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..d0f74da --- /dev/null +++ b/Crashlytics.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,42 @@ + + + + + BuildMachineOSBuild + 13F34 + CFBundleDevelopmentRegion + English + CFBundleExecutable + Crashlytics + CFBundleIdentifier + com.twitter.crashlytics.mac + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Crashlytics + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.0.9 + CFBundleSignature + ???? + CFBundleVersion + 54 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 6A2008a + DTPlatformVersion + GM + DTSDKBuild + 14A382 + DTSDKName + macosx10.10 + DTXcode + 0611 + DTXcodeBuild + 6A2008a + NSHumanReadableCopyright + Copyright © 2015 Crashlytics, Inc. All rights reserved. + + diff --git a/Crashlytics.framework/Versions/A/Resources/en.lproj/InfoPlist.strings b/Crashlytics.framework/Versions/A/Resources/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..5e45963 Binary files /dev/null and b/Crashlytics.framework/Versions/A/Resources/en.lproj/InfoPlist.strings differ diff --git a/Crashlytics.framework/Versions/A/_CodeSignature/CodeResources b/Crashlytics.framework/Versions/A/_CodeSignature/CodeResources new file mode 100644 index 0000000..10dc7ef --- /dev/null +++ b/Crashlytics.framework/Versions/A/_CodeSignature/CodeResources @@ -0,0 +1,177 @@ + + + + + files + + Resources/Info.plist + + 2WPfQTDP9K8ajX1IM/NFR47EgJs= + + Resources/en.lproj/InfoPlist.strings + + hash + + MiLKDDnrUKr4EmuvhS5VQwxHGK8= + + optional + + + + files2 + + Headers/CLSLogging.h + + zcn6IoylvVofwfxrmJZrxDN7Tp0= + + Headers/CLSReport.h + + Tu7M2FRwYUeX+Yv7uFTV4jHKafA= + + Headers/CLSStackFrame.h + + 4XDKnrO7wRNttwP1TQ2Ed8CuRqQ= + + Headers/Crashlytics.h + + YfdjEaVRyq9Ds/1gYu4lnfQl8Ks= + + Modules/module.modulemap + + FjLJjH4TslH+1dyccMCHCkT4VpY= + + Modules/module.private.modulemap + + TW6wf6BihLkE0wMg0gzvdoYDEf8= + + PrivateHeaders/CLSAsyncOperation.h + + xaAW5bVUvvOOAm8WSM96i+6q4F8= + + PrivateHeaders/CLSAsyncOperation_Private.h + + IfcvxYVaMpOdRjsKhS7DLJUg/08= + + PrivateHeaders/Crashlytics_Errors.h + + g/pJdp+zfBGskCqr1rUZB/FMeHc= + + PrivateHeaders/Crashlytics_Platform.h + + uz96BQuMa25BzWR4fa39cFbAe60= + + PrivateHeaders/Crashlytics_WebKit.h + + nOQUR6IGXGnybgvIFS9xazi00Y8= + + Resources/Info.plist + + 2WPfQTDP9K8ajX1IM/NFR47EgJs= + + Resources/en.lproj/InfoPlist.strings + + hash + + MiLKDDnrUKr4EmuvhS5VQwxHGK8= + + optional + + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/Crashlytics.framework/Versions/Current b/Crashlytics.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Crashlytics.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Crashlytics.framework/run b/Crashlytics.framework/run new file mode 100755 index 0000000..baca7f3 Binary files /dev/null and b/Crashlytics.framework/run differ diff --git a/Fabric.framework/Fabric b/Fabric.framework/Fabric new file mode 120000 index 0000000..4df0d3a --- /dev/null +++ b/Fabric.framework/Fabric @@ -0,0 +1 @@ +Versions/Current/Fabric \ No newline at end of file diff --git a/Fabric.framework/Headers b/Fabric.framework/Headers new file mode 120000 index 0000000..a177d2a --- /dev/null +++ b/Fabric.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/Fabric.framework/Modules b/Fabric.framework/Modules new file mode 120000 index 0000000..5736f31 --- /dev/null +++ b/Fabric.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/Fabric.framework/Resources b/Fabric.framework/Resources new file mode 120000 index 0000000..953ee36 --- /dev/null +++ b/Fabric.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/Fabric.framework/Versions/A/Fabric b/Fabric.framework/Versions/A/Fabric new file mode 100755 index 0000000..c5d66c0 Binary files /dev/null and b/Fabric.framework/Versions/A/Fabric differ diff --git a/Fabric.framework/Versions/A/Headers/FABAttributes.h b/Fabric.framework/Versions/A/Headers/FABAttributes.h new file mode 100644 index 0000000..7200ea4 --- /dev/null +++ b/Fabric.framework/Versions/A/Headers/FABAttributes.h @@ -0,0 +1,23 @@ +// +// FABAttributes.h +// Fabric +// +// Created by Priyanka Joshi on 3/3/15. +// Copyright (c) 2015 Twitter. All rights reserved. +// + +#pragma once + +#define FAB_UNAVAILABLE(x) __attribute__((unavailable(x))) + +#if __has_feature(nullability) +#define FAB_NONNULL __nonnull +#define FAB_NULLABLE __nullable +#define FAB_START_NONNULL _Pragma("clang assume_nonnull begin") +#define FAB_END_NONNULL _Pragma("clang assume_nonnull end") +#else +#define FAB_NONNULL +#define FAB_NULLABLE +#define FAB_START_NONNULL +#define FAB_END_NONNULL +#endif diff --git a/Fabric.framework/Versions/A/Headers/Fabric.h b/Fabric.framework/Versions/A/Headers/Fabric.h new file mode 100644 index 0000000..7b1b31a --- /dev/null +++ b/Fabric.framework/Versions/A/Headers/Fabric.h @@ -0,0 +1,75 @@ +// +// Fabric.h +// +// Copyright (c) 2014 Twitter. All rights reserved. +// + +#import +#import "FABAttributes.h" + +FAB_START_NONNULL + +/** + * Fabric Base. Coordinates configuration and starts all provided kits. + */ +@interface Fabric : NSObject + +/** + * Initialize Fabric and all provided kits. Call this method within your App Delegate's + * `application:didFinishLaunchingWithOptions:` and provide the kits you wish to use. + * + * For example, in Objective-C: + * + * `[Fabric with:@[TwitterKit, CrashlyticsKit, MoPubKit]];` + * + * Swift: + * + * `Fabric.with([Twitter(), Crashlytics(), MoPub()])` + * + * Only the first call to this method is honored. Subsequent calls are no-ops. + * + * @param kits An array of kit instances. Kits may provide a macro such as CrashlyticsKit which can be passed in as array elements in objective-c. + * + * @return Returns the shared Fabric instance. In most cases this can be ignored. + */ ++ (instancetype)with:(NSArray *)kits; + +/** + * Returns the Fabric singleton object. + */ ++ (instancetype)sharedSDK; + +/** + * This BOOL enables or disables debug logging, such as kit version information. The default value is NO. + */ +@property (nonatomic, assign) BOOL debug; + +/** + * Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance. + */ +- (id)init FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance."); + +/** + * Returns Fabrics's instance of the specified kit. + * + * @param klass The class of the kit. + * + * @return The kit instance of class klass which was provided to with: or nil. + */ +- (id FAB_NULLABLE)kitForClass:(Class)klass; + +/** + * Returns a dictionary containing the kit configuration info for the provided kit. + * The configuration information is parsed from the application's Info.plist. This + * method is primarily intended to be used by kits to retrieve their configuration. + * + * @param kitInstance An instance of the kit whose configuration should be returned. + * + * @return A dictionary containing kit specific configuration information or nil if none exists. + */ +- (NSDictionary * FAB_NULLABLE)configurationDictionaryForKit:(id)kitInstance; + +@end + +FAB_END_NONNULL + diff --git a/Fabric.framework/Versions/A/Modules/module.modulemap b/Fabric.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 0000000..2a31223 --- /dev/null +++ b/Fabric.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module Fabric { + umbrella header "Fabric.h" + + export * + module * { export * } +} \ No newline at end of file diff --git a/Fabric.framework/Versions/A/Resources/Info.plist b/Fabric.framework/Versions/A/Resources/Info.plist new file mode 100644 index 0000000..20aa285 --- /dev/null +++ b/Fabric.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,42 @@ + + + + + BuildMachineOSBuild + 13F34 + CFBundleDevelopmentRegion + en + CFBundleExecutable + Fabric + CFBundleIdentifier + io.fabric.sdk.mac + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + Fabric + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.2.6 + CFBundleSignature + ???? + CFBundleVersion + 18 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 6A2008a + DTPlatformVersion + GM + DTSDKBuild + 14A382 + DTSDKName + macosx10.10 + DTXcode + 0611 + DTXcodeBuild + 6A2008a + NSHumanReadableCopyright + Copyright © 2015 Twitter. All rights reserved. + + diff --git a/Fabric.framework/Versions/Current b/Fabric.framework/Versions/Current new file mode 120000 index 0000000..8c7e5a6 --- /dev/null +++ b/Fabric.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/Fabric.framework/run b/Fabric.framework/run new file mode 100755 index 0000000..04198c3 Binary files /dev/null and b/Fabric.framework/run differ