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

.a files cannot be installed properly, it needs to be in "Build Phases/Link Binary with Libraries"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Master
    • None
    • None

    Description

      plugin.xml:
      https://github.com/shazron/TestFlightPlugin/blob/b55cd6e7f11a599223645511cb0c6e9741648b9b/plugin.xml#L37

      As you can see, the .a file is installed as a source-file, which is needed for the file to be copied into the Plugins folder. The file is also added to the Build Phases/Compile Sources phase when it shouldn't be - but this is harmless.

      The .a file needs to be installed into the Build Phases/Link Binary with Libraries, if not there is a linker error. To do this, you could specify the file as a framework tag, setting the src attribute. However, no matter what you do, you can't get the right path since the framework item is set to "Relative to Group" in Xcode, and this is set to the root of the project folder.

      So if the project folder is "/Users/Desktop/FooProject", that is the root of the Frameworks group as well. The Plugins folder would be in "/Users/Desktop/FooProject/FooProject/Plugins", and there is no way to know this ahead of time (note the extra FooProject), if not, I could set the framework src attribute to "FooProject/Plugins/blah" (but this is not ideal, and is confusing)

      Not sure how to fix this but some suggestions:
      1. plugman appends the "FooProject/Plugins" part to the src (only for a user lib), so this configuration could work:

      <source-file src="TestFlight1.1/libTestFlight.a" target-dir="TestFlightPlugin/TestFlight1.1" />
      <framework src="TestFlightPlugin/TestFlight1.1/libTestFlight.a" />
      

      This would work a bit better if CB-2717 was implemented.

      2. Or better yet, have a framework=[boolean] attribute on a source-file element:

      <source-file src="TestFlight1.1/libTestFlight.a" target-dir="TestFlightPlugin/TestFlight1.1" framework="true"/>
      

      Attachments

        Activity

          People

            anis Anis Kadri
            shazron Shazron Abdullah
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: