If you look inside the NSNetServices
header, you will see the following listing that explains each error:
typedef NS_ENUM(NSInteger, NSNetServicesError) { NSNetServicesUnknownError = -72000L, NSNetServicesCollisionError = -72001L, NSNetServicesNotFoundError = -72002L, NSNetServicesActivityInProgress = -72003L, NSNetServicesBadArgumentError = -72004L, NSNetServicesCancelledError = -72005L, NSNetServicesInvalidError = -72006L, NSNetServicesTimeoutError = -72007L, };
You get a collision error with a service, which means that a network service with the same domain, type and name is already publishing its service on your network.
In general, I always refer to the header file for error codes. They are almost always assigned the value of an enumeration, and an enumeration usually has a much more descriptive name than the number used.
source share