[英]NSDATA description returning nil
NSData
description returning nil and making the NSData
object nil. NSData
描述返回nil并使NSData
对象为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. 如果我在
Xcode
10中编译我的代码,它将得到很好的NSData
描述。 But if I use Xcode
11 it will give me nil as the description and it will make the NSData
nil as well. 但是,如果我使用
Xcode
11,它将得到零的描述,同时也将使NSData
零。 I'm confused as to how this is happening. 我对这是怎么回事感到困惑。 Is this because it's still a beta release?
这是因为它仍然是Beta版本吗? Is this kind of thing normal in beta releases?
Beta版本中这种情况正常吗? I just want to make sure my code still works before the new iOS 13 an iPAD OS 13 come out.
我只想确保在新的iOS 13 iPAD OS 13发布之前,我的代码仍然可以使用。
NSString *result = [[data description] stringByReplacingOccurrencesOfString:@" " withString:@""];
See https://twitter.com/steipete/status/1174111017900503040 - iOS 13 behavior (written at time of GM seed 2). 请参阅https://twitter.com/steipete/status/1174111017900503040-iOS 13行为(在GM种子2时编写)。
As others have said, you should not be using [NSData description] this way. 正如其他人所说,您不应以这种方式使用[NSData description]。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.