मुद्दा:iCloud UIDocumentPicker रुक-रुक कर दुर्घटनाओं और लटका हुआ है
जब एक दस्तावेज़ iCloud से आवेदन बेतरतीब ढंग से दुर्घटनाओं, समय के सबसे अधिक के लिए निम्न कोड के चुनाव, लेकिन दुर्लभ अवसरों पर यह असफल हो जायेगी।
मैंने ऐप में iCloud एंटाइटेलमेंट सक्षम किया है और यह कारण नहीं लग रहा है कि यह अंतःस्थापित क्यों विफल रहता है। क्या कोई जांच है कि मुझे याद आ रही है?
यह भी अवसरों पर एक ध्यान देने योग्य 5 या तो सेकंड के लिए फांसी है (आमतौर पर दुर्घटनाग्रस्त के लिए दौड़ में)
कोड:
#pragma mark - iCloud =======================================================================================================
- (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentAtURL:(NSURL *)url {
BOOL fileUrlAuthozied = [url startAccessingSecurityScopedResource];
NSURL *ubiquityURL = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil];
NSLog(@"ubiquityURL - %@",ubiquityURL);
if(fileUrlAuthozied){
NSFileCoordinator *fileCoordinator = [[NSFileCoordinator alloc] init];
NSError *error;
[fileCoordinator coordinateReadingItemAtURL:url options:0 error:&error byAccessor:^(NSURL *newURL) {
NSData *data = [NSData dataWithContentsOfURL:newURL];
//Do something with data
selectedDocumentToUpload = [[UploadDocumentObj alloc] initWithiCloudDocument:data];
[self performSegueWithIdentifier:@"goToRename" sender:nil];
}];
[url stopAccessingSecurityScopedResource];
}else{
//Error handling
[Lib showErrorMessageWithTitle:@"Alert" message:@"E-Sign could not retrive the document!\nPlease try again." delegate:self];
}
}
त्रुटि:
2015-03-18 16:22:15.955 E-Sign[6338:1860982] *** Assertion failure in -[UIDocumentPickerViewController _commonInitWithCompletion:], /SourceCache/UIKit/UIKit-3318.93/UIDocumentPickerViewController.m:66
2015-03-18 16:22:15.960 E-Sign[6338:1860982] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application initializing document picker is missing the iCloud entitlement. Is com.apple.developer.icloud-container-identifiers set?'
अन्य त्रुटियों:
2015-03-18 16:33:45.884 E-Sign[6357:1864309] plugin com.apple.UIKit.fileprovider.default interrupted
2015-03-18 16:33:45.885 E-Sign[6357:1864309] plugin com.apple.UIKit.fileprovider.default invalidated
कोई भी इससे पहले आया है?
मुझे भी होता है, मुझे यकीन नहीं है कि यह केवल विकास का मुद्दा है, या यह उत्पादन पर भी होता है –
यह दोनों में होता है। बाहरी परीक्षक एक ही मुद्दे की रिपोर्ट करते रहते हैं, अंत में मैंने अपनी अविश्वसनीयता – AJ9