Provide a way to override `alternativeAdvertisingNameEnabled`
townofdon opened this issue · comments
Hello!
Awesome lib. I have a quick question:
The library IOS-Pods-DFU-Library
has this option to turn off alternativeAdvertisingNameEnabled
:
Would it be possible to add this as an option when calling NordicDFU.startDFU
?
If I'm reading this correctly, it would be easy enough to set the instantiated DFUServiceInitiator
class properties here?
I'm curious if the following would work? If so I'll submit a PR:
RCT_EXPORT_METHOD(startDFU:(NSString *)deviceAddress
deviceName:(NSString *)deviceName
filePath:(NSString *)filePath
resolver:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)reject
// new param:
alternativeAdvertisingNameEnabled:(BOOL *)alternativeAdvertisingNameEnabled)
{
...
initiator.alternativeAdvertisingNameEnabled = alternativeAdvertisingNameEnabled
...
}
Forgive me if any of my syntax is off - I'm new to Objective C. :)
Submitted PR: #91
#91 merged -> available in v3.1.0 release