Skip to content

Commit

Permalink
fix stupid SUFeedURL mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
codykrieger committed Nov 22, 2020
1 parent b46f155 commit aac0c0e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions Classes/gfxCardStatusAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
[_prefs setBool:YES forKey:kHasSeenOneTimeNotificationKey];
}

// Argh. In v2.5b1, I introduced some code that set the _updater.feedURL property, which results in the
// SUFeedURL defaults key being set. Sparkle will prefer that value over the SUFeedURL defined in
// Info.plist, resulting in gfxCardStatus being "pinned" to the beta channel on that machine in
// perpetuity. In order to fix that silly mistake, the appcasts on the server side have been moved to
// /appcasts/<channel>.xml, which allows us to easily detect and remove the bad value from the defaults
// store without accidentally deleting someone's intentionally-set SUFeedURL.
NSString *feedURL = [[NSUserDefaults standardUserDefaults] stringForKey:@"SUFeedURL"];
if ([feedURL containsString:@"appcast.beta.xml"])
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"SUFeedURL"];

GSLogInfo(@"Appcast URL: %@", _updater.feedURL);

// Hook up the check for updates on startup preference directly to the
Expand Down
4 changes: 2 additions & 2 deletions gfxCardStatus.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@
PRODUCT_NAME = gfxCardStatus;
PROVISIONING_PROFILE_SPECIFIER = "";
SU_FEED_CHANNEL = testing;
SU_FEED_URL = "https://gfx.io/appcast.$(SU_FEED_CHANNEL).xml";
SU_FEED_URL = "https://gfx.io/appcasts/$(SU_FEED_CHANNEL).xml";
};
name = Debug;
};
Expand Down Expand Up @@ -647,7 +647,7 @@
PRODUCT_NAME = gfxCardStatus;
PROVISIONING_PROFILE_SPECIFIER = "";
SU_FEED_CHANNEL = release;
SU_FEED_URL = "https://gfx.io/appcast.$(SU_FEED_CHANNEL).xml";
SU_FEED_URL = "https://gfx.io/appcasts/$(SU_FEED_CHANNEL).xml";
};
name = Release;
};
Expand Down

0 comments on commit aac0c0e

Please sign in to comment.