I am currently getting an API misuse error when scanning - I know exactly why this happens because I need to wait to verify that the state of the central manager is powered on.
My question comes from when my application is terminated by the system to free up memory. I imitate this by running a SIGKILL command on my app, but I am getting the API Misuse error as I try to queue up a scan for the future.
What should I be doing? I don't want to set up a pending connect command either as that will drain the battery of my peripheral too quickly. I want it to scan and then connect if the user agrees (which I have set up using notifications).
Thanks.