Xcode 10: A valid provisioning profile for this executable was not found

前端 未结 30 1394
名媛妹妹
名媛妹妹 2020-11-29 15:12

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

相关标签:
30条回答
  • 2020-11-29 15:41

    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

    1. clean project menu > Product > Clean Build Folder and /Users/{you user name}/Library/Developer/Xcode/DerivedData

    2. go to your project directory and remove Podfile.lock ,Pods folder,pod_***.framework

    3. run pod install again

    Done

    0 讨论(0)
  • 2020-11-29 15:42

    In my case, here are the steps that I resolve the problems:

    1. Go to this folder: ~/Library/MobileDevice/Provisioning Profiles/
    2. Remove all the provisioning profile
    3. In Xcode 10 menu > Product > Clean Build Folder
    4. In Xcode 10 menu > Xcode > Preferences > Account > Download Manual Profiles
    5. In Xcode 10 menu > Product > Build / Archive

    The reason to take the steps above is to remove the old provisioning profiles that messed up the building process.

    0 讨论(0)
  • 2020-11-29 15:44

    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.

    0 讨论(0)
  • 2020-11-29 15:44

    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.

    0 讨论(0)
  • 2020-11-29 15:46

    Make sure the provisionning profile comes from the same team in both your target and your targetTests.

    0 讨论(0)
  • 2020-11-29 15:46

    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.

    0 讨论(0)
提交回复
热议问题