I ran into a similar issue, so for anyone having this, here is another possible solution:
If you go to your Target > General > Linked Frameworks and Libraries, you should see UIKit (if not, add it). Make sure it says "Optional" instead of "Required" next to it...