NativeScript / NativeScript/nativescript-cli
LiveSync related commands build applications for not needed architectures
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 1.1k
- Fork
- 204
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 8
Mô tả
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
$ tns create myApp --js$ cd myApp- Start iOS 9.x or 10.x Simulator
- Run
tns run ios --log trace - Check the logs - you'll see both
i386andx86_64architectures. Similarly when you build for iOS Device, in the log you'll seearmv7andarm64.
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với các đường dẫn lệnh tns run, tns debug và tns test liên quan đến liveSync, rồi kiểm tra cách các bản build iOS sử dụng App_Resources/iOS/build.xcconfig. Tái hiện vấn đề bằng Simulator iOS 9.x hoặc 10.x với tns run ios --log trace, sau đó so sánh các architecture được chọn với Simulator hoặc thiết bị đang sử dụng. Hoàn thành khi chỉ các architecture bắt buộc được build mà không làm hỏng hành vi deployment target được ghi lại trong tài liệu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- ios, javascript
- Lĩnh vực
- build-system, cli, mobile
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100