So I have an app that's about 2 years old, works fine. But I've been having a lot of issues with Xamarin Studio lately so i've completely re-built this solution in Visual Studio for Mac. All was good for about 2 days then suddenly something weird happened. Out of the blue my iPhone configurations disappeared and are no longer available for me to select for builds or see in the settings.
If I try to create a new configuration it doesn't even give me the option to select iPhone as a platform. It only shows iPhoneSimulator. But if I create a new blank solution all together, the default configuration has both iPhoneSimulator and iPhone in it. And that new blank solution allows me to add configurations with iPhone platforms.
Here is what I see when I try to create a new configuration, notice that it doesn't even offer me iPhone as a configuration, only iPhoneSimulator
If I create a new blank solution, it offers me iPhone as an option
See below for what my solution file and structure looks like:
Below is my solution file and solution/project structure:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MobileClient.iOS", "MobileClient.iOS\MobileClient.iOS.csproj", "{7EEC6C4F-036E-4144-BBE9-6C01BECEA311}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Mobile.API", "..\xamarin_mobile_api\Mobile.API.shproj", "{4520CB09-DBCB-4764-8E8C-4CBAA2CBAD6A}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Mobile.iOS", "..\xamarin_mobile_ios\Mobile.iOS.shproj", "{10B1EF5A-0F37-4544-9327-902022A42BA4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdjustBindingsiOS", "..\xamarin_mobile_api\3rdParty\Adjust\AdjustBindingsiOS\AdjustBindingsiOS.csproj", "{EF829C6D-7D00-4DF1-95C7-F3E54B164827}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mixpanel", "..\xamarin_mobile_api\3rdParty\Mixpanel\Mixpanel.csproj", "{5E6FA2B8-D94C-4318-8A37-1E9D765CF71E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Staging|iPhoneSimulator = Staging|iPhoneSimulator
Production|iPhoneSimulator = Production|iPhoneSimulator
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7EEC6C4F-036E-4144-BBE9-6C01BECEA311}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{7EEC6C4F-036E-4144-BBE9-6C01BECEA311}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{7EEC6C4F-036E-4144-BBE9-6C01BECEA311}.Staging|iPhoneSimulator.ActiveCfg = Staging|iPhoneSimulator
{7EEC6C4F-036E-4144-BBE9-6C01BECEA311}.Staging|iPhoneSimulator.Build.0 = Staging|iPhoneSimulator
{7EEC6C4F-036E-4144-BBE9-6C01BECEA311}.Production|iPhoneSimulator.ActiveCfg = Production|iPhoneSimulator
{7EEC6C4F-036E-4144-BBE9-6C01BECEA311}.Production|iPhoneSimulator.Build.0 = Production|iPhoneSimulator
{EF829C6D-7D00-4DF1-95C7-F3E54B164827}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{EF829C6D-7D00-4DF1-95C7-F3E54B164827}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{EF829C6D-7D00-4DF1-95C7-F3E54B164827}.Staging|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{EF829C6D-7D00-4DF1-95C7-F3E54B164827}.Staging|iPhoneSimulator.Build.0 = Debug|Any CPU
{EF829C6D-7D00-4DF1-95C7-F3E54B164827}.Production|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{EF829C6D-7D00-4DF1-95C7-F3E54B164827}.Production|iPhoneSimulator.Build.0 = Debug|Any CPU
{5E6FA2B8-D94C-4318-8A37-1E9D765CF71E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{5E6FA2B8-D94C-4318-8A37-1E9D765CF71E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{5E6FA2B8-D94C-4318-8A37-1E9D765CF71E}.Staging|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{5E6FA2B8-D94C-4318-8A37-1E9D765CF71E}.Staging|iPhoneSimulator.Build.0 = Debug|Any CPU
{5E6FA2B8-D94C-4318-8A37-1E9D765CF71E}.Production|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{5E6FA2B8-D94C-4318-8A37-1E9D765CF71E}.Production|iPhoneSimulator.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
$0.TextStylePolicy = $1
$1.inheritsSet = null
$1.scope = application/vnd.apple-interface-builder
$1.inheritsScope = text/plain
$1.FileWidth = 120
$1.TabsToSpaces = False
$0.CSharpFormattingPolicy = $2
$2.IndentSwitchBody = True
$2.IndentCaseBody = False
$2.IndentPreprocessorDirectives = False
$2.AnonymousMethodBraceStyle = NextLine
$2.PropertyGetBraceStyle = NextLine
$2.PropertySetBraceStyle = NextLine
$2.EventBraceStyle = NextLine
$2.EventAddBraceStyle = NextLine
$2.EventRemoveBraceStyle = NextLine
$2.StatementBraceStyle = NextLine
$2.ElseNewLinePlacement = NewLine
$2.ElseIfNewLinePlacement = DoNotCare
$2.WithinMethodDeclarationParentheses = True
$2.AfterDelegateDeclarationParameterComma = True
$2.scope = text/x-csharp
$0.DotNetNamingPolicy = $3
$0.TextStylePolicy = $4
$4.inheritsSet = null
$4.scope = application/config+xml
$0.XmlFormattingPolicy = $5
$5.inheritsSet = null
$5.scope = application/vnd.apple-interface-builder
$5.inheritsScope = application/xml
$0.TextStylePolicy = $6
$6.inheritsSet = null
$6.scope = application/xml
$0.XmlFormattingPolicy = $7
$7.scope = application/xml
$0.TextStylePolicy = $8
$8.scope = text/plain
$0.TextStylePolicy = $9
$9.inheritsSet = null
$9.scope = application/json
$0.VersionControlPolicy = $10
$0.TextStylePolicy = $11
$11.inheritsSet = null
$11.scope = application/vnd.apple-xcode-storyboard
$0.XmlFormattingPolicy = $12
$12.inheritsSet = null
$12.scope = application/vnd.apple-xcode-storyboard
$0.TextStylePolicy = $13
$13.inheritsSet = null
$13.scope = application/vnd.apple-interface-builder
$0.XmlFormattingPolicy = $14
$14.inheritsSet = null
$14.scope = application/vnd.apple-interface-builder
$0.StandardHeader = $15
EndGlobalSection
EndGlobal
Just to test, I created a new blank iOS solution from scratch inside Visual Studio for Mac. Below is what that solution file looks like.
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "asdfasdf", "asdfasdf\asdfasdf.csproj", "{398E03FF-50ED-4D8C-8845-A6077EFF0093}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "qweradfsxz", "qweradfsxz\qweradfsxz.csproj", "{ABB95F3F-67FA-48D4-89AB-8EAD30C69DE2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|iPhoneSimulator = Debug|iPhoneSimulator
Release|iPhone = Release|iPhone
Release|iPhoneSimulator = Release|iPhoneSimulator
Debug|iPhone = Debug|iPhone
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{398E03FF-50ED-4D8C-8845-A6077EFF0093}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{398E03FF-50ED-4D8C-8845-A6077EFF0093}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{398E03FF-50ED-4D8C-8845-A6077EFF0093}.Release|iPhone.ActiveCfg = Release|iPhone
{398E03FF-50ED-4D8C-8845-A6077EFF0093}.Release|iPhone.Build.0 = Release|iPhone
{398E03FF-50ED-4D8C-8845-A6077EFF0093}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{398E03FF-50ED-4D8C-8845-A6077EFF0093}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{398E03FF-50ED-4D8C-8845-A6077EFF0093}.Debug|iPhone.ActiveCfg = Debug|iPhone
{398E03FF-50ED-4D8C-8845-A6077EFF0093}.Debug|iPhone.Build.0 = Debug|iPhone
{ABB95F3F-67FA-48D4-89AB-8EAD30C69DE2}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{ABB95F3F-67FA-48D4-89AB-8EAD30C69DE2}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{ABB95F3F-67FA-48D4-89AB-8EAD30C69DE2}.Release|iPhone.ActiveCfg = Release|Any CPU
{ABB95F3F-67FA-48D4-89AB-8EAD30C69DE2}.Release|iPhone.Build.0 = Release|Any CPU
{ABB95F3F-67FA-48D4-89AB-8EAD30C69DE2}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{ABB95F3F-67FA-48D4-89AB-8EAD30C69DE2}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{ABB95F3F-67FA-48D4-89AB-8EAD30C69DE2}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{ABB95F3F-67FA-48D4-89AB-8EAD30C69DE2}.Debug|iPhone.Build.0 = Debug|Any CPU
EndGlobalSection
EndGlobal
Here are screenshots of what my solution's build target platform options look like. Notice the iPhone deploy target disappeared. And in configuration mappings, the iPhone platform disappeared and the iPhoneSimulator is the only one available.
Below are screenshots of my test solution I made, notice there is an iPhone (my phone's name is LeetSauce) option as well as an iPhone option in the configuration mappings.
Any ideas how I broke this or how to fix it?
------------------EDIT------------------
So a user on the Xamarin forums showed me that you can manually type in "iPhone" into the platform box in the 1st screenshot. That was helpful. But I ended up just re-creating the solution and adding in all the files/resources/packages/components again. I'm not able to reproduce the issue again, hopefully I don't see it anymore. This "feels" like a bug that somehow my .sln and/or .csproj files became corrupt. It's also possible that it was broken to begin with and that it working for 2 days was just a fluke. Hoping it doesn't happen again.