Hello,
I have create a project of Unity Native for iOS, its build successfully & running on Device
But when i’m going to “Archive” the its Showing “Lexical or preprocessor issue” :
il2cpp-config file not found in Il2CppMethodPointerTable.cpp
Was the Xcode project modified or moved after it was created by Unity? It sounds like something is missing. Also, can you build and run and Xcode without archiving?
Did u solve that?
I have the same question as above, was the Xcode project modified somehow after the build in Unity completed?
No, I also compiled into a new folder etc
Is there an il2cpp-config.h file in the XCode project directory? It should get copied into the project directory from the Unity installation.
Hi. I mate maybe same problem but finally solved.
Simply exported Xcode project failed to build (not to archive) with message ‘il2cpp-config file not found’.
I found that exported Xcode project has whole unity project in ‘Libraries’ folder like this image.
I used Unity 2019.2.14f1.
After that, I simply updated unity project to 2019.2.21f1, and export again.
No problem happen ( no whole copies of unity project ) and succeed to build.
I encountered this when upgrading from Unity 2018.4.23 to 2019.4.29.
The solution for me was to delete my Library folder for the project. After a full reimport my built XCode directory no longer contained a full copy of the project and il2cpp-config.h was present.
My 1/1 repro steps:
-
Have an existing Unity 2018.4.23 project hosted on source control.
-
Import the project on a PC and a Mac in Unity 2018.4.23.
-
Upgrade the project on the PC to Unity 2019.4.29.
-
Choose to continue using Asset Database V1
-
Submit the changes to source control.
-
Sync the Unity upgrade changes on the Mac.
-
Open the project in Unity 2019.4.29 on the Mac.
-
Attempt a build to iOS.
-
Notice the “il2cpp-config.h file not found” error.
-
Close Unity.
-
Delete the Library folder.
-
Open Unity and allow the full reimport to complete.
-
Attempt a build to iOS.
-
Notice the build now succeeds.

