incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Gryb (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-254) All input parameters in iOS backend methods are strings
Date Tue, 06 Mar 2012 21:59:58 GMT

    [ https://issues.apache.org/jira/browse/CB-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223702#comment-13223702
] 

Oleg Gryb commented on CB-254:
------------------------------

I've tested this in the branches suggested by Filip Maj:
https://github.com/filmaj/incubator-cordova-js
https://github.com/filmaj/incubator-cordova-ios

I found out that the correct types are created for different data types: NSString for strings
and NSNumber for integers.  I think, this will fix the described problem. The only thing that
plugin developers would need to do is to get rid of data conversion in their iOS methods if
they used version 1.4.1 ( or older).

See also my suggetion in CB-255 about nulls. 
                
> All input parameters in iOS backend methods are strings
> -------------------------------------------------------
>
>                 Key: CB-254
>                 URL: https://issues.apache.org/jira/browse/CB-254
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.4.0
>         Environment: Xcode 4.2 Mac OS X 10.7
>            Reporter: Oleg Gryb
>            Assignee: Shazron Abdullah
>             Fix For: 1.6.0
>
>
> Input parameters in 'arguments' array contain NSString types only, no matter what was
passed in JS,
> e.g. in JS I can write something like this:
>         
>         return PhoneGap.exec(successCallback,
>                              failureCallback, 
>                              VPCLASS,  
>                              'method',
>                              ["str", 0, 1]);
>  
> but 'arguments' below will contain NSStrring types @"0" and @"1" instead of integers
in the method below
> -(void)method:(NSMutableArray *)arguments withDict:(NSMutableDictionary *)options
> In Android there was a method data.getInt that I could use to retrieve an integer, but
I didn't see anything like that in iOS

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message