Reputation: 1449
I recently updated my OS to Catalina, and updated Xcode to 11.2. Since doing so, when I try to run a release version of my app on my device, I'm simply given the error:
Unable to install the app.
When I tap 'details', it provides me with the following:
App installation failed Domain: com.apple.dtdevicekit Code: -402620395 Failure Reason: A valid provisioning profile for this executable was not found.
User Info: { DVTRadarComponentKey = 487927; "com.apple.dtdevicekit.stacktrace" = ( 0 DTDeviceKitBase 0x000000011baff6e7 DTDKCreateNSError + 109 1 DTDeviceKitBase
0x000000011baffde9 DTDK_AMDErrorToNSError + 792 2 DTDeviceKitBase
0x000000011bb3f56a 90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 164 3 DVTFoundation 0x000000010356f156 DVTInvokeWithStrongOwnership + 73 4 DTDeviceKitBase
0x000000011bb3f301 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1589 5 IDEiOSSupportCore 0x000000011b9c7a25 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4523 6 DVTFoundation 0x00000001036a03ba __DVT_CALLING_CLIENT_BLOCK + 7 7 DVTFoundation 0x00000001036a1a92 __DVTDispatchAsync_block_invoke + 809 8
libdispatch.dylib 0x00007fff68220583 _dispatch_call_block_and_release + 12 9 libdispatch.dylib 0x00007fff6822150e _dispatch_client_callout + 8 10 libdispatch.dylib 0x00007fff68226ace _dispatch_lane_serial_drain + 597 11 libdispatch.dylib 0x00007fff68227452 _dispatch_lane_invoke + 363 12 libdispatch.dylib 0x00007fff68230a9e _dispatch_workloop_worker_thread + 598 13 libsystem_pthread.dylib 0x00007fff6847a71b _pthread_wqthread + 290 14 libsystem_pthread.dylib 0x00007fff6847a57b start_wqthread + 15 ); }
My provisioning profiles are 100% correct, as are my certificates. I have no idea why this is happening, and I've tried absolutely everything to get it to install/run. I've tried:
NONE of the above has worked. I've been at this for 2 days now - help is appreciated. The only way I'm able to install the app file successfully to my device is if I upload it to TestFlight first (which, I can't feasibly do every time I want to test a small change).
Upvotes: 67
Views: 120449
Reputation: 34471
Xcode error
Unable to install the app.
Try to clean Provisioning Profiles
[About]
Xcode -> Window -> Devices and Simulators
-> Right click on your device -> Show Provisioning Profiles...
-> Select Provisioning Profile -> - Remove selected profiles
Upvotes: 7
Reputation: 149
Here is what works for me:
In Some cases:
Upvotes: 1
Reputation: 814
Most probably you are manually code signing your app and use a manual provisioning profile.
The problem occurs when you try to deploy your app to your physical device with distribution provisioning profile.
The solution is to create 2 different provisioning profiles; one for the development and the other is for distribution.
You can manage your provisioning profiles at https://developer.apple.com/account/resources/profiles/list
After that, set your provisioning profiles as the image below:
if you don't see your settings separated into two, you can use the tab above and set your profiles for each type of provisioning profiles (Debug and Release)
Upvotes: 1
Reputation: 126
Do not forget to read the error reason before deleting DerivedData or messing with code signing. I didn't pay attention that in my case error was caused due to:
Cleaning the device helped :)
Upvotes: 0
Reputation: 4139
I had to go to Build Settings and have Excluded Architectures look exactly like this:
Upvotes: 0
Reputation: 88
For me none the answers worked.
The solution was for me to got to your project, then select your project under "TARGETS". Go to "Build Phases" -> "[CP] Embeb Pods Frameworks" and unselect "For Install Builds Only".
Yes, this is disabled in default, but I turned it on once for a problem I had.
Upvotes: 0
Reputation: 14338
My case's
XCode 13.0
to XCode
13.1XCode's bug, not generated proper Provisioning Profile
for iOS app/project
cause later:
Unable to install
failed to get the task for process
both internal specific error reason is:
A valid provisioning profile for this executable was not found
Upvotes: 0
Reputation: 349
Yes, Faced this issue several times for several xcode
and cocoapods
versions.
This issues happen when each pod frameworks can't find specific info.plist
file in project.
Of course I don't know why after pod install
, each pod frameworks can't find info.plist
.
In my case I've linked manually to the project main
info.plist for each pod frameworks. :) Such as below.
After this, I could successfully install app to device
or simulator
.
Hope this help everyone.
Upvotes: 0
Reputation: 1696
I have received this error message after I updated my MacOS (specific to Big Sur) and Xcode (to version 12.5). For me what have solved the problem is just deleting the app from the device and re-install
Upvotes: 0
Reputation: 3464
This is very strange but for me
pod deintegrate
and then pod install
works.
Try out this solution if none of the above works for you
Upvotes: 2
Reputation: 141
In My case just remove the existing build in my phone then run again its working perfectly.
Upvotes: 0
Reputation: 2404
This is a codesign problem.
You can check iOS device logs to see which framework go wrong. filter 'installd' process. you can clearly say which framework codesign is wrong. so just find it out and fix it!
0x16fa53000 +[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]: 77: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.dABVKh/extracted/Your.app/Frameworks/xxx.framework : 0xe8008001 (An unknown error has occurred.)
0x16fa53000 -[MIInstaller performInstallationWithError:]: Verification stage failed
Upvotes: 1
Reputation: 5307
In Xcode 12, I got an error window saying: Unable to install "AppName"
.
I clicked Details
and found that There was no space on my iPhone.
Upvotes: 0
Reputation: 1
I got this issue resolved after a whole day of mental agony.
For WebDriverAgentRunner package, WebDriverAgentRunner --> Build Settings --> Product Bundle Identifier --> Provide a custom bundle identifier name
N.B: Copy the bundle identifier name you just provided.
Move to WebDriverAgentRunner --> Info --> Bundle Identifier --> Provide here the bundle identifier name you just copied
Follow the same step for the APP package you are trying to push.
Clean build folder and start building and APP should get pushed without an issue. Tested on Xcode 11.7
Upvotes: 0
Reputation: 992
Delete derivedData folder
rm -rf ~/Library/Developer/Xcode/DerivedData
Upvotes: 4
Reputation: 349
For me, it was that the watch i was trying to use didn't unlock so i had to lock and unlock my watch again and then it was working fine.
Upvotes: 2
Reputation: 4066
Struggled with this for a long time. What fixed it for me was deleting all the cache data generated by Xcode like Device Support, Archives, Derived data, etc...
Upvotes: 0
Reputation: 304
In my case the problem was occurred by empty framework references in pbxproj. After removing them the problem was fixed.
Upvotes: 1
Reputation: 643
This could be due to running distribution/release scheme. Changing the scheme to debug works for me. Hope this helps someone.
Upvotes: 1
Reputation: 480
"-402620395 Failure Reason: A valid provisioning profile for this executable was not found."
I had this issue as well and solved it:
This means that your provisioning profile is not set to development. You need to create a new provisioning profile for development, which is different than a profile set for distribution. Then, in signing and capabilities, in your app settings on xcode, choose your development profile if you want to install on your device. Don't worry about distributing with your dev profile, you must choose which profile you want to use when pushing to app store (its set to none and you need to switch it).
Another solution would be choosing automatically manage signing in settings, but that has defaults set when pushing to app store which you might not want.
Upvotes: 7
Reputation: 3726
This issue is only related to CODE SIGNING
But, the key point to note here is, if you are using XCode 11.x version. Not only the code signing in your project, but we should check the code signing in Thirdparty SDKs or dependencies that we add to our project.
Steps to verify the Code Signing of 3rd party SDks:
Go to Targets -> Signing & Capabilities -> Select all tab -> Bundle Identifier If you see any unevenness in the identifier like, identifier with 4 seperators (Eg: com.company.mac.app)
Change it to com.* and enter.
Make sure your XCODE COMMAND LINE TOOLS is set with XCode 11.x
Now, use below command to rebuild the SDK, with the changes done in above step-3
carthage build --no-skip-current --cache-builds --platform iOS
Now copy the framework generated from, carthage folder of source code, and replace the existing SDK in your project.
Repeat the same for process for all the 3rd party SDKs, in your project.
NOTE: Make sure you marked all the 3rd party SDKs as Embed & Sign in
Targets => General => Frameworks, Libraries, and Embedded Content
Upvotes: 2
Reputation: 12224
I got this error when running a project that had a library under Embed Frameworks
which had Code Sign on Copy
unchecked. Check-marking this resolved this issue for me.
Upvotes: 0
Reputation: 3583
For me, it's due to Dynamic Frameworks which I have added in the application. Initially, I have selected (Embed + Don't Sign) option for the dynamic frameworks.
Changing it to (Embed & Sign) for such frameworks resolved the issue for me.
Upvotes: 26
Reputation: 765
Here is what works for me:
Upvotes: 22
Reputation: 2361
I manage to fix this issue when first I clean:
cmd + k
shift + cmd + k
and then I delete all the content of Deriving Data the path of the folder should be like this
/Users/youruser/Library/Developer/Xcode/DerivedData
Or you can check it in
Xcode -> Preferences -> Locations
Upvotes: 8
Reputation: 81
I have the same issue and the problem was that I were using unpaid account and the total number of free development profiles was reached ,so you have to use paid account
detailes :
Failure Reason: The maximum number of apps for free development profiles has been reached
Upvotes: 0
Reputation: 626
I had the same problem until I found this solution. I had to clear out all of my old certificates and provisioning profiles and then create new certificates with "Apple Development" and "Apple Distribution," instead of the "iOS..." option.
Upvotes: 1
Reputation: 120103
Even if you can install it on your device, you can't pass AppStore: See here for logs
Download the latest valid to AppStore version xip file.
Xcode 11.2 had some issues and crashes older iOS devices and does not install on newer iOS devices. So for now you can:
Upvotes: -1