【发布时间】:2015-11-04 22:41:39
【问题描述】:
我在 Xcode 中收到此警告
comparison of addresses of NSUbiquitycontainerDidChangeNotification not equal to a null pointer is always true
它在核心数据集成框架中
CDEICloudFileSystem.m
在
- (void)addUbiquityContainerNotificationObservers {
[self removeUbiquityContainerNotificationObservers];
/// in this line
if (&NSUbiquityIdentityDidChangeNotification != NULL) {
///
__weak typeof(self) weakSelf = self;
ubiquityIdentityObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSUbiquityIdentityDidChangeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note) {
__strong typeof(weakSelf) strongSelf = weakSelf;
[strongSelf stopMonitoring];
[strongSelf willChangeValueForKey:@"identityToken"];
[strongSelf didChangeValueForKey:@"identityToken"];
}];
}
}
谁能告诉我如何解决这个问题?
谢谢
【问题讨论】:
-
除非您尝试支持 iOS 5,否则无需检查
NSUbiquityIdentityDidChangeNotification常量。
标签: ios objective-c ensembles