Xcode:找不到已安装的应用程序。声称安装成功,但在设备上找不到应用程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/56614661/
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 10:58:36  来源:igfitidea点击:

Xcode: Could not locate installed application. Install claimed to have succeeded, but application could not be found on device

iosxcode

提问by Swissdude

I manually deleted my app from the iPhone and now I get this error message when trying to run it again from Xcode.

我从 iPhone 手动删除了我的应用程序,现在我在尝试从 Xcode 再次运行它时收到此错误消息。

I cleaned the build folder, restarted the device, Xcode and the Mac, nothing helps.

我清理了构建文件夹,重新启动了设备、Xcode 和 Mac,没有任何帮助。

I also tried everything that's mentioned here: Install claimed to have succeeded, but application could not be found on device

我也尝试了这里提到的所有内容:安装声称已成功,但在设备上找不到应用程序

How do I force a re-installation?

如何强制重新安装?

回答by Tan Vu

I ran into the same issue while testing a app on iOS 13 via XCode 11.0. Building via the legacy system solved it (File > Workspace Settings... > Build System > Legacy Build System).

我在通过 XCode 11.0 在 iOS 13 上测试应用程序时遇到了同样的问题。通过遗留系统构建解决了这个问题(文件 > 工作区设置... > 构建系统 > 遗留构建系统)。

Hope it helps

希望能帮助到你

回答by Swissdude

As always, when the question is posted on SO, one finds a solution ;)

与往常一样,当问题发布在 SO 上时,就会找到解决方案;)

I edited the Scheme, setting the build configuration from debug to release and that installed the app again. Changed it back to debug and now it's running again as expected.

我编辑了方案,设置了从调试到发布的构建配置,然后再次安装了应用程序。将其改回调试,现在它按预期再次运行。

回答by Marcin Klimek

I had a similar issue after one of Carthage/XCode updates. It means iOS was not able to install app on the phone. XCode apparently is not able to provide this information directly. The first thing to do is open your phone console - go to Window/Devices and Simulatorsthen select your device and click Open Console. In the console you can search for your app name what should provide you more detailed fail info. In my case it was sth like this:

在 Carthage/XCode 更新之一后,我遇到了类似的问题。这意味着 iOS 无法在手机上安装应用程序。XCode 显然无法直接提供此信息。首先要做的是打开您的电话控制台 - 转到Window/Devices and Simulators然后选择您的设备并单击Open Console。在控制台中,您可以搜索您的应用程序名称,该名称应该为您提供更详细的失败信息。就我而言,它是这样的:

Applications did fail to install: (
    "<LSApplicationProxy: 0x118913b60> com.mydomain.myapp (null) <com.mydomain.myapp <INVALID >:0>"
) (appInfos: (null))

There was another console log few rows before flagging the problem:

在标记问题之前还有几行控制台日志:

0x16f4df000 -[MIExecutableBundle codeSigningInfoByValidatingResources:performingOnlineAuthorization:ignoringCachedSigningInfo:checkingTrustCacheIfApplicable:error:]: 789: Code signing identifier (org.alamofire.Alamofire.iphonesimulator) does not match bundle identifier (org.alamofire.Alamofire.iphoneos) for /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.E83T1l/extracted/myapp.app/Frameworks/Alamofire.framework

There was an issue with one of the frameworks AlamofireI'm using in the project. I changed bundle identifier of the project and build framework again what solved the problem.

Alamofire我在项目中使用的框架之一存在问题。我更改了项目的包标识符并再次构建框架解决了问题。

Hope it helps!

希望能帮助到你!

回答by Joel Rubinsky

In my case, the problem was an embedded framework that was not being signed. In the General tab of the project settings, setting the embed setting to 'Embed & Sign' did the trick.

就我而言,问题是一个未签名的嵌入式框架。在项目设置的常规选项卡中,将嵌入设置设置为“嵌入和签名”即可。

回答by Satish

I was facing similar issue in Xcode 11.1. I have fix this issue. Not sure about this solution that it will to work for all or not.

我在 Xcode 11.1 中遇到了类似的问题。我已经解决了这个问题。不确定这个解决方案是否适用于所有人。

My device iOS version was older then the iOS Xcode target build version.

我的设备 iOS 版本比 iOS Xcode 目标构建版本旧。

Steps:

脚步:

  1. I have put Xcode target Device to iPhone device OS version.
  2. Delete derived data
  3. Start xcode and open project
  4. Clean the project and gererate build and install in device
  1. 我已将 Xcode 目标设备放入 iPhone 设备操作系统版本。
  2. 删除派生数据
  3. 启动xcode并打开项目
  4. 清理项目并在设备中生成并安装

Note: Please check your developer account, certificate validation and already registered device warning.

注意:请检查您的开发者帐户、证书验证和已注册设备警告。

Hope this solution will help some peoples. Happy coding.

希望这个解决方案能帮助一些人。快乐编码。

回答by James Trickey

After trying everything here, for me the solution was to change my distribution profile to use the new Apple distribution certificate that covers all apple platforms. This should be compliant with xcode 11 (if you're not experiencing one of the other million problems since the "upgrade").

在尝试了这里的一切之后,对我来说,解决方案是更改我的分发配置文件以使用涵盖所有 Apple 平台的新 Apple 分发证书。这应该符合 xcode 11(如果自“升级”以来您没有遇到其他一百万个问题之一)。

The cert change is mentioned here: https://developer.apple.com/documentation/xcode_release_notes/xcode_11_release_notes

此处提到了证书更改:https: //developer.apple.com/documentation/xcode_release_notes/xcode_11_release_notes

Cert creation instructions here: https://help.apple.com/developer-account/#/devbfa00fef7

这里的证书创建说明:https: //help.apple.com/developer-account/#/devbfa00fef7

Once done, make sure the correct profile is selected in Signing & Capabilities, and 'Apple Distribution' is selected under Build Setting -> Signing for the appropriate build configurations

完成后,确保在 Signing & Capabilities 中选择了正确的配置文件,并在 Build Setting -> Signing 下选择了“Apple Distribution”以获取适当的构建配置

回答by bonesyblue

A solution that solved this issue for me was to check the signing team for my tests target. Selecting the same development team then meant that my app was able to be built and run on device.

为我解决了这个问题的一个解决方案是检查我的测试目标的签名团队。选择相同的开发团队意味着我的应用程序能够在设备上构建和运行。

Build system: New Build System

构建系统:新构建系统

Xcode: Version 11.1

Xcode:版本 11.1

回答by Mogens Egeskov-Madsen

On your iPhone go to Settings/General/Profiles & Devices/Apple Development: "YOUR APPLE ID" and delete all apps from there. It fixed the problem for me.

在您的 iPhone 上,转到设置/通用/配置文件和设备/Apple 开发:“您的 Apple ID”并从那里删除所有应用程序。它为我解决了问题。

回答by Liubov Zaprivoda

In my case it was a problem with new Development certificate. It's created automatically after Xcode updated to 11 and may not be included in current provisioning profile.

就我而言,这是新开发证书的问题。它是在 Xcode 更新到 11 后自动创建的,可能不包含在当前的配置文件中。

回答by Ninetyn Percent

Uninstall all the other apps that are under the same "Organization" or "Bundle Identifier" with your current app and try again.

卸载与您当前的应用程序在同一“组织”或“捆绑标识符”下的所有其他应用程序,然后重试。

It works for me. Hope it does for you too.

这个对我有用。希望它也适合你。