The answer via a friendly Apple engineer is this appears when the modificationDate on the underlying sqlite file is different to the fileModificationDate
property on the NSPersistentDocument
instance so to resolve reset the fileModificationDate
after the move
override moveToUrl:
like this
-(NSDate *)modDateForURL:(NSURL *)url
{
NSDictionary *dict = [[NSFileManager defaultManager] attributesOfItemAtPath:[url path] error:NULL];
return dict[NSFileModificationDate];
}
-(void)moveToURL:(NSURL *)url completionHandler:(void (^)(NSError *))completionHandler
{
void(^takeoverblock)(NSError *error) = ^(NSError *error){
if (completionHandler) {
completionHandler(error);
}
if (!error) {
self.fileModificationDate = [self modDateForURL:self.fileURL];
}
};
[super moveToURL:url completionHandler:takeoverblock];
}