50ButtonsEach / fliclib-ios

The fliclib framework for iOS
35 stars 5 forks source link

Button connected but no messages received #38

Open arlomedia opened 4 years ago

arlomedia commented 4 years ago

I have a couple users with a first-generation Flic button who are reporting that my app receives no messages from the buttons. Here's what I know:

This works fine with my Flic button, on an iPhone or iPad with iOS 13.3. Both these users have iOS 13.3. One user says that he has a different device with iOS 12 and the button works as expected there.

I did find a problem where I was checking for an error in didGrabFlicButton and returning, and setting button.triggerBehavior after that. So a button that was already known to the device, but which somehow forgot its triggerBehavior setting, would trigger didReceiveButtonClick and didReceiveButtonHold but not didReceiveButtonDoubleClick. Is there a default triggerBehavior setting that would cause it to not trigger any of these methods?

Otherwise, is there anything else I can check to find out what's wrong? (I don't have access to the devices to debug with.)

arlomedia commented 4 years ago

Based on this documentation, it doesn't look like a bad triggerBehavior setting could be the problem: https://partners.flic.io/partners/developers/documentation/ios/Constants/SCLFlicButtonTriggerBehavior.html

Sm038229 commented 4 years ago

I've more than one paired Flic buttons in my app. I left my app in background(not killed) for 4-5 hours and then I click single/double even more than one time on Flic 1.0 button then it shows me red light in it means it shows disconnected in device bluetooth settings as well as after opening the App in foreground. It shows me red light in Foreground also. It happens every time. If I restart device bluetooth, it continues working means shows connected in device bluetooth settings.

It is missing "Single Click", "Double Click" and "Press and Hold" triggers. So my working is stopping on this situation. Please have a look on it. I'm working on iOS 13.x.

Please give me a stable solution for it if possible.