From f186aa6896083b06835b33f919a2cfa38e67e214 Mon Sep 17 00:00:00 2001 From: Andy Matuschak Date: Tue, 16 Dec 2008 00:08:33 -0600 Subject: [PATCH] Fixed some deprecated method use which caused warnings with new versions of the iPhone SDK. --- SUBasicUpdateDriver.m | 2 +- SUHost.m | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/SUBasicUpdateDriver.m b/SUBasicUpdateDriver.m index 9a1dc66b..0fe58ea3 100644 --- a/SUBasicUpdateDriver.m +++ b/SUBasicUpdateDriver.m @@ -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]; } diff --git a/SUHost.m b/SUHost.m index 3f8f91db..62f6050e 100644 --- a/SUHost.m +++ b/SUHost.m @@ -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