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?