install an older version of xcode on mac lion 10.7
You should be able to login to Downloads for Apple Developers with your Apple ID. From there, search for "Xcode 4." You should see "Xcode 4.6.3" at the top of the list. It includes the iOS 6.1 SDK and OS X 10.8 SDK. This is the last version of Xcode supported by OS X Lion (10.7.x) and was released on June 13, 2013.