This was so simple until some decided to turn on MAM Intune for email.
we wrote a small iOS utility that receives some serial numbers in a CSV file sent via email as an attachment.
it has worked well for about 5 years until some decided to turn on some corporate encryption scheme so all the attachments now come encrypted.
I understand that I have to make the app an Intune managed application I am OK with that it I could only figure out how.
the app is written in C# dotnet8 and NO it is not using MAUI just plain UIKIT app written in DotNet8
I found this
public void DecryptAndReadFile(string filePath)
{
var managedFile = IntuneMAMFile.Open(filePath);
if (managedFile != null && managedFile.IsEncrypted)
{
// Decrypt the file at the specified path
managedFile.DecryptFileAtPath(filePath);
Console.WriteLine("File decrypted successfully.");
// Read the content of the decrypted file
using (var stream = managedFile.OpenRead())
{
using (var reader = new StreamReader(stream))
{
string content = reader.ReadToEnd();
Console.WriteLine("File Content: ");
Console.WriteLine(content);
}
}
}
else
{
Console.WriteLine("File is not encrypted or does not exist.");
}
}
but from what I can gather that code requires this library
dotnet add package Microsoft.Intune.MAM.Xamarin.iOS
which will not install because it dose not support DotNet8.
it has been suggested that I use the library Microsoft.Intunes.MAUI.Essinsials.iOS
but I can't find any instructions on how to use this library.
anyone know of an solution ?
Regards Christian Arild Stœr Andersen