NativeScript / NativeScript/nativescript-cli
LiveSync related commands build applications for not needed architectures
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 1.1k
- Forks
- 204
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 8
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit den tns run-, tns debug- und tns test-Befehlspfaden im Zusammenhang mit liveSync und untersuche, wie iOS-Builds App_Resources/iOS/build.xcconfig verwenden. Reproduziere das Problem mit einem iOS-9.x- oder 10.x-Simulator unter Verwendung von tns run ios --log trace und vergleiche anschließend die ausgewählten Architekturen mit dem verwendeten Simulator oder Gerät. Als erledigt gilt die Aufgabe, wenn nur die erforderlichen Architekturen erstellt werden, ohne das dokumentierte Verhalten des Deployment Targets zu beeinträchtigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- ios, javascript
- Bereich
- build-system, cli, mobile
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100