0

I have a Mac and iOS app that is using v2 of the BoxSDK. The BoxSDK is integrated as a framework and the iOS app builds and archive fine. The Mac app fails to archive with the following error:

Lexical or Preprocessor issue:

'BoxCocoaSDK/BoxCocoaSDK.h' file not found

The include looks like this:

#import <BoxCocoaSDK/BoxCocoaSDK.h>

I've spent a few hours of this with no luck. I tried the following with no success: Lexical or Preprocessor issue when trying to archive project using the v2 BoxSDK

Community
  • 1
  • 1
jeffbailey
  • 137
  • 6
  • Please check the target membership of of the files. Adding the SDK to to XCode project is not enough. See here: http://stackoverflow.com/questions/1939515/xcode-target-membership-of-frameworks – AlexVogel Aug 06 '14 at 13:14

2 Answers2

0

I was having the same problem: Build worked but Archive did not. I solved it by adding this to the Header Search Paths in Build Settings:

$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts

Also it was key to make that line Recursive.

Ty Jacobs
  • 218
  • 1
  • 9
0

On XCode 7.1 following Header Search Path worked for me for the Release Build

$(PROJECT_TEMP_DIR)/../UninstalledProducts/iphoneos/include

Seema Sharma
  • 379
  • 3
  • 12