SIGABRT when adding Unity to existing iOS project

I’m trying to add Unity to an existing iOS Xcode project. I have gotten it to build but when I try to show the unityController window it gives me a SIGABRT: “* Assertion: should not be reached at tramp-arm.c:724”, this is happening on “UnityInitApplication(appPath);” inside of “- (void) startUnity:(UIApplication*)application”

I have looked around quite a bit on how to incorporate Unity with an existing project and it seems to be possible (looking at this post and others). I have been able to add code to the generated Unity project by following the post on blurst but I cannot seem to go the other way (add contents of the generated Unity project to an existing project).

Here is what I have done so far:

  • Added in sources from “Compile Sources” in the Unity project to my project
  • Added in libraries from “Link Binary With Libraries” in the Unity project to my project
  • Added “Classes” and “Libraries” directories under the Unity project to my “Header Search Paths”
  • Copied lines from the PCH in the Unity project to mine
  • Set up a basic “- (void)launchUnity” method in my AppDelegate similar to blurst

At this point the project builds but when I set the window in my AppDelegate to be “unityController->_window” and “makeKeyAndVisible” I get the aforementioned SIGABRT.

Any help or thoughts on this would be greatly appreciated!

I added the following to main.mm and that resolved the problem. Unfortunately I’m getting another runtime crash now.

#include "RegisterClasses.h"
#include "RegisterMonoModules.h"

static const int constsection = 0;
void UnityParseCommandLine(int argc, char *argv[]);

int main(int argc, char *argv[])
{
    UnityParseCommandLine(argc, argv);
    RegisterMonoModules();
    // other main code here...
}