First, to quote Steve Jobs:
"I am saddened, not by Microsoft's success - I have no problem with their success. (...) I have a problem with the fact that they just make really third-rate products."
JK. Now let's go. I have been just handed over a Xamarin project in my company and I have really no experience with this framework, so I thought someone could enlighten me in some points.
I'm trying to perform a Facebook login in Debug mode in a physical device, but I just can't make the hash key to work. It is throwing the good ol' "Invalid key hash. The key hash xxxxxxxxx does not match any stored ky hashes. etc..." error.
I have done this many times in Android Studio and it always seemed pretty straight forward. I have my appId setup in my AndroidManifest.xml and have added the hashes to Facebook for Develops Dashboard. Now I'm following Facebook's tutorial on key hashes, but no matter what I do the key hash I generate is always different from to one showing in my device.
I'm in a Mac using Visual Studio for Mac 7.5. First I tried generating the hash using ~/.android/debug.keystore, but no success. On further research, I found that Xamarin actually uses another debug.keystore located in ~/.local/share/Xamarin/Mono for Android/debug.keystore, also the same error. Another curious things I noticed is if I use different password it gives me different hashes.
Searching a little more, I discovered that there is a way to generate the keys programmatically using the class PackageManager but, since I'm in Xamarin I'm having a hard time figuring it out. I can't find the Xamarin equivalent of PackageManager.GET_SIGNATURES.
Now for the questions:
Why my device hash is different from the ones I generate in my Mac? From Facebook's docs I understood that if the keystore files used to created the hash and to build my app are the same, the hash key should be the same.
Maybe I'm using the wrong password? If so, how can I change it or find the correct one?
Maybe Visual Studio is using a third keystore I'm not aware of? If so, how can I find out which keystore file is being used?
How can make the PackageManager class work in Xamarin? I was taking a look at their docs but I really couldn't figure it out.
Thanks!
EDIT
I was indeed using the wrong password. What worked for me was using the keystore located at ~/.local/share/Xamarin/Mono for Android/debug.keystore with the password android