cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bharath Hariharan (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CB-13043) Cordova generated app broken if the plugin is a dynamic framework that depends on Cordova
Date Thu, 20 Jul 2017 23:02:00 GMT
Bharath Hariharan created CB-13043:
--------------------------------------

             Summary: Cordova generated app broken if the plugin is a dynamic framework that
depends on Cordova
                 Key: CB-13043
                 URL: https://issues.apache.org/jira/browse/CB-13043
             Project: Apache Cordova
          Issue Type: Bug
          Components: cordova-create, cordova-ios
    Affects Versions: 4.4.0
         Environment: iOS 10
            Reporter: Bharath Hariharan
            Assignee: Shazron Abdullah


I have a plugin that's directly dependent on Cordova since it contains a subclass of CDVViewController
and it references other native Cordova classes. I'm trying to package this framework as a
dynamic framework and bundle it in my plugin. The problem with this is that it has to be linked
to Cordova.framework but the generated app from Cordova CLI links to libCordova.a which causes
symbol conflicts. The basic problem is that a dynamic framework has a defined boundary and
is self-sufficient, which prevents it from getting symbols from the external libCordova.a.
It also can't weak-link to a static lib. The fix here would be to do 1 of the following:

1) In the generated app, make Cordova's dynamic framework target a dependency instead of the
static target like it is currently. Also, link to Cordova.framework instead of libCordova.a.

2) Allow a parameter to be set in the plugin, called "dynamic" or something to that effect
that allows a plugin to specify that it needs Cordova as a dynamic framework dependency. Setting
this parameter would basically make Cordova do (1).

Since Apple has moved away from static libs and is recommending dynamic frameworks, I would
recommend approach (1).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message