Device: . iPhone6s
Development Environment: .net Standard 1.5, Visual Studio on Mac Community Version 7.2.2 (build 7), Xamarin
I have the following code to get/list Certificates that are installed on my iPhone. I have not been successful so far – I get an empty collection when I use the code below.
I am running the code on the iPhone using a development provisioning profile.
I have 2 projects a portable Project and an iOS project. The Code listed below is in the Portable Class library.
paramStore = new X509Store(StoreName.My, StoreLocation.CurrentUser)
foreach (X509Certificate2 mCert in paramStore.Certificates)
numberOfCertificates = numberOfCertificates + 1;
I have also tried accessing StoreName.Root, StoreName.CertificateAuthority along with variations of OpenFlags e.g. .ReadWrite - same result no data.
Looking for input/thoughts.