Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving didModifyServices message for Peripheral #94

Open
michael-martinez opened this issue May 14, 2021 · 1 comment
Open

Receiving didModifyServices message for Peripheral #94

michael-martinez opened this issue May 14, 2021 · 1 comment

Comments

@michael-martinez
Copy link

michael-martinez commented May 14, 2021

When the distant device application gets killed, I would like to disconnect properly from my side, I am receiving only one log from the library internals:
./Pods/BlueCapKit/BlueCapKit/Central/Peripheral.swift:peripheral(_:didModifyServices:):332

As it is not forwarded anywhere, and the Peripheral registers as the CBDelegate, I cannot handle the notification from my side.
Do I have to modify the source code to forward that message or am I missing something?

Thanks for your support,

@michael-martinez
Copy link
Author

The solution I found is to manually poll on the peripheral services property after being connected:

Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { _ in
print("Is notifying ? (self.connectedPeripheral!.services.first!.characteristics[0].isNotifying)")
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant