cast of Objective-C pointer type 'NSString *' to C pointer type 'CFStringRef' (aka 'const struct __CFString *') requires a bridged cast

后端 未结 3 626
慢半拍i
慢半拍i 2020-12-07 22:55

When converting an Objective-C program to a Objective-C ARC, I get the error:

\"cast of Objective-C pointer type \'NSString *\' to C pointer type \'CFStringR         


        
3条回答
  •  -上瘾入骨i
    2020-12-07 23:10

    Here is a nice ARC tutorial that I found to be easier to understand than Apple's documentation that @jtbandes references.

    Take a look at the section titled "Toll free bridging" in particular.

提交回复
热议问题