Permalink
Browse files

Fixed some deprecated method use which caused warnings with new versi…

…ons of the iPhone SDK.
  • Loading branch information...
1 parent 2bedf00 commit f186aa6896083b06835b33f919a2cfa38e67e214 @andymatuschak andymatuschak committed Dec 16, 2008
Showing with 3 additions and 2 deletions.
  1. +1 −1 SUBasicUpdateDriver.m
  2. +2 −1 SUHost.m
View
@@ -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 stringWithCString:[cleanedAgent bytes] encoding:NSASCIIStringEncoding];
[appcast setUserAgentString:userAgent];
[appcast fetchAppcastFromURL:URL];
}
View
@@ -111,7 +111,8 @@ - (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]];
+ NSError *ignoreErr;
+ return [NSString stringWithContentsOfFile:[bundle pathForResource:keyFilename ofType:nil] encoding:NSASCIIStringEncoding error: &ignoreErr];
}
- (NSArray *)systemProfile

0 comments on commit f186aa6

Please sign in to comment.