Weird Xcode autocomplete - ios

I've updated my Xcode yesterday to version 7.3 and since then I got a really strange autocomplete (marked text, case sensitive etc.):
Is it something of the new version? Can I turn it off and use the classic autocomplete of Xcode?
Thank you!

Yes, it is a new autocomplete in the new Xcode version. It uses fuzzy matching to provide suggestions. I haven't found a way to turn it off, but give it a shot. The old autocomplete is absolutely dreadful. I used to install a Fuzzy Autocomplete plugin to make it work properly.
In the old days (in case of Objective-C, for instance, but it's the same with Swift), if you wanted to implement
- tableView:heightForRowAtIndexPath:
you typed -tableView, saw all the methods starting with tableView:, then you added a colon, and the autocomplete died. Now you can just enter something like -tv:hfrowatinp, and you instantly get your method.
It will take a bit of time getting used to, but it's worth it, trust me.

Related

WebStorm and Dart autocomplete

I have been trying to figure this out for a few hours now with no result. I am doing some tutorial in trying to learn Dart. For some reason, my IDE does not seem to autocomplete like the instructors do. Anybody has any idea if there is any settings I should turn on?
On the left, is the video and on the right is what I am getting. In this case, I am not getting any #overide...
It's relatively new feature, make sure you use one of the latest Dart SDK 2.0.0-dev releases.
Also don't forget to add the Dart support for your project because the language is not automatically selected :
In Settings, go to Languages & Framwework, select Dart and verify the
Dart SDK path is correct.

Auto fix implement of missing method of protocol with Xcode?

I am not very familiar with Xcode,
Since I think every decent IDE should have a shortcut for auto-fix a template of implemented protocol (such as interface in java) to save some effects of the programmers to just fill in the logic and don't have to type in the method name and parameter stuff.
Such as when we meet this:
And I googled around and some guy said that there should be a fix all in scope thing in the Editor, but seems I can't make that clickable :-(
So, how to do this with xcode? Thanks.
Unfortunately Xcode is fairly behind compared to other IDE's in features for refactoring and such.
The main Xcode version: 8.x, can't do what you wish for. But some of it will be/is available in beta Xcode 9
Xcode may suggest a fix for a compiler error. You can click the errors individually to see the suggested fix(es) and select one.
Alternatively the 'Fix All In Scope' allows you to tell Xcode to select suggested fixes of the current file.

Is there a way to turn off Xcode 8's autocomplete for image names?

Xcode 8 has this new feature that is supposed to suggest image file names when you use UIImage(named:)
In my case it suggests image names even when it doesn't make any sense.
Example:
There is nothing in preferences. I wonder if there is some secret command to disable this part of autocompletion.
No this unfortunately can't be turned off, and nothing states that this is fixed in the Xcode 8.1 Release Notes.
It should either be fixed or you should have the opportunity to turn it off. The functionality is kind of good when it´s used for it´s purpose only, as I describe in this post.
But the issue is that Xcode 8 is inserting images inline in source when it can't possibly make any sense as you mention. For example, if you have a for iteration and type for x in to start a loop and you have any image in the project whose name matches "in" using this syntax.
Annoying issue, that I hope Apple will fix soon, because the feature is good when it´s used for images only.
Update:
Just confirmed that this is still an issue in Xcode 8.1 stable version.
Update:
This functionality remains in Xcode Version 9.0 beta 6 (9M214v)
Update
This seems to be fixed in Xcode 10 now.
It seems to me that the best way to deal with this issue is by using comments (commmand + /). Changing the code to become a comment seems to turn off the autocomplete for image names.
So, you would have basically to switch back and forth between commenting and uncommenting your code (e.g. you find an error, make your code as a comment, fix the error, uncomment your code, check if your changes fixed the issue, and so on.).
Example of the same code with and without being a comment.
Simply update to Xcode 10: the image autocompletion feature has been discontinued:
Code Completion for Swift image literals has been removed in Xcode 10. (38087260)
Source: the Xcode 10 Beta release notes (this note was removed in the final release notes)

XCode 6.3 autocomplete not working

I'm learning basics of Objective-C and using XCode for writing code.
As you all know autocomplete option is perfect for new users that don't know (or remember) name of functions.
I have a problem with using autocomplete in XCode 6.3 couse its just.. not working - it is not showing anything or showing things that are not connected.
For example I just wrote simple few lines of code gusing NSMutableArray and NSEnumerator, when I'm trying to remind myself function/message 'nextObject' of NSEnumerator, XCode is not suggesting anything.
Here is a pic to show it:
Am I doing sth wrong or there is a way to fix it?
thanks in advance!
It must be a temporary glitch. Happens to me almost all the time while Xcode is "indexing". You might be typing too fast and by the time Xcode gives indexing a break and looks for the auto-completion you might have types something for which there is no method (or something that you expected)
Also, for custom classes & method, make sure you have included the respective header files.
It seems that autocomplete does not work when there is an error in the code.
The reason for autoComplete not working can be anything. Do any one of the following to debug it
Check if there are errors and if so try to solve it and then check autoComplete. If any error is present in any of the line then autoComplete will not work for below code. Try autoComplete above the error incase you want to check.
If debugger does not throw any error then try commenting out the all lines and uncomment it from top to methods to recheck the autoComplete
Quit Xcode and Reopen it
Clear Derived data and then launch Xcode and check

Is it possible to make Xcode auto complete to act like visual assist?

I am using Xcode 6.1 on Yosemite, writing IOS apps using swift.
For example:
If I type:
myClass.st
I was hoping the editor to show me this:
myClass.SetTitle()
but the reality is not what I had expected.
the editor says no match. In case of visual assist or Sublime Text, "st" mathes "SetTitle"
Sometimes people only remember a few keywords of the long variable name, rather than the full name from the very beginning.
Is is possible to solve this issue by some plugins?
Thank you
I think I have found the answer to this.
The plugin is called
FuzzyAutocompletePlugin
Written by GitHub.com/chemo

Resources