jdiehl / async-network

Cocoa and iOS Socket Networking Evolved
http://jdiehl.github.com/async-network
MIT License
91 stars 31 forks source link

Bluetooth does not work after upgrading to iOS 8 #11

Open willSapgreen opened 9 years ago

willSapgreen commented 9 years ago

To whom it may concern, After upgrading to iOS 8, the device cannot find each other. But if connecting with WiFi, the device can. Do you have this issue? Thank you.

jdiehl commented 9 years ago

Sorry for the late answer. Is this still an issue or did you resolve this somehow?

willSapgreen commented 8 years ago

Hello jdiehl, can you reopen this issue? Because I still cannot make two device connect through Bluetooth in iOS9.1. And I am still digging in the root cause. Thank you.

vjjjv commented 8 years ago

For me this reproduced on iOS10 also. The solution was to enable ipv6 for AsyncServer and AsyncConnection like this:

    // set up listening socket
    _listenSocket = [[GCDAsyncSocket alloc] initWithDelegate:self delegateQueue:AsyncNetworkDispatchQueue()];
    [self.listenSocket setIPv6Enabled:YES];

This thread discusses the similar issue and gives evidence that this really might be the correct solution: https://forums.developer.apple.com/thread/62306

jdiehl commented 8 years ago

Does this patch resolve the issue?

vjjjv commented 8 years ago

Yes, that works for us on iOS9 and iOS10 at least.

chiahsien commented 7 years ago

@jdiehl Could you update to a new version and the CocoaPods spec for this?