NativeScript / NativeScript/nativescript-cli

LiveSync related commands build applications for not needed architectures

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

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

bug livesync os: ios os: mac severity: medium ux
主要言語
JavaScript
スター
1.1k
フォーク
204
平均マージ
1日 9時間
マージ済み PR(30日)
8

説明

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 5.1.1
  • Cross-platform modules: Not applicable
  • Android Runtime: Not applicable
  • iOS Runtime: Not applicable
  • Plugin(s): Not applicable

Describe the bug
During liveSync related commands, like tns run, tns debug, tns test, CLI may build the application as it have to install it on devices. However, CLI does not use the architectures of the devices/emulators that will be used and builds for the default ones. This means that in most cases the build result (.ipa, .app) is larger than required and the build is much slower as it is done for multiple architectures.

To Reproduce

  1. $ tns create myApp --js
  2. $ cd myApp
  3. Start iOS 9.x or 10.x Simulator
  4. Run tns run ios --log trace
  5. Check the logs - you'll see both i386 and x86_64 architectures. Similarly when you build for iOS Device, in the log you'll see armv7 and arm64.

Expected behavior
To build the app only for the required architectures that will be used during this command.

Additional context
For iOS builds, in case you set IPHONEOS_DEPLOYMENT_TARGET = 11.0 in <path to App_Resources>/iOS/build.xcconfig, Xcode will build only for 64 bits (i.e. arm64 or x86_64).
Similar thing will happen in case we pass ONLY_ACTIVE_ARCH=YES, so Xcode will automatically detect running simulators/attached devices.
NOTE: By default our project template for Xcode has deployment target set to 9, so in case it is not set in build.xcconfig and ONLY_ACTIVE_ARCH is set to NO, Xcode will build the application for all supported architectures.

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

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

はじめの一歩

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

調査の方向性

liveSync 関連の tns runtns debugtns test のコマンドパスから着手し、iOS ビルドが App_Resources/iOS/build.xcconfig をどのように使用しているかを調査します。tns run ios --log trace を使用して iOS 9.x または 10.x の Simulator で再現し、その後、選択されたアーキテクチャを使用中の Simulator またはデバイスと比較します。必要なアーキテクチャだけがビルドされ、文書化されている deployment target の動作を壊していなければ完了です。

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

評価

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

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

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