mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
DM-2540 We need to have SUFeedURL inside Info.plist file should be optional for DevMate customer.
This commit is contained in:
1 parent
313daa4711
commit
1dcb87cc44
1 file changed
+10
-2
+10
-2
@@ -480,10 +480,18 @@ static NSString * const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefault
|
||||
{
|
||||
// A value in the user defaults overrides one in the Info.plist (so preferences panels can be created wherein users choose between beta / release feeds).
|
||||
NSString *appcastString = [host objectForKey:SUFeedURLKey];
|
||||
if( [delegate respondsToSelector: @selector(feedURLStringForUpdater:)] )
|
||||
if ([delegate respondsToSelector: @selector(feedURLStringForUpdater:)])
|
||||
{
|
||||
appcastString = [delegate feedURLStringForUpdater: self];
|
||||
}
|
||||
|
||||
if (!appcastString) // Can't find an appcast string!
|
||||
[NSException raise:@"SUNoFeedURL" format:@"You must specify the URL of the appcast as the SUFeedURL key in either the Info.plist or the user defaults!"];
|
||||
{
|
||||
static NSString * const sDevMateFeedURLBase = @"http://updates.devmate.com/";
|
||||
NSString *bundleId = [[host bundle] bundleIdentifier] ? : @"";
|
||||
NSString *feedURLComponent = [bundleId stringByAppendingPathExtension:@"xml"];
|
||||
appcastString = [sDevMateFeedURLBase stringByAppendingPathComponent:feedURLComponent];
|
||||
}
|
||||
NSCharacterSet* quoteSet = [NSCharacterSet characterSetWithCharactersInString: @"\"\'"]; // Some feed publishers add quotes; strip 'em.
|
||||
NSString* castUrlStr = [appcastString stringByTrimmingCharactersInSet:quoteSet];
|
||||
if( !castUrlStr || [castUrlStr length] == 0 )
|
||||
|
||||
Reference in new issue
Block a user