我在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