Forum Xamarin.iOS

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Unable to Archive project after moving to new Mac

JvBrechtJvBrecht Member ✭✭
edited February 5 in Xamarin.iOS

Hey everyone!

Recently I moved my xamarin.ios project to a new Mac device (as a performance upgrade primarily) but ran into some issues, mainly regarding the archiving of my project.

I am using Visual Studio for Mac (latest version), everytime when I'm trying to archive the solution I get different errors all the time, here are a few:

  • ['myviewcontrollername.mycellname.TextLabel'] hides inherited member ['myUitableViewCellName.TextLabel']. Use the new keyword if hiding was intended. (sometimes this error would show elements from different files with the same message)

  • Plain Style unsupported in a Navigation Item.
    It would mainly cycle between these errors when I try to archive my solution.

It still is able to successfully emulate the project as if nothing is wrong.

What annoys me most about it is that everything still works fine on the old Mac from where I copied the project, which also sports the latest Visual Studio version.

I have already tried to: delete the 'bin' and 'obj' folders,
rebuild, unload, clean solution .etc
Completely reinstall Visual studio

I'd love to hear if anyone can help me!

Best Answer

  • JvBrechtJvBrecht Member ✭✭
    Accepted Answer

    UPDATE:

    Problem solved!
    I did not properly transfer my files between the mac's. Probably missing some kind of config file.

    After using the Migration Assistant from Apple to properly move files it works perfectly.

Answers

  • ColeXColeX Member, Xamarin Team Xamurai
    edited February 9

    Try to fix the two errors with the following ways

    • Change the name myviewcontrollername.mycellname.TextLabel or myUitableViewCellName.TextLabel .

    • Search key word barButtonItem in Storyboard and remove its Plain style .


    Xamarin forums are migrating to a new home on Microsoft Q&A!
    We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A!
    For more information, please refer to this sticky post.

  • JvBrechtJvBrecht Member ✭✭

    @ColeX said:
    Try to fix the two errors with the following ways

    • Change the name myviewcontrollername.mycellname.TextLabel or myUitableViewCellName.TextLabel .

    • Search key word barButtonItem in Storyboard and remove its Plain style .

    I'm going to try these in a bit. However what confuses me most is the fact that these errors only exist on the new mac.. any idea why this happens?

  • JvBrechtJvBrecht Member ✭✭
    edited February 9
    • Change the name myviewcontrollername.mycellname.TextLabel or myUitableViewCellName.TextLabel .

    I'm not sure what you mean by this? but here is a sample of one such tableCell in use:

    In this public override:
    public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath){

    There i have these bits of code which fill the tablecells:
    else { UITableViewCell cell; cell = tableView.DequeueReusableCell ("UserDataCell"); // set in storyboard cell.DetailTextLabel.Text = tableItems ["Sections"] [indexPath.Section] ["Items"] [indexPath.Row] ["Value"]; cell.TextLabel.Text = tableItems["Sections"][indexPath.Section]["Items"][indexPath.Row]["Label"]; cell.TextLabel.TextColor = Colors.GetColor(Colors.ColorEnum.TextColorSecondary); return cell; }

    • Search key word barButtonItem in Storyboard and remove its Plain style .

    There is only one bar button item in my storyboard of which I've set the style to 'bordered' which didn't fix the error.

    As stated in my last response, I'm very curious as to why this even happens on ONLY the new mac and not the previous one? Both Visual studio versions are the same..

  • JvBrechtJvBrecht Member ✭✭
    Accepted Answer

    UPDATE:

    Problem solved!
    I did not properly transfer my files between the mac's. Probably missing some kind of config file.

    After using the Migration Assistant from Apple to properly move files it works perfectly.

  • ColeXColeX Member, Xamarin Team Xamurai

    @JvBrecht said:
    UPDATE:

    Problem solved!
    I did not properly transfer my files between the mac's. Probably missing some kind of config file.

    After using the Migration Assistant from Apple to properly move files it works perfectly.

    Great , could you mark your solution as answer ?

  • JvBrechtJvBrecht Member ✭✭

    @ColeX said:
    Great , could you mark your solution as answer ?

    Done!

Sign In or Register to comment.