TylerBreau opened a new pull request, #1266:
URL: https://github.com/apache/cordova-ios/pull/1266

   Update is backwards compatible with previous embed behaviour.
   
   <!--
   Please make sure the checklist boxes are all checked before submitting the 
PR. The checklist is intended as a quick reference, for complete details please 
see our Contributor Guidelines:
   
   http://cordova.apache.org/contribute/contribute_guidelines.html
   
   Thanks!
   -->
   
   ### Platforms affected
   iOS
   
   
   ### Motivation and Context
   <!-- Why is this change required? What problem does it solve? -->
   Currently, the framework tag does not support both linking and embedding a 
framework. Comments in the code suggest this was a limitation in Apple's code.
   
   This limitation no longer exists. The current default behaviour of XCode 
(version 14) when dragging and dropping an XCFramework into General -> 
"Frameworks, Libraries, and Embedded Content" is to both embed and link the 
XCFramework.
   I have only tested this with XCFramework but I assume other kinds of 
frameworks are the same.
   
   This change allows the framework tag to both link and embed a framework.
   
   In my real-world use case, I am using custom XCFrameworks to get c binaries 
into my cordova app.
   If the XCFramework is not embedded then the App will crash during runtime 
because it can not find the binaries. This is expected because the binaries 
were not embedded into the app.
   If the XCFramework is not linked then the App can not be built due to linker 
errors. This is expected because the binaries are not being linked to the app.
   
   This change depends on this cordova-cli PR ()
   cordova-ios' packages do not need to update for this change to work however; 
you will need to update your global cordova-cli package in order for the link 
attribute to be read from the framework tag.
   
   
   <!-- If it fixes an open issue, please link to the issue here. -->
   
   
   
   ### Description
   <!-- Describe your changes in detail -->
   Add code that checks for new framework attribute "link".
   If link is not explicitly set, fallback to the previous behaviour (link = 
!embed).
   
   
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   I've ran npm test.
   
   Tested various combinations of framework tag's embed and link attributes by 
installing a plugin using these attributes. I would observe how the XCFramework 
is added to the the XCode project with the following focuses:
   -Is the XCFramework embedded (or not embedded) in Build Phrases?
   -Is the XCFramework linked (or not linked) in Build Phrases?
   -Is the XCFramework set to "Embed and Sign" in General?
   
   I have ran my company's app using these changes.
   
   ### Checklist
   
   - [x] I've run the tests to see all new and existing tests pass
   - [ ] I added automated test coverage as appropriate for this change
   - [ ] Commit is prefixed with `(platform)` if this change only applies to 
one platform (e.g. `(android)`)
   - [ ] If this Pull Request resolves an issue, I linked to the issue in the 
text above (and used the correct [keyword to close issues using 
keywords](https://help.github.com/articles/closing-issues-using-keywords/))
   - [ ] I've updated the documentation if necessary
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to