我在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'常量。 – rmaddy