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

iOS plugins not copied from root plugins folder to platform specific plugin folder

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Not A Problem
    • 3.6.3, 6.1.0
    • 6.1.0
    • cordova-cli, cordova-ios
    • Cordova 6.1 + App with iOS custom plugins

    Description

      I do not understand how Cordova (latest version 6.1) deals with plugins. I have the following project for my app:

          myapp (only relevant folders and files shown)
          +-config.xml
          +-platforms
          | +-ios
          |   +-CordovaLib
          |   +-MyApp
          |     +-Plugins
          |       +-com-myproj-myplugin
          |         |-myplugin.h
          |         |-myplugin.m
          +-plugins
          | +-com-myproj-myplugin
          |   |-plugin.xml
          |   +-src
          |     +-ios
          |       |-myplugin.h
          |       |-myplugin.m
          +-www
      

      As you can see, this project has a plugin myplugin which resides in 2 directories:

      • The root plugins folder - Here file myapp\plugins\com-myproj-myplugin\src\ios\myplugin.m does not contain any code implementation (just signatures and empty content in functions).
      • The iOS application specific Plugins folder - Here file myapp\platforms\ios\MyApp\Plugins\com-myproj-myplugin\myplugin.m actually contains the implementation.
        1. Where is the redundancy?
          I thought that the model was as follows:

      1. I call `cordova build ios`.
      2. Cordova will copy resources from myapp\plugins into specific platform plugin folders in myapp\platforms\...\Plugins

      But turns out this is not the case. No copy is performed from the general `plugins` folder into platform specific `Plugins` folders.

      *My question* How am I supposed to develop the plugin in order to avoid this redundancy? Should the code be placed only in platform specific Plugins folder? But how about plugin.xml which is placed in the generic plugins folder?

      Attachments

        Activity

          People

            vladimir.kotikov Vladimir Kotikov
            andry-tino Andrea Tino
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: