0
votes

I got this issue: Implicit conversion of an Objective-C pointer to 'const char *' is disallowed with ARC. Which way do I need to use to coreect this problem?

1
Post your code to see exactly what you are doing. However check my answer.Pochi
is your variable of type NSString*, not const char *?nielsbot

1 Answers

3
votes

Can't tell without looking at the code but here are my guesses:

If you are passing an NSString you have to put

NSString *someStringUTF = @"something";
NSString *someString = [NSString stringWithUTF8String:someStringUTF.UTF8String];

If you are passing a core object (Most of the raw objects that start with CF) you have to bridge it by either giving ownership or keeping it.

(__bridge_transfer NSString*)yourFoundationObject