In my mac, I tried to build and package my project contains below codes by UE5.3.
However, “CreateProc” and “SaveStringToFile” didn’t work.
Any process didn’t start to run, and there is no saved file.
FString Args = "example";
uint32 NeedBPUINT32 = 0;
FString appPath = FPaths::ProjectContentDir() + EXE_PATH;
FString dirPath = FPaths::ProjectContentDir();
FProcHandle ProcHandle = FPlatformProcess::CreateProc(*appPath, *Args, true, false, false, &NeedBPUINT32, 0, *dirPath, nullptr);
FString savePath = FPaths::ProjectContentDir() + SAVE_FILE_PATH;
FString outputStr = "output";
FFileHelper::SaveStringToFile(outputStr, *savePath,
FFileHelper::EEncodingOptions::ForceUTF8WithoutBOM);
I checked that same code works in Mac editor, Windows editor, and Windows application. But it doesn’t work in Mac application only.
and, same code worked in Mac application build by UE5.2,.
So, I think there are no code mistakes, and it needs some setting or permission changes to use “CreateProc” and “SaveStringToFile”.
Do you know how to solve this problem, or what to change?
Thank you for watching…