Swift Package Manager
Swift Package Manager, Package.swift, dependencies, versioning, local packages
1What is the main manifest file required to define a Swift Package?
What is the main manifest file required to define a Swift Package?
Resposta
The Package.swift file is the mandatory manifest for any Swift Package. It contains package metadata, dependencies, targets, and products. Without this file at the package root, Xcode cannot recognize the structure as a valid package.
2How to define an executable target in SPM?
How to define an executable target in SPM?
Resposta
An executable target produces an application or command-line tool. It differs from a library target by producing a standalone executable binary. Executable targets require a valid entry point (main.swift file or @main) to compile correctly. SPM uses .executableTarget() in Package.swift to define this target type.
3What is the difference between a target and a product in SPM?
What is the difference between a target and a product in SPM?
Resposta
A target is a compilation unit containing source code, while a product is the consumable artifact generated from one or more targets. A product exposes targets to the outside world and defines how they are distributed. For example, the same target can be exposed as a static or dynamic library depending on the product. This separation provides flexibility in code distribution while centralizing compilation logic.
How to declare a remote dependency in SPM?
What is the role of local dependencies in SPM?
+13 perguntas de entrevista
Outros temas de entrevista iOS
Swift Basics
Swift Language Essentials
UIKit Fundamentals
UIViewController Lifecycle
UserDefaults & Keychain
Application Lifecycle
Auto Layout & Constraints
UITableView & UICollectionView
SwiftUI Basics
SwiftUI State Management
SwiftUI Navigation
Networking & URLSession
Codable & JSON Parsing
Core Data
Protocol Oriented Programming
MVVM Architecture
Push Notifications
Unit Testing & XCTest
UI Testing
Xcode & Build System
Memory Management & ARC
Combine Framework
Concurrency & async/await
iOS Design Patterns
Performance Optimization
Security & Encryption
SwiftUI Advanced
iOS Application Architecture
Domine iOS para sua proxima entrevista
Acesse todas as perguntas, flashcards, testes tecnicos, exercicios de code review e simuladores de entrevista.
Comece gratis