Thomas K
Thomas K

Reputation: 6196

Variable is not a CFString

Somehow the code below crashes my app:

NSString *filename = [NSString stringWithFormat:@"%@%@", dbPath, @"BAR"];
NSString *dbS = [NSString stringWithFormat:@"%@%@", "@", filename];

I've set a breakpoint at the dbS string and see that it says "variable is not A CFString." First I thought it had to do with the at-symbol, however removing it does not help.

Anyone got a clue what's going on?

Thanks!

P.s. dbPath is defined in my header file --> #define dbPath @"FOO"

Upvotes: 0

Views: 1244

Answers (1)

VenoMKO
VenoMKO

Reputation: 3294

Second string should look like this:

NSString *dbS = [NSString stringWithFormat:@"@%@", filename];

Upvotes: 1

Related Questions