Visual Studio 2019 + Mercury for iOS requests Keychain password

I’m trying out creating an iOS app in VS2019 with Mercury, as I want to see the debugging experience via Crossbox. I’m running into a couple of things that either don’t seem right or I’m stuck at:

Note: I am connected via Crossbox to my Mac. However it was more than a couple of weeks ago so I’m not 100% sure of my settings. Pretty sure I used password access and not a key.

  1. The first thing I ran into is that the Provisioning Profile Name in VS2019 on Windows seems to be populated with the Profile ID options and not the Names:
    image
    I did try to select a Provisioning Profile ID above it to see if it would automatically then select the Provisioning Profile Name but it did not.

Note: The compile error regarding selecting a provisioning profile goes away by selecting the GUID, but I don’t know if ultimately it will be happy with that selection since I’m getting a different error now.

  1. The build error I’m getting now is this:
    Severity Code Description Project File Line Suppression State
    Error () Codesign failed for ‘C:\Users\alovhaug\AppData\Local\RemObjects Software\EBuild\Obj\F5A422F42D986B9B202BF72001F99FD1F574D12E\Debug\Toffee-iOS\Device\iOSBasic.app’. You might need to provide your Keychain password in project settings. iOSBasic C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\RemObjects Software\Elements\RemObjects.Elements.Toffee.targets 53

But this error is confusing to me, because I don’t see where I can provide my “Keychain password in project settings” - that doesn’t seem to be an option. There is an option to provide the “Keychain Name”, but I don’t see how to provide the Keychain password, although it makes sense that it would need it. I thought perhaps if I provided a Keychain Name value it would prompt me for a password, but so far it hasn’t. This may be because I’m not quite following what value the Keychain Name should have in it. But I did look through some of the items in my Keychain and try them without success.

  1. I’m kind of surprised that there doesn’t seem to be a way to remove a CrossBox Server connection. I was thinking that I would remove my registration to my Mac and created it again, this time using a Private Key to see if the Keychain issue went away, but I don’t see how to do that. Maybe I’m just missing something?

Thanks,

–Avonelle

That looks like a bug specific to Visual Studio, I’ll log. I assume in Water this works fine (if you tried), and in Fire too?

hmm. that option should be there… I just checked our settings config, and the setting is conditional to VS and Water only; so I;m assuming something is going wrong with that check in VS; I’ll log an issue too.

As a workaround, the can conical setting name is KeychainPassword, so you can add it manually in the propject file as

<KeychainPassword>Secret</KeychainPassword>

It’s a known issue to add a “remove” option for Fire/Water, but I’m pretty sure VS shoukld have a Remove menu item; I cannot check right now as I;m not near a Windows VM that has VS (Windows/ARM runs well in Parallels on my M1 MacBook Air, but I’m not quite ready to burden it with the behemoth that is VS ;). I’ll check later and log an issue if necessary.

thanx!

Thanks, logged as bugs://85465 — for the missing project setting(s)/bad filtering

Thanks, logged as bugs://85466 — for the provisioning profile dropdown

forgot to add: you can manually remove those in %APPDATA%\RemObjects Software\Elements\CrossBox.xml (close and restart VS to make it reload the changed info)

Yes, Fire and Water are fine, just Visual Studio.

Maybe because it is the kind of thing you wouldn’t want someone looking over your shoulder seeing, it is better to not show it?

But I’m still not following what belongs there, but this may be because of my fairly limited experience with the Mac. I understand what Keychain is, but is it asking me for credentials to access Keychain itself, or for something specific stored in Keychain? I’m guessing the former, but maybe I’m wrong here. (So far I haven’t figured out the right combination.)

Thanks!

–Avonelle

Yeah, its set to show as PasswordString. Doesn’t it, in Water?

Keychain has to be the name of the keychain if you’re not using the default (login). Normally you’d not have to set this. KeychainPassword will the password of your keychain (for the default one, its usually the same as your account password).

you can get the list of keychains in Terminal via

➜  Cherry:~/Code/Fire git:(develop) ✗ # security list-keychains
    "/Users/mh/Library/Keychains/develop.keychain-db"
    "/Users/mh/Library/Keychains/login.keychain-db"
    "/Users/mh/Library/Keychains/x.keychain-db"
    "/Library/Keychains/System.keychain"

if you specify one, you’ll want to specify the full path as shown here. in my case, “develop” is a custom keychain I have, so that others can build on my Mac remotely w/o needing access to my real account; “login” is the default keychain.

Yes - the item does appear in Water (with asterisks for the value).

Thank you! It really helps to know what it is expecting. Building now successfully in Water and VS2019.

By the way: it is using the default “login” keychain, but for some reason in both Water and VS2019 I still have to provide these values. I don’t know if that relates to my specific setup or a bug, but I mention it in case it is the latter.

–Avonelle

Oh DUH - I just realized if I wipe out the Keychain Name value and just enter the password, it still works, both in VS2019 and Water, so nevermind!

–Avonelle

1 Like

Wrote up some more details on this in the docs, for future reference: Remote Building (from Windows). Feedback appreciated.

1 Like

Marc - this is great, and would have helped me a lot. I can’t think of any changes that would improve it.

–Avonelle

1 Like

bugs://85465 got closed with status fixed.

bugs://85466 got closed with status fixed.