Hello guys,
I have been trying to advertise in the background but I can’t seem to make it work.
In my case, I want if a device is acting as a peripheral and the app goes to the background it still can be discoverable and be able to write/read to/from it by the central.
I have added the background mode “Acts as a Bluetooth accessory”.
- When will willRestoreState be called?
- What should I do in willRestoreState?
- Will it always be discoverable or have some limitations?
- Should I stop advertising at any point?
- How should I clean up after the view is dismissed?
- Must the peripheral manager be initialized in the AppDelegate? and if so, will it always be advertising even if I don't want it to?
- What are the battery concerns?
Also, I have encountered an issue that my iPhone device can discover an Android device but not the opposite. What could be the problem of this?
Thank you.
Best regards