Make connectivitity be similar to Apple's example
Fix compile issues in Xcode 6.1