You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Shazron Abdullah (JIRA)" <ji...@apache.org> on 2015/06/05 00:27:38 UTC
[jira] [Resolved] (CB-5001) iOS plugin: Cannot pass quite large
(about 80kb) content via CDVPluginResult/ messageAsDictionary
[ https://issues.apache.org/jira/browse/CB-5001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shazron Abdullah resolved CB-5001.
----------------------------------
Resolution: Incomplete
> 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
> Assignee: Shazron Abdullah
> Labels: cordova-ios-4.0.x
>
> 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
> {code}
> 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];
> {code}
> // works
> {code}
> 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];
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org