Загрузка...

Fix Your UIKit App's BIGGEST Testing Problem Now

Initialize unit testing in Swift the RIGHT way. Learn how to 10x your UIKit tests through better isolation and dependency management.

Watch This Next: https://www.youtube.com/playlist?list=PLYJtyUqeFiHQDNhjBi1S7pFXcfUDs2GGd

Video Links
UIApplicationMain:
https://developer.apple.com/documentation/uikit/uiapplicationmain(_:_:_:_:)-1yub7

UIApplicationDelegate:
https://developer.apple.com/documentation/uikit/uiapplicationdelegate

Code:

/// Main File:
import UIKit

let appDelegateClass: AnyClass = NSClassFromString("TestAppDelegate") ?? AppDelegate.self

UIApplicationMain(
CommandLine.argc,
CommandLine.unsafeArgv,
nil,
NSStringFromClass(appDelegateClass)
)

/// New Test ApplicationDelegate
import UIKit

@objc(TestAppDelegate)
class TestAppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) → Bool {
print("~", "Test App Delegate")
return true
}
}
Connect with me!
X: https://x.com/StemFoxIO

Question - Have you ever setup a testing app delegate? Answer in the comments!

Want to learn more? Here are some sources I've learned from. Plus, some purchases help the channel (Affiliate Links).

I love Big Mountain Studio's books. Detailed and image oriented. Check them out here https://www.bigmountainstudio.com/a/yqq9g
⏰ Timecodes ⏰
Inset timecodes here:
00:00 - Intro
00:17 - UIApplicationDelegate
03:00 - Testing App Delegate
04:15 - Setting Up main
05:39 - Outro

#swift, #ios #development, #software, #swiftui, #UIKit
(Insert hashtags for your channel/video here)

About:
StemFoxIO posts videos to help you become a better, more efficient iOS developer.

Видео Fix Your UIKit App's BIGGEST Testing Problem Now канала StemFoxIO
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять