Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Commit

Permalink
FeedbackReporter and Sparkle update
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Kuijt authored and Johan Kuijt committed Feb 19, 2014
1 parent 5171542 commit f2d01ae
Show file tree
Hide file tree
Showing 29 changed files with 146 additions and 15 deletions.
1 change: 1 addition & 0 deletions FeedbackReporter.framework/FeedbackReporter
1 change: 1 addition & 0 deletions FeedbackReporter.framework/Headers
1 change: 1 addition & 0 deletions FeedbackReporter.framework/Resources
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright 2008, Jens Alfke, Torsten Curdt
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#import <Cocoa/Cocoa.h>


@interface FRExceptionReportingApplication : NSApplication

@end
50 changes: 50 additions & 0 deletions FeedbackReporter.framework/Versions/A/Headers/FRFeedbackReporter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Copyright 2008-2011, Torsten Curdt
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#import <Cocoa/Cocoa.h>

@protocol FRFeedbackReporterDelegate <NSObject>
@optional
- (NSDictionary*) customParametersForFeedbackReport;
- (NSMutableDictionary*) anonymizePreferencesForFeedbackReport:(NSMutableDictionary *)preferences;
- (NSString *) targetUrlForFeedbackReport;
- (NSString *) feedbackDisplayName;
@end

@interface FRFeedbackReporter : NSObject {

@private
id feedbackController;
id<FRFeedbackReporterDelegate> delegate;
}

// Creates and returns the singleton FRFeedbackReporter. Does not perform any checks or other real work.
+ (FRFeedbackReporter *)sharedReporter;

// Gets/sets the delegate.
- (id<FRFeedbackReporterDelegate>) delegate;
- (void) setDelegate:(id<FRFeedbackReporterDelegate>) delegate;

// Displays the feedback user interface allowing the user to provide general feedback. Returns YES if it was able to display the UI, NO otherwise.
- (BOOL) reportFeedback;

// Searches the disk for crash logs, and displays the feedback user interface if there are crash logs newer than since the last check. Updates the 'last crash check date' in user defaults. Returns YES if it was able to display the UI, NO otherwise.
- (BOOL) reportIfCrash;

// Displays the feedback user interface for the given exception. Do not pass nil. Returns YES if it was able to display the UI, NO otherwise.
- (BOOL) reportException:(NSException *)exception;

@end
38 changes: 38 additions & 0 deletions FeedbackReporter.framework/Versions/A/Resources/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>13B3116</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>FeedbackReporter</string>
<key>CFBundleIdentifier</key>
<string>org.vafer.FeedbackReporter</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>FeedbackReporter</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.3</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>5A3005</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>13A595</string>
<key>DTSDKName</key>
<string>macosx10.9</string>
<key>DTXcode</key>
<string>0502</string>
<key>DTXcodeBuild</key>
<string>5A3005</string>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions FeedbackReporter.framework/Versions/Current
28 changes: 21 additions & 7 deletions Traktable.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
04BCC5E417B03DBB00D8DE7A /* ITHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = 04BCC5E317B03DBB00D8DE7A /* ITHistory.m */; };
04BCC5EF17B1879300D8DE7A /* ITDb.m in Sources */ = {isa = PBXBuildFile; fileRef = 04BCC5EE17B1879300D8DE7A /* ITDb.m */; };
04BCC5F217B1885A00D8DE7A /* ITConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 04BCC5F117B1885A00D8DE7A /* ITConstants.m */; };
04D27E8E18B404BD007AD8CD /* FeedbackReporter.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 04D27E8D18B404BD007AD8CD /* FeedbackReporter.framework */; };
04D27E8F18B404C4007AD8CD /* FeedbackReporter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04D27E8D18B404BD007AD8CD /* FeedbackReporter.framework */; };
04D74BB617C7AC5700B135BF /* ITTableRowView.m in Sources */ = {isa = PBXBuildFile; fileRef = 04D74BB517C7AC5700B135BF /* ITTableRowView.m */; };
04D74BC217CA9FB800B135BF /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04D74BC117CA9FB800B135BF /* CoreServices.framework */; };
04D74BC417CAB18B00B135BF /* movies.png in Resources */ = {isa = PBXBuildFile; fileRef = 04D74BC317CAB18B00B135BF /* movies.png */; };
Expand All @@ -134,6 +136,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
04D27E8E18B404BD007AD8CD /* FeedbackReporter.framework in CopyFiles */,
04714E8116D2DEC500A308F7 /* Sparkle.framework in CopyFiles */,
048DF20416DFF676004B064A /* Growl.framework in CopyFiles */,
);
Expand Down Expand Up @@ -331,6 +334,7 @@
04BCC5EE17B1879300D8DE7A /* ITDb.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ITDb.m; sourceTree = "<group>"; };
04BCC5F017B1885A00D8DE7A /* ITConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ITConstants.h; sourceTree = "<group>"; };
04BCC5F117B1885A00D8DE7A /* ITConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ITConstants.m; sourceTree = "<group>"; };
04D27E8D18B404BD007AD8CD /* FeedbackReporter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FeedbackReporter.framework; sourceTree = "<group>"; };
04D74BB417C7AC5700B135BF /* ITTableRowView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ITTableRowView.h; sourceTree = "<group>"; };
04D74BB517C7AC5700B135BF /* ITTableRowView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ITTableRowView.m; sourceTree = "<group>"; };
04D74BBC17CA88A200B135BF /* VLC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLC.h; sourceTree = "<group>"; };
Expand All @@ -348,6 +352,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
04D27E8F18B404C4007AD8CD /* FeedbackReporter.framework in Frameworks */,
04982DE817FBFE0600A50555 /* Quartz.framework in Frameworks */,
04FE3AE517D8BBF200497DAD /* SystemConfiguration.framework in Frameworks */,
04D74BC217CA9FB800B135BF /* CoreServices.framework in Frameworks */,
Expand Down Expand Up @@ -385,6 +390,7 @@
042F07E116BC19DB00A0CE9E /* Frameworks */ = {
isa = PBXGroup;
children = (
04D27E8D18B404BD007AD8CD /* FeedbackReporter.framework */,
04982DE717FBFE0600A50555 /* Quartz.framework */,
04FE3AE417D8BBF200497DAD /* SystemConfiguration.framework */,
04D74BC117CA9FB800B135BF /* CoreServices.framework */,
Expand Down Expand Up @@ -776,7 +782,7 @@
ORGANIZATIONNAME = Mustacherious;
TargetAttributes = {
042F07DD16BC19DB00A0CE9E = {
DevelopmentTeam = 68SVRCR7Q9;
DevelopmentTeam = DWL2AQ47K8;
};
};
};
Expand Down Expand Up @@ -1033,21 +1039,25 @@
042F07FD16BC19DB00A0CE9E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "Developer ID Application";
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
"\"$(SRCROOT)/..\"",
"\"$(SRCROOT)/Traktable\"",
"$(SRCROOT)",
"\\\"$(SRCROOT)/..\\\"",
"\\\"$(SRCROOT)/Traktable\\\"",
/Users/johan/Documents/Traktable,
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Traktable/Traktable-Prefix.pch";
INFOPLIST_FILE = "Traktable/Traktable-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Traktable\"",
);
MACOSX_DEPLOYMENT_TARGET = 10.7;
OTHER_CODE_SIGN_FLAGS = "--deep";
PRODUCT_NAME = Traktable;
WRAPPER_EXTENSION = app;
};
Expand All @@ -1056,21 +1066,25 @@
042F07FE16BC19DB00A0CE9E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "Developer ID Application";
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
"\"$(SRCROOT)/..\"",
"\"$(SRCROOT)/Traktable\"",
"$(SRCROOT)",
"\\\"$(SRCROOT)/..\\\"",
"\\\"$(SRCROOT)/Traktable\\\"",
/Users/johan/Documents/Traktable,
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Traktable/Traktable-Prefix.pch";
INFOPLIST_FILE = "Traktable/Traktable-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/Traktable\"",
);
MACOSX_DEPLOYMENT_TARGET = 10.7;
OTHER_CODE_SIGN_FLAGS = "--deep";
PRODUCT_NAME = Traktable;
WRAPPER_EXTENSION = app;
};
Expand Down
Binary file not shown.
11 changes: 5 additions & 6 deletions Traktable/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#import "ITDb.h"
#import "ITSync.h"
#import "ITConstants.h"
#import <FeedbackReporter/FRFeedbackReporter.h>

// Scripting Bridge
#import "iTunes.h"
Expand Down Expand Up @@ -56,6 +57,8 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
// Make sure all logging with NSLog is ported to the log file in the compiled version of the app
[self redirectConsoleLogToDocumentFolder];

[[FRFeedbackReporter sharedReporter] reportIfCrash];

_api = [ITApi new];
_video = [[ITVideo alloc] init];
Expand Down Expand Up @@ -197,12 +200,7 @@ - (void)hideProgressWindow {

- (IBAction)feedback:(id)sender {

NSString *encodedSubject = [NSString stringWithFormat:@"SUBJECT=%@", [@"Traktable feedback" stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]];
NSString *encodedBody = [NSString stringWithFormat:@"BODY=%@", [@"Your feedback here..." stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]];
NSString *encodedTo = [@"traktable@w3f.nl" stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding];
NSString *encodedURLString = [NSString stringWithFormat:@"mailto:%@?%@&%@", encodedTo, encodedSubject, encodedBody];
NSURL *mailtoURL = [NSURL URLWithString:encodedURLString];
[[NSWorkspace sharedWorkspace] openURL:mailtoURL];
[[FRFeedbackReporter sharedReporter] reportFeedback];
}

- (IBAction)openTraktProfile:(id)sender {
Expand Down Expand Up @@ -366,4 +364,5 @@ - (IBAction)displayPreferences:(id)sender {
- (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification{
return YES;
}

@end
2 changes: 2 additions & 0 deletions Traktable/ITTVShowView.m
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ - (void)awakeFromNib
[imageBrowser setZoomValue:0.5];

[self fetchShows];

abort();
}


Expand Down
6 changes: 4 additions & 2 deletions Traktable/Traktable-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.5</string>
<string>0.5.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.5</string>
<string>0.5.1</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.video</string>
<key>LSMinimumSystemVersion</key>
Expand All @@ -38,6 +38,8 @@
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>FRFeedbackReporter.targetURL</key>
<string>http://bbqapp.herokuapp.com/submitfeedback.php?application=%@</string>
<key>SUPublicDSAKeyFile</key>
<string>dsa_pub.pem</string>
<key>SUFeedURL</key>
Expand Down

0 comments on commit f2d01ae

Please sign in to comment.