⌘K

DevKit (iOS)

Nativeblocks provides hot-reloading and logging tools for developers

Devkit is a powerful debugging and logging and hot-reloading utility for Android applications.

Get started

Make sure that your project meets these requirements:

  • Uses Swift 5.0 or higher
  • Uses SwiftUI for UI development
  • Use iOS 15.0 or above
  • Initialized Nativeblocks Core SDK

Add DevKit to your project by updating your Package.swift:

.package(url: "https://github.com/nativeblocks/nativeblocks-wandkit-ios-sdk", from: "1.1.0")

Let's get started by initializing the SDK, it can be inside the init block or provide via dependency injection, but make sure DevKit calls after the Nativeblocks initialize

Add Required Permissions

Add the following keys to your Info.plist:

  • Notifications: NSUserNotificationUsageDescription

Provide appropriate descriptions for these permissions to explain why they are required.

let devKit = DevKit.Builder()
    .keepScreenOn()
    .autoConnect()
    .enableLogging()
    .build()

NativeblocksManager.getInstance().wandkit(devkit)

Here is how to integrate DevKit in a SwiftUI app:

import SwiftUI
import Nativeblocks
import NativeblocksWandkit

@main
struct SampleApp: App {

    init() {
        NativeblocksManager.initialize(
            ...
        )

        #if DEBUG
        let devKit = DevKit.Builder()
            .keepScreenOn()
            .autoConnect()
            .enableLogging()
            .build()
        NativeblocksManager.getInstance().wandKit(devkit)
        #endif
    }

    ...
}