I have just updated to the new Xcode beta 6.0 and when trying to compile for an ipad mini with iOS 8 I am getting a weird error in the console:
"Attempt to add read-only file at path file:///var/mobile/Media/PhotoData/Photos.sqlite?readonly_shm=1 read/write. Adding it read-only instead. This will be a hard error in the future; you must specify the NSReadOnlyPersistentStoreOption"
This happens when executing the following code:
if ([self.rootDelegate respondsToSelector:@selector(wImageRequiresAPhotoPicker:)]){
[self.rootDelegate wImageRequiresAPhotoPicker:(DWImage*)item];
}
And:
-(void)wImageRequiresAPhotoPicker:(DWImage *)img{
self.selectedWimg = img;
DWImagePickerController *imgPicker = [[DWImagePickerController alloc] init];
[imgPicker setDelegate:self];
[imgPicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
[imgPicker setAllowsEditing:YES];
[imgPicker setModalPresentationStyle:UIModalPresentationCurrentContext];
UIPopoverController *popOver = [[UIPopoverController alloc] initWithContentViewController:imgPicker];
popOver.delegate = self;
self.popoverImageViewController = popOver;
[self.popoverImageViewController presentPopoverFromRect:img.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
Does anyone have a clue of why this is happening?
Most likely a newly introduced bug in iOS 8 beta 2. Let's see how it develops.
It seems that ALAssetsLibrary requests internally read & write access to Photos.sqlite
database, and it can only gain read access. I'm receiving the same error with this call:
[self.assetsLibrary enumerateGroupsWithTypes:ALAssetsGroupAll
usingBlock:^(ALAssetsGroup *group, BOOL *stop) {
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With