xcode Mac App Store 声称已经安装了我的应用程序的较新版本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10560619/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 00:17:28  来源:igfitidea点击:

Mac App Store claims newer version of my app is already installed

xcodemacosapp-storemac-app-store

提问by simon.d

I'm trying to install my app from the Mac App Store now that it's been published. I'm using the same machine as the one I developed the app one. For some reason, the App Store claims "A newer version of this app is already installed on this computer." I haven't touched the version number since I submitted it so this is strange.

我正在尝试从 Mac App Store 安装我的应用程序,因为它已经发布。我使用的机器与我开发应用程序的机器相同。出于某种原因,App Store 声称“此计算机上已安装此应用程序的较新版本。” 自从我提交以来,我没有碰过版本号,所以这很奇怪。

I've removed all references of the app from Applications, Library/Preferences, Library/Application Support, Library/Caches, /var, and Trash. I've also cleaned the Product from within Xcode.

我已从 Applications、Library/Preferences、Library/Application Support、Library/Caches、/var 和 Trash 中删除了该应用程序的所有引用。我还从 Xcode 中清理了产品。

Any suggestions?

有什么建议?

Thanks!

谢谢!

采纳答案by Tim

Go to ~/Library/Developer/Xcode/DerivedData/ and delete your app's build folder.

转到 ~/Library/Developer/Xcode/DerivedData/ 并删除您的应用程序的构建文件夹。

回答by Mat E.

I had this problem with CoBook on Mountain Lion and nothing out there seemed to work until I found this:

我在 Mountain Lion 上使用 CoBook 时遇到了这个问题,在我发现这个之前似乎没有任何效果:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

Source: http://web.archive.org/web/20130519023616/http://www.hacktheday.com/force-reinstall-application-downloaded-from-mac-app-store

来源:http: //web.archive.org/web/20130519023616/http: //www.hacktheday.com/force-reinstall-application-downloaded-from-mac-app-store

回答by Jonathan Berger

To fix this problem, you need to perform two steps.

要解决此问题,您需要执行两个步骤。

  1. Delete all instances of your app. There are likely copies hiding in your home folder in ~/Library/Developer/Xcode/DerivedData/
  2. Reset the userdomain in the Launch Services database with /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain user
  1. 删除您的应用程序的所有实例。在 ~/Library/Developer/Xcode/DerivedData/ 的主文件夹中可能隐藏着副本
  2. 使用以下命令重置userLaunch Services 数据库中的域 /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain user

The lsregister command manages the Launch Service database, or the database that keeps track of applications installed on your Mac and what types of files they open.

lsregister 命令管理启动服务数据库,或用于跟踪 Mac 上安装的应用程序及其打开的文件类型的数据库。

It's only necessary to reset the userdomain (unlike the other answer from Mat E. that also resets the systemand localdomain) since your XCode DerivedData exists in your individual user directory. Only resetting this domain will prevent unnecessary warnings about running an app for the first time from reappearing.

这是唯一需要重置user域(不像从垫E.对方的回答也复位systemlocal域),因为您的Xcode DerivedData在你的个人用户目录中。只有重置此域才能防止有关首次运行应用程序的不必要警告再次出现。

回答by simon.d

This happened again to me but unfortunately the other solutions didn't work. This is what ended up working:

这再次发生在我身上,但不幸的是其他解决方案不起作用。这就是最终的工作:

  1. Open the App Store. From the menu bar click Store > Sign In
  2. Click Purchases from the top of the App Store window.
  3. Select your app in the list. Then right or control click where you see Installed then click Install.
  4. Make sure and use the same Apple ID used for the original purchase.
  1. 打开应用商店。从菜单栏中单击商店 > 登录
  2. 单击 App Store 窗口顶部的购买。
  3. 在列表中选择您的应用。然后右键或控制单击您看到已安装的位置,然后单击安装。
  4. 确保并使用与原始购买相同的 Apple ID。

This also works for free apps.

这也适用于免费应用程序。