74

I've recently changed apple ID and I've downloaded xCode on mac with another apple ID.

Not the mac store informs me there is a new version for xCode but I need to insert password of the older Apple ID, and I can't just use the new one. It seems the app is associated with the old apple ID.

I can't even download a new xCode using the new apple id, because it only gives me the option to update it with the old Apple ID.

Dylan Corriveau
  • 2,561
  • 4
  • 29
  • 36
aneuryzm
  • 63,052
  • 100
  • 273
  • 488
  • 6
    Delete Xcode, and reinstall it using the new Apple ID. – Mick MacCallum Jul 25 '12 at 17:49
  • @NSPostWhenIdle Post the comment as answer, so I can accept it. – aneuryzm Jul 26 '12 at 07:32
  • Can I use two different apple Id to develop two app in a one Xcode – sejn Jan 31 '20 at 07:08
  • I am using Mac for work reasons only, and every day I wonder more and more how Apple is often praised for being more user friendly than Windows. When you think you have finally seen it all, they manage to surprise you even further with things like this. Leaves me speechless. Thanks for your solution @MickMacCallum – Spray'n'Pray May 07 '22 at 22:57

8 Answers8

178

To make the AppStore forget the old credentials with which the app was downloaded, you must remove the _MASReceipt directory in the app itself.

To do this:

  1. Open Finder and navigate to Applications,
  2. Ctrl+Click XCode and choose "Show Package Contents",
  3. Expand the Contents directory and click _MASReceipt to select it,
  4. Type Command+Delete to delete the directory permanently---you will be prompted for your credentials since this is a protected file.

Quit and restart AppStore, then find XCode. The button should now say "Free" or "Install" instead of "Update". Clicking it will update your XCode to the latest version as the currently logged-in Apple user.

jimbo
  • 11,004
  • 6
  • 29
  • 46
  • Appstore wants to download the whole thing again, the point was to update the current version not to get a full new copy. – Ali Feb 16 '13 at 12:41
  • I believe that's how it does the update. I don't think it has any sort of incremental update option, just overwrites with the latest. – jimbo Feb 19 '13 at 19:27
  • this worked for me too, but i had to hit the install/update button a couple of times in the App Store. clicking the button the first time gave me the same warning as before. but it worked in the end. – Randy L Apr 02 '13 at 04:21
  • 2
    Excellent solution. Tried few suggestions from apple forum but didn't work: https://discussions.apple.com/thread/2794280?start=0&tstart=0 – Krishna May 25 '13 at 12:35
  • worked perfectly. The App Store kept asking for an account that I had lost which was very annoying. – hanumanDev May 25 '13 at 14:46
  • Excellent! Quick and enough. – Lobo-X Jul 19 '13 at 11:20
  • This is brilliant - it's bugged me at work on the macbook I inherited from another developer for 2 months now. I suppose this will likely work with any free apps installed under a different owner, but at least the xCode thing has solved my troubles. This should be the winning answer, but I guess it's too late for that. – Don Kelley Mar 31 '14 at 16:49
  • 1
    App store gave me "unexpected error" and I was beginning to wish that I had backed up the receipt file, but after a re-start of the Mac it worked. Thanks. – dawid Feb 18 '15 at 05:15
  • 3
    This works. Thank you. Restarting AppStore didn't do it for me. I had to restart the Mac. Also, you do not need to permanently delete that folder if you're worried about it. Just move it to trash. – matt.dolfin Mar 31 '16 at 14:14
  • as of Aug. 2016, this solution worked for me. The only extra thing I had to do was to **restart** my Mac as well. – mfaani Aug 08 '16 at 21:19
  • 1
    I am not able to find _MASReceipt folder in contents might be apple made changes in directory structure. – Prabhat Kasera May 26 '17 at 10:04
  • this worked but is the update really 8 GB? or it it's starting to download the whole thing? – Ali123 May 03 '20 at 14:03
23

Assuming you have the issue where you are getting the error

To update this application, sign in to the account you used to purchase it.

on the App Store app, go to Store --> Sign Out

and then do the stuff suggested here

check this fix from Beartech at https://discussions.apple.com/thread/2794280?start=15&tstart=0

The App Store used Spotlight in some way. My fix was to add the entire HD to the "Privacy" tab in the Spotlight System prefs pane, close the prefs and wait 30 seconds, re-open and remove your HD from the Privacy tab. Spolight begins reindexing. Re-opened the App Store and problem was fixed! Posting this here for others who might search later on. Also filed a bug report with Apple.

hope this fixes the issue for you!

edit: I think this is a different issue compared to what I had. Your only option is probbaly to delete xcode, and download with your new Apple ID

Nitin Alabur
  • 5,812
  • 1
  • 34
  • 52
  • 1
    The Beartech link leads to another link http://osxdaily.com/2011/12/10/disable-or-enable-spotlight-in-mac-os-x-lion/. Following that procedure did indeed work. After indexing proceeded for a while, the app store told me WHICH id it wanted, and I logged in with that. – cayhorstmann Sep 07 '12 at 22:19
  • 3
    This answer assumes you own the account that was used to 'purchase' xcode. If the account belonged to, say, a former employee, this answer doesn't help. – bluescrubbie Nov 15 '12 at 00:54
  • 1
    This worked for me. How on the earth I would have figured this out own my own is beyond me... – Venkat D. Feb 01 '13 at 21:24
  • @bluescrubbie I dont see the point of transferring accounts per se. every single mac I work on, every iOS/Mac app I purchase is on my personal iTunes Account (of course, work related stuff gets expensed) – Nitin Alabur Feb 01 '13 at 22:06
  • 1
    @VenkatD. glad it helped! luckily, earth has StackOverflow :) – Nitin Alabur Feb 01 '13 at 22:07
  • glad to see an year old answer still helping! – Nitin Alabur Oct 09 '13 at 16:23
  • 1
    In my case bluescrubbie was right. @jimbojw's solution was necessary to remove ex-employee's account. – conner.xyz Jul 24 '15 at 16:28
  • Reading this answer, I thought it'd be absolutely ridiculous if it worked. And what do you know, it worked perfectly. I have no idea why this is the solution, but what can I say - thanks so much for posting what seems like an insane way to fix logging into Xcode. – Jarrod Robins Feb 08 '16 at 00:40
  • @JRod wow! glad it helped. did you have this issue with XCode 7 on Yosemite? – Nitin Alabur Feb 24 '16 at 19:57
  • @NitinAlabur No, I had it with Xcode 7 on El Capitan. – Jarrod Robins Feb 25 '16 at 03:22
  • "The App Store used Spotlight in some way." - on my laptop a colleague had an old copy of XCode.app in their home directory, and the AppStore was seeing this. After deleteing this, and no more hits were left in Spotlight, I could re-install the latest version. – Luke Quinane May 05 '16 at 23:59
8

To add an Apple ID account

  1. Choose Xcode > Preferences.
  2. At the top of the window, click Accounts.
  3. In the lower-left corner, click the Add button (+) .
  4. Choose Add Apple ID from the pop-up menu.
    enter image description here

  5. In the dialog that appears, enter your Apple ID and password, and click Sign In.
    enter image description here

To remove an Apple ID account

  1. Choose Xcode > Preferences.
  2. Click Accounts at the top of the window.
  3. Select the Apple ID account you want to delete in the left column.
  4. Click the Delete button (–) in the lower-left corner.

Follow link for source and detailed information.
https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/ManagingAccounts/ManagingAccounts.html

Aamir
  • 16,329
  • 10
  • 59
  • 65
  • this won't work: I have successfully removed the old account but the AppStore keeps asking for the password of that account...which makes my wonder if the old account was actually "removed"... – afe Nov 20 '18 at 16:38
7

open a folder Finder-> Go -> Applications then find Xcode in the folder. Right click on the Xcode. -> Get Info at the bottom, there is Sharing & Permissions, open it, click on the lock icon on the right corner. make Read & Write for everyone in the list.

then wait 5-10 seconds. just try update Xcode again. it will start to updating...

fulberto100
  • 313
  • 5
  • 23
1

As NSPostWhenIdle said: "Delete Xcode, and reinstall it using the new Apple ID."

Bart
  • 19,692
  • 7
  • 68
  • 77
Victor Zamanian
  • 3,100
  • 24
  • 31
  • While OP was able to get past the issue without doing this, this is exactly what I had to do. – wberry Jul 02 '13 at 01:17
1

For XCode 5

  1. Xcode menu > Preferences > Accounts
  2. At the bottom left, click the +
  3. Click on Add Apple ID.
absessive
  • 1,121
  • 5
  • 14
  • 36
1

I had a somewhat similar issue. My AppleId was changed- the username - from "ab***" to "ab***@gmail.com". The new format requires an email address, and my AppleId dates back many years. I suddenly couldn't export anything from Xcode. How I fixed it:

  1. Preferences/Accounts
  2. Delete old AppleId
  3. Add new AppleId.

Apple seemed to sort itself out on the backend and the only issue was Xcode hanging around to old references to defunct and/or bad usernames (to the same keyed account. Go figure.)

Anna Billstrom
  • 2,482
  • 25
  • 33
-1

If you restore your device to 13.3.0 will fix your problem, it worked for me

blueprint
  • 61
  • 2
  • 11