Think about what ARC does and what __bridge cast does: ARC takes responsibility for maintaining / releasing NSObjects. The __bridge transfer transfers this responsibility. For example, __bridge_retained saves an NSString, discards a pointer to CFStringRef, and is responsible for performing the corresponding release operation on those using CFStringRef.
This cannot work with a pointer to NSObject * or a pointer to a base ref. A pointer points to a memory location. Any NSObject * or Core Foundation objects can be stored there.
You need two variables: one for NSInputStream * and one for CFReadStreamRef. Use the appropriate bridge to move NSInputStream * to CFReadStreamRef. Now you have what you want and can pass the address.
source share