lexical or preprocessor issue file not found occurs while archiving?
I am new to this iPhone development and i have almost completed my first application but when i try for creating an archive it gives an error lexical or preprocessed issue file not found But it runs fine in simulator and also has also tested on device. I have included SDwebimage architecture for lazy loading of image in table view.Can any tell me what is the issue?
Solution 1:
Few things to try, Ensure the Framework and all it's headers are imported into your project properly.
Also in your Build Settings
set YES
to Always search user paths
, and make sure your User header paths
are pointing to the Framework.
Finally, Build->Clean and Restart Xcode.
Hope this helps !
UPDATE: According to SDWebImage's installation, it's required you make a modification to Header Search Path
and not User header paths
, As seen below.
Have you done this as well? I suggest slowly, re-doing all the installation steps from the beginning.
Solution 2:
Spaces in a folder name in your header search path can cause this problem. Make sure the folders in your project do not have spaces in their names.
Solution 3:
My project was building fine until I updated to Xcode 10.1. After the Xcode update, started getting Lexical or preprocessor Issue
errors on build. Some XCDataModel header files could not be found.
This fixed the issue.
Go to Build Settings, Header Search Paths
Change the appropriate value from $(SRCROOT) non-recursive
to recursive
.
This ensures that subfolders are also searched for headers during build.