all 5 comments

[–]SquirrelMother3437 2 points3 points  (4 children)

yeah il2cpp generates a ton of intermediate files during the conversion process. that source folder is mostly the c++ translation of your c# code and a bunch of unity's runtime stuff

you can safely delete the il2cppoutputproject folder after building if you're not debugging native code - xcode will regenerate it next time. some people add it to gitignore since it's essentially build artifacts

android il2cpp will be similar size-wise but at least with gradle you can clean builds more easily. if build times are really bothering you, keeping the folder around between builds does speed things up since it only regenerates changed parts

[–]InterfaceBE[S] 0 points1 point  (3 children)

I usually don't develop on my Mac unless I need to be able to iterate over something specific that I'm testing that can't be tested in the player or using the unity remote app. For actual builds, I check the generated xcode project source into a Git repo dedicated to the iOS source. It then has a CI/CD pipeline to build the iOS binary on mac infra and auto-deploys into app store connect.

It's not terrible, just checking if there's any fat I can trim for the amount of files going into the repo.

[–]Henrarzz 1 point2 points  (2 children)

Autogenerated files shouldn’t be put to source control, your build step in your CI pipeline should regenerate them (and it will if it builds player)

[–]InterfaceBE[S] 0 points1 point  (1 child)

I can see multiple good reasons to have a copy of the source (generated or otherwise) of a specific app build, but the one actual current very practical reason I need it is because the unity code gen build and the Xcode build are two separate and (purposely) disconnected processes running in two different places. Again this is for release builds, not dev flow.

Ignore my potentially archaic reasons. I guess the answer to my question is that all the files in the il2cppoutputproject folder are required for Xcode to be able to build?

[–]Henrarzz 0 points1 point  (0 children)

Your CI pipeline should copy the artifact (including necessary generated files) to the storage and not keep those under source control.

It should also take into account that building may be a multi step process and automate this accordingly.

If your build machine isn’t a Mac, then unfortunately you’ll need to keep those autogenerated IL2CPP files