VNAPNIC / flutter_nearby_connections

Flutter plugin support peer-to-peer connectivity and the discovery of nearby devices for Android vs IOS
https://pub.dev/packages/flutter_nearby_connections
BSD 2-Clause "Simplified" License
106 stars 68 forks source link

Fixed found devices sometimes never appearing on the Dart side under iOS #55

Open TuongNM opened 6 months ago

TuongNM commented 6 months ago

Hi,

when we added another plugin into our project (https://github.com/itsMatoosh/geofencing-awesome) the nearby service stopped working under iOS. We are not sure what the exact issue is but the List of found devices never seemed to get sent to the Dart side.

What we did notice was that whenever a peer was lost on iOS the List of devices was suddenly updated. Therefore, we added the deviceDidChangeState Notification that is also posted when the device disconnects when a peer is lost.

We didn't know what else to do and also didn't really understand the issue with the 2 plugins running in parallel but this fixed the issue for us.