Log in or register to post comments

Solution: 'QCARUniytPlayer.h' file not found

November 21, 2012 - 9:03am #1

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

 

Solution: 'QCARUniytPlayer.h' file not found

February 6, 2013 - 10:06pm #3

Thank you!!!  This worked for me.

Solution: 'QCARUniytPlayer.h' file not found

November 22, 2012 - 1:52am #2

Thanks for posting this Paul!

N

Log in or register to post comments