You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Oleg (JIRA)" <ji...@apache.org> on 2013/10/08 13:40:41 UTC

[jira] [Comment Edited] (CB-4971) Installation of plugins does not work for iOS

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

Oleg edited comment on CB-4971 at 10/8/13 11:39 AM:
----------------------------------------------------

[~shazron]: Originally (when the bug was created, only 3.0 was available) the plugins had core in their name. After the update to 3.1 of cordova I installed "network-information" plugin, i.e. the one not having "core" in its name. This is what I did:
cordova plugin add org.apache.cordova.network-information
cordova prepare
(note, that I have ios and android platforms in my project)
Open up Xcode -> the files CDVConnection.h, CDVConnection.m, CDVReachability.h, CDVReachability.m are red.
Here I would expect the files to be copied! But they are not. So I need to do the following work-around:
Create directory platforms/ios/Solutions/Plugins/org.apache.cordova.network-information/  (Solutions is the name of the project as you can guess)
Copy the above files from the top plugins/org.apache.cordova.network-information directory into this new directory. Then it works.
As said, some plugins required additional frameworks to be added. That I needed to do manually as well.

I didn't try this for 100 times, but the feeling I got was that adding plugins to freshly created project works. However if you develop and change something in the code - e.g. in the main js file, then it stops copying plugins correctly.


was (Author: olegforyou):
[~shazron]: Originally (when the bug was created, only 3.0 was available) the plugins had core in their name. After the update to 3.1 of cordova I installed "network-information" plugin, i.e. the one not having "core" in its name. This is what I did:
cordova plugin add org.apache.cordova.network-information
cordova prepare
(note, that I have ios and android platforms in my project)
Open up Xcode -> the files CDVConnection.h, CDVConnection.m, CDVReachability.h, CDVReachability.m are red.
Here I would expect the files to be copied! But they are not. So I need to do the following work-around:
Create directory platforms/ios/Solutions/Plugins/org.apache.cordova.network-information/
Copy the above files from the top plugins/org.apache.cordova.network-information directory into this new directory. Then it works.
As said, some plugins required additional frameworks to be added. That I needed to do manually as well.

I didn't try this for 100 times, but the feeling I got was that adding plugins to freshly created project works. However if you develop and change something in the code - e.g. in the main js file, then it stops copying plugins correctly.

> Installation of plugins does not work for iOS
> ---------------------------------------------
>
>                 Key: CB-4971
>                 URL: https://issues.apache.org/jira/browse/CB-4971
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Contacts, Plugin Device, Plugin Dialogs
>    Affects Versions: 3.0.0, 3.1.0
>         Environment: iOS 
>            Reporter: Oleg
>            Priority: Critical
>              Labels: ios, plugin
>             Fix For: Master, 3.0.0, 3.1.0
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> Installation of iOS plugins does not work for iOS.
> Update: does not work in 3.1 cordova either.
> When installing the plugin via "cordova plugin add", the plugins fail to install correctly to the iOS platform:
> - source code (.js, .m, .h and .bundle) files are not copied over
> - proper frameworks are not being added to the project
> - config.xml file is not updated with plugin information
> Tried it on Device, Contacts and Dialogs and some other plugins.
> Update: tried on network-information plugin with cordova 3.1
> the workaround is to perform the above steps manually. but it is not documented anywhere.
> Note: it worked for me during one test, when the project was fresh. However after making a few minor changes and running "cordova prepare" or "cordova build" a few times, it stops working for iOS - i.e. you cannot add plugins without issues above. Android works fine.



--
This message was sent by Atlassian JIRA
(v6.1#6144)