None of the above worked on my 10.8 xcode 4.5.1.
Most of the paths given above are not found.
Here is my solution note.
- Download xcode_4.4.1_6938145.dmg in https://developer.apple.com/downloads/
- Load up the dmg file then go to Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ you will find iPhoneOS5.1.sdk (this is what i want in this case).
- Copy iPhoneOS5.1.sdk folder into your Xcode folder /Applications/Xcode/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
- Restart Xcode
- Open Xcode project setting->build settings->base SDK, then you will see iOS 5.1 option.