How to update XCode with a different userid? So i have been given a macbook by my employer which was used by previous developer for iOS development. Now Appstore is asking me to update XCode to new version and when I am trying to update , it keeps asking me to login using Apple ID. In pop up window, it keeps showing me old user's apple id and doesn't let me change also. It is frustrating that Apple doesn't allow a different user to update the software unless that user has installed it. Any solution for this problem? 

I came across https://stackoverflow.com/questions/10395077/updating-xcode-using-different-apple-account this. The solution here says to delete the XCode from launchpad and then reinstall it. My question is if I delete XCode , will it affect existing iOS project files which were created using XCode?
Delete the app from /Applications and then re-download it from your preferred Apple ID. Launchpad deletion is a bit cleaner, but does the same thing, preserving user files created by Xcode, but deleting the application itself.

Unless you stored project files in /Applications, you won't affect project files or user settings since they get stored by default in /Users