NativeScript / NativeScript/nativescript-cli

Custom plugin link issue in Xcode

Open
#3,806 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

os: ios to-be-checked
Dominant language
JavaScript
Stars
1.1k
Forks
204
Avg merge
1d 9h
Merged PRs (30d)
8

Description

From @smartsanja2013 on March 30, 2018 4:31

I have created a native ios plugin and exported as .tgz
Now I have added the plugin using this command
tns plugin add ./mywork/third-party-package/nativescript-mylib-1.0.0.tgz

But when building the Xcode project, I am getting following error

ld: library not found for -lMYLIB
clang: error: linker command failed with exit code 1 (use -v to see invocation)

But, In xcode project, I can see mylib.a already being added in to Linked Frameworks and Binaries

In order to build the Xcode project,
Every time I need to delete the mylib.a from Framworks folder in xcode and need to add again manually (with the "copy items if needed" option selected)

Is there any workaround to solve this problem?

Copied from original issue: NativeScript/NativeScript#5601

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the tns plugin add ./mywork/third-party-package/nativescript-mylib-1.0.0.tgz flow and building the Xcode project. Inspect how the packaged mylib.a is added to Linked Frameworks and Binaries; done means the project links -lMYLIB without manually deleting and re-adding the library with “copy items if needed” selected.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios
Domain
cli, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.