/EngineeringMode

Engineering Mode is a customizable view to manage UserDefaults, Notifications, Network etc. in your iOS app!

Primary LanguageSwift

🛠️ Engineering Mode

EngineeringMode is a highly customizable iOS package to make debugging common things like Notifications, UserDefaults, Permissions and Networking easier.

Usage

EngineeringMode can be added to any SwiftUI view easily. Typically, it's used with a Sheet.

Basic usage with a sheet

import EngineeringMode

//...

.sheet(isPresented: $showingEngineeringModeSheet) {
  EngineeringMode()
}

Custom Views

To add a custom view to the existing Engineering Mode screen, just pass in customViews and customViewTitles. Optionally, if you want Custom Views to show before the other views, then add showCustomViewsFirst.

EngineeringMode(
  customViews: [AnyView],
  customViewTitles: [String],
  showCustomViewsFirst: Bool
)

⚠️ Important:

  • customViews takes in an AnyView - please cast it to that.
  • customViews and customViewTitles should have the same number of array elements! Each custom view should have a title, otherwise the app will crash.

Example

EngineeringMode(
  customViews: [AnyView(MyCustomView())],
  customViewTitles: ["Test"],
  showCustomViewsFirst: true
)