{"action":"closed","issue":{"url":"https://api.github.com/repos/don/cordova-plugin-ble-central/issues/264","repository_url":"https://api.github.com/repos/don/cordova-plugin-ble-central","labels_url":"https://api.github.com/repos/don/cordova-plugin-ble-central/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/don/cordova-plugin-ble-central/issues/264/comments","events_url":"https://api.github.com/repos/don/cordova-plugin-ble-central/issues/264/events","html_url":"https://github.com/don/cordova-plugin-ble-central/issues/264","id":161452719,"number":264,"title":"connectFailure callback not being triggered on iOS devices","user":{"login":"kerrynh","id":14784633,"avatar_url":"https://avatars.githubusercontent.com/u/14784633?v=3","gravatar_id":"","url":"https://api.github.com/users/kerrynh","html_url":"https://github.com/kerrynh","followers_url":"https://api.github.com/users/kerrynh/followers","following_url":"https://api.github.com/users/kerrynh/following{/other_user}","gists_url":"https://api.github.com/users/kerrynh/gists{/gist_id}","starred_url":"https://api.github.com/users/kerrynh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kerrynh/subscriptions","organizations_url":"https://api.github.com/users/kerrynh/orgs","repos_url":"https://api.github.com/users/kerrynh/repos","events_url":"https://api.github.com/users/kerrynh/events{/privacy}","received_events_url":"https://api.github.com/users/kerrynh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-06-21T14:31:55Z","updated_at":"2016-08-18T23:55:00Z","closed_at":"2016-08-18T23:55:00Z","body":"Hi Don :-)\r\n\r\nI'm having some issues with the failure callback on iOS for the following call:\r\n\r\n`ble.connect(device_id, connectSuccess, connectFailure);`\r\n\r\nAccording to the docs, \r\n\r\n> \"Failure is called if the connection fails, or later if the peripheral disconnects.\"\r\n\r\nIf I switch my peripheral off, the connectFailure callback triggers correctly for both Android and iOS. If however, I turn my Bluetooth on the device off, or switch to Airplane mode (which obviously switches the Bluetooth off), the callback is only triggered correctly on Android, NOT iOS.\r\n\r\nI have tested this on a few different iOS devices - my dev iPhone is running iOS 8.3 and the other iPhones and iPads were all running various versions of iOS 9. It's the same across the board.\r\n\r\nI'm currently running Cordova 5.4.1 and the plugin version is the latest, 1.1.1. In an attempt to solve the issue, I tried reverting to previous plugin versions (down to about 1.0.1) and Cordova version (to 5.1.1), and combinations of that - I thought this was working a few months back....  Still no luck on triggering the callback on iOS. If it was working, I have no idea how or when it broke! Or if I was just thinking of Android...\r\n\r\nI'm not sure if it's relevant, but I'm using IntelXDK 3400 to build my app for Android and iOS...\r\n\r\nDo you perhaps have any ideas as to how to solve this? I'm contemplating running a `ble.isConnected` check on a timer (every 5 seconds or so), but I'm hoping you have a more elegant suggestion!\r\n\r\nThanks in advance :-) You've helped so many of us with this creating and maintaining this plugin...\r\n\r\n"}}
{"actor":{"display_login":"don"}}