Check out example codes for "how to get appdelegate object in swift". It will help you in understanding the concepts better.

Code Example 1

let appDelegate = UIApplication.shared.delegate as! AppDelegate
let aVariable = appDelegate.someVariable

Learn ReactJs, React Native from akashmittal.com