"Could not build Objective-C module 'Photos'" Error

I was working through Chapter 6 and I suspect that I accidentally edited something in PHPhotoLibrary.h because of the second error:

“Expected identifier or ‘(’
PHPhotoLibrary.h”

I tried deleting the derived data for this project and cleaning the project, but the error persists.

if you edited a header in the iOS SDK, cleaning derived data will not help. I’ve never had this problem, but maybe try downloading a different version of iOS SDK and running the project on it.

I was using Xcode 8.1 and I made a typo in the copied code. I tried in Xcode 8.2 then fixed the typo and everything works fine now in both Xcode 8.1 and 8.2. I cannot reproduce the bug. Very strange.