I had this implementation with Swift 2.0 and the Xcode suggestion is not only baffling but causes compilation error as well. it\'s a library where users are passing callfunc
Another way, for me which is good enough using init private
final class SingletonClass {
// reachable from other classes
static let sharedInstance: SingletonClass = SingletonClass()
// properties
var stringArray : [String] = []
// not reachable from other classes
private init() { }
}