I am developing an IOS application. I am using Facebook AsyncDisplayKit library. My project running at debug mode. But When I tried to Project Archive Then Xcode give error message. Error Message is "Lexical or Preprocessor issue". I am not using pod. I drag to my project to AsyncDisplayKit.xcodeproj file
Below dessription is Facebook ASDK implementation (ASDK can also be used as a regular static library: Copy the project to your codebase manually, adding AsyncDisplayKit.xcodeproj to your workspace. Add libAsyncDisplayKit.a, AssetsLibrary, and Photos to the "Link Binary With Libraries" build phase. Include -lc++ -ObjC in your project linker flags.)

My Project Direktory : /devel/workplace/app/MyApp
Library Direktory : /devel/workplace/app/ios-libraries/AsyncDisplayKit
The main thing to know about solving this problem is that Archiving copies your entire project and all of the source and headers to an intermediate folder and builds it from there. It tries to set up header paths that will work, but sometimes it doesn't understand some project setups.
You need to
To find the right header path, the first step is to figure out where the Xcode BUILD_ROOT is. I made a simple workspace and project to reproduce this. My xcodebuild line is
xcodebuild -workspace TryADK.xcworkspace -scheme TryADK -showBuildSettings|grep BUILD_ROOT
On my system that shows:
BUILD_ROOT = /Users/lou/Library/Developer/Xcode/DerivedData/TryADK-bsnchnrjizifmqahbifklpdekupm/Build/Products
Now, you need to find AsyncDisplayKit.h relative to that. It's probably somewhere in BUILD_ROOT/.., so copy the BUILD_ROOT folder you get and type (without /Products at the end of the build root)
find /Users/lou/Library/Developer/Xcode/DerivedData/TryADK-bsnchnrjizifmqahbifklpdekupm/Build -name AsyncDisplayKit.h
I get a few folders. The one that makes sense for the Archive build is:
/Users/lou/Library/Developer/Xcode/DerivedData/TryADK-bsnchnrjizifmqahbifklpdekupm/Build/Intermediates/ArchiveIntermediates/TryADK/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/include/AsyncDisplayKit/AsyncDisplayKit.h
Under Archiving, the BUILD_ROOT is set from
BUILD_ROOT = /Users/lou/Library/Developer/Xcode/DerivedData/TryADK-bsnchnrjizifmqahbifklpdekupm/Build/Products
to
BUILD_ROOT = /Users/lou/Library/Developer/Xcode/DerivedData/TryADK-bsnchnrjizifmqahbifklpdekupm/Build/Intermediates/ArchiveIntermediates/TryADK/Products
So, your new header path is (with my setup):
"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/include"
If this doesn't work, we probably didn't get everything exactly right. The best way to debug is:
Build with xcodebuild -- something like:
xcodebuild -workspace TryADK.xcworkspace -scheme TryADK build archive
Find your error in the output and look at the exact compiler settings that were used. Look at all of the -I/Users/... arguments -- one of those is your user header path with BUILD_ROOT exploded to the full path.
Make sure it's right by comparing to the results of the find above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With