App lifecycle and system interview questions
41 questions from real iOS interviews. Topics: App states, background modes, push, deep links, extensions, permissions.
- App lifecycle and systemShort answer
App states and transitions
A user is working in your app, takes a phone call, hangs up, goes out to the home screen, and comes back 30 minutes later. Which states does the app pass throu…
#app-state #lifecycle #background #suspended
- App lifecycle and systemMultiple choice
The Inactive state
Which situations put an app in the Inactive state? Pick all that apply.
#app-state #inactive #lifecycle
- App lifecycle and systemShort answer
What AppDelegate does
What kind of object is AppDelegate, and which events does it handle?
#appdelegate #uiapplicationdelegate #launch #lifecycle
- App lifecycle and systemMultiple choice
App entry point and UIApplicationMain
Which of these does the AppDelegate marked @main (or the UIApplicationMain call) do at launch? Pick all that apply.
#main #uiapplicationmain #launch #runloop
- App lifecycle and systemMultiple choice
Limits of the Simulator
Which of these can't be done, or can't be trusted, in the iOS Simulator? Pick all that apply.
#simulator #device-testing #xcode
- App lifecycle and systemMultiple choice삼성전자
Scene callback order on leaving and returning
In a scene-based (SceneDelegate) UIKit app, the user goes out to the home screen and comes back 30 seconds later, with the app never terminated. Which list put…
#app-state #scene-delegate #lifecycle-callbacks
- App lifecycle and systemShort answerBarclaysinterview report
View controller appearance lifecycle
In a UIKit screen, which pair of lifecycle methods would you add and remove a subscription in, like a NotificationCenter observer you only need while the scree…
#uikit #view-lifecycle #viewdidload #observer
- App lifecycle and systemShort answerPhoton Interactiveinterview report
Scene-based app lifecycle
In a scene-based iOS app, where would you put work like registering the push token, and where would you put work like saving screen state: AppDelegate or Scene…
#scene #app-lifecycle #appdelegate #swiftui
- App lifecycle and systemShort answer
Why SceneDelegate exists
A request comes in to open the same app in two windows on iPad. Why was SceneDelegate introduced?
#scenedelegate #uiscene #multi-window #ipad
- App lifecycle and systemMultiple choice
Callbacks in a scene-based app
In an iOS 13+ scene-based UIKit app (one that uses SceneDelegate), which callback runs when the app comes back from the background to the foreground?
#scenedelegate #appdelegate #lifecycle #callback
- App lifecycle and systemShort answer
Background execution limits
You get a report that a save to the server never lands when the user taps save and goes straight out to the home screen. How would you fix it?
#background #beginbackgroundtask #suspended #background-modes
- App lifecycle and systemShort answer
App bundle and App Thinning
The download size shown on the App Store is far smaller than your Xcode archive. How does App Thinning cut the size down?
#app-bundle #app-thinning #slicing #on-demand-resources
- App lifecycle and systemShort answer
Push notification flow
Can you walk me through the whole path a single remote push takes to reach a user's device? Cover it from the app, APNs, and server sides.
#push-notification #apns #device-token #fcm
- App lifecycle and systemMultiple choice
Foreground notification presentation
How do you make a local or remote notification banner show on screen while the app is in the foreground?
#local-notification #unusernotificationcenter #willpresent
- App lifecycle and systemShort answer
Deep links and Universal Links
Marketing is texting out product links and wants users with the app to land in the app and everyone else to land on the web. How would you set that up?
#deep-link #universal-link #url-scheme #associated-domains
- App lifecycle and systemMultiple choice
Notification authorization options
Which option do you request when you want notifications delivered silently into Notification Center, with no permission prompt, so the user can decide later wh…
#notification-permission #provisional #requestauthorization
- App lifecycle and systemShort answer
Low Power Mode and thermal state
How can an app find out that the user turned on Low Power Mode or that the device has gotten hot?
#low-power-mode #thermal-state #processinfo #battery
- App lifecycle and systemMultiple choice
UIBackgroundModes
What do you need in UIBackgroundModes in Info.plist for a silent push (content-available: 1) to wake the app in the background and fetch data?
#background-modes #remote-notification #info-plist #silent-push
- App lifecycle and systemMultiple choice삼성전자
The Background to Suspended transition
Which statements about the moment an app moves from Background to Suspended are correct? Pick all that apply.
#app-state #suspended #background-task #termination
- App lifecycle and systemShort answerSwiggy
Permission screen and authorization status
For a manager round assignment you built "a screen that explains our notification permission before the system prompt", and now you're taking questions on it. …
#push-notification #permission #unusernotificationcenter #delegate
- App lifecycle and systemMultiple choicePhonePe
Handling the APNs device token
Which statements about handling the device token in the remote push flow are correct? Pick all that apply.
#push-notification #apns #device-token #registerforremotenotifications
- App lifecycle and systemShort answerByteDance
NotificationCenter threads and observers
If you call NotificationCenter.default.post on a background thread, which thread does the observer code run on?
#notificationcenter #objective-c #threading #observer
- App lifecycle and systemShort answerAlibaba Group
App launch sequence
From the moment the app icon is tapped on the home screen until the first screen is drawn, what happens in order in the system and in the app, including the st…
#app-launch #dyld #objective-c #pre-main
- App lifecycle and systemShort answerShopee
Process states vs app states
How do the process states from an OS class (new, ready, running, waiting, terminated) map onto the iOS app states (Not Running, Inactive, Active, Background, S…
#app-state #process #suspended #jetsam
- App lifecycle and systemMultiple choiceWiprointerview report
APNs priority and headers
The server team asks how to set the QoS (priority) on the notifications they send through APNs. Pick all the correct statements.
#push-notification #apns #priority #apns-push-type
- App lifecycle and systemShort answerTencent
Leaving to the home screen
When the user goes out to the home screen (with the home button or a swipe), what happens in order in the system and in the app?
#app-state #snapshot #privacy #background
- App lifecycle and systemShort answer피에프씨테크놀로지스interview report
Hiding sensitive screens on background
A lending app has to keep account information out of the app switcher snapshot when it goes to the background. Which lifecycle callback do you put the cover sc…
#lifecycle #privacy #background #authentication
- App lifecycle and systemMultiple choice
How Universal Links work
Which statements about Universal Links are correct? Pick all that apply.
#universal-link #aasa #associated-domains
- App lifecycle and systemShort answer
Sandbox and sharing data between apps
Your main app, a widget, and a Share Extension all have to use the same login session and cache database. How would you share data between apps and extensions …
#sandbox #app-group #keychain-sharing #extension
- App lifecycle and systemShort answer
WidgetKit timelines and App Intents
You're getting complaints that the home screen widget doesn't change in real time. How does WidgetKit handle refreshes?
#widgetkit #timeline #app-intents #shortcuts
- App lifecycle and systemShort answer
BGTaskScheduler
A requirement comes in: "every night while the user sleeps, clear the cache and prefetch new content." How would you register recurring work like that on iOS?
#bgtaskscheduler #bgapprefreshtask #bgprocessingtask #background
- App lifecycle and systemMultiple choice
How BGAppRefreshTask behaves
Which statements about BGAppRefreshTask are correct? Pick all that apply.
#bgtaskscheduler #bgapprefreshtask #background
- App lifecycle and systemShort answer
Designing permission requests
The numbers say 60% of users refuse the camera permission. How would you design for a lower refusal rate while staying inside the review guidelines?
#permissions #privacy #info-plist #att
- App lifecycle and systemShort answer
Launch options and cold start routing
Tapping a push while the app is closed should take the user to that chat room, but sometimes it stops on the home screen or the room appears behind the login s…
#launch-options #connectionoptions #deep-link #push-tap
- App lifecycle and systemShort answer뱅크샐러드interview report
Native bridge for WKWebView
Most of the service is built in WKWebView, and you have to maintain the bridge the web side uses to call native features like biometrics and the camera. Which …
#wkwebview #javascript-bridge #deep-link #wkscriptmessagehandler
- App lifecycle and systemShort answer드림어스컴퍼니interview report
State restoration across devices
You support the same music playback screen on iPhone, iPad, and CarPlay. When the app has been terminated and a scene reconnects, what would you restore the pl…
#state-restoration #carplay #scene #multidevice
- App lifecycle and systemShort answer
Reliability of silent push
A chat app is built to wake up on a silent push (content-available) for each new message and sync ahead of time, but the data says more than half never arrive …
#silent-push #content-available #background #apns
- App lifecycle and systemShort answer
Termination and state restoration
Users complain that when they're writing a long post and step out to another app, what they were writing sometimes disappears. Why does that happen?
#termination #state-restoration #nsuseractivity #prewarming
- App lifecycle and systemShort answer
App Extension limits
A Share Extension that takes a large photo and uploads it to the server dies silently now and then. What's different about an App Extension from the main app t…
#app-extension #share-extension #memory-limit #process
- App lifecycle and systemMultiple choice
Notification Service Extension
Which statements about a Notification Service Extension (NSE) are correct? Pick all that apply.
#notification-service-extension #mutable-content #push #e2ee
- App lifecycle and systemShort answer42dotinterview report
Background BLE and digital car keys
You're building a digital car key app. When the user walks up to the car with the phone in a pocket (the app in the background), it has to unlock over BLE. Wha…
#core-bluetooth #background-mode #state-restoration #uwb