UIDocument openWithCompletionHandler returns NO for success

I have this code:

[metaDoc openWithCompletionHandler:^(BOOL success) {
    if (!success) {
        NSLog(@"UH OH");
    }
}];

Why would it ever return NO? For me, this returns NO, although in my

- (BOOL)loadFromContents:(id)contents 
                  ofType:(NSString *)typeName 
                   error:(NSError **)outError 

I always return YES.

thank

+3
source share
1 answer

There are many reasons. Override handleError: userInteractionPermited: and either register the data or set a breakpoint there. You should see the exact error.

+5
source

All Articles