Hi all
I have found a solution to the Xcode error in projects generated from Unity3D: 'QCARUniytPlayer.h' file not found
Looking at a few threads on this and the Unity3D forum suggest that it's caused by spaces in the path to the Libraries folder.
Whilst this may cause s problem for some, I've not found this to the be issue.
Rather, it's that the project build settings should have "Always Search User Paths = Yes" which will force Xcode to look in the additional path added by the Vuforia PostProcessBuildPlayer script.
The Xcode project that Unity generates has this flag set to 'No', so I've modified the Vuforia PostProcessBuildPlayer script (in Vuforia v1.5.9) to set it to 'Yes':
at line 215:
if section == 'XCBuildConfiguration':
if line.strip()[0:13] == 'buildSettings':
pbxproj.write('\t\t\t\tHEADER_SEARCH_PATHS = \"$(SRCROOT)/Libraries\";\n')
and replace this block with:
# force ALWAYS_SEARCH_USER_PATHS = YES
if section == 'XCBuildConfiguration':
if line.strip()[0:13] == 'buildSettings':
pbxproj.write('\t\t\t\tALWAYS_SEARCH_USER_PATHS = YES;\n')
pbxproj.write('\t\t\t\tHEADER_SEARCH_PATHS = \"$(SRCROOT)/Libraries\";\n')
# remove existing ALWAYS_SEARCH_USER_PATHS
if line.strip()[0:30] == 'ALWAYS_SEARCH_USER_PATHS = NO;':
pbxproj.seek(-32, os.SEEK_CUR)
This will force the 'Always Search User Paths' option to 'Yes' for all build profiles.
Note that the PostProcessBuildPlayer script will be overwritten if you re-import the Vuforia package (or any other package that has a PostProcessBuildPlayer script).
Hope that helps.
Cheers
Paul
Thank you!!! This worked for me.