Swift 4
In Info.plist
add this property
View controller-based status bar appearance to NO
and after that in AppDelegate
inside the didFinishLaunchingWithOptions
add these lines of code
UIApplication.shared.isStatusBarHidden = false
UIApplication.shared.statusBarStyle = .lightContent