Repository navigation
fix(cli): keep -fno-objc-arc libraries out of the noarc folder - #8663
Open
RaphaelFakhri wants to merge 1 commit into
Open
RaphaelFakhri wants to merge 1 commit into
RaphaelFakhri wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #8038.
When a Cordova plugin declares a static library with
compiler-flags="-fno-objc-arc", for example<source-file src="src/ios/libFoo.a" framework="true" compiler-flags="-fno-objc-arc" />,cap update ioswith CocoaPods copies the library intonoarc/<Plugin>/, but the generatedCordovaPlugins.podspecreferences it assources/<Plugin>/libFoo.ains.vendored_libraries. The library is never linked, and the Xcode build fails withUndefined symbols. The podspec also gets an emptynoarcsubspec.compiler-flagshas no effect on a prebuilt library, and Cordova ignores it in this case. This change does the same:copyPluginsNativeFilesonly moves a source file tonoarcwhen it is not aframework="true"library, so the library stays at thesources/path that the podspec references.filterARCFilesignoresframework="true"libraries, so nonoarcsubspec is generated when no source file needs it.Testing
Added a CocoaPods case to
cli/test/update.ios.spec.tsthat adds a-fno-objc-arc.alibrary to the test Cordova plugin, runscap add ios --packagemanager CocoaPods, and checks that:s.vendored_librariespath exists on disk.noarcsubspec.Both checks fail without the change and pass with it.
npm testinclipasses (109 tests).