SimulatorStatusMagic is available through CocoaPods. To install, simply add the following line to your Podfile:
pod 'SimulatorStatusMagic', :configurations => ['Debug']SimlatorStatusMagic is also available through Carthage. Carthage will not make any modifications to your project, so installation is more involved than with CocoaPods. This describes a way of adding SimulatorStatusMagic so that it is only imported for DEBUG build configurations.
- Add
SimulatorStatusMagicto yourCartfile:
github "shinydevelopment/SimulatorStatusMagic"
- Run
carthage update SimulatorStatusMagic --platform iOS - Add the framework file directly from
Carthage/Build/iOS/toLinked Frameworks and Libraries, NOT Embedded Libraries. Ensure that the file is reference at this location so that futurecarthage updatebuilds will be embedded correctly.
- Add code referencing
SimulatorStatusMagiciOSinside#if canImport ... #endifblocks in yourAppDelegate:
#if DEBUG
import SimulatorStatusMagiciOS
#endif
@UIApplicationMain
final class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions options: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool {
#if DEBUG
SDStatusBarManager.sharedInstance()?.enableOverrides()
#endif
}
}- Run your app in
DEBUGto see the status bar changes in effect.

