Xcode build fails with “fatal error: malformed or corrupted AST file” Crashlytics.h
I recently enabled modules in my Xcode project build settings (“Enable Modules (C and Objective-C)”) and now I frequently get the below build error. It works the next time I build (without any changes) but it is annoying because it happens very often (several times an hour).
fatal error: malformed or corrupted AST file: ‘could not find file
referenced by AST file’ note: after modifying system headers, please
delete the module cache at
UIApplication sharedApplication - keyWindow is nil? Dot (“.”) operator and arrow (“->”) operator use in C vs. Objective-C Hide autolayout UIView : How to get existing NSLayoutConstraint to update this one Wipe all data stored with CoreData when the model has changed How to unzip a .zip file on iOS? Add an annotation on a pdf
Crashlytics recommended removing Crashlytics.h from the precompiled header file (.pch) and importing directly in each source file that needs it. This greatly reduces the problem but I still occasionally get a Crashlytics.h file not found error when building.
fatal error: 'Crashlytics/Crashlytics.h' file not found #import <Crashlytics/Crashlytics.h>
- issue with uploading dSYM to crashlytics
- Missing DYSM Error on multiple Target in Fabric and Objective C
- How to disable Crashlytics iOS library using a flag?
- Swift crash on a line that only has a bracket
- Xcode Bitcode, Include Symbols settings effect on dSYM generation
- React-Native ios App crashes without report
2 Solutions Collect From Internet About “Xcode build fails with “fatal error: malformed or corrupted AST file” Crashlytics.h”
First, try going to Product -> Clean menu in Xcode. Then rebuild when it finishes.
If that doesn’t work, go to your [Name]-Prefix.pch file in the Supporting Files folder, and delete the #import line. Build. It will have errors, it’s ok, now start typing it again and make sure to select the right choice from the drop-down suggest menu so it auto-fills the rest of the line for you. (This step worked for me).
Good luck! Love it when Xcode goes weird like this 🙂
I hit this issue after updating my version of Xcode via the Mac App Store.
After updating Xcode, the
xcode-select Command Line Tools version of Xcode was still set to the old version. This was creating some kind of mismatch in
I solved the issue like so:
Xcode > Preferences > Command Line Tools. Select the newest Xcode version.
- Quit Xcode
- Delete the
- Run build script again. Success!
For SEO purposes, when I was hitting this issue I saw the following errors:
error: InputFile /Users/user/source/Your-PCH-Prefix.pch 0 1406772618 191 33188... malformed line 9; 'InputFile' should have exactly five arguments
xcodebuild[53039:5503] stream error: stream error at offset 29: created by an unsupported XCDependencyGraph build xcodebuild[53039:4e0b] stream error: stream error at offset 29: created by an unsupported XCDependencyGraph build ** BUILD FAILED ** The following build commands failed: Write auxiliary files MappingModelCompile
- Enable one handed mode in iPhone 6 simulator?
- convert iphone App to IPad
- : unrecognized selector sent to instance 0x43fe068
- Unarchiving UIImageView with subviews
- core data application is Crashing in iphone device
- can't unsafeBitCast between types of different sizes in swift
- How do I access SQLite database instance on iPhone?
- Swift semantics regarding dictionary access
- iOS 10.1 and Xcode 8 issue
- Grouped/Ungroup MKAnnotation depending on the zoom level (And keep it fast)
- Delete multiple tables from a single query by separating from semicolon
- How to use NSUserDefaults to store an array of dictionaries
- UISearchBar out of screen bounds when navigation bar translucent = false
- Vertical Fold Animation
- dyld: Library not loaded. Reason : no suitable image found