Consuming static library on iOS doesn't work

オープン
#2,811 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
ios, javascript
領域
cli, mobile

調査の方向性

tns plugin addtns run ios で実行される CLI のプラグイン処理パスから始め、文書化されている platforms/ios のレイアウトと、再現手順として静的ライブラリのリンカーエラーを使用します。MyStaticiOSLibrary.a がどのように処理されるかを追跡し、そのディレクトリがプロジェクトのライブラリ検索パスに到達していることを確認します。サンプルアプリがプラグイン付きでビルドおよび実行できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug os: ios plugins

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:

  1. Create a blank app -> tns create MyApp
  2. Create a plugin with the folder structure described above
  3. Add the plugin to the app -> tns plugin add my-plugin
  4. Run the app: tns run ios
主要言語
JavaScript
スター
1.1k
フォーク
204
平均マージ
1日 9時間
マージ済み PR(30日)
8

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NativeScript/nativescript-cli のほかの issue

NativeScript/nativescript-cli の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。