Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1.89 KB

File metadata and controls

42 lines (31 loc) · 1.89 KB

Installing with Cocoapods

SimulatorStatusMagic is available through CocoaPods. To install, simply add the following line to your Podfile:

pod 'SimulatorStatusMagic', :configurations => ['Debug']

Installing with Carthage

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.

  1. Add SimulatorStatusMagic to your Cartfile:
github "shinydevelopment/SimulatorStatusMagic"
  1. Run carthage update SimulatorStatusMagic --platform iOS
  2. Add the framework file directly from Carthage/Build/iOS/ to Linked Frameworks and Libraries, NOT Embedded Libraries. Ensure that the file is reference at this location so that future carthage update builds will be embedded correctly.

Linked Frameworks and Libraries

  1. Add the embed-debug-only-framework.sh script found here and discussed here.

Embed run script phase

  1. Add code referencing SimulatorStatusMagiciOS inside #if canImport ... #endif blocks in your AppDelegate:
#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
  }
}
  1. Run your app in DEBUG to see the status bar changes in effect.