didBeginContact passed PKPhyicsObject
I have a helper method which extends SKPhysicsContact extension SKPhysicsContact { /// - returns: `[SKPhysicsBody]` containing all the bodies that match `mask` func bodiesMatchingCategory(mask: UInt32) -> [SKPhysicsBody] { let bodies = [bodyA, bodyB] return bodies.filter { ($0.categoryBitMask & mask) != 0 } } } in didBeginContact() I call this method on the passed in contact . func didBeginContact(contact: SKPhysicsContact) { let ballMask: UInt32 = 0x1 << 2 let ball = contact.bodiesMatchingCategory(ballMask) ... I get this error message sometimes (like 1 in 5) which crashes the app: -