Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-6092

Deploying plugins for iOS frameworks breaks symlinks

    Details

      Description

      my Plugin has an included ios framework, which resides in Opentok.framework directory.

      Most iOS frameworks have symlinks within the directory. For example, in the current framework I use, these are the folders listed and their corresponding symlinks:
      Headers -> Versions/Current/Headers
      Opentok -> Versions/Current/Opentok
      Resources -> Versions/Current/Resources
      Versions

      After publishing my plugin, symlinks seems to be missing. When I install the plugin into my app, typing 'ls' in my framework directory only produces one folder:
      Versions

      Plugin publish seems to be unable to upload symlinks? This issue does not exist if I install the plugin directly from the git source:
      'cordova plugin add https://github.com/opentok/cordova-plugin-opentok'

      ML thread: http://markmail.org/thread/2mbqwaviwvuitngh

        Activity

        Hide
        mjl Mechiel Lukkien added a comment -

        Today encountered the same issue while installing the phonegap-facebook-plugin plugin.
        Took me quite some time to figure out... Installing from a locally cloned copy make it work too.

        Show
        mjl Mechiel Lukkien added a comment - Today encountered the same issue while installing the phonegap-facebook-plugin plugin. Took me quite some time to figure out... Installing from a locally cloned copy make it work too.
        Hide
        songz Song Zheng added a comment -

        so sad that this still hasn't been fixed. How can we get more attention around this issue?

        Show
        songz Song Zheng added a comment - so sad that this still hasn't been fixed. How can we get more attention around this issue?
        Hide
        kamrik Mark Koudritsky added a comment -

        Plugins are published using "npm publish". As far as I understood, npm does not include symlinks by design [1] when preparing a package file.
        [1] https://github.com/npm/npm/issues/3310

        Show
        kamrik Mark Koudritsky added a comment - Plugins are published using "npm publish". As far as I understood, npm does not include symlinks by design [1] when preparing a package file. [1] https://github.com/npm/npm/issues/3310
        Show
        djhartman Derk-Jan Hartman added a comment - Just bumped into this as well. Related mailing list thread: http://mail-archives.apache.org/mod_mbox/cordova-dev/201409.mbox/%3cCA+h2+t0pMQnezByb6SfoiDNhwWwoosoXLYVA5HkF=7bNzjBcFw@mail.gmail.com%3e
        Hide
        shazron Shazron Abdullah added a comment -

        Try packaging the plugin up as a tarball before publishing:
        https://www.npmjs.org/doc/cli/npm-publish.html

        This should preserve the symlinks.

        Show
        shazron Shazron Abdullah added a comment - Try packaging the plugin up as a tarball before publishing: https://www.npmjs.org/doc/cli/npm-publish.html This should preserve the symlinks.
        Hide
        dankingston Dan added a comment -

        Is this likely to get attention any time soon? Would be a big help if it was fixed...

        Show
        dankingston Dan added a comment - Is this likely to get attention any time soon? Would be a big help if it was fixed...
        Hide
        miqmago Miquel added a comment -

        Hi, this is causing big problems to iOS plugins for cordova and phonegap.

        See for example, this plugin https://github.com/appfeel/admob-google-cordova (admob ads for cordova) is depending on Google Admob Ads SDK v7.0.0 (https://github.com/appfeel/google-iosadmobads). Google decided to redesign their sdk to a framework so now there are symlinks inside and the plugin stopped working on iOS platforms.

        See issue also here: http://stackoverflow.com/questions/28974791/plugman-framework-skips-mac-os-x-symbolic-links

        Any workaround will be really appreciated

        Show
        miqmago Miquel added a comment - Hi, this is causing big problems to iOS plugins for cordova and phonegap. See for example, this plugin https://github.com/appfeel/admob-google-cordova (admob ads for cordova) is depending on Google Admob Ads SDK v7.0.0 ( https://github.com/appfeel/google-iosadmobads ). Google decided to redesign their sdk to a framework so now there are symlinks inside and the plugin stopped working on iOS platforms. See issue also here: http://stackoverflow.com/questions/28974791/plugman-framework-skips-mac-os-x-symbolic-links Any workaround will be really appreciated
        Hide
        shazron Shazron Abdullah added a comment -

        This is an npm limitation. Have you tried the method in my previous comment?

        Show
        shazron Shazron Abdullah added a comment - This is an npm limitation. Have you tried the method in my previous comment?
        Hide
        miqmago Miquel added a comment - - edited

        Right now I have been able to fix it by adding the url to the dependency tag in cordova admob plugin https://github.com/appfeel/admob-google-cordova in plugin.xml file:

            <dependency id="com.ios.libgoogleadmobads" url="https://github.com/appfeel/google-iosadmobads"/>
        

        Now it's working in PGB and cordova CLI. Thanks.

        My conclusion is that any plugin which needs .framework libraries should place them in a separate repo and link them by using url attribute in dependency tag.

        Show
        miqmago Miquel added a comment - - edited Right now I have been able to fix it by adding the url to the dependency tag in cordova admob plugin https://github.com/appfeel/admob-google-cordova in plugin.xml file: <dependency id= "com.ios.libgoogleadmobads" url= "https: //github.com/appfeel/google-iosadmobads" /> Now it's working in PGB and cordova CLI. Thanks. My conclusion is that any plugin which needs .framework libraries should place them in a separate repo and link them by using url attribute in dependency tag.
        Hide
        bau720123 Colin Bau added a comment - - edited

        hi Miquel
        I am a PGB's (build.phonegap.com) user
        you said that use you the way and solve the problem in PGB and cordova CLI
        <dependency id="com.ios.libgoogleadmobads" url="https://github.com/appfeel/google-iosadmobads"/>
        but I tried,it still build fail in android and iOS
        please told me what the exactly way

        for now my code like that
        <gap:plugin name="com.phonegap.plugins.facebookconnect" version="0.11.0" source="plugins.cordova.io">
        <param name="APP_ID" value="myid" />
        <param name="APP_NAME" value="myname" />
        </gap:plugin>
        <dependency id="com.ios.libgoogleadmobads" url="https://github.com/appfeel/google-iosadmobads"/>

        Show
        bau720123 Colin Bau added a comment - - edited hi Miquel I am a PGB's (build.phonegap.com) user you said that use you the way and solve the problem in PGB and cordova CLI <dependency id="com.ios.libgoogleadmobads" url="https://github.com/appfeel/google-iosadmobads"/> but I tried,it still build fail in android and iOS please told me what the exactly way for now my code like that <gap:plugin name="com.phonegap.plugins.facebookconnect" version="0.11.0" source="plugins.cordova.io"> <param name="APP_ID" value="myid" /> <param name="APP_NAME" value="myname" /> </gap:plugin> <dependency id="com.ios.libgoogleadmobads" url="https://github.com/appfeel/google-iosadmobads"/>
        Hide
        miqmago Miquel added a comment -

        Hi Colin,

        Don't know exactly what are you trying to do.
        If your intention is to add Google Admob ads, you should use the plugin (not the library itself). See phonegap admob plugin for more detailed info:

        <gap:plugin name="com.phonegap.plugins.facebookconnect" version="0.11.0" source="plugins.cordova.io">
        <param name="APP_ID" value="myid" />
        <param name="APP_NAME" value="myname" />
        </gap:plugin>
        <gap:plugin name="com.admob.google" source="plugins.cordova.io" />
        

        Otherwise, if you are using the library as a dependency, because you are building a plugin, this is the right way to use it.

        Show
        miqmago Miquel added a comment - Hi Colin, Don't know exactly what are you trying to do. If your intention is to add Google Admob ads, you should use the plugin (not the library itself). See phonegap admob plugin for more detailed info: <gap:plugin name= "com.phonegap.plugins.facebookconnect" version= "0.11.0" source= "plugins.cordova.io" > <param name= "APP_ID" value= "myid" /> <param name= "APP_NAME" value= "myname" /> </gap:plugin> <gap:plugin name= "com.admob.google" source= "plugins.cordova.io" /> Otherwise, if you are using the library as a dependency, because you are building a plugin, this is the right way to use it.
        Hide
        bau720123 Colin Bau added a comment -

        hi Miquel
        I just want to build success in PGB (build.phonegap.com) with Android and iOS
        for now I use your code in my PGB's config.xml
        but still build fail in iOS...

        Show
        bau720123 Colin Bau added a comment - hi Miquel I just want to build success in PGB (build.phonegap.com) with Android and iOS for now I use your code in my PGB's config.xml but still build fail in iOS...
        Hide
        miqmago Miquel added a comment -

        Which is yout config.xml? Which is the error log/message in PGB?
        I think it's better if you could ask a question in stackoverflow with "phonegap-plugins" tag or open an issue in https://github.com/appfeel/admob-google-cordova/issues.
        In this way we won't mess up this thread and I can give better follow up.

        Show
        miqmago Miquel added a comment - Which is yout config.xml? Which is the error log/message in PGB? I think it's better if you could ask a question in stackoverflow with "phonegap-plugins" tag or open an issue in https://github.com/appfeel/admob-google-cordova/issues . In this way we won't mess up this thread and I can give better follow up.
        Hide
        jgberg Jeffrey Greenberg added a comment - - edited

        Miquel This is a problem related to the Facebook plugin here: https://github.com/Wizcorp/phonegap-facebook-plugin which notes this bug... This plugin is used a great deal because it connects to that little company known as Facebook . It includes the Facebook iOS SDK, and that SDK has symlinks. It is not an issue with Google Admob as far as I know. To reproduce and address the problem, work with that plugin.

        Show
        jgberg Jeffrey Greenberg added a comment - - edited Miquel This is a problem related to the Facebook plugin here: https://github.com/Wizcorp/phonegap-facebook-plugin which notes this bug... This plugin is used a great deal because it connects to that little company known as Facebook . It includes the Facebook iOS SDK, and that SDK has symlinks. It is not an issue with Google Admob as far as I know. To reproduce and address the problem, work with that plugin.
        Hide
        purplecabbage Jesse MacFadyen added a comment -

        We do not use our own registry any more, npm for all the things! Closing!

        Show
        purplecabbage Jesse MacFadyen added a comment - We do not use our own registry any more, npm for all the things! Closing!

          People

          • Assignee:
            Unassigned
            Reporter:
            songz Song Zheng
          • Votes:
            8 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development