You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Oleg Gryb (Created) (JIRA)" <ji...@apache.org> on 2012/03/02 01:02:56 UTC

[jira] [Created] (CB-291) PhonGap.exec Plugin Parameter is Different on iOS and Android

PhonGap.exec Plugin Parameter is Different on iOS and Android
-------------------------------------------------------------

                 Key: CB-291
                 URL: https://issues.apache.org/jira/browse/CB-291
             Project: Apache Callback
          Issue Type: Bug
          Components: Android
    Affects Versions: 1.4.0
         Environment: iOS, Android, Mac OSX 10.7
            Reporter: Oleg Gryb
            Assignee: Joe Bowser


plugins.xml on Android and PhoneGap.phlist are used to define a new plugin. They both use a short name (e.g. MyPlugin) and a fully qualified name (e.g. com.MyCompany.MyPlugin) to describe a plugin, however the meaning of the parameter #3 in PhoneGap.exec function is different. In Android case you need to write:

PhoneGap.exec(success, error, "MyPlugin", "method", [params]);

while in iOS case id should be:

PhoneGap.exec(success, error, "com.MyCompany.MyPlugin", "method", [params]);

It results in necessity of having two different JS files with custom plugin definitions, which could be avoided if we use the same convention on both platforms. I think, using FQN is a better option and that's why it should be fixed on Android.

A work around to avoid deploying two different JS files is to use something like this in plugins.xml on Android:

<plugin name="com.MyCompany.MyPlugin" value="com.MyCompany.MyPlugin"/>

It works, but it looks really ugly.

--
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

        

[jira] [Updated] (CB-291) PhonGap.exec Plugin Parameter is Different on iOS and Android

Posted by "Filip Maj (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filip Maj updated CB-291:
-------------------------

    Component/s: iOS
                 CordovaJS
       Assignee:     (was: Joe Bowser)
    
> PhonGap.exec Plugin Parameter is Different on iOS and Android
> -------------------------------------------------------------
>
>                 Key: CB-291
>                 URL: https://issues.apache.org/jira/browse/CB-291
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android, CordovaJS, iOS
>    Affects Versions: 1.4.0
>         Environment: iOS, Android, Mac OSX 10.7
>            Reporter: Oleg Gryb
>
> plugins.xml on Android and PhoneGap.plist are used to define a new plugin. They both use a short name (e.g. MyPlugin) and a fully qualified name (e.g. com.MyCompany.MyPlugin) to describe a plugin, however the meaning of the parameter #3 in PhoneGap.exec function is different. In Android case you need to write:
> PhoneGap.exec(success, error, "MyPlugin", "method", [params]);
> while in iOS case id should be:
> PhoneGap.exec(success, error, "com.MyCompany.MyPlugin", "method", [params]);
> It results in necessity of having two different JS files with custom plugin definitions, which could be avoided if we use the same convention on both platforms. I think, using FQN is a better option and that's why it should be fixed on Android.
> A work around to avoid deploying two different JS files is to use something like this in plugins.xml on Android:
> <plugin name="com.MyCompany.MyPlugin" value="com.MyCompany.MyPlugin"/>
> It works, but it looks really ugly.

--
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

        

[jira] [Commented] (CB-291) PhonGap.exec Plugin Parameter is Different on iOS and Android

Posted by "Filip Maj (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13220518#comment-13220518 ] 

Filip Maj commented on CB-291:
------------------------------

Yep, you are absolutely right. We are in the process of consolidating the different labels for plugins, the differing interfaces to exec and the different implementations of each core Cordova plugin.

The root of these efforts are in the cordova-js project, which is a unified JavaScript layer for all Cordova platforms. That is over here: https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-js.git;a=summary

The above is already used in the latest Cordova-Android implementation.

Next step is integrating iOS into this. This is going to be a significant chunk of work as a lot of the plugin implementations are completely different. I am chugging along on this work on a fork of the repo in a branch on my GitHub repository here: https://github.com/filmaj/incubator-cordova-ios/tree/cordova-js

The BlackBerry progress on this is a bit farther along but will not land for 1.5 (much more likely for 1.6).

Let me know if you want to help out with these efforts!
                
> PhonGap.exec Plugin Parameter is Different on iOS and Android
> -------------------------------------------------------------
>
>                 Key: CB-291
>                 URL: https://issues.apache.org/jira/browse/CB-291
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android, CordovaJS, iOS
>    Affects Versions: 1.4.0
>         Environment: iOS, Android, Mac OSX 10.7
>            Reporter: Oleg Gryb
>            Assignee: Joe Bowser
>
> plugins.xml on Android and PhoneGap.plist are used to define a new plugin. They both use a short name (e.g. MyPlugin) and a fully qualified name (e.g. com.MyCompany.MyPlugin) to describe a plugin, however the meaning of the parameter #3 in PhoneGap.exec function is different. In Android case you need to write:
> PhoneGap.exec(success, error, "MyPlugin", "method", [params]);
> while in iOS case id should be:
> PhoneGap.exec(success, error, "com.MyCompany.MyPlugin", "method", [params]);
> It results in necessity of having two different JS files with custom plugin definitions, which could be avoided if we use the same convention on both platforms. I think, using FQN is a better option and that's why it should be fixed on Android.
> A work around to avoid deploying two different JS files is to use something like this in plugins.xml on Android:
> <plugin name="com.MyCompany.MyPlugin" value="com.MyCompany.MyPlugin"/>
> It works, but it looks really ugly.

--
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

        

[jira] [Commented] (CB-291) PhonGap.exec Plugin Parameter is Different on iOS and Android

Posted by "Filip Maj (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13220564#comment-13220564 ] 

Filip Maj commented on CB-291:
------------------------------

Awesome! If you have experience with iOS (and are more versed in Objective-C than me - I am just learning) I can certainly use help in getting the new consolidated interfaces lined up in the native iOS implementation.

You can always fire an email my way at fil at adobe dot com.
                
> PhonGap.exec Plugin Parameter is Different on iOS and Android
> -------------------------------------------------------------
>
>                 Key: CB-291
>                 URL: https://issues.apache.org/jira/browse/CB-291
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android, CordovaJS, iOS
>    Affects Versions: 1.4.0
>         Environment: iOS, Android, Mac OSX 10.7
>            Reporter: Oleg Gryb
>
> plugins.xml on Android and PhoneGap.plist are used to define a new plugin. They both use a short name (e.g. MyPlugin) and a fully qualified name (e.g. com.MyCompany.MyPlugin) to describe a plugin, however the meaning of the parameter #3 in PhoneGap.exec function is different. In Android case you need to write:
> PhoneGap.exec(success, error, "MyPlugin", "method", [params]);
> while in iOS case id should be:
> PhoneGap.exec(success, error, "com.MyCompany.MyPlugin", "method", [params]);
> It results in necessity of having two different JS files with custom plugin definitions, which could be avoided if we use the same convention on both platforms. I think, using FQN is a better option and that's why it should be fixed on Android.
> A work around to avoid deploying two different JS files is to use something like this in plugins.xml on Android:
> <plugin name="com.MyCompany.MyPlugin" value="com.MyCompany.MyPlugin"/>
> It works, but it looks really ugly.

--
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

        

[jira] [Commented] (CB-291) PhonGap.exec Plugin Parameter is Different on iOS and Android

Posted by "Oleg Gryb (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13220540#comment-13220540 ] 

Oleg Gryb commented on CB-291:
------------------------------

+Filip Maj - please let me know where you need my help. It's not like I have too much time due my day job responsibilities, but I really like what you do in PhoneGap prj and will try to be useful. Thanks for your effort and you can shoot an email to oleg at gryb dot info.
                
> PhonGap.exec Plugin Parameter is Different on iOS and Android
> -------------------------------------------------------------
>
>                 Key: CB-291
>                 URL: https://issues.apache.org/jira/browse/CB-291
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android, CordovaJS, iOS
>    Affects Versions: 1.4.0
>         Environment: iOS, Android, Mac OSX 10.7
>            Reporter: Oleg Gryb
>
> plugins.xml on Android and PhoneGap.plist are used to define a new plugin. They both use a short name (e.g. MyPlugin) and a fully qualified name (e.g. com.MyCompany.MyPlugin) to describe a plugin, however the meaning of the parameter #3 in PhoneGap.exec function is different. In Android case you need to write:
> PhoneGap.exec(success, error, "MyPlugin", "method", [params]);
> while in iOS case id should be:
> PhoneGap.exec(success, error, "com.MyCompany.MyPlugin", "method", [params]);
> It results in necessity of having two different JS files with custom plugin definitions, which could be avoided if we use the same convention on both platforms. I think, using FQN is a better option and that's why it should be fixed on Android.
> A work around to avoid deploying two different JS files is to use something like this in plugins.xml on Android:
> <plugin name="com.MyCompany.MyPlugin" value="com.MyCompany.MyPlugin"/>
> It works, but it looks really ugly.

--
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

        

[jira] [Updated] (CB-291) PhonGap.exec Plugin Parameter is Different on iOS and Android

Posted by "Oleg Gryb (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Gryb updated CB-291:
-------------------------

    Description: 
plugins.xml on Android and PhoneGap.plist are used to define a new plugin. They both use a short name (e.g. MyPlugin) and a fully qualified name (e.g. com.MyCompany.MyPlugin) to describe a plugin, however the meaning of the parameter #3 in PhoneGap.exec function is different. In Android case you need to write:

PhoneGap.exec(success, error, "MyPlugin", "method", [params]);

while in iOS case id should be:

PhoneGap.exec(success, error, "com.MyCompany.MyPlugin", "method", [params]);

It results in necessity of having two different JS files with custom plugin definitions, which could be avoided if we use the same convention on both platforms. I think, using FQN is a better option and that's why it should be fixed on Android.

A work around to avoid deploying two different JS files is to use something like this in plugins.xml on Android:

<plugin name="com.MyCompany.MyPlugin" value="com.MyCompany.MyPlugin"/>

It works, but it looks really ugly.

  was:
plugins.xml on Android and PhoneGap.phlist are used to define a new plugin. They both use a short name (e.g. MyPlugin) and a fully qualified name (e.g. com.MyCompany.MyPlugin) to describe a plugin, however the meaning of the parameter #3 in PhoneGap.exec function is different. In Android case you need to write:

PhoneGap.exec(success, error, "MyPlugin", "method", [params]);

while in iOS case id should be:

PhoneGap.exec(success, error, "com.MyCompany.MyPlugin", "method", [params]);

It results in necessity of having two different JS files with custom plugin definitions, which could be avoided if we use the same convention on both platforms. I think, using FQN is a better option and that's why it should be fixed on Android.

A work around to avoid deploying two different JS files is to use something like this in plugins.xml on Android:

<plugin name="com.MyCompany.MyPlugin" value="com.MyCompany.MyPlugin"/>

It works, but it looks really ugly.

    
> PhonGap.exec Plugin Parameter is Different on iOS and Android
> -------------------------------------------------------------
>
>                 Key: CB-291
>                 URL: https://issues.apache.org/jira/browse/CB-291
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.4.0
>         Environment: iOS, Android, Mac OSX 10.7
>            Reporter: Oleg Gryb
>            Assignee: Joe Bowser
>
> plugins.xml on Android and PhoneGap.plist are used to define a new plugin. They both use a short name (e.g. MyPlugin) and a fully qualified name (e.g. com.MyCompany.MyPlugin) to describe a plugin, however the meaning of the parameter #3 in PhoneGap.exec function is different. In Android case you need to write:
> PhoneGap.exec(success, error, "MyPlugin", "method", [params]);
> while in iOS case id should be:
> PhoneGap.exec(success, error, "com.MyCompany.MyPlugin", "method", [params]);
> It results in necessity of having two different JS files with custom plugin definitions, which could be avoided if we use the same convention on both platforms. I think, using FQN is a better option and that's why it should be fixed on Android.
> A work around to avoid deploying two different JS files is to use something like this in plugins.xml on Android:
> <plugin name="com.MyCompany.MyPlugin" value="com.MyCompany.MyPlugin"/>
> It works, but it looks really ugly.

--
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

        

[jira] [Resolved] (CB-291) PhonGap.exec Plugin Parameter is Different on iOS and Android

Posted by "Filip Maj (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filip Maj resolved CB-291.
--------------------------

       Resolution: Fixed
    Fix Version/s: 1.6.0

Cordova-js has just [landed in the cordova-ios mainline|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-ios.git;a=commit;h=ab2afceeffda5c5bef9410d1f60b45426176f171].

Fixed!
                
> PhonGap.exec Plugin Parameter is Different on iOS and Android
> -------------------------------------------------------------
>
>                 Key: CB-291
>                 URL: https://issues.apache.org/jira/browse/CB-291
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android, CordovaJS, iOS
>    Affects Versions: 1.4.0
>         Environment: iOS, Android, Mac OSX 10.7
>            Reporter: Oleg Gryb
>            Assignee: Filip Maj
>             Fix For: 1.6.0
>
>
> plugins.xml on Android and PhoneGap.plist are used to define a new plugin. They both use a short name (e.g. MyPlugin) and a fully qualified name (e.g. com.MyCompany.MyPlugin) to describe a plugin, however the meaning of the parameter #3 in PhoneGap.exec function is different. In Android case you need to write:
> PhoneGap.exec(success, error, "MyPlugin", "method", [params]);
> while in iOS case id should be:
> PhoneGap.exec(success, error, "com.MyCompany.MyPlugin", "method", [params]);
> It results in necessity of having two different JS files with custom plugin definitions, which could be avoided if we use the same convention on both platforms. I think, using FQN is a better option and that's why it should be fixed on Android.
> A work around to avoid deploying two different JS files is to use something like this in plugins.xml on Android:
> <plugin name="com.MyCompany.MyPlugin" value="com.MyCompany.MyPlugin"/>
> It works, but it looks really ugly.

--
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

        

[jira] [Assigned] (CB-291) PhonGap.exec Plugin Parameter is Different on iOS and Android

Posted by "Filip Maj (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filip Maj reassigned CB-291:
----------------------------

    Assignee: Filip Maj
    
> PhonGap.exec Plugin Parameter is Different on iOS and Android
> -------------------------------------------------------------
>
>                 Key: CB-291
>                 URL: https://issues.apache.org/jira/browse/CB-291
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android, CordovaJS, iOS
>    Affects Versions: 1.4.0
>         Environment: iOS, Android, Mac OSX 10.7
>            Reporter: Oleg Gryb
>            Assignee: Filip Maj
>
> plugins.xml on Android and PhoneGap.plist are used to define a new plugin. They both use a short name (e.g. MyPlugin) and a fully qualified name (e.g. com.MyCompany.MyPlugin) to describe a plugin, however the meaning of the parameter #3 in PhoneGap.exec function is different. In Android case you need to write:
> PhoneGap.exec(success, error, "MyPlugin", "method", [params]);
> while in iOS case id should be:
> PhoneGap.exec(success, error, "com.MyCompany.MyPlugin", "method", [params]);
> It results in necessity of having two different JS files with custom plugin definitions, which could be avoided if we use the same convention on both platforms. I think, using FQN is a better option and that's why it should be fixed on Android.
> A work around to avoid deploying two different JS files is to use something like this in plugins.xml on Android:
> <plugin name="com.MyCompany.MyPlugin" value="com.MyCompany.MyPlugin"/>
> It works, but it looks really ugly.

--
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