After some research on the Internet, I found a fix for this problem.
1) Open the "Application Store" and leave it now.
2) press cmd + shift + g on your desktop and go to / system / library / coreservices /
2) Copy SystemVersion.plist to the desktop, and duplicate the file
3) Open the file with the correct name on the desktop, and not with the copy, and replace the old part with the following:
<key>ProductBuildVersion</key> <string>12E55</string> <key>ProductCopyright</key> <string>1983-2013 Apple Inc.</string> <key>ProductName</key> <string>Mac OS X</string> <key>ProductUserVisibleVersion</key> <string>10.8.4</string> <key>ProductVersion</key> <string>10.8.4</string>
4) Now copy this edited file to / system / library / coreservices and go to the "App Store" application.
5) Download Xcode 4.6.3, now you can, because your OsX is detected as Mountain Lion.
6) After downloading its completion and installing Xcode, reboot.
7) Open the project in beta version of xcode 5, if you have some .xib files, go to the file inspector, check the document version and change the development version to 4.6 instead of 5. Do this for each .xib, then close xcode 5
8) Open Xcode 4.6.3 and restart your project. Check build settings that 10.9 are not present anywhere. Replace it with 10.8 or whatever you need.
9) Clean, create for archiving, archive ... Swipe!
10) Now your project should be checked.
11) After you have downloaded the application, rename SystemVersion.plist (copy) to your desktop and copy it back to / system / library / coreservices. You do not need to reboot.
It's kind of a hack, but if you don't want to reinstall everything, this is the only way to go.
Ps: after replacing SystemVersion.plist, you will notice strange behavior in Os, such as safari, which does not work, and so on, so I suggested duplicating the plist file before changing the version of os. In any case, if you can still use the terminal and "vi" to restore everything, if for some reason you have not copied the original.
Hope this helps someone. I lost a day finding out a solution;)