locked
iPhoneSimulator build results in "No valid iOS code signing keys found in keychain." RRS feed

  • Question

  • User1044 posted

    Previous versions of Xamarin.iOS (8.9.x and earlier) incorrectly assumed that if the Entitlements.plist file in your project had no keys set, then the app did not need to be signed for use with the iOS Simulator.

    This, however, was wrong. The problem is that Entitlements also need to be merged from the selected Provisioning Profile, so simply checking the contents of the Entitlements.plist file was not enough.

    Starting with Xamarin.iOS 8.10, if the Entitlements.plist file is set at all for the iPhoneSimulator build configuration, then codesigning is required and thus an iOS code signing certificate is required to be installed in your keychain.

    If you do not need your iOS Simulator builds to codesign (because you do not need to test any Entitlement features), then you can go into the iOS Bundle Signing options panel within your Project Options and remove the "Entitlements.plist" value from the Custom Entitlements textbox.

    Friday, May 1, 2015 2:10 PM

All replies

  • User37696 posted

    In VS, the iOS Bundle Signing menu is not editable when targeting Simulators. You may need to manually work around this by checking the .csproj file and removing the correct elements. Take a look at the bug filed here for suggestions on how to work around.

    Friday, May 1, 2015 3:28 PM
  • User54688 posted

    problem solved, thx :)

    Monday, May 4, 2015 7:01 PM
  • User110264 posted

    Worked for me, thanks!

    Tuesday, May 5, 2015 5:58 PM
  • User104279 posted

    The resolution for me was to unload the ios project. Open the csproj file, find this element

    BEFORE

    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
        <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
    </PropertyGroup>
    

    AFTER

    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
        <CodesignEntitlements></CodesignEntitlements>
    </PropertyGroup>
    

    Removing Entitlements.plist from the CodesignEntitlements element.

    Wednesday, May 6, 2015 7:11 PM
  • User107757 posted

    I am having this problem with our AppStore build. It was working fine a couple weeks ago -- submitted to apple -- and it got approved over the weekend -- now working on an update. I can't remove the entitlements.plist as suggested here because this is our app store build. Any thoughts? We're using the Xamarin Studio, not VS.

    Monday, May 18, 2015 6:25 PM
  • User13824 posted

    @JohnAlbano.6183, the App Store build is built for iPhone device, whereas this thread is only about the iPhone simulator deployment scenario. The error message in your case therefore mostly likely means that you do not in fact have a valid App Store signing key in your Mac's keychain. See for example http://forums.xamarin.com/discussion/comment/63318/#Comment_63318 for some additional troubleshooting steps for that (different) issue. One possible cause is that your App Store signing certificates might have expired.

    Wednesday, May 20, 2015 5:28 AM
  • User110594 posted

    After I did these changes, all ipad options are gone

    Friday, May 22, 2015 6:00 AM
  • User110594 posted

    It used to be, I can fire the ipad simulator from visual studio

    Friday, May 22, 2015 6:01 AM
  • User41170 posted

    The proposed solution does not work for me in Ad Hoc and AppStore builds. Is there any update?

    Nm - looks my distribution cert actually expired - this post was super helpful in resolving the problem: http://forums.xamarin.com/discussion/comment/63318/#Comment_63318

    Sunday, May 31, 2015 11:56 PM
  • User113291 posted

    Hello World... In my cross platform solution created in Visual Studio 2013 I have the Build error: No valid iOS code signing keys found in keychain.

    How can I find the .csproj file to edit? Where can I see the file to opend?

    Monday, June 1, 2015 7:10 PM
  • User13824 posted

    It used to be, I can fire the ipad simulator from visual studio

    MichaelLeung.3031, the closest related issue I've run into myself is Bug 30646. To double-check if you might be hitting that issue, you can look under "Project properties -> iOS Application -> Devices". If that field is set to "iPhone/iPod", then the iPad simulators will not appear in the device selection drop-down menu. You will need to change the value to "iPad" or "Universal" to see iPad simulators in the drop-down menu.

    If the issue you're seeing is different from Bug 30646, then the most direct way forward would be if you get a chance to file a new bug for the specific problem you are seeing (ideally including a test case and a list of steps to reproduce). (If that link redirects to the top-level kb.xamarin.com/ page the first time you click it, try clicking it once more.) Thanks!

    Monday, June 1, 2015 9:26 PM
  • User13824 posted

    RaulArevaloLuna, the first hit on Google for "how to edit .csproj file" is a suitable answer from StackOverflow:

    http://stackoverflow.com/questions/5129090/how-to-edit-csproj-file/5129214#5129214.

    Monday, June 1, 2015 9:29 PM
  • User132704 posted

    @jstedfast and @JohnMiller it works like a charm in VS2015RC!

    Tuesday, June 9, 2015 11:57 AM
  • User87745 posted

    The version that came out yesterday on the site https://releases.xamarin.com/alpha-release-cycle-5-service-release-2/ Already comes with this corrected functionality, is so Xamarin change the update channel for the Alpha version and wait for the installation, and this well to stable version !! The production version due out until the middle of this month !!

    Thursday, June 11, 2015 10:00 PM
  • User80438 posted

    I am getting the same error. 'No valid iOS code signing keys found in keychain'. I have removed the Entitlements.plist out of the csproj by editing it. But I still get this error when trying to deploy to my iPhone. This is on a new MacBook btw. I followed the XCode provisioning again to the letter and all that looks good, but still the same error. This is running on either W8 or W10 with VS2015. I currently can not test my app on my iphone due to this error. Can anyone help me please?

    Friday, July 31, 2015 2:41 PM
  • User1044 posted

    @jonathanyates

    You MUST codesign for iPhone deployment. Removing the Entitlements.plist only "fixes" this for iPhoneSimulator.

    You'll need to go to https://developer.apple.com and create a development certificate to use for deploying to your iOS device for testing.

    Friday, July 31, 2015 3:19 PM
  • User80438 posted

    Yes I've done all that. I followed this to the letter:

    http://developer.xamarin.com/guides/ios/gettingstarted/installation/deviceprovisioning/

    I have my iPhone set up against my provisioning profile which is shown in XCode. I've tried with both wildcard and specific AppID's. Still doesn't work.

    Is there some other magic I need to do?

    Friday, July 31, 2015 3:45 PM
  • User1044 posted

    Those are provisioning profiles, not codesigning certificates. You need both. The error is about a missing codesigning certificate.

    If you created a certificate, you need to make sure to import it into your keychain.

    Friday, July 31, 2015 3:48 PM
  • User80438 posted

    Where is the documentation for this it is not described in the provisioning link above?

    Friday, July 31, 2015 3:54 PM
  • User1044 posted

    http://developer.xamarin.com/guides/ios/gettingstarted/installation/deviceprovisioning/#Requesting-a-Development-Certificate

    Friday, July 31, 2015 3:59 PM
  • User13824 posted

    As a little test, you can also try deploying a new blank Xcode iOS project to the device from Xcode to make sure everything is working smoothly from that side.

    Friday, July 31, 2015 4:01 PM
  • User80438 posted

    Yes I have followed all of that. See attached screenshot for what I have showing in XCode Account.

    Friday, July 31, 2015 4:03 PM
  • User1044 posted

    You do not have an "iOS Development" certificate. That's the problem. You only have one for Mac.

    Friday, July 31, 2015 4:04 PM
  • User80438 posted

    Really? I think I do. This is what is showing in the Dev Center. See attached.

    Friday, July 31, 2015 4:09 PM
  • User80438 posted

    Why does XCode not show this?

    Friday, July 31, 2015 4:09 PM
  • User1044 posted

    Those are provisioning profiles (the website UI is really confusing). The Xcode screenshot shows pretty clearly that you do not have an iOS Development certificate - or, if you do, it's not installed on your machine.

    If you had an iOS development certificate in your keychain, it would show up in Xcode as "iOS Development", but you do not have that. You have "Mac Development" instead, which is not the same thing.

    Friday, July 31, 2015 4:12 PM
  • User80438 posted

    But on the dev centre it shows the iOS certs. XCode should pull this down when I do view details and refresh right, as described in the docs. What else can I do?

    Friday, July 31, 2015 4:15 PM
  • User80438 posted

    Remember this is a new mac. It was working on my old one.

    Friday, July 31, 2015 4:17 PM
  • User1044 posted

    Your Developer Center screenshot showed that you have iOS Development provisioning profiles. It did not show that you have iOS Development certificates.

    I know that on the left-hand side, it looked like you had selected development certificates, but what you were actually looking at were provisioning profiles. Look at the top of the right-hand side of the screen in your screenshot and you'll see that it says "iOS Provisioning Profiles (Development)".

    You need to create a new iOS Development certificate more-or-less the same way you created the "Mac Development" certificate on Apple's Developer Portal website.

    Friday, July 31, 2015 4:19 PM
  • User80438 posted

    I clicked the + in the accounts under the signing identities and it told me I have an iOS but on another machine and gave the the option to Revoke and Request. I clicked this and the iOS Development cert magically appeared in the list. And now solution builds without the error and I can deploy to my iPhone :)

    Thanks for your help.

    Friday, July 31, 2015 4:21 PM
  • User1044 posted

    Grats :-)

    Friday, July 31, 2015 5:29 PM
  • User128877 posted

    Hi Xcode give possibility run application on device without certificate. can I do something like this in XS ?

    Thursday, October 22, 2015 9:09 AM
  • User31231 posted

    Hi @AntonDashivskyi,

    What you are looking for is our Free Provisioning document. It should help you do what you want.

    Kevin

    Thursday, October 22, 2015 11:43 AM
  • User128877 posted

    Don't work. I can run single application from Xcode, but still can't run from XS

    Thursday, October 22, 2015 12:01 PM
  • User211618 posted

    ... and 1 year after this thread was started, I'm still experiencing the "No installed provisioning profiles match the installed iOS code signing keys" error. At this point, I should probably just give up and create a Hitler Rant video on YouTube, since I've tried every workaround mentioned in this and other threads, and nothing worked :(

    I figure, if deploying from Xcode onto device works, but Xamarin fails with this stupid error - it's Xamarin's fault. Is it not??

    Thursday, April 7, 2016 11:28 PM
  • User289352 posted

    I believe a more proper & simple solution (especially because things have changed so much) is to change the platform build configuration from iPhone to iPhoneSimulator. See here: http://stackoverflow.com/questions/32647815/no-valid-ios-code-signing-keys-found-in-keychain

    Friday, January 6, 2017 8:28 PM
  • User31568 posted

    I have the same error when I try to archive but not when I build the app

    Kindly help..

    I am using Visual Studio for Mac

    Monday, November 6, 2017 11:39 PM
  • User303359 posted

    I'm also getting "No valid iOS code signing keys found in keychain. You need to request a codesigning certificate from developer.apple.com. BLE.Client.iOS" (and for what it is worth I can't get the android one to run as well)

    I tried to build the "empty" Xcode app to put on my iOS device, but I could not get that to work either. There are a number of posts on this forum and on stackoverflow, but they all seem to be out of date. None of them work.

    Please advise.

    Wednesday, November 29, 2017 8:00 PM
  • User74 posted

    @RobertAuer have you created the certificates and provisioning profiles that contain the device id for your iOS device?

    Thursday, November 30, 2017 9:41 AM
  • User303359 posted

    @JohnHair Thank you for your response. I have created the certificate from developer.apple.com I'm not sure what you mean by device id. Are you aware of someplace that has a step by step document to explains this? Everything seems (to me) to be rather scattered.

    Thursday, November 30, 2017 4:14 PM
  • User74 posted

    @RobertAuer well the Xamarin site has everything you should need: https://developer.xamarin.com/guides/ios/gettingstarted/ and in there you'll find: https://developer.xamarin.com/guides/ios/gettingstarted/installation/device_provisioning/

    Thursday, November 30, 2017 5:08 PM
  • User21936 posted

    @RobertAuer said: Are you aware of someplace that has a step by step document to explains this? Everything seems (to me) to be rather scattered.

    https://www.google.com/search?client=safari&rls=en&q=Xamarin+iOS+Device+provisioning&ie=UTF-8&oe=UTF-8

    In a nutshell these are the things you need to provision your app:

    1. Signing certificate (sometimes called signing identity)
    2. App ID. These can be a wildcard, e.g. com.companyname.*, which can be used by any app with a bundle id that starts with com.companyname., or explicit e.g. com.companyname.appname which can only be used by an app with that exact same bundle id.
    3. Device IDs. These are the UUIDs from the devices you want to register for deploying apps to for debugging and testing.
    4. Provisioning profile. This wraps up all of the other stuff. When you create a provisioning profile manually on Apple Dev Portal you will specify the signing certificates the profile can use (can be more than one so multiple developers can use the same profile), the app ID the profile will use (one App ID per profile), and the device IDs (up to 100) for all the devices you want to deploy to.
    Saturday, December 2, 2017 1:33 AM