The initial error from Xcode was this before I changed the home folder's name:
<unknown>:0: error: invalid virtual filesystem overlay file '/Users/Mage's_Machine/Library/Developer/Xcode/DerivedData/Clima-flpmhdjedajchpfzcevzpufjznko/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/SwiftyJSON.build/unextended-module-overlay.yaml'
<unknown>:0: error: clang importer creation failed
I changed the name of the home folder of my mac after knowing through some research that Xcode does not accept nonalphanumeric characters on folder names (see: Mage's_Machine)
After doing that, I got this error:
error: PCH was compiled with module cache path '/Users/Mage's_Machine/Library/Developer/Xcode/DerivedData/ModuleCache/2RH9SWJYJWLH7', but the path is currently '/Users/Mage/Library/Developer/Xcode/DerivedData/ModuleCache/2RH9SWJYJWLH7'
Is it correct that I changed the name of the home folder? If yes, how do I compile PCH with a different module cache path to fix this error?
I'm using Cocoapods (Alamofire, SVProgressHUD, SwiftyJSON), after changing the home folder name, I got more errors. One example of these errors:
While building module 'UIKit' imported from /Users/Mage/Desktop/Clima-iOS11-master2/Pods/Target Support Files/SwiftyJSON/SwiftyJSON-prefix.pch:2:
In file included from <module-includes>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h:8:9: fatal error: could not build module 'Darwin'
#import <Availability.h>
~~~~~~~^