0
\$\begingroup\$

These two errors are doing my head in. New to Xcode. So please advise thank you.

FYI

I did not touch or modify anything of the Xcode that was generated by Unity. Upon opening there is a warning that says to set to recommended settings. Other than that just set the provisional file. Set the simulator device then pressed play but these two errors keep showing!

include "Unity/GlesHelper.h" file not found

include "UI/Keyboard.h" file not found

enter image description here

enter image description here

\$\endgroup\$
7
  • \$\begingroup\$ Under the target build settings, what contents do you have in the "header search path" settings? \$\endgroup\$
    – AhiyaHiya
    Aug 13, 2016 at 14:23
  • \$\begingroup\$ Also, under the target settings, you may have a search path set for the header files under "other c flags settings". You may want to check there too. \$\endgroup\$
    – AhiyaHiya
    Aug 13, 2016 at 14:23
  • \$\begingroup\$ postimg.org/gallery/2jt3pay1y uploaded some pictures to what i see is the project search path where the project is located. \$\endgroup\$ Aug 13, 2016 at 15:13
  • \$\begingroup\$ Select the "header search path" field and paste the contents into your question above so we could see the full path. \$\endgroup\$
    – AhiyaHiya
    Aug 13, 2016 at 16:06
  • \$\begingroup\$ When I select the header search path field I find this $(PROJECT_DIR). Thank you. \$\endgroup\$ Aug 13, 2016 at 16:13

1 Answer 1

-1
\$\begingroup\$

There are 2 possibilities given what you've posted. Since I've not used Unity, I don't know which it is, but I'll explain both:

  1. If Unity isn't a framework, then you need to just add the path to the Unity folder to your target's "Header Search Paths". Given how the #includes are written, my guess is that that's the case.

  2. If Unity is a framework, then you haven't added the Unity.framework to your target. I don't know if Unity ships as a framework, but if it does, you need to add the framework to your target by going to the target's "Build Phases" and clicking the "+" button under "Link Binary With Libraries". From there, click the "Add Other…" button and navigate to wherever you put the Unity.framework. You also need to change the #include "Unity/GlesHelper.h" to #include <Unity/GlesHelper.h>. You may additionally need to add the Unity framework's headers path to your target's headers path. I have found instances where Xcode didn't automatically add the headers path of a framework after adding the framework to the target.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks for your answer. When you say need to add the unity folder to the target's header path. Do you mean the actual unity project folder? or the Xcode project folder that Unity generates for you? \$\endgroup\$ Aug 13, 2016 at 16:59
  • \$\begingroup\$ The path to wherever Unity stores the headers on your hard drive. (The headers being things like Unity/GlesHelper.h, etc.) Not the Xcode project you're working on but the headers from the Unity library/framework/whatever it is. \$\endgroup\$ Aug 13, 2016 at 17:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .