-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS: plugin unusable after putting device to sleep, then waking #38
Comments
Would the goal use case be disconnecting when the app is paused and reconnecting on resume? I see there's a disconnect method that isn't currently exposed in the javascript layer. Or, should the connection continue seamlessly? |
Good question. There are uses for both types of behavior. I think in the short term probably the pausing/reconnecting is probably going to be the way to go. Keeping the connection alive will probably be fairly complex across the platforms. The plugin should probably throw a disconnected error of some sort now and then the app would naturally try to reconnect when it resumed and had a chance to handle it. This way if in the future the plugin did support more persistent connections applications might not need to change, they just wouldn't get the error. |
Cordova would have Reacting to those automatically in the plugin might not always be the wanted behavior, because at least according to the docs, I think easiest option to implement (and maybe also easy-enough for plugin users) would be what is described in above comment so that plugin fires an error event if connection drops and the app can connect again. |
Steps to reproduce:
Observe crash
When returning to the AllJoyn app (step 3), these messages
are being constantly printed in the Xcode console.
When the crash occurs (on attempting to use plugin, step 4), the error that appears in the Xcode console is dependent upon the action performed:
(Attempted to create a channel in the chat app)
(Attempted to call a method which could be successfully called prior to pushing power button)
while Xcode shows the crash at the same point:
The text was updated successfully, but these errors were encountered: