Posts

Post not yet marked as solved
3 Replies
4.1k Views
Hi there!Is it thinkable, that in an iOS App the AppDelagate can be nil?Suppose we have an view controller that needs a reference to the AppDelegate and tests the existence of the delagate like this:... guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else { fatalError("no Application Delegate found") } ...I'm not sure about that, but when no delegate exists it is not possible to reach code in any view controller or framework or whatsoever because the App should crash before any other part of the App can be executed. Therefore the test above is unnecessary.Question: Is that right?Regards!
Posted
by strike.
Last updated
.