Since yesterday I\'ve been getting the following error when trying run an app on my device: \"A valid provisioning profile for this executable was not found.\". This is afte
It takes a long time, and we did all the above solutions and they didn't work at all so our team decided to remove Pod
files and run pod install
again. finally, our OTA uploaded ipa installed on the user's device.
best Solution
clean project menu > Product > Clean Build Folder
and /Users/{you user name}/Library/Developer/Xcode/DerivedData
go to your project directory and remove Podfile.lock
,Pods
folder,pod_***.framework
run pod install
again
Done
In my case, here are the steps that I resolve the problems:
~/Library/MobileDevice/Provisioning Profiles/
The reason to take the steps above is to remove the old provisioning profiles that messed up the building process.
So this won't be the case for everyone but I thought I'd post it here anyway as there doesn't seem be any answers relating to it.
In my case I was working on an app that was being developed in ReactNative, my issue was that although my signing was correct on the main app target the test target did not have any signing applied to it.
For some reason React Native requires that both your app target and your test target are signed in order to install the app on a device.
It does specify this in the official documentation on building for device however its the only instance I have ever seen where the test target is built alongside the app for anything other than testing.
In order to sign your test target, go to your project settings by opening the project navigator (⌘1) and select your project at the top.
Inside the main editor select your main app target under Targets (should have the same name as your project) and ensure the signing is correct, then select the test target (likely just under your main app target, it should be the same name with Tests appended) and make sure its signed in the same way.
Rebuild your app and it should now install successfully.
Credit for this goes to Leo Lei, his answer here saved me a lot of headache: https://stackoverflow.com/a/48657358/732844
As an aside, if anyone knows why react native requires your test target be built alongside your app target could they let me know? The only reason I can think of is to streamline the interface so react can build a single app and do both running and testing without needing to rebuild but i'm just guessing with that one.
I was struggling with the same issue and the solution in my case was to log in to the developer account(s). After updating to Xcode 10 all accounts were logged out.
Use the menu "Xcode -> Preferences ... -> Accounts" and make sure all accounts you use are logged in so the provisioning profiles are accessible.
Make sure the provisionning profile comes from the same team in both your target and your targetTests.
Did you maybe change your developing device? It happened to me when I bought a new iPhone and gave it the same name with my previous device. A clean build however fixed the issue.