implicit conversion of an Objective-C pointer to 'void *' is disallowed with ARC

Ali picture Ali · Jul 29, 2011 · Viewed 21.1k times · Source

What does this mean and what alternative do I have?

implicit conversion of an Objective-C pointer to 'void *' is disallowed with ARC

I am porting an Xcode3 project to iOS5 which uses AudioSessionInitialize like this

AudioSessionInitialize(NULL, NULL, NULL, self);

where self here is a ViewController.

Answer

Kazuki Sakamoto picture Kazuki Sakamoto · Aug 23, 2011

You should use __bridge cast for it.

AudioSessionInitialize(NULL, NULL, NULL, (__bridge void *)self);