After took 48MP ProRaw photo,
captureOutput:(AVCapturePhotoOutput *)output didFinishProcessingPhoto
write to photo library use
[PHPhotoLibrary sharedPhotoLibrary] performChangesAndWait:
or
[PHPhotoLibrary sharedPhotoLibrary] performChanges
There is a high probability of failure
No matter use fileURL or [photo fileDataRepresentation]
failure info below
2022-09-28 10:43:57.353815+0800 LUTCamera[2031:218103] [GatekeeperXPC] Error received from proxy factory <PLAssetsdServiceProxyFactory: 0x28190b300> in sendChangesRequest:usingProxyFactory:error:: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.photos.service was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid." UserInfo={NSDebugDescription=The connection to service named com.apple.photos.service was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid.}
2022-09-28 10:43:57.354114+0800 LUTCamera[2031:218103] [PhotoKit] PhotoKit XPC proxy is invalid. Dropping request on the floor and returning an error: Error Domain=PHPhotosErrorDomain Code=3301 "(null)" (underlying error Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.photos.service was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid." UserInfo={NSDebugDescription=The connection to service named com.apple.photos.service was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid.})
2022-09-28 10:43:57.359493+0800 LUTCamera[2031:218100] [error] error: XPC: synchronousRemoteObjectProxyWithErrorHandler encountered error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service created from an endpoint was invalidated: failed to check-in, peer may have been unloaded: mach_error=10000003." UserInfo={NSDebugDescription=The connection to service created from an endpoint was invalidated: failed to check-in, peer may have been unloaded: mach_error=10000003.}
2022-09-28 10:43:57.359508+0800 LUTCamera[2031:218257] CoreData: XPC: XPC connection was invalidated
CoreData: error: XPC: synchronousRemoteObjectProxyWithErrorHandler encountered error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service created from an endpoint was invalidated: failed to check-in, peer may have been unloaded: mach_error=10000003." UserInfo={NSDebugDescription=The connection to service created from an endpoint was invalidated: failed to check-in, peer may have been unloaded: mach_error=10000003.}
2022-09-28 10:43:57.473207+0800 LUTCamera[2031:218100] CoreData: XPC: sendMessage: failed #0
1
0
1.6k