It would be helpful to know what action triggers startSync:
but in setUpPP
you are assigning a meaningless instance of MCPeerID
(with no displayName
) to self.SSid
so I could see that crash happening if startSync:
is ever called before self.SSid
gets a real MCPeerID
assigned to it.
My suggestion would be to start out with self.SSid
as nil, and make sure that you are not sending invitations unless that property has a value. Going further I wouldn't rely on a single property to store an MCPeerID
that could have it's value changed before startSync:
is called.