Can't build iOS in Xamarin Studio (5.7.1 through 5.9)

Stein9Stein9 ILMember
edited April 2015 in Visual Studio

Currently can't build iOS at all.

Just Updated to Xamarin Studio 5.9 (not sure from what version), and now I can't build my iOS project anymore, which built just fine before the update.
I get the following error: "No valid iOS code signing keys found in keychain.".


This is really frustrating, as it's not the first time this has happened. See:
http://forums.xamarin.com/discussion/30761/error-no-valid-iphone-code-signing-keys-found-in-keychain-when-i-update-xamarin-5-7-help-me


Last time I was advised to either downgrade (from 5.7 to the previously stable 5.5.4), or convert my project to the new unified API (which I preferred).
This time however, I have to downgrade as the project is already in the unified API and the problem still persists.


I tried downgrading to 5.8.3.1 but the problem persisted.
I then tried downgrading to 5.8.1.8 and again the build failed as it did with 5.8.0 and 5.7.1 which I also tried (same problem).


I can't find any versions prior to that on the downloads page (https://store.xamarin.com/account/my/subscription/downloads).


As I can't currently build or work, I would very much appreciate it if someone could find a fix / workaround for this issue or or point me to a download of 5.7.0 (which I worked on for sure with no problems).


Thanks.


P.S.
I am on Yosemite 10.10.2, Xcode 6.1.1.

Posts

  • Stein9Stein9 ILMember

    Updates:

    I am using a Debug|iPhoneSimulator configuration.
    So this seems connected to, but not quite the same as the following issues:
    https://forums.xamarin.com/discussion/39539/no-valid-ios-code-signing-keys-found-in-keychain
    https://forums.xamarin.com/discussion/39452/cannot-build-ios-solution-in-xam-studio-5-9-stable

    I updated to Xcode 6.3.1 but still no luck.

  • rmaciasrmacias USBeta, University ✭✭✭✭✭

    I get the following error: "No valid iOS code signing keys found in keychain.".

    Do you get this when you deploy to the simulator or a device?

  • Stein9Stein9 ILMember

    Deploying to the simulator in debug configuration.

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    This isn't an issue with Xamarin Studio, it's an error in the msbuild code that is part of Xamarin.iOS which is why downgrading Xamarin Studio is not making any difference.

    Do you have any iPhone Developer code signing keys in your keychain? If not, that's the problem.

    Presumably you have keys set in your Entitlements.plist file and so the build logic determines that in order to properly run the app in the Simulator with full support for whatever entitlements you've enabled, it has to codesign the app or the entitlements won't work (that's how they get embedded in the app).

    So your other option is to remove all the keys from your Entitlements.plist.

  • Stein9Stein9 ILMember

    This isn't an issue with Xamarin Studio, it's an error in the msbuild code that is part of Xamarin.iOS which is why downgrading Xamarin Studio is not making any difference.

    I upgraded back to Xamarin Studio 5.9, and Downgraded to Xamarin iOS 8.9.1.3.
    The build error disappeared but I still can't run my application, as now the debugger won't connect. I get the following:

    Starting iPhone 4s
    Launching application
    ERR: There was an error launching the application: The operation couldn’t be completed. (BKSSystemServiceDomain error 8.)
    


    Do you have any iPhone Developer code signing keys in your keychain? If not, that's the problem.

    That can not be the problem because though I do not have code signing keys in my keychain, neither did I have any prior to the update. In fact nothing changed in my environment except for updating Xamarin and its components (iOS, Android etc..) and it worked just fine prior to the update.

    Presumably you have keys set in your Entitlements.plist file and so the build logic determines that in order to properly run the app in the Simulator with full support for whatever entitlements you've enabled, it has to codesign the app or the entitlements won't work (that's how they get embedded in the app).

    So your other option is to remove all the keys from your Entitlements.plist.

    My Entitlements.plist was and still is empty. This is its content:

    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    </dict>
    </plist>
    
  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    A simple workaround is to get yourself a codesigning certificate and install it into your keychain.

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    I've just checked the code and it doesn't matter if you have no keys set in your Entitlements.plist. What you have to do is go to your Project Options and then to "iOS Bundle Signing" and then clear the textbox for the "Custom Entitlements".

    Then you will not need a codesigning certificate.

  • Stein9Stein9 ILMember

    Thank you very much.
    I will try clearing the entitlements as you suggested as soon as I'm back in front of the computer, and post the results here.

  • WilliamSheltonWilliamShelton USMember ✭✭

    @jstedfast I was having the same issue. On the mac with Xamarin studios your above post fixed it. However, I primarily have been developing in Visual Studios on a PC and using the Xamarin Build Host. Visual studios is still giving me the same error about no valid iOS code signing keys found in keychain. In visual studio under the iOS project there is a page for iOS Bundle Signing, but it is disabled and says 'this page is valid only for hardware platforms'. Do you have any ideas how to fix this issue for visual studio connecting to a xamarin build host on the mac? (p.s. it also was working fine before the xamarin update).

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    You can edit your .csproj file by hand and remove the <CodesignEntitlements> key.

  • WilliamSheltonWilliamShelton USMember ✭✭

    Awesome. That fixed it. Thank you so much.

  • Stein9Stein9 ILMember

    @jstedfast I upgraded back to the latest Xamarin iOS, and cleared the textbox for the "Custom Entitlements" as per your suggestion, but still getting the new error:

    Starting iPhone 4s
    Launching application
    ERR: There was an error launching the application: The operation couldn’t be completed. (BKSSystemServiceDomain error 8.)
    



    I will try to uninstall all Xamarin components completely (as described in: http://developer.xamarin.com/guides/cross-platform/getting_started/installation/uninstalling_xamarin/) and try a fresh install.

  • JeffreyStedfastJeffreyStedfast USXamarin Team Xamurai

    The new error you are getting is something only @Rolf can help you with, I have no idea what that error means (and it looks like it is coming from Xamarin.iOS and not Xamarin Studio).

  • Stein9Stein9 ILMember

    Thanks for your help Jeffrey.
    I uninstalled everything completely using the uninstall script, and now when trying a fresh install using the XamarinInstaller.dmg file, the installer insists I still have Xamarin iOS installed (and will not reinstall it). I even tried a reboot but to no avail.

    Any ideas?
    Could it be that the latest version of Xamarin iOS leaves something behind when uninstalling (i.e. something that is being installed in a new location the uninstall script is unaware of, but that the installer checks)?

  • Stein9Stein9 ILMember

    Ok.
    So I installed everything except for Xamarin iOS through the installer, then Xamarin iOS separately, and now everything seems to work.
    Thanks for the help.

Sign In or Register to comment.