App Development with Swift Associate Exam Prep
Free practice questions

Free ADSA Practice Questions

10 exam-style questions with answers and explanations, straight from our 1,030-question bank. Tap an answer to check yourself. When you're ready, take the scored version in the free practice test.

Start the free practice test → ★★★★★4.9/5 from 2,400+ candidates · No signup

These 10 free ADSA questions are organized by exam domain, so you can see how each part of the App Development with Swift Associate blueprint is tested. Reveal the answer and explanation under each question.

Domain 1: Planning and Design

Question 1

A weather app supports both device-location lookup and forecasts for a city entered by the user. On first launch, the user declines location access. No location is saved. The developer is choosing how the app should behave after that decision. Which response respects the decision without unnecessarily removing useful functionality?

Show answer & explanation

Correct answer: A - Offer city entry and retrieve the forecast for the city the user chooses.

Question 2

An app team has adopted WCAG 2.2 Level AA contrast criteria for its visual design. A review reports: • Ordinary body text, not large-scale text: 3.6:1 against its background. • A custom outline needed to identify an active text-entry field: 3.8:1 against every adjacent color. Neither element qualifies for an exception. Considering only the applicable minimum-contrast criteria, what should the review conclude?

Show answer & explanation

Correct answer: B - Only the text fails; use 4.5:1 for text and 3:1 for the outline.

Domain 2: Xcode Project Navigation

Question 3

In Assets.xcassets, an image set named "TrailBadge" contains the file "badge_final.png". The catalog is included in the app target; the PNG is not included separately as a bundle resource. A SwiftUI source file already imports SwiftUI, and the developer needs to display this custom artwork rather than a system symbol. The appropriate image expression is:

Show answer & explanation

Correct answer: C - Image("TrailBadge")

Domain 3: Swift Language Usage

Question 4

A reading app uses this function to produce a title followed by its author's name: ```swift func caption(_ title: String, for author: String) -> String { return "\(title) by \(author)" } ``` Select the call that returns exactly "Checklist by Lina".

Show answer & explanation

Correct answer: D - caption("Checklist", for: "Lina")

Question 5

A note editor creates a working copy before changing its title: ```swift struct Note { let id: String var title: String mutating func rename(to newTitle: String) { title = newTitle } } let original = Note(id: "N7", title: "Draft") var edited = original edited.rename(to: "Ready") ``` A reviewer claims the last line also changes original.title. Which assessment is accurate?

Show answer & explanation

Correct answer: C - original.title is "Draft" and edited.title is "Ready"; they are independent values.

Question 6

A document processor receives page names interspersed with control markers. This Swift code builds the list of pages to export: ```swift var queued: [String] = [] for name in ["cover", "skip", "notes", "stop", "index"] { if name == "skip" { continue } if name == "stop" { break } queued.append(name) } ``` When processing ends, queued contains:

Show answer & explanation

Correct answer: A - ["cover", "notes"]

Domain 4: View Building with SwiftUI

Question 7

The following SwiftUI screen is already visible. A user turns on "Favorites only" and then activates "Change favorite" once. The screen remains mounted, and no other state changes occur. ```swift import SwiftUI struct TrailFilter: View { @State private var isFavorite = false @State private var favoritesOnly = false var body: some View { VStack { Toggle("Favorites only", isOn: $favoritesOnly) Button("Change favorite") { isFavorite.toggle() } if !favoritesOnly || isFavorite { Text("Harbor Walk") } } } } ``` How does the "Harbor Walk" label respond to those two actions, in order?

Show answer & explanation

Correct answer: B - Hidden after the toggle; visible after the button.

Question 8

A designer expects the blue background of this SwiftUI label to include its surrounding space. The parent offers ample room and does not compress the view. ```swift import SwiftUI struct ActionLabel: View { var body: some View { Text("Go") .frame(width: 80, height: 30) .padding(10) .background(Color.blue) } } ``` Identify the resulting outer size and the bounds covered by the blue background. All dimensions are in points.

Show answer & explanation

Correct answer: A - Outer size 100 × 50; blue covers the full padded area.

Question 9

In this unfinished SwiftUI form, editing the child's text field must also update the parent's greeting. The call to NameField currently produces a type mismatch. ```swift import SwiftUI struct NameField: View { @State var name: String var body: some View { TextField("Name", text: $name) } } struct ProfileEditor: View { @State private var name = "Mina" var body: some View { VStack { NameField(name: $name) Text("Hello, \(name)") } } } ``` Replace only the property declaration inside NameField so that the form compiles and both views use the parent's value.

Show answer & explanation

Correct answer: D - @Binding var name: String

Domain 5: Debugging

Question 10

Xcode reports a missing return in the following function: ```swift func deliveryLabel(isMember: Bool) -> String { if isMember { return "Free delivery" } print("Standard delivery") } ``` The function must return "Free delivery" for a member and "Standard delivery" for anyone else. Keep the signature and the if block unchanged. Only the final print statement may be replaced. Choose the replacement that fixes both the diagnostic and the behavior.

Show answer & explanation

Correct answer: D - return "Standard delivery"

That's 10 of 1,030

The full bank has 1,020 more ADSA questions with explanations.

Continue in the free practice test →

View plans