Apple App-Development-with-Swift-Certified-User Actual Free Exam Questions & Community Discussion

  • Exam Code/Number: App-Development-with-Swift-Certified-User
  • Exam Name/Title: App Development with Swift Certified User Exam
  • Certification Provider: Apple
  • Corresponding Certification: Apple App Development with Swift
  • Exam Questions: 42
  • Updated On: Jul 23, 2026
Review the code.
var capitalCities = [ " USA " : " Washington D.C. " , " Spain " : " Madrid " , " Peru " : " Lima " ] Which two statements add the capital city of " Italy " to the dictionary? (Choose 2.)
Correct Answer: A,D Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Review the code.
var capitalCities = [ " USA " : " Washington D.C. " , " Spain " : " Madrid " , " Peru " : " Lima " ] Which two statements add the capital city of " Italy " to the dictionary? (Choose 2.)
Correct Answer: A,D Vote an answer
Complete the code by selecting the correct option from each drop-down list to create the following screen.

Note: You will receive partial credit for each correct answer.
Correct Answer:

Review the code snippet.

Move each item from the list on the left to the correct code segment on the right. You may use each item only once.
Note: You will receive partial credit for each correct response.
Correct Answer:

Explanation:

This question belongs to Swift Programming Language , specifically the domain covering structs, properties, methods, and initializers .
A computed property does not store a value directly. Instead, it returns a value calculated from other data.
That is why description is a computed property: it returns a string based on content.
A memberwise initializer is automatically provided by Swift for structs when their stored properties are initialized through parameters. So Document(content: " Greetings! " ) is using the struct's memberwise initializer.
A type property belongs to the type itself rather than to an instance. In Swift, static var docCount = 0 is a type property because it is declared with static.
An instance method is a function that belongs to an instance of the struct or class. The display() method uses the instance's content, so it is an instance method.
A type method is a method declared with static and belongs to the type itself. So static func increment() is a type method because it changes the shared type property docCount.
Drag the views on the left to the correct locations m the code on the fight to match the shown canvas.
You may use each View once, more than once, or not at all.

Correct Answer:

Explanation:
* RedCircleView()
* GreenTriangleView()
* BlueSquareView()
* BlueSquareView()
* GreenTriangleView()
This question belongs to View Building with SwiftUI , specifically arranging views with HStack , VStack , and ZStack . In SwiftUI, an HStack lays views out horizontally, a VStack lays them out vertically, and a ZStack overlays views front-to-back. Apple's stack layout guidance describes these three containers exactly this way.
To match the canvas, the main HStack must show three items from left to right: a red circle , a green triangle
, and then a right-side vertical group. That means the first two blanks inside HStack are RedCircleView() and GreenTriangleView(). On the right side, the VStack shows a blue square on top, so the next blank is BlueSquareView(). Under that, the lower-right shape is made by layering a green triangle on top of a blue square , which means the ZStack must contain BlueSquareView() first as the background and GreenTriangleView() second as the foreground. SwiftUI's documentation notes that ZStack aligns and overlays its children in depth order, which is why the square goes before the triangle.
So the correct placement order is:
HStack {
RedCircleView()
GreenTriangleView()
VStack {
BlueSquareView()
ZStack {
BlueSquareView()
GreenTriangleView()
}
}
}
That arrangement reproduces the exact layout shown in the canvas.
0
0
0
10