C++ class creation will break sync between XCODE and EDITOR (!)

I tried to use the report a bug but its too demanding, im only a user of unreal…

Step to reproduce:
Make sure the xcode has not been build since changes made

  1. Make sure your Xcode have at list 1 header and 1 cpp file with a syntax error that will prevent it from performing a build

  2. Using the content drawer, create a C++ actor class and make sure to create a new directory for it in the creation window itself (under public or private, “legally”)

  3. While unreal try to compile the newly created C++ file, it will fail (because Xcode already had some syntax error we intentionally made for this test)

  4. Use tools - > refresh xcode project

    Result: you will now see that the new C++ file and its new directory are removed from editor, and is only show in Xcode. it will not exist in build and throw an error if you try to reference it.
    it will be very hard to sync them from this point. closing the project / refreshing it will not help. even deleting the known directory might not solve this.

The issue itself (first fresh project, only coding for a short time in it):

I hope you guys going to fix this entire process as soon as the next update . this is very hard to work with. Please add on 5.7.2 some mechanism that force Xcode and editor to sync on demand. regenerate project files just does not always work on mac.

Thank you

Could you post the exact log message of that syntax error? I don’t know if that still exists in UE 5.7, but you could check if this would solve your issues.

1 Like

All this happen in latest unreal version, mac os 15.7.2, and latest Xcode.

Does the log saves everything in the lifetime of the project? if so i can try to search back and find it.

Look at the attached post that i added. solution was there.

I Appreciate the Epic team for bringing this to mac and doing efforts, I don’t take it for granted. But if they really want more mobile devs to adopt this platform seriously for making games for ios they really need to triple down on the entire workflow with more devs in my opinion. The out of the box experience is really bad right now : (

Xcode dont use unreal types colors in text, issues with speed, live coding, generate project file is broken from macOS ui and even using terminal which works does not yield expected results. Those things are fundamental to the workflow and are currently half broken, its should not be like that…

I look at his post, seems like a different issue then the one i detailed.
My issue describe the poor functionality of unreal engine when trying to sync the UE Editor with Xcode if a C++ class get “lost” due to creation of the class while project is not able to be built in xcode (even something simple like syntax mistake by user somewhere in the code).

you would expect the issue would be solved by fixing the syntax, compile again, and the class would show up in both Xcode and Editor. but it does not. and re - sync it seems almost impossible.

This issue seems to be easily fixed in windows environment by simply using the “generate project files” with visual studio.

Because the workflow is not good right now, this feature is not working in xcode + unreal in mac, and the terminal command does not sync them either even tho it does execute the regenerate of project files. even if the project was not broken due to me deleting the 3 known folders, it would still not fix it.

Actually, im not sure if there is any other way beside rebuild the entire project using the main unreal branch that exist in the documents folder (im not sure how to describe it, but its path is in my attached post)

I hope Epic will just make some button for mac users, in unreal engine editor (not the “refresh xcode project” it does not fix anything) that do whatever needed to be done so the editor and xcode always stay in sync as long as you can build.

For Unreal C++ projects on Mac, I can really only recommend JetBrains Rider, as XCode takes ages for indexing the project files. There is something like “generate project files” on mac, but that does not work, always have to do that manually.

in terminal cd to batchfile folder of your UE version

cd /Users/Shared/Epic\ Games/UE_5.7/Engine/Build/BatchFiles/Mac

Then regenerate the project files:

./GenerateProjectFiles.sh /Users/YourUsername/Documents/UnrealProjects/UEProject/UEProject.uproject -Editor UEProject
1 Like

Thank you for this information. If i use jetBrain i will need to install Visual studio anyway, so in that case i will just use VS.

But once i get to build it to IOS i will encounter other issues around it so im not sure i want to do that tbh

At least with Xcode i have enough tutorials online around the export to IOS and all the apple’s nonsense in that area

For Rider on mac you don’t need to install VS, it will take the XCode build tools. It’s your decision what IDE to use, but I would give Rider a try. It’s even free for non-commercial use.

1 Like

does the rider have the option to regenerate project files and sync properly with the editor?

I just tried this and deleted the “Binaries,” “Intermediate,” and “DerivedDataCache” folders in my project, started Rider, and found that these folders are recreated.

These are the processes while the project is loading:

1 Like

I tried rider, it share the same problem with Xcode, some files just dont get into sync from the get go (even if created while build is successful)

I haven’t tried to delete those directories (last time i did that the entire project was unable to load, as seen in my attached post)

I will try this first with Xcode and then with rider if it fail

Th problem is still with unreal in macOS. because both IDEs share same issue

It get worse.

Rider - same as xcode. same issues but less indexing time. Free for none commercial but its not my case

Files out of sync issue: its getting even worse.
I changed a folder name in finder.

I rebuild the entire editor after deleting the right folders, forced the elimination of the old redirectors from terminal, and some other advices from the ai assistant. Nothing works. Folder exist and is working in Xcode with include and everything. but refuse to show in editor.

The current state of unreal + mac is really bad right now. none of epic team is even reply to this post.

Its a clean project with basically nothing on it. 200% friction on every step by just creating new classes.

Epic may you please reply to this post and declare intentions about all those issues?

Thank you guys …

Im sorry to spam but im finding crucial errors as if it was pre - alpha version of some kind.
Apology in advance, i dont try to be disrespectful i honestly ask if you did any QA on Xcode with unreal with the out of the box experience?

Unreal didn’t recognize a folder, so it created another one on the exact same level ( i was assuming it will either will not allow it, or will be forced to re calculate the structure of directory and fix it on the spot).. Which ended up in 2 folders identical in the same scope. even mac OS cant have 2 folders with the same name in the same scope in finder. how is that even possible?

Xcode recognize both of them, unreal editor dont show any of them, and Xcode build successfully.

Is anyone from epic games gonna give any attention to this post? im only 3 days with C++ in unreal & xcode, and it has already broken in every level possible of classes creation….

I haven’t even written any logic yet, im only creating classes so far. and not many of them, around 5-6 in total and fighting with the terminal because for every class i create it go out of sync and generate new issues .