Various small project fixes

* Added support for project files without UIKit in the prefix.pch
* Fixed a typo that meant Cocoa wasn't actually imported on Mac
* Added weak reference support for delegate
* Updated project settings