Warning incompatible type 'id<NSNetServiceDelegate>'


#1

Hi
I’m seeing this warning using iOS4. It still works but I don’t like warnings. What am I missing?

Code

// As the delegate, you will know if the publish is successful
[netService setDelegate:self];

#2

In iOS 4.0, they moved many of the informal delegate protocols to formal protocols. NSNetServiceDelegate, prior to 4.0, was such an informal protocol. Now that there is a protocol, you can add NSNetServiceDelegate to the protocol list in the header file of this class.