Hi from this morning i've got a weird thing !
Xcode won't Suggest
,
won't AutoComplete
,
won't give color to my codes
,
wont give me any Errors
and won't find out
my properties or methods or anything !
But indexing compelete with success
Build compelete with success
Run compelete with success
Restart your Xcode. If still not work, restart your computer.
I Had same problem , and i have solutions for that :
Xcode caches some files that cause this problem
Go to --> YourUserName/Library/Developer/Xcode/
Then remove the DerivedData
directory in the Xcode
directory
if you didnt saw Library folder because it is a hidden directory
Here is a good Resource of how to show hidden files in macOS
clean up some memory , on devices that have 8GB of RAM
this problem Occurred more
I suggest you to use CleanMyMac3
it also free a lot of Storage
I suggest you to code clean first !
a few things that i used to do in my Projects :
For every method that only belongs to body of that class use fileprivate
which means this method is available for the class and extenstions which just private
is only available to the body of the class
Any property that belongs only to body of the class should mark with fileprivate
Avoid of declaring variables outside of the class ! this will get memory all the time
Deinit()
the Models
after you end up working with them
Avoid of doing Notification Center
because you forget to dispose them ! instead of that i suggest you to start RxSwift
that works better you can find it here
go to the Xcode->Preferences->TextEditing
Check that is your code completion options is checked to true
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.