Xcode 8.3 Indexing & Building Extremely Slow
Apple knows about this problem, and says that Xcode 9 beta will perform much better. Note that if you don't want to update to Swift 4, you can continue compiling in Swift 3 mode using Xcode 9. The big limitation is that you won't be able to submit your project to the App Store until Xcode 9 goes final.
Also, Xcode 9 contains a new build system. You don't get it by default: you have to turn it on for this project. Choose File > Project Settings and switch the pop-up menu to New Build System (Preview). This is experimental, but it will be the default build system eventually, so it would be interesting to know whether this makes an appreciable difference.
If you don't want to update to Xcode 9 beta, you will just have to do a binary search: comment out all your code and start adding it back, piece by piece, until you find that piece that's causing the trouble.
Xcode swift indexing forever
Solved it: I deleted the most recently added files from the project and the problem disappeared. Then I started to add back the files, one by one until the problem reappeared. So I found the file causing the problem. Then I deleted the most recently added code from that file and again, the problem disappeared.
That way, I found a piece of code which was responsible for that behavior.
Xcode stuck on Indexing
- Open your Project Folder.
- Find ProjectName.xcodeproj file.
- Right-Click Copy and Paste to Safe Place.
- Right-Click Show Package Contents.
- Find project.xcworkspace file and delete that file.
- Reopen Your Project and clean and Rebuild.
If your problem is not solved then replace the file with your backup file.
Xcode indexing takes ages and uses gigabytes of memory
Found it !!
I needed to remove use_frameworks!
from my Podfile (make sure you use cocoapods > 1.5.0) and add
install! 'cocoapods', :disable_input_output_paths => true
Source: https://www.ralfebert.de/ios/blog/cocoapods-clean-input-output-files/
Xcode 8.0 Swift 3.0 slow indexing and building
I solved the problem by commenting all files and then removing comments one by one. I found that the problem is still in the array declaration as described here.
I had code like this and project was not indexing:
class {
var first: String!
var second: String!
var third: String!
var fourth: String!
var fifth: String!
func abc() -> [String] {
var array = [first, second, third, fourth, fifth]
}
}
I've changed it to this and indexing started working:
class {
var first: String!
var second: String!
var third: String!
var fourth: String!
var fifth: String!
func abc() -> [String] {
var array = [first]
array.append(second)
array.append(third)
array.append(fourth)
array.append(fifth)
}
}
Xcode 9.2 Compiling So Slow
I had the same issue when I was using the storyboard. You can try some small tweaks that helped me a lot and now its much better.
- Try to off the "Automatically Refresh Views" from Editor.
- Update your Xcode to the latest one which is much better and also if they don't Have it on the App Store, try getting it from the developer program from the iTunes connect.
hope this helps a little :)
Related Topics
Embedding Videos in a Tableview Cell
Referring to Environment Variables in Swift
Convert Firebase Firestore Timestamp to Date (Swift)
Why I Can Not Inherit from Multiple Classes in Swift Just Like It's Library Classes
How to "Strongify" Optional Self Using Guard in Swift 2.0
How to Convert Range in Nsrange
In Swift, How to Cast to Protocol with Associated Type
How to Connect to Self Signed Servers Using Alamofire 1.3
Swift: Extending Functionality of Print() Function
What Is '@_Silgen_Name' in Swift Language
Create a Paginated PDF-MAC Os X
What Are "Intervals" in Swift Ranges
Scanning Real-World Object and Generating 3D Mesh from It
Alamofire - Nsurlcache Is Not Working
What Does the Swiftui '@State' Keyword Do