MCQs / Computer Science / iOS: Architecture and Framework

iOS: Architecture and Framework MCQs — Computer Science (page 2)

47 multiple-choice questions on iOS: Architecture and Framework from Computer Science, each with the correct answer and, where available, a teacher's explanation. Read through them to revise the chapter, then practise the same questions one by one to test yourself.

26. The Android equivalent of SwiftUI is:

  1. Fragments
  2. Jetpack Compose
  3. XML Views
  4. Gradle

Answer: B) Jetpack Compose

Explanation: Both are modern declarative UI toolkits.

Discuss this question

27. The Security framework and keychain are part of the:

  1. Core OS layer
  2. Cocoa Touch layer
  3. App layer
  4. Media layer

Answer: A) Core OS layer

Explanation: Low-level security services are in Core OS.

Discuss this question

28. Interface Builder files used to visually design several UIKit screens and their transitions are called:

  1. Bundles
  2. Storyboards
  3. Manifests
  4. Plists

Answer: B) Storyboards

Explanation: Storyboards contain scenes and segues for UIKit apps.

Discuss this question

29. Apple recommends that developers use:

  1. The highest-level framework that meets their needs
  2. Only the Core OS layer
  3. Only Objective-C
  4. Assembly language

Answer: A) The highest-level framework that meets their needs

Explanation: Higher layers are easier, safer and more efficient for most tasks.

Discuss this question

30. An iOS app in the foreground but not receiving events (e.g. during an incoming call alert) is:

  1. Suspended
  2. Active
  3. Inactive
  4. Not running

Answer: C) Inactive

Explanation: Inactive means foreground without receiving events.

Discuss this question

31. In UIKit, an @IBOutlet is used to:

  1. Import a library
  2. Handle a button tap
  3. Declare a database table
  4. Reference a storyboard UI element from code

Answer: D) Reference a storyboard UI element from code

Explanation: Outlets connect UI elements to properties in code; actions connect events to methods.

Discuss this question

32. Which UIKit class shows a scrolling list of rows?

  1. UIStepper
  2. UISwitch
  3. UITableView
  4. UILabel

Answer: C) UITableView

Explanation: UITableView displays rows in a single column list.

Discuss this question

33. SwiftUI is described as a:

  1. Declarative UI framework
  2. Imperative networking library
  3. Database framework
  4. Kernel extension

Answer: A) Declarative UI framework

Explanation: In SwiftUI you declare the UI for a given state.

Discuss this question

34. The Apple Developer Program fee for publishing apps is:

  1. Free forever
  2. USD 25 one time
  3. USD 10 per app
  4. USD 99 per year

Answer: D) USD 99 per year

Explanation: Apple charges USD 99 per year.

Discuss this question

35. Which is the HIGHEST layer of the iOS architecture?

  1. Core Services
  2. Media
  3. Core OS
  4. Cocoa Touch

Answer: D) Cocoa Touch

Explanation: Cocoa Touch is the top layer that apps interact with most.

Discuss this question

36. In SwiftUI, which container arranges views vertically?

  1. List only
  2. HStack
  3. VStack
  4. ZStack

Answer: C) VStack

Explanation: VStack stacks child views vertically.

Discuss this question

37. The iOS kernel is called:

  1. Windows NT
  2. XNU (part of Darwin)
  3. Linux
  4. Mach-Linux

Answer: B) XNU (part of Darwin)

Explanation: XNU, a hybrid of Mach and BSD, is the kernel of Darwin used by iOS and macOS.

Discuss this question

38. Which SwiftUI property wrapper stores local mutable state of a view?

  1. @State
  2. @IBOutlet
  3. @main
  4. @objc

Answer: A) @State

Explanation: @State holds view-local state; changing it re-renders the view.

Discuss this question

39. Apple's OS for the Vision Pro headset is:

  1. XROS-Android
  2. visionOS
  3. watchOS
  4. tvOS

Answer: B) visionOS

Explanation: visionOS runs on Apple Vision Pro.

Discuss this question

40. Xcode runs on:

  1. macOS only
  2. Android
  3. Windows
  4. Linux

Answer: A) macOS only

Explanation: Xcode is available only for macOS.

Discuss this question

41. Which UIViewController method is called once after the view is loaded into memory?

  1. viewDidLoad()
  2. viewWillAppear()
  3. viewDidDisappear()
  4. deinit

Answer: A) viewDidLoad()

Explanation: viewDidLoad is the usual place to set up the UI, like Android's onCreate.

Discuss this question

42. How many main layers are in the classic iOS architecture?

  1. Two
  2. Four
  3. Five
  4. Three

Answer: B) Four

Explanation: Core OS, Core Services, Media and Cocoa Touch.

Discuss this question

43. The iOS app package uploaded to the store is a/an:

  1. IPA
  2. DEX
  3. AAB
  4. APK

Answer: A) IPA

Explanation: iOS apps are packaged as IPA files.

Discuss this question

44. Which Xcode tool profiles memory, CPU and energy usage?

  1. Simulator
  2. Instruments
  3. Interface Builder
  4. TestFlight

Answer: B) Instruments

Explanation: Instruments is Xcode's performance profiling tool.

Discuss this question

45. Which iOS framework is used to show maps inside an app?

  1. MapKit
  2. Core Image
  3. Accelerate
  4. PhotoKit

Answer: A) MapKit

Explanation: MapKit embeds maps and annotations.

Discuss this question

46. In UIKit, each screen is usually managed by a:

  1. UIWindowDelegate
  2. NSManagedObject
  3. UIViewController
  4. UIApplication

Answer: C) UIViewController

Explanation: A view controller manages one screen's views and events.

Discuss this question

47. Swift Package Manager and CocoaPods are used to:

  1. Add third-party libraries (dependencies)
  2. Encrypt the IPA
  3. Design icons
  4. Test on Android

Answer: A) Add third-party libraries (dependencies)

Explanation: They are dependency managers for iOS projects.

Discuss this question

Previous Page 2 of 2

Practise iOS: Architecture and Framework MCQs

More Computer Science chapters