-
-
Notifications
You must be signed in to change notification settings - Fork 204
feat(ios): improve spm build logs, clarity and size reporting #6085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+263
−5
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: NativeScript/nativescript-cli
Length of output: 208
🏁 Script executed:
Repository: NativeScript/nativescript-cli
Length of output: 2972
🏁 Script executed:
Repository: NativeScript/nativescript-cli
Length of output: 229
🌐 Web query:
@nativescript/nativescript-dev-xcode 0.8.2 getFirstTarget source💡 Result:
The package
@nativescript/nativescript-dev-xcodeis a fork of apache/cordova-node-xcode [1][2]. Searches performed across the repository and related documentation did not locate a function named getFirstTarget within the@nativescript/nativescript-dev-xcodecodebase [1][3][4]. While the term getFirstTarget appears in other unrelated projects (such as Java-based implementations or other libraries) [5][6][7], it is not a documented or standard part of the@nativescript/nativescript-dev-xcodeAPI [2][3]. The primary API for this library involves methods like addHeaderFile, addSourceFile, and addFramework, which are used after parsing a project file [2][3].Citations:
🌐 Web query:
site:nativescript.org or site:github.com/NativeScript/nativescript dev-xcode getFirstTarget💡 Result:
The term dev-xcode refers to nativescript-dev-xcode, which is a Node.js library used to parse and modify Xcode project (.xcodeproj) files [1]. It was forked from the cordova-node-xcode project [1]. There is no standard, widely documented function named getFirstTarget within the public API of the nativescript-dev-xcode library [1]. While the library allows for the manipulation of Xcode project files, interaction with targets typically involves accessing the project's internal data structures, such as the pbxproj object, which represents the project's configuration [1]. If you are looking to interact with targets in an Xcode project using this library, you would typically parse the project file first and then access the targets array within the project object [1]: const xcode = require("xcode"); const projectPath = "myproject.xcodeproj/project.pbxproj"; const myProj = xcode.project(projectPath); myProj.parse(function (err) { // Targets are usually stored in myProj.hash.project.objects.PBXNativeTarget const targets = myProj.pbxNativeTargets; const firstTarget = targets; console.log(firstTarget); }); Because nativescript-dev-xcode is a wrapper around cordova-node-xcode, its API methods are consistent with the original library, which primarily exposes methods like addHeaderFile, addSourceFile, and addFramework [1]. You may need to inspect the specific version of the library you are using to confirm if any custom helper methods exist, or access the targets directly via the parsed object [1].
Citations:
🌐 Web query:
npm package nativescript-dev-xcode 0.8.2 getFirstTarget💡 Result:
In the nativescript-dev-xcode package (which is a fork of cordova-node-xcode), the getFirstTarget method is a utility function used to retrieve the first target defined within an Xcode project (.pbxproj) file [1][2][3]. Based on its implementation and standard usage in projects derived from this parser, getFirstTarget returns an object containing the UUID and the target details [3][4][5]. Typical usage often looks like this: const target = xcode.getFirstTarget; // target.uuid provides the UUID of the first target // target.firstTarget provides the object representation of the target The method is frequently used in build scripts and plugin logic (such as Cordova or NativeScript plugins) to automatically identify the main project target when performing operations like adding build phases, modifying build settings, or embedding frameworks [6]. While version 0.8.2 is the latest release (published June 10, 2026) [7][8], the getFirstTarget method is a long-standing feature in this codebase, inherited from the original cordova-node-xcode parser [1].
Citations:
🌐 Web query:
github.com NativeScript nativescript-dev-xcode getFirstTarget implementation💡 Result:
In the nativescript-dev-xcode library, which is a fork of cordova-node-xcode [1][2], the getFirstTarget method is intended to retrieve the first build target defined within the Xcode project file [3][4][5]. Based on the library's implementation history and shared ancestry with node-xcode, the method generally accesses the project's native targets section and returns the first entry found [3][4]. It typically returns an object containing the UUID of the target and the target definition itself (often labeled as pbxNativeTarget) [4][5]. Usage example: const target = xcode.getFirstTarget; [3] Technical details: 1. Origin: The library is a parser utility for.xcodeproj/project.pbxproj files [1][2]. 2. Implementation Context: The method is used in automated build processes to identify the primary application or library target, though it can sometimes lead to issues if multiple targets (such as iOS and tvOS) are present, as it indiscriminately selects the first one [6]. 3. Signatures: You can find type definitions for this method in various related projects that consume the same node-xcode-style API, where it is defined as returning an object containing the UUID and the target details [7][4][5]. For specific implementation code, you should examine the lib/pbxProject.js file within the NativeScript/nativescript-dev-xcode repository on GitHub, as this file contains the core project parsing logic and method definitions [1][8][9].
Citations:
Use the main-target UUID explicitly before pinning
Sources.getFirstTarget()only exposes auuidshape here; its implementation is not available locally to prove it excludes extension/watch targets. If an extension/watch target is pinned instead of the main app target, theSourcesphase still resolves to the wrong target.🤖 Prompt for AI Agents