xCode 4.4 does not get all the .pch file headers imports?

前端 未结 6 814
臣服心动
臣服心动 2021-01-30 17:39

This is my .pch file -

   //
// Prefix header for all source files of the \'English Club\' target in the \'English Club\' project
//

#import 

        
相关标签:
6条回答
  • 2021-01-30 18:02

    Xcode 5 Update:

    You can now delete derived data straight from Xcode Organizer. Delete, clean, and build solved the problem for me.

    enter image description here

    0 讨论(0)
  • 2021-01-30 18:06

    Also one of the problem could be that .pch file is not set for a target. To do that do the following:
    1. Go to the target settings.
    2. Option Precompile Prefix Header set to YES.
    3. For Prefix Header add a project relative path or an absolute path.

    0 讨论(0)
  • 2021-01-30 18:13

    I found that just updating your pch file (add and delete space) and rebuild will cause xcode to fix those problems

    0 讨论(0)
  • 2021-01-30 18:21

    Also check if both your app.pch and the app_Test.pch have the required imports. Sometimes you might be staring at the main pch, but the errors are for the unit tests pch.

    0 讨论(0)
  • 2021-01-30 18:23

    This appears to be a known issue in Xcode 4.4 (as seen in the release notes)

    It is suggested to Delete the PCH index folder to workaround this issue.

    To locate this folder, in Xcode, open the Organizer and select the Projects tab, then select the project in the left-hand pane. You should see the Derived Data path for this particular project with a small arrow to Show in Finder. If you click on this arrow, you will be taken to the right location in Finder. If you then navigate to the Index subfolder and delete PrecompiledHeaders folder, you should be all set.

    Xcode should re-index, and re-create this folder, but the errors should be gone.

    0 讨论(0)
  • 2021-01-30 18:26

    I know this is an old post but I wanted to share my experience. Im running Xcode 6.1 the fix was to delete the Tests target. for example MyProjectNameTests.

    0 讨论(0)
提交回复
热议问题