Reputation: 428
I m trying to work on WCSession default instance. But it gives the following complier issue.
Defination of default Instance
Upvotes: 0
Views: 98
Reputation: 610
Try this:
var session : WCSession!
func startSession() {
if WCSession.isSupported() {
session = WCSession.default()
session.delegate = self
session.activate()
}
}
Call startSession() wherever you want to activate your WCSession. Preferably in AppDelegate and ExtensionDelegate.
Upvotes: 0