You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "sgunfio (JIRA)" <ji...@apache.org> on 2013/10/07 10:04:41 UTC
[jira] [Created] (CB-5001) iOS plugin: Cannot pass quite large
(about 80kb) content via CDVPluginResult/ messageAsDictionary
sgunfio created CB-5001:
---------------------------
Summary: iOS plugin: Cannot pass quite large (about 80kb) content via CDVPluginResult/ messageAsDictionary
Key: CB-5001
URL: https://issues.apache.org/jira/browse/CB-5001
Project: Apache Cordova
Issue Type: Bug
Components: iOS
Affects Versions: 3.1.0
Environment: IOS / XCode 4.5.1
Reporter: sgunfio
When I'm going to pass a quite large (about 80kb) content via CDVPluginResult/ messageAsDictionary, my app crashes,
if I use messageAsString the app works without problem
// crashes
NSMutableDictionary* resultDict = [[[NSMutableDictionary alloc] init] autorelease];
[resultDict setObject:data forKey:@"data"];
[resultDict setObject:cancelledNumber forKey:@"cancelled"];
CDVPluginResult* result = [CDVPluginResult
resultWithStatus: CDVCommandStatus_OK
messageAsDictionary: resultDict
];
NSString* js = [result toSuccessCallbackString:callback];
[self writeJavascript:js];
// works
NSMutableDictionary* resultDict = [[[NSMutableDictionary alloc] init] autorelease];
[resultDict setObject:data forKey:@"data"];
[resultDict setObject:cancelledNumber forKey:@"cancelled"];
CDVPluginResult* result = [CDVPluginResult
resultWithStatus: CDVCommandStatus_OK
messageAsString:data
];
NSString* js = [result toSuccessCallbackString:callback];
[self writeJavascript:js];
--
This message was sent by Atlassian JIRA
(v6.1#6144)