Fixed some deprecated method use which caused warnings with new versions of the iPhone SDK.

This commit is contained in:
Andy Matuschak committed 2008-12-16 00:08:33 -06:00
1 parent 2bedf000a8
commit f186aa6896
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -32,7 +32,7 @@
[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];
}
+2 -1
View File
@@ -111,7 +111,8 @@
// 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