I\'m working through a Core Data exercise from a book and it starts out creating a helper class which is a singleton. I understand that global variables can be created outside
A private global variable in Swift is a global that is only accessible from the file in which it is declared.
The book you are using isn't following current best-practice as far as creating singletons in Swift (perhaps it is a little out-dated?).
There is no need for the private global variable. You can just say:
class CDHelper: NSObject {
// MARK: - SHARED INSTANCE
static let shared = CDHelper()
}