Permalink
Browse files

[FIX] Replace use of deprecated methods. (Jacques Vidrine via https:/…

  • Loading branch information...
1 parent 2d74d2b commit 980674374d043dcdd6b745d89d22cf7094fe168a @rentzsch committed May 4, 2009
Showing with 2 additions and 2 deletions.
  1. +1 −1 Sparkle/SUBasicUpdateDriver.m
  2. +1 −1 Sparkle/SUHost.m
@@ -32,7 +32,7 @@ - (void)checkForUpdatesAtURL:(NSURL *)URL host:(SUHost *)aHost
[appcast setDelegate:self];
NSString *userAgent = [NSString stringWithFormat: @"%@/%@ Sparkle/%@", [aHost name], [aHost displayVersion], ([SPARKLE_BUNDLE objectForInfoDictionaryKey:@"CFBundleVersion"] ?: nil)];
NSData * cleanedAgent = [userAgent dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
- userAgent = [NSString stringWithCString:[cleanedAgent bytes] length:[cleanedAgent length]];
+ userAgent = [[NSString alloc] initWithData:cleanedAgent encoding:NSASCIIStringEncoding];
[appcast setUserAgentString:userAgent];
[appcast fetchAppcastFromURL:URL];
}
View
@@ -111,7 +111,7 @@ - (NSString *)publicDSAKey
// More likely, we've got a reference to a Resources file by filename:
NSString *keyFilename = [self objectForInfoDictionaryKey:SUPublicDSAKeyFileKey];
if (!keyFilename) { return nil; }
- return [NSString stringWithContentsOfFile:[bundle pathForResource:keyFilename ofType:nil]];
+ return [NSString stringWithContentsOfFile:[bundle pathForResource:keyFilename ofType:nil] encoding:NSASCIIStringEncoding error:NULL];
}
- (NSArray *)systemProfile

0 comments on commit 9806743

Please sign in to comment.