cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-11233) Support installing frameworks into "Embedded Binaries" section of the Xcode project
Date Thu, 30 Mar 2017 06:35:41 GMT

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

Shazron Abdullah commented on CB-11233:
---------------------------------------

Ok CB-10034 is stalled and I will just send a PR to get the feature working independently
(just add an embed attribute, for simplicity and no link and sign attributes), in cordova-lib.
Unfortunately, this new attribute will be dependent on a cordova-cli@7.0.0 release (in the
future): https://issues.apache.org/jira/secure/RapidBoard.jspa?rapidView=142

That release will pin the ios platform it supports, which will be cordova-ios@4.4.0. Even
though it needs the CLI for the new attribute, we can still support this feature in the platform
release, just that the "embed" attribute will always be false (since we need the CLI to pass
the right value to the platform). 

The code that determines embeddability is here: https://github.com/alunny/node-xcode/blob/078625f16c102372965cc5a4f6a8f7a5145d36aa/lib/pbxProject.js#L300

Here's the plan. The goal of this new feature *must* preserve backwards compatibility while
adding the new feature (i.e {{custom=true}} and {{custom=false}} must work the same).

This means when {{custom=true}} and there is no {{embed}} attribute, it is implicit {{embed=false}}
and implicit {{link=true}} in node-xcode (see source link above).
For {{embed=true}} attribute to be used in node-xcode, it has to have {{custom=true}} if not
the value is not applied. It will also set {{link=false}} (we don't want duplicate symbols
possibly)

For any implicit behaviours above, we will make it explicit in our {{pluginHandlers.js}} according
to the table below.

----

||scenario||custom attribute||embed attribute||opt.link ||opt.embed|| Expected Result||
|1|true|false|true|false|Linked|
|2|true|true|false|true|Embedded|
|3|false|true|true|false|Linked|
|4|false|false|true|false|Linked|

----

Scenarios {{3}} and {{4}} are covered by:
https://github.com/apache/cordova-ios/blob/7ec3bdb463a5fd806d9d370b294a96f35e361179/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js#L79
(embed attribute ignored since custom is false, opt.link is set to true explicitly (default
true in node-xcode), opt.embed is set to false explicitly (default false in node-xcode))
This is equivalent to current behaviour for {{custom=false}}.

Scenario {{1}} is covered by:
https://github.com/apache/cordova-ios/blob/7ec3bdb463a5fd806d9d370b294a96f35e361179/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js#L92
(embed attribute is false/missing thus false, opt.link is set to true explicitly (default
true in node-xcode), opt.embed is set to false explicitly (default false in node-xcode)) 
This is equivalent to current behaviour for {{custom=true}}.

Scenario {{2}} is *new*.
(both custom and embed attributes must be true -- and opt.link will be set to false explicitly
and opt.embed set to true explicitly).
You can only have either link or embed to be true, to make it simple (and avoid duplicate
symbols).






> Support installing frameworks into "Embedded Binaries" section of the Xcode project
> -----------------------------------------------------------------------------------
>
>                 Key: CB-11233
>                 URL: https://issues.apache.org/jira/browse/CB-11233
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: CordovaLib
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>             Fix For: cordova-ios@4.4.0
>
>
> Right now, this:
> {code}
> <framework src="Foo.framework" custom="true" />
> {code}
> .. links the framework statically into the program.
> There needs to be a similar directive that will install the framework into the "Embedded
Binaries" section of the Xcode project. Frameworks that are installed in the "Embedded Binaries"
section are dynamically loaded when needed by your iOS program.
> Two ways this can be done:
> 1. Overload the "custom" attribute (icky but we won't have to introduce a new attribute)
to be a string, and the new value would be "dynamic"
> 2. Have a new "dynamic" attribute (boolean)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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


Mime
View raw message