Xcode 6 code termination not working

Using Xcode 6 GM seed ended the completion of my code. He worked the other day. I tried to get work to work. I created the Objc header file and assigned it as the header for the Swift class.

At this point, I am getting code completion using the Objective-c project. But not with a quick project.

I tried restarting Xcode by creating a new empty project.

+58
objective-c xcode swift
Sep 17 '14 at 6:40
source share
13 answers

Just go to user->Library->Developer->Xcode->DerivedData and delete the folder data (Derived Data) and restart Xcode.

+102
Oct 14 '14 at 9:47
source share

This fix from apple dev forums works for me. I had problems with autocomplete with Xcode 6.1 / Yosemite.

  • Close Xcode.
  • Reboot the computer (to clear the caching in memory).
  • Delete the contents of the DerivedData folder (~ / Library / Developer / Xcode / DerivedData), execute exactly, a) cd ~ / Library / Developer / Xcode / DerivedData /
    b) rm -rf *



  1. (Try this if steps 1-3 really don't work, as it restores the cache later on reboot, which takes time). Delete the contents of the folder ~ / Library / Caches / com.apple.dt.Xcode, i.e.,
    a) cd ~ / Library / Caches / com.apple.dt.Xcode
    b) rm -rf *

Now run Xcode again ...

+27
Dec 02 '14 at 6:35
source share

I experienced some serious code work because I had some “notes” after the @end statement of my .m file, which were as follows:

 /* NSAlertFirstButtonReturn, NSAlertSecondButtonReturn, NSAlertThirdButtonReturn */ 

These lines may appear before the @end statement without breaking code completion.

+18
Feb 10 '15 at 3:36
source share

There is an easier way to remove Derived Data from Xcode (no need to open finder or restart):

Xcode Organizer → Projects → (Your Project) → Delete Derived Data

+7
Feb 11 '15 at 0:44
source share

I recently had this problem. Autocomplete did not work ... and when I typed, for example, tableView ..., it did not give me the various functions available.

I tried the following and it worked for me.

  • Xcode Organizer → Projects → (Your Project) → Delete Derived Data

  • delete the file ~ / Library / Developer / Xcode / DerivedData / ModuleCache

  • Reboot xcode

Hope this works

+4
Feb 15 '15 at 7:35
source share

Another possible reason that he does not work is because he is not part of the targeted membership. To fix this, select the file you are working on. Then go to the “File Inspector” section and in the “Target Membership” section, make sure your project is checked.

Target Membership

+3
Feb 25 '16 at 10:32
source share

Try the following - no matter how stupid it sounds: Change your device to iPhone 6, close Xcode, open Xcode again and wait for the indexing to complete.

+2
Feb 02 '15 at 12:28
source share

Go to the Xcode menu, then Window → Organizer, then select "Projects". Select your project and click the delete button next to the blurred data. Then restart Xcode

This solution worked with me on Xcode 6.1

+1
Mar 25 '15 at 8:39
source share

If the problem with code completion is only related to user interface classes (for example, UIImage, UIDevice), you just need to add "import UIKit".

Swift files will not have code completion for user interface classes unless "import UIKit" exists.

+1
Jun 30 '15 at 14:39
source share

I had the same problem, but under different circumstances, I have 2 projects in my work area

  • Swift Interface for iOS and OSX
  • iOS Project (which uses a quick structure)

My code completion works fine in iOS, but it doesn't work in a quick structure. I tried everything about the solution and no luck and killed my performance.

Finally, I figured out a solution to this problem.

  • Select the file you are editing (within)
  • Select the Utilities tab on the right.
  • uncheck the Mac target (just hold on to the target you're currently working on)

Now, this solved my problem. hope this helps someone who is in a similar situation.

+1
Aug 16 '16 at 6:39
source share

user / Library / Developer / Xcode / DerivedData Delete all files specified in this folder. after that go to the name of your project and clean projects, then go back to the file in which you want to see the proposals. Enter any word and done.

+1
Jan 09 '17 at 9:27
source share

So, all you have to do is make sure that the first field is checked in the file inspector view on the right side of the target membership. I'm not sure why this makes a difference, but I'm sure someone can come and give a more complete answer.

0
Jul 18 '15 at 7:01
source share

In my case, some files were deleted on the File System, but were still listed in Project ie in Red Color. Just remove them from Project and everything will be fine. Completed code completion.

I would also like to note that all the above answers about cleaning / deleting the folder with the derived data seem to work for a short time, but whenever a new pull or update occurs, the problem starts again, so the main reason was the files without the link / moved / deleted files are displayed in RED in the project, they must be cleaned manually.

0
Dec 22 '15 at 12:28
source share



All Articles