Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…ons of the iPhone SDK.
  • Loading branch information...
commit f186aa6896083b06835b33f919a2cfa38e67e214 1 parent 2bedf00
@andymatuschak andymatuschak authored
Showing with 3 additions and 2 deletions.
  1. +1 −1  SUBasicUpdateDriver.m
  2. +2 −1  SUHost.m
View
2  SUBasicUpdateDriver.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 stringWithCString:[cleanedAgent bytes] encoding:NSASCIIStringEncoding];
[appcast setUserAgentString:userAgent];
[appcast fetchAppcastFromURL:URL];
}
View
3  SUHost.m
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.