Skip to content

React native 0.80 support #29

@niklavsBariss

Description

@niklavsBariss

AppDelegate has been migrated to .swift which means the README has to be updated:

Import has to be placed in project-Bridging-Header.h

  #import "RNNordicDfu.h"

Then in AppDelegate.swift we don't need to import RNNordicDfu and can just:

import CoreBluetooth
...

  func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
  ) -> Bool {
    ...
    ...
    RNNordicDfu.setCentralManagerGetter {
      return CBCentralManager(delegate: nil, queue: DispatchQueue.global(qos: .background))
    }
    
    // Reset manager delegate since the Nordic DFU lib "steals" control over it
    RNNordicDfu.setOnDFUComplete {
      NSLog("onDFUComplete")
    }
    
    RNNordicDfu.setOnDFUError {
      NSLog("onDFUError")
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions