Undeclared identifier __bridge on xcode

前端 未结 1 1433

I am trying to convert a CFUUIDRef to a NSString *.

Before, I used the following code, and worked fine.

CFStringRef str = CFUUIDCreateString(NULL, _u         


        
相关标签:
1条回答
  • 2020-12-06 02:43

    __bridge is only defined with ARC (Automatic Reference Counting) enabled. It is used to "transfer objects in and out of ARC control". (Source)

    To turn on ARC, go to your build settings and set Objective-C Automatic Reference Counting to Yes.

    Or, if you do not want to use ARC, simply remove __bridge and it should work fine.

    0 讨论(0)
提交回复
热议问题