[ad_1]
I’m writing unit exams for a category in a Swift Package deal to be used with iOS. The category being examined (BleCommunicator) makes use of Bluetooth however the check in query doesn’t. I can not run the check as a result of I get the error under as the category underneath check is instantiated:
“State restoration of CBCentralManager is barely allowed for functions which have specified the “bluetooth-central” background mode (NSInternalInconsistencyException)”
The answer for an app can be so as to add the bluetooth-central entry into the Information.plist file. How can this be dealt with for a Swift Package deal?
Thanks upfront for the assistance!
class BleCommunicatorTests: XCTestCase {
var sut: BleCommunicator!
override func setUpWithError() throws {
attempt tremendous.setUpWithError()
sut = BleCommunicator()
}
func test_WhenSavingSomething_AFileShallBeCreated() {
...
}
[ad_2]
