Рет қаралды 13,197
Learn how to become a senior iOS developer, crack the senior interview, and negotiate salary.
Get the Xcode project at github.com/mahi1995/top-stori...
Join the iOS Lead Essentials program iosleadessentials.com
Like and share this content with someone that you believe will benefit from it. See you in the next episode.
---
Update/Correction
At ~47min we replaced `@main` with `@UIApplicationMain`, but that wasn't needed. We only had to remove the UISceneSession life-cycle methods from the AppDelegate to make it work.
Background:
On iOS 12 and before, we managed app life-cycle events through the UIApplicationDelegate. On iOS 13, Apple introduced the new UISceneDelegate APIs to respond to life-cycle events occurring within a scene.
New Xcode projects already come configured with an AppDelegate and a SceneDelegate. However, a requirement of this interview challenge was for the app to support iOS 12 and above (and iOS 12 doesn't support UISceneDelegate).
On iOS 12 and before, we had only the UIApplicationDelegate. So the project had duplication in the AppDelegate and SceneDelegate to be able to support both iOS 12 and 13+.
Since this app doesn't require managing scenes, our goal was to remove the UISceneDelegate and use only the UIApplicationDelegate, which works with iOS 12 and iOS 13+. This way, the code works with all iOS versions without duplication or doing more work than needed.
To remove the UISceneDelegate setup, we need to (1) remove the `Application Scene Manifest` entry from the `Info.plist` and (2) remove the UISceneSession life-cycle methods from the AppDelegate. And that's it!
---
How to Build iOS Apps with Swift, TDD & Clean Architecture series↴
www.essentialdeveloper.com/pr...
Caio & Mike's Book Suggestions ↴
www.essentialdeveloper.com/bo...
---
Subscribe to our channel ↴
kzfaq.info...
You can also find us on ↴
Twitter ☛ / essentialdevcom
Facebook ☛ / essentialdeveloper
Instagram ☛ / essentialdeveloper
LinkedIn ☛ / essentialdeveloper
Caio ↴
Twitter ☛ / caiozullo
LinkedIn ☛ / caiozullo
Mike ↴
Twitter ☛ / mrmichael
LinkedIn ☛ / mapostolakis
Join the iOS Lead Essentials program ↴
iosleadessentials.com
Visit our website ↴
essentialdeveloper.com