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 2014/08/27 01:41:58 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=14111576#comment-14111576 ] 

Shazron Abdullah commented on CB-5001:
--------------------------------------

The plugin is using older deprecated functions, upgrade to the newer usage.

> 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.2#6252)