Xcode 8 does full project rebuild

I have found this works consistently, it will however compile swift files if you modify a header included in the bridging header. It will also do full compile if you switch git branches back and forth. Firstly make sure optimization level for debug is set to None (Not whole module optimization) Then, according to https://forums.developer.apple.com/thread/62737 … Read more

Swiftlint warning : For Where Violation: `where` clauses are preferred over a single `if` inside a `for`. (for_where)

The syntax preferred by your swiftlint configuration is: for settingsKeys in searchResults where settingsKeys.key == settingsObject.key { settingsKeys.value = settingsObject.value try context.save() } Which is the similar to for settingsKeys in (searchResults.filter { $0.key == settingsObject.key }) { settingsKeys.value = settingsObject.value try context.save() } If you know there is only one result with the same … Read more

Xcode 8 source control does not show conflicts

I use git in Terminal to solve this problem, mergetool is used. Fisrt, I pull some changes, but oops, not up to date: git fetch origin git pull origin master From ssh://gitosis@example.com:22/projectname * branch master -> FETCH_HEAD Updating a030c3a..ee25213 error: Entry ‘filename.c’ not uptodate. Cannot merge. So get up-to-date and try again, but have a … Read more

Xcode 8 signing errors, can’t log in with account and no provisioning profile

I can’t take credit for this solution, it came from BrianBatchelder on the apple forum. I had to go to “XCode” -> “Preferences” -> “Accounts”, where it turned out my Apple ID had timed-out. After logging-in there, and then restarting Xcode, my profile was automatically “repaired”, and all is now well. Re-starting Xcode is important … Read more

Unit Test fails in Xcode 8

Go to each of your test targets (e.g. MyProjectTests and MyProjectUITests) in the project settings and select “None” for the “Target Application” dropdown. Then reselect your Target Application back for the same targets. This should reset the test targets and make XCode less confused.