Kindly bear if it is a very basic question. I tried to convert CFStringRef to NSString using __bridge, as i have enabled ARC.
mydevUUIDString = CFUUIDCreateString(NULL, peripheral.UUID);
NSString *temp = (__bridge NSString *) devUUIDString;
I’m still getting the following error:
Incompatible type casting 'CFStringRef' (aka 'const struct __CFString **) to 'NSString' with _bridge cast.
Kindly advice, how to resolve this issue.
I think the problem is that when you create
mydevUUIDString, you create it as a pointer to a CFStringRef. For example, when I enter the following code, Xcode gives me no errors:However, when I enter this code (which is most likely what you’ve done):
I get the same error you get: