JC Castano
JC Castano

Reputation: 165

NSDATA description returning nil

NSData description returning nil and making the NSData object nil. My code has stopped working and I would like to get this working again.

If I compile my code in Xcode 10 it will get the NSData description fine. But if I use Xcode 11 it will give me nil as the description and it will make the NSData nil as well. I'm confused as to how this is happening. Is this because it's still a beta release? Is this kind of thing normal in beta releases? I just want to make sure my code still works before the new iOS 13 an iPAD OS 13 come out.

NSString *result = [[data description] stringByReplacingOccurrencesOfString:@" " withString:@""];

Upvotes: 0

Views: 501

Answers (1)

xaphod
xaphod

Reputation: 6804

See https://twitter.com/steipete/status/1174111017900503040 - iOS 13 behavior (written at time of GM seed 2).

As others have said, you should not be using [NSData description] this way.

Upvotes: 1

Related Questions