Replaced include of Foundation with UIKit when necessary