Arun Sharma
Arun Sharma

Reputation: 230

Error:Variable is not CFString

I am using sqlite database to save data from our xib. When I add first time then its added successfully but when i repeat that process then it shows run time exception and exit from program,and shows variable is not CFString.

Upvotes: 0

Views: 2723

Answers (1)

VonC
VonC

Reputation: 1323963

Hard to say without looking at the code, but if this thread is any indication:

I believe the issue is that the array enumeration is doing an implicit cast to the enumerator variable type (NSString *, in this case), but the object(s) in the array aren't actually NSString *. When the 'rangeOfString' method is called on the object, the exception is raised.

Even if your code doesn't include that specific problem, it is likely to have some conversion issue related with CFString.

Upvotes: 1

Related Questions