Permalink
Browse files

stringWithContentsOfFile is deprecated. use stringWithContentsOfURL:e…

…ncoding:error: instead.
  • Loading branch information...
1 parent 7414192 commit 4fb556fbfcf4f885cb9674855ee02ca8c01f2626 @kishikawakatsumi committed Dec 19, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 Classes/UICGoogleMapsAPI.m
@@ -33,12 +33,12 @@ - (void)drawRect:(CGRect)rect {
- (void)makeAvailable {
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"api" ofType:@"html"];
- NSString *fileContents = [NSString stringWithContentsOfFile:filePath];
+ NSString *fileContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil];
[self loadHTMLString:fileContents baseURL:[NSURL URLWithString:@"http://iphone.local/"]];
}
- (void)webView:(UIWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(id)frame {
-// NSLog(@"%@", message);
+ NSLog(@"%@", message);
id JSONValue = [message JSONValue];
if (!JSONValue) {
if ([self.delegate respondsToSelector:@selector(goolgeMapsAPI:didFailWithMessage:)]) {

0 comments on commit 4fb556f

Please sign in to comment.