NativeScript / NativeScript/nativescript-cli

Custom plugin link issue in Xcode

未关闭
#3,806 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

os: ios to-be-checked
主要语言
JavaScript
星标
1.1k
派生
204
平均合并
1 天 9 小时
30 天内合并 PR
8

描述

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先重现 tns plugin add ./mywork/third-party-package/nativescript-mylib-1.0.0.tgz 流程并构建 Xcode 项目。检查打包的 mylib.a 是如何添加到 Linked Frameworks and Binaries 的;当项目能够链接 -lMYLIB,而无需手动删除并重新添加库且选择“copy items if needed”时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
ios
领域
cli, mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。