What is inside an iOS project — targets, the Info.plist, the asset catalog, and the entry point — and how Swift Package Manager adds dependencies. The map you need before writing app code.
An iOS app is built by Xcode from Swift source, resources (an asset catalog, storyboards), and configuration. The key pieces are the target (what gets built), the Info.plist (declares the app to the system), and the entry point (the App struct in SwiftUI). Knowing where each lives orients you before you touch code — most "where does this setting go?" questions resolve here.
MyApp.xcodeproj / .xcworkspace the project Xcode opens
MyApp/
├── MyApp.swift the @main entry point (SwiftUI App struct)
├── ContentView.swift your first screen
├── Assets.xcassets images, colors, app icon (the asset catalog)
├── Info.plist declares the app to iOS (permissions, config)
└── Preview Content/ assets used only by Xcode previews
A TARGET defines one buildable product (the app, a test bundle, a widget).
Schemes tie targets + build settings together for building/running.A modern SwiftUI app starts from a struct marked @main that conforms to App. Its body returns a Scene — usually a WindowGroup containing your root view. This tiny struct replaces the old AppDelegate/SceneDelegate boilerplate for most apps; you add lifecycle hooks and app-wide state here. It is where execution begins.
import SwiftUI
@main // the app's entry point
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView() // the root view of the app
}
}
}
// SwiftUI apps start here. The old UIKit way used AppDelegate + SceneDelegate;
// you can still add an @UIApplicationDelegateAdaptor when you need those hooks.Swift Package Manager (SPM) is the built-in, recommended way to add third-party libraries — no separate tool required (it superseded CocoaPods and Carthage for most projects). You add a package by its Git URL in Xcode, pin a version range, and import it. A Package.swift manifest describes a package’s own dependencies and targets.
// Package.swift — a package manifest (for libraries; apps add packages in Xcode)
// dependencies: [
// .package(url: "https://github.com/Alamofire/Alamofire", from: "5.9.0")
// ]
// in Xcode: File > Add Package Dependencies... > paste the Git URL > pick a version
import Alamofire // then just import + use it
// SPM is built into Xcode/Swift — the modern default over CocoaPods/Carthage.
// it resolves versions, fetches sources, and links them into your target.The Info.plist is a key-value file that configures your app for the system: its bundle identifier and version, supported orientations, and — most importantly — the usage-description strings iOS shows when you request a sensitive permission. Missing a required usage-description string is a common crash-on-first-use, so knowing the plist is essential.
<!-- Info.plist entries (edited via Xcode's UI or as raw XML) -->
<key>CFBundleShortVersionString</key>
<string>1.0</string> <!-- user-visible version -->
<key>CFBundleVersion</key>
<string>1</string> <!-- build number, bump each upload -->
<!-- REQUIRED usage strings — the app CRASHES on request without them: -->
<key>NSCameraUsageDescription</key>
<string>We use the camera to scan documents.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>We use your location to find nearby stores.</string>