Convert/cast CFReadStreamRef to NSInputStream (iOS5)
问题 I am trying to port my app to iOS5. I am using a TCP connection to a server via CFSockets. My problem now is the conversion (cast) from CFReadStreamRef to NSInputStream (same with write). With iOS4 I could use the toll-free bridging, but with automatic reference counting of iOS5 this isn't possible anymore. This is what I get: error: Automatic Reference Counting Issue: Cast to 'NSInputStream *' of a non-Objective-C to an Objective-C pointer is disallowed with Automatic Reference Counting Code