I'm wondering whats wrong with my code at this point. After trying a lot I figured out how to pass a UIAlert over...kind of.. But I get errors. Another pair of eyes would be great for some advice. Source code would be great. Thanks in advance code is below. I just put the part of the code that I need to transfer over. I haven't finished writing the the "didfinishRecievingResource"; because I got stuck at this point. If this is not possible can you let me know that way I can take a different route. Again thank you for even looking at this . I am also using xcode 8. THANKS MULTIPEER CONNECTION
func session(_ session: MCSession, didStartReceivingResourceWithName resourceName: String, fromPeer peerID: MCPeerID, with progress: Progress) {
self.newAlert(title: "HI", message: "Player 1 !")
func newAlert (title: String, message:String)
{
let alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction(title: output.text, style: UIAlertActionStyle.default, handler: { (action) in
}))
self.present(alert,animated: true, completion:nil)
}
}
}