If you come from the Objective-C world, you’re probably familiar with the singleton pattern. @implementation MyClass + (id)sharedInstance { static MyClass *__instance = nil…