addFramework uses incorrect path for Swift libraries
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, nodejs
- Domain
- mobile
Research direction
Start at the addFramework entry point and compare its PBXFileReference path handling with the experimental patch linked in the issue. Reproduce the libswiftAVFoundation.tbd example and confirm that Swift libraries use usr/lib/swift while other frameworks retain their expected paths.
Written by the indexing model from the issue text.
Description
The default path used in the PBXFileReference for frameworks with .tbd extensions is /usr/lib. However, I believe that Swift libraries with the same extension needs to have the path /usr/lib/swift.
For example, if you use addFramework to add libswiftAVFoundation.tbd it produces the following PBXFileReference in the project file:
27874A9BBF2444AABA64E8E0 /* libswiftAVFoundation.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libswiftAVFoundation.tbd; path = usr/lib/libswiftAVFoundation.tbd; sourceTree = SDKROOT; };
This will ultimately result in a Crash on iOS versions 12.1 or lower, before the Swift runtime was bundled with the OS.
If you add the library manually in Xcode, the project file has the following `PBXFileReference' added:
5DBEA893249434B30034407A /* libswiftAVFoundation.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libswiftAVFoundation.tbd; path = usr/lib/swift/libswiftAVFoundation.tbd; sourceTree = SDKROOT; };
Note the path difference:
cordova-node-xcode: usr/lib/libswiftAVFoundation.tbd
Xcode: usr/lib/swift/libswiftAVFoundation.tbd
I have an experimental patch here to work around this.
Assuming I'm on the right track here, I'll submit a pull request but I'm hoping that the maintainers can recommend if the approach I used is acceptable or if there's a more effective way to select the correct default path for these libraries than introducing another option.
- Dominant language
- JavaScript
- Stars
- 217
- Forks
- 102
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/cordova-node-xcode
-
Add & Improve JSDocs Openenhancement
apache/cordova-node-xcode#171 · 1 assignee ·
-
🔖 New release Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
apache/cordova-node-xcode#162 · 4 comments · 2 reactions ·
-
Install .xcframework Open
Difficulty 3/5 1-2 days Newbie friendliness 28/100
apache/cordova-node-xcode#139 · 2 comments ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
apache/cordova-node-xcode#138 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
apache/cordova-node-xcode#137 · 2 reactions ·
All issues in apache/cordova-node-xcode
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
docToolchain/docToolchain#1705 ·
-
Timezone select lists one option per character; duplicate "Failed" reason; shared tracker popover id Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nightscout/nocturne#1414 ·
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
modelcontextprotocol/inspector#2458 · 1 comment ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
carbon-design-system/ibm-products#9907 ·