I'm trying to convert a project to iOS 10 (using Xcode 8 Beta 6) which includes MultipeerConnectivity. Unfortunately, I'm immediately hitting a wall because as soon as I include MCNearbyServiceAdvertiserDelegate, I will continuously get an error that "ViewController does not conform to protocol MCNearbyServiceAdvertiserDelegate". It has only one required method, which I include (see the code below) but that doesn't seem to be recognized. And if I use the Fix command that Xcode prompts me with, it will just repeatedly put this method in - and then still tell me my class doesn't conform. (Swift 3 code symantics aside, this approach works fine in iOS 9 and Xcode 7.3.1)
import UIKit
import MultipeerConnectivity
class ViewController: UIViewController, MCNearbyServiceAdvertiserDelegate {
func advertiser(_ advertiser: MCNearbyServiceAdvertiser, didReceiveInvitationFromPeer peerID: MCPeerID, withContext context: Data?, invitationHandler: (Bool, MCSession?) -> Void) {
// should work
}
}Is there some new part of Swift 3.0 or iOS 10 that I'm missing? Am I missing something else that's obvious? Or is this a legitamate bug in Xcode?