NativeScript / NativeScript/nativescript-cli
Consuming static library on iOS doesn't work
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 204
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 8
Description
it seems that after removing the lib/iOS directory we fail to consume plugins containing a static libraries. According to the doc a plugin containing a static library should have the following structure:
my-plugin/
├── ...
└── platforms/
└── ios/
├── MyStaticiOSLibrary.a
└── include/
└── MyStaticiOSLibrary/
└── Header1.h
└── Header2.h
└── ...
When processing such a plugin the CLI should add the path to MyStaticiOSLibrary.a binary to the project library search paths but it doesn't happen. As a result the build fails with:
ld: library not found for -lMyStaticiOSLibrary
Environment:
CLI, tns-core-modules, ios-runtime -> 3.0.0
Steps to reproduce:
- Create a blank app ->
tns create MyApp - Create a plugin with the folder structure described above
- Add the plugin to the app ->
tns plugin add my-plugin - Run the app:
tns run ios
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.
Research direction
Start with the CLI plugin-processing path exercised by tns plugin add and tns run ios, using the documented platforms/ios layout and the static-library linker error as the reproduction. Trace how MyStaticiOSLibrary.a is handled and verify that its directory reaches the project library search paths; done means the sample app builds and runs with the plugin.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, javascript
- Domain
- cli, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100