4

I'm building a Xamarin Forms application for Android and iOS.

How can i set iOS as startup project? I've read that your suppose to rightclick and set it as startup project. But i can't find the option?

enter image description here

Please help me.

Lord Vermillion
  • 5,264
  • 20
  • 69
  • 109
  • The "right click -> set as star up project" is valid when using Visual Studio, which you are not using. What IDE are you using there? – Nahuel Ianni Aug 14 '14 at 07:20
  • I am going to guess that it is Xamarin Studio, which according to this article http://www.developer.com/ws/android/creating-an-ios-solution-with-xamarin.html, should have the same right click option. – Gary Ewan Park Aug 14 '14 at 07:24
  • Latest Xamarin Studio for OSX – Lord Vermillion Aug 14 '14 at 07:24
  • I have never used Xamarin Studio, but assuming it works the same way as Visual Studio, you can use the technique described here http://stackoverflow.com/a/1808352/671491 as a workaround. Hopefully this will work for you. – Gary Ewan Park Aug 14 '14 at 07:29

3 Answers3

12

You need to change your configuration options to something you have connected. This happens if you were originally debugging directly on an iPhone connected to your Mac, and now the iPhone is gone. Xamarin Studio doesn't switch automatically to the iPhone Simulator when a device is not detected, instead removes the option to use that project as a startup project.

To fix, do this:

  1. Right click on the iOS project and go to Options
  2. Under Build->Output, select the "All Configurations" under the drop down
  3. Under the Platform drop down, select "iPhone Simulator"
  4. Click Ok to save

Now on the top left corner of Xamarin Studio where you can set Debug or Releas, make sure you set it to Debug | iPhoneSimulator and NOT to Debug | iPhone

... and only then, you'll be able to select "Set As Startup Project".

Michel Triana
  • 2,486
  • 1
  • 22
  • 31
0

So much depends on your operating system and which environment you are using. If you are on Xamarin Studio on a Mac, right clicking should work fine. Can you possibly give us a bit more information?

Jesse Liberty
  • 1,314
  • 1
  • 11
  • 26
0
  • Do you have XCode and iOS SDKs from Apple installed? Do you have an iOS development account? You need both of these things, then click on the project's options and pick a development account to use for the project.

  • You may not have the iOS license and may not be able to run the iOS project at all, although in such cases on my machine the project is grayed out and clearly labeled.

  • Are you on Windows? If so you won't be able to run iOS projects. The shortcut labels indicate Mac, so does the context menu shape.

Have you been able to run any iOS projects? Try creating a new blank solution with just an iOS project in it to see if it runs.

  • There is a chance this is a bug with Xamarin's localization in your language (Swedish?) Try switching your locale to US/English and file a bug with Xamarin or at least send them an email

enter image description here

Sten Petrov
  • 10,943
  • 1
  • 41
  • 61