Skip to content

Commit

Permalink
Merge pull request #235 from czechboy0/hd/sparkle_dev_fixes
Browse files Browse the repository at this point in the history
Sparkle and Keychain fixes in development
  • Loading branch information
czechboy0 committed Feb 4, 2016
2 parents bbc19dd + f0902ee commit 4f30e07
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
6 changes: 5 additions & 1 deletion BuildaKit/SecurePersistence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ final class SecurePersistence {
typealias Keychain = NSMutableDictionary
#endif

static let Prefix = "com.honzadvorsky.buildasaur"
#if RELEASE
static let Prefix = "com.honzadvorsky.buildasaur"
#else
static let Prefix = "com.honzadvorsky.buildasaur.debug"
#endif

private let keychain: Keychain
private let safe: Safe
Expand Down
2 changes: 2 additions & 0 deletions Buildasaur.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1752,6 +1752,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand All @@ -1760,6 +1761,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_SWIFT_FLAGS = "-D RELEASE";
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
Expand Down
9 changes: 7 additions & 2 deletions Buildasaur/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
var dashboardViewController: DashboardViewController?
var dashboardWindow: NSWindow?
var windows: Set<NSWindow> = []
var updater: SUUpdater!

func applicationDidFinishLaunching(aNotification: NSNotification) {

Expand All @@ -51,6 +52,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
// defs.setBool(true, forKey: "NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints")
// defs.synchronize()

self.setupSparkle()
self.setupURLCallback()
self.setupPersistence()

Expand All @@ -66,6 +68,11 @@ class AppDelegate: NSObject, NSApplicationDelegate {
self.dashboardWindow = self.windowForPresentableViewControllerWithIdentifier("dashboard")!.0
}

func setupSparkle() {
#if RELEASE
self.updater = SUUpdater.sharedUpdater()
#endif
}

func migratePersistence(persistence: Persistence) {

Expand Down Expand Up @@ -187,8 +194,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}
}

@IBOutlet weak var updater: SUUpdater!

//Sparkle magic
func checkForUpdates(sender: AnyObject!) {
self.updater.checkForUpdates(sender)
Expand Down
23 changes: 9 additions & 14 deletions Buildasaur/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -644,12 +644,7 @@
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
</connections>
</application>
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="Buildasaur" customModuleProvider="target">
<connections>
<outlet property="updater" destination="Kp1-X6-aLq" id="pXi-Re-2ev"/>
</connections>
</customObject>
<customObject id="Kp1-X6-aLq" customClass="SUUpdater"/>
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="Buildasaur" customModuleProvider="target"/>
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-715" y="52"/>
Expand Down Expand Up @@ -2775,7 +2770,7 @@ Gw
<rect key="frame" x="0.0" y="91" width="220" height="32"/>
<subviews>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Fkq-gK-hvs" userLabel="Edit Button">
<rect key="frame" x="-6" y="-1.5" width="168" height="32"/>
<rect key="frame" x="-6" y="-2" width="168" height="32"/>
<buttonCell key="cell" type="push" title="Start" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="I1g-GG-Xh1">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
Expand Down Expand Up @@ -2817,7 +2812,7 @@ Gw
</connections>
</button>
<button translatesAutoresizingMaskIntoConstraints="NO" id="SL5-bS-Lf1">
<rect key="frame" x="27" y="1.5" width="195" height="18"/>
<rect key="frame" x="27" y="1" width="195" height="18"/>
<buttonCell key="cell" type="check" title="Wait for &quot;lttm&quot;" bezelStyle="regularSquare" imagePosition="right" state="on" inset="2" id="Qky-j0-ffo">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
Expand Down Expand Up @@ -2847,7 +2842,7 @@ Gw
</connections>
</button>
<button translatesAutoresizingMaskIntoConstraints="NO" id="I34-eZ-a6k">
<rect key="frame" x="27" y="1.5" width="195" height="18"/>
<rect key="frame" x="27" y="1" width="195" height="18"/>
<buttonCell key="cell" type="check" title="Post Status Comments" bezelStyle="regularSquare" imagePosition="right" state="on" inset="2" id="iGN-fv-G4G">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
Expand All @@ -2867,15 +2862,15 @@ Gw
<rect key="frame" x="0.0" y="0.0" width="220" height="22"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5mg-80-kNh">
<rect key="frame" x="-2" y="2.5" width="106" height="17"/>
<rect key="frame" x="-2" y="2" width="106" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Sync interval [s]:" id="Iye-7H-92P">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<customView horizontalCompressionResistancePriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="VbR-v2-u7g">
<rect key="frame" x="110" y="2.5" width="41" height="17"/>
<rect key="frame" x="110" y="2" width="41" height="17"/>
</customView>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="A9h-Jh-CP9">
<rect key="frame" x="159" y="0.0" width="40" height="22"/>
Expand Down Expand Up @@ -2940,7 +2935,7 @@ Gw
<rect key="frame" x="20" y="257" width="540" height="70"/>
<subviews>
<stackView distribution="fill" orientation="vertical" alignment="trailing" horizontalStackHuggingPriority="250.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cd8-A7-08H">
<rect key="frame" x="0.0" y="1.5" width="104" height="67"/>
<rect key="frame" x="0.0" y="1" width="104" height="67"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bXH-Mp-58j">
<rect key="frame" x="16" y="50" width="90" height="17"/>
Expand Down Expand Up @@ -2979,7 +2974,7 @@ Gw
</customSpacing>
</stackView>
<stackView distribution="fill" orientation="vertical" alignment="leading" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5W8-CL-buP">
<rect key="frame" x="112" y="1.5" width="350" height="67"/>
<rect key="frame" x="112" y="1" width="350" height="67"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nkQ-bA-3DP">
<rect key="frame" x="-2" y="50" width="129" height="17"/>
Expand Down Expand Up @@ -3021,7 +3016,7 @@ Gw
</customSpacing>
</stackView>
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="WVe-pQ-Rdt">
<rect key="frame" x="464" y="17.5" width="82" height="32"/>
<rect key="frame" x="464" y="17" width="82" height="32"/>
<constraints>
<constraint firstAttribute="width" constant="70" id="aX4-H0-wyG"/>
</constraints>
Expand Down

0 comments on commit 4f30e07

Please sign in to comment.