Save Screenshot Image to PhotosAlbum on iPad

hi!
I created a button to take screenshot and need to save it to photoAlbum on ipad.

first, in the cpp file, i used

 `FScreenshotRequest::RequestScreenshot(filename, false, false)`.

I also get the absolute path in ios device by using IFileManager::Get().ConvertToAbsolutePathForExternalAppForRead(*FPaths::ScreenShotDir())
the return value seems like /var/mobile/Containers/Data/Application/xxxx-xxxx-xxxx/Library/Caches/{ProjectName}/Saved/Screenshots/IOS/

and then, i used original object-c code to get the UIImagefrom the location i got in the prev step.

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *cachePath = [paths objectAtIndex : 0];
NSString *filePath = [cachePath stringByAppendingPathComponent : @"{ProjectName}/Saved/Screenshots/IOS/xxxx.png"];
UIImage *image = [UIImage imageWithContentsOfFile : filePath];
UIImageWriteToSavedPhotosAlbum(image , nil, nil, nil);

I tested many times, but every time i run into the func UIImageWriteToSavedPhotosAlbum, the app crashes.

Did any one can help me with that?

Anyone knows any solution, but only using blueprints without needed to use C/C++, on iPad to create a screenshot?

Hi I also encountered the same problem, solved it?