Post

Replies

Boosts

Views

Activity

Reply to What does the error mean: Unable to obtain assetsd XPC proxy
I found this answer to be untrue for my circumstances even though it seems to match almost exactly the errors I was getting. I am building a Catalyst version of an ancient Objective-C iOS app and on iOS and iPadOS UIImageWriteToSavedPhotosAlbum works as it always has. For Mac, though, I had to use the Photos framework. I had a feeling it was not my apps using too much memory more than photoslibraryd or assets had crashed because I could retrieve images from the Photos library just fine and because my Catalyst apps run more quietly and with less memory than most apps running on my Mac at any given time. The following truncated code worked for me on Mac and iOS and iPadOS. #if !TARGET_OS_UIKITFORMAC     UIImageWriteToSavedPhotosAlbum(saveImage, self, @selector(image:didFinishSavingWithError:contextInfo:), NULL);  #endif #if TARGET_OS_UIKITFORMAC     [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{     [PHAssetChangeRequest creationRequestForAssetFromImage:saveImage];     } completionHandler:^(BOOL success, NSError *error) {         if (success) {              // do some thing you need to do         }         else {             NSLog(@"write error : %@",error);         }     }];  #endif Leaving this here in case anyone else gets frustrated because this is a top hit for the error code. I hope this helps someone else save a few hours.
Jul ’20