You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I implement startDFU function and faulty Call to getCentralManager returned nil
RNFetchBlob.config({// response data will be saved to this path if it has access right.path: dirs.DocumentDir+'/FirmwareBLE.zip',fileCache: true,}).fetch('GET','http://localhost/uploads/SdoorMasterV1001_009.zip',{//some headers ..}).then((res)=>{// the path should be dirs.DocumentDir + 'path-to-file.anything'console.log('The file saved to ',res.path());NordicDFU.startDFU({//deviceAddress: remote.macBleHex,deviceAddress: "6E400001-B5A3-F393-E0A9-E50E24DCCA9E",deviceName : "423423423",filePath: res.path(),}).then(res=>console.log('Transfer done:',res)).catch(console.log);});},2000);
I have added the code to the xcode in the function didFinishLaunchingWithOptions(AppDelegate.m)
[RNNordicDfu setCentralManagerGetter:^() {
return [BleManager getCentralManager];
}];
// Reset manager delegate since the Nordic DFU lib "steals" control over it
[RNNordicDfu setOnDFUComplete:^() {
NSLog(@"onDFUComplete");
CBCentralManager * manager = [BleManager getCentralManager];
manager.delegate = [BleManager getInstance];
}];
[RNNordicDfu setOnDFUError:^() {
NSLog(@"onDFUError");
CBCentralManager * manager = [BleManager getCentralManager];
manager.delegate = [BleManager getInstance];
}];
I implement startDFU function and faulty Call to getCentralManager returned nil
I have added the code to the xcode in the function didFinishLaunchingWithOptions(AppDelegate.m)
Package.json with me
thanks you !
The text was updated successfully, but these errors were encountered: