Xamarin IOS App Not Building

Srinath Mannam 291 Reputation points
2021-05-26T16:30:35.277+00:00

I am trying to build the Xamarin IOS app from visual studio windows to an iPhone 9.

I get the following errors.

99995-image.png

99937-image.png

Can someone please about this?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,326 questions
0 comments No comments
{count} votes

Accepted answer
  1. Kyle Wang 5,531 Reputation points
    2021-05-27T06:56:12.62+00:00

    Hi SrinathMannam-4826,

    Welcome to our Microsoft Q&A platform!

    For the first error, there is no "ToHexString" method in NSData class. You can convert NSData to hexstring as follows.

    string ToHexString(NSData data)  
    {  
        byte[] by = data.ToArray();  
        StringBuilder hex = new StringBuilder(by.Length * 2);  
        foreach (byte b in by)  
            hex.AppendFormat("{0:x2}", b);  
        return hex.ToString();  
    }  
    

    For the error "CS0246", please check if you have add the right reference and using it in your code. More info you can refer to Compiler Error CS0246.

    As to the error "CS0234", similarly, you need to check if the namesapce has the correct references. For more info, refer to Compiler Error CS0234.

    To handle the error in the second image, you can try to clean the project and clear the related cache on Mac under the path ~/Library/Caches/Xamarin/mtbs.

    Regards,
    Kyle


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful