Build and run for the project target, not UE4 target. Observe that UE4 editor for the current project runs.
Stop.
Clean the project via Xcode’s Product > Clean menu option.
Try to build again. Observe build failure with a message saying:
clang: error: no such file or directory: ‘/Users/Shared/UnrealEngine/4.10/Engine/Binaries/Mac/UE4Editor.app/Contents/MacOS/UE4Editor-Core.dylib’
clang: error: no such file or directory: ‘/Users/Shared/UnrealEngine/4.10/Engine/Binaries/Mac/UE4Editor.app/Contents/MacOS/UE4Editor-CoreUObject.dylib’
clang: error: no such file or directory: ‘/Users/Shared/UnrealEngine/4.10/Engine/Binaries/Mac/UE4Editor.app/Contents/MacOS/UE4Editor-Engine.dylib’
clang: error: no such file or directory: ‘/Users/Shared/UnrealEngine/4.10/Engine/Binaries/Mac/UE4Editor.app/Contents/MacOS/UE4Editor-InputCore.dylib’
ERROR: UBT ERROR: Failed to produce item: /Users/saim/Projects/Unreal/Travelers/Binaries/Mac/UE4Editor-${PROJECT_NAME}.dylib
If you check the file system, you can find that the file is actually missing.
You can reinstall the missing UE4Editor.app via Epic Launcher > Select the engine > Verify.
After “Verify”, build works again.
I think Xcode clean is removing the shared binary mistakenly.
You can make a workaround. I don’t see this as a permanent one though.
Basically, you can add script target as a dependency to your main project, which will detect “Clean” action and temporarily move the stuff you want to prevent from deletion. And, also perform the reverse operation after “Clean” build finishes.
For more info on Xcode hookup:
This definitely needs to be fixed in unreal build pipeline. But, it think the script should prevent this specific issue.
As mindblender mentioned, if you run the Verify option from the Launcher for the engine version you’re using, it should regenerate the XCode files and allow the engine to be used again.
Currently our resources are dedicated elsewhere and UE-23624 is not a priority item for us to work on. We don’t have a timeframe for when this may be addressed. Please keep in mind that with source code access, a programmer on your project can implement your own solution, and you are welcome to share that result with Epic for possible integration.
I updated to Xcode 8.3, which means my PCH files were compiled with a different branch of the clang compiler. The fix for that is to Clean the project. While this fixed the PCH compiler mismatch issue, it caused several dylib files to be deleted.
If you Verify the Engine in the Epic Game Launcher, it fixes the problem.
This really should get fixed, or at least have a warning come up after cleaning the project from Xcode.
I’ve added a private note to the original report to indicate that this is still occurring. As mentioned in the report (Unreal Engine Issues and Bug Tracker (UE-23624)) you can work around this by choosing the Verify option for the affected engine version in the Launcher.
This still happens in the pre-release (dev-ar-kit) for 4.17 BTW. Compiling for in XCode 11 beta 3, I ran clean on a project and binaries for UE4Editor all disappeared.
Currently our resources are dedicated elsewhere and UE-23624 is not a priority item for us to work on. We don’t have a timeframe for when this may be addressed. Please keep in mind that Verifying the engine version from the launcher should restore any missing files and allow the project to open.
Launcher deletes shaders on launch,
Xcode deletes binaries on clean,
In game windows are completely broken by functionality,
what else should I expect from he macOS branch ?
Still occuring with 4.21.1 and Xcode 10.1
Verifying doesn’t work, it says I need to check running processes and I have nothing else open. Resarting doesn’t help. The only way I fixed it was to perform a clean install of ue4.
Verifying doesn’t work, it says I need to check running processes and I have nothing else open. Resarting doesn’t help. The only way I fixed it was to perform a clean install of ue4.