Xcode build fails with “fatal error: malformed or corrupted AST file” Crashlytics.h

后端 未结 2 1782
深忆病人
深忆病人 2021-02-12 07:20

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 b

2条回答
  •  别跟我提以往
    2021-02-12 08:07

    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 xcodebuild.

    I solved the issue like so:

    1. Xcode > Preferences > Command Line Tools. Select the newest Xcode version.
    2. Quit Xcode
    3. Delete the ~/Library/Developer/Xcode/DerivedData directory.
    4. 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
    

    Also:

    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 
    

提交回复
热议问题