Xcode: Could not locate installed application. Ins

2020-05-26 03:20发布

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

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

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?

标签: ios xcode
19条回答
Anthone
2楼-- · 2020-05-26 03:30

Problem occured on XCode 11

TL;DR:

Try changing Embed option in General=>Section Frameworks, Libraries.. to Do Not Embed (although it sounds strange)

In my General=>Section Frameworks, Libraries.. list are Security.framework and the CocoaPods Pods_projectname.framework amongst others. Default setting of these two was Do Not Embed. Sounded strange to me, so I changed it without need alternating to Embed & Sign or Embed Without Signing. With both options the error occured!

查看更多
Melony?
3楼-- · 2020-05-26 03:32

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

This was the solution that worked for me.

查看更多
该账号已被封号
4楼-- · 2020-05-26 03:33

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

查看更多
地球回转人心会变
5楼-- · 2020-05-26 03:35

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 Simulators then 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:

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 Alamofire I'm using in the project. I changed bundle identifier of the project and build framework again what solved the problem.

Hope it helps!

查看更多
闹够了就滚
6楼-- · 2020-05-26 03:37

As Marcin's answer suggested, I visited the phone console and in my case, it is this error message:

-[MIFreeProfileValidatedAppTracker _onQueue_addReferenceForApplicationIdentifier:bundle:error:]: 182: This device has reached the maximum number of installed apps using a free developer profile: {(

So if you are signing your app with a Personal Team certificate, make sure that you don't have more than 3 apps.

Read more here: Why can I not install more than three apps?

查看更多
叛逆
7楼-- · 2020-05-26 03:38

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

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.

查看更多
登录 后发表回答