[ 
https://issues.apache.org/jira/browse/CB-5001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shazron Abdullah updated CB-5001:
---------------------------------
    Labels: cordova-ios-4.0.x  (was: )

> 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
>              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-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to