All quizzes
Free quiz · 20 questions in the bank

Swift Package Manager quiz

Test your Swift Package Manager knowledge with a free interactive quiz — 20 questions with answers and explanations. No signup needed to play.

Question 1/5Score 0

What versioning scheme does SPM expect packages to follow, and why does it matter?

Questions in this quiz
  1. What versioning scheme does SPM expect packages to follow, and why does it matter?
  2. What is `Package.resolved` and why is it typically committed to source control?
  3. What is Swift Package Manager (SPM)?
  4. What file declares a Swift package's name, products, dependencies, and targets?
  5. What does `swift package update` do, and how does it compare to `swift package resolve`?
  6. What is a local Swift package used for during development, e.g. via "Add Local Package" in Xcode?
  7. What are Swift Package plugins used for?
  8. Why can a Swift package not (by default) depend on CocoaPods or Carthage-distributed libraries directly?
  9. How do you add a dependency on another package in Package.swift?
  10. What is the purpose of `swift build` at the command line?
  11. What is a "trait" or conditional compilation approach for platform-specific code across an SPM package's multiple targets?
  12. What is the purpose of an `.executableTarget` versus a plain `.target` in Package.swift?
Gaps to close?
Read the curated Swift Package Manager notes — core concepts, patterns, interview prep.
Swift Package Manager notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web