fix oc file error

This commit is contained in:
yaw
2018-09-10 14:20:41 +08:00
parent 45def6aaf3
commit 53b427c5d8
+4 -4
View File
@@ -80,7 +80,7 @@
[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:[error localizedDescription]] callbackId:callbackId];
} else {
NSDictionary *dict=[NSDictionary dictionaryWithObjectsAndKeys:fullpath,@"path",[NSURL fileURLWithPath:fullpath] absoluteString],@"uri",@"image",@"mediaType",size,@"size",[NSNumber numberWithInt:index],@"index", nil];
NSDictionary *dict=[NSDictionary dictionaryWithObjectsAndKeys:fullpath,@"path",[[NSURL fileURLWithPath:fullpath] absoluteString],@"uri",@"image",@"mediaType",size,@"size",[NSNumber numberWithInt:index],@"index", nil];
[aListArray addObject:dict];
if([aListArray count]==[selectArray count]){
[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:aListArray] callbackId:callbackId];
@@ -129,7 +129,7 @@
[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:[error localizedDescription]] callbackId:callbackId];
} else {
NSDictionary *dict=[NSDictionary dictionaryWithObjectsAndKeys:fullpath,@"path",[NSURL fileURLWithPath:fullpath] absoluteString],@"uri",size,@"size",@"video",@"mediaType" ,[NSNumber numberWithInt:index],@"index", nil];
NSDictionary *dict=[NSDictionary dictionaryWithObjectsAndKeys:fullpath,@"path",[[NSURL fileURLWithPath:fullpath] absoluteString],@"uri",size,@"size",@"video",@"mediaType" ,[NSNumber numberWithInt:index],@"index", nil];
[aListArray addObject:dict];
if([aListArray count]==[selectArray count]){
[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:aListArray] callbackId:callbackId];
@@ -167,7 +167,7 @@
NSLog(@"completed!");
NSString *compressCompletedjs = [NSString stringWithFormat:@"MediaPicker.compressEvent('%@',%i)", @"completed",index];
[self.commandDelegate evalJs:compressCompletedjs];
NSDictionary *dict=[NSDictionary dictionaryWithObjectsAndKeys:fullpath,@"path",[NSURL fileURLWithPath:fullpath] absoluteString],@"uri",@"video",@"mediaType" ,[NSNumber numberWithInt:index],@"index", nil];
NSDictionary *dict=[NSDictionary dictionaryWithObjectsAndKeys:fullpath,@"path",[[NSURL fileURLWithPath:fullpath] absoluteString],@"uri",@"video",@"mediaType" ,[NSNumber numberWithInt:index],@"index", nil];
[aListArray addObject:dict];
if([aListArray count]==[selectArray count]){
[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:aListArray] callbackId:callbackId];
@@ -283,7 +283,7 @@
[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:[error localizedDescription]] callbackId:callbackId];
} else {
[options setObject:fullpath forKey:@"path"];
[options setObject:[NSURL fileURLWithPath:fullpath] absoluteString] forKey:@"uri"];
[options setObject:[[NSURL fileURLWithPath:fullpath] absoluteString] forKey:@"uri"];
[options setObject:size forKey:@"size"];
[options setObject:filename forKey:@"name"];
[self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:options] callbackId:callbackId];