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!
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
Try to fix the two errors with the following ways
Change the name
myviewcontrollername.mycellname.TextLabel
ormyUitableViewCellName.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.
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?
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; }
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..
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 ?
Done!