Skip to content

Commit

Permalink
[ios] Cast id references to NSURL to avoid compiler warnings (Fixes: #18
Browse files Browse the repository at this point in the history
)
  • Loading branch information
clelland committed Mar 21, 2014
1 parent 653ec00 commit 449df55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ios/CDVFileTransfer.m
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ - (void)fileDataForUploadCommand:(CDVInvokedUrlCommand*)command
return;
} else {
// Extract the path part out of a file: URL.
NSString* filePath = [source hasPrefix:@"/"] ? [source copy] : [[NSURL URLWithString:source] path];
NSString* filePath = [source hasPrefix:@"/"] ? [source copy] : [(NSURL *)[NSURL URLWithString:source] path];
if (filePath == nil) {
// We couldn't find the asset. Send the appropriate error.
CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:[self createFileTransferError:NOT_FOUND_ERR AndSource:source AndTarget:server]];
Expand Down Expand Up @@ -646,7 +646,7 @@ - (void)connection:(NSURLConnection*)connection didReceiveResponse:(NSURLRespons
filePath = [fs filesystemPathForURL:sourceURL];
} else {
// Extract the path part out of a file: URL.
NSString* filePath = [self.target hasPrefix:@"/"] ? [self.target copy] : [[NSURL URLWithString:self.target] path];
NSString* filePath = [self.target hasPrefix:@"/"] ? [self.target copy] : [(NSURL *)[NSURL URLWithString:self.target] path];
if (filePath == nil) {
// We couldn't find the asset. Send the appropriate error.
[self cancelTransferWithError:connection errorMessage:[NSString stringWithFormat:@"Could not create target file"]];
Expand Down

0 comments on commit 449df55

Please sign in to comment.