Xamarin.iOS – Create Single View App iOS Project

In this lesson

  • Use Xamarin Studio’s Single View App project template
  • Specify app attributes: app ID, supported iOS versions, supported form factors
  • Project naming conventions


Tap on time to skip ahead


I’m going to select iOS>app for my new project. Xamarin has already created some project templates. What we’re going to do is a Single View App. This app, I’m going to keep it very simple because there’s going to be a lot of concepts that we need to explore as well as understand. So I then hit Next, and I’m going to give my app a name. I’m going to give it the name Pomodoro. The identifier for this, you don’t necessarily need to know it right off the bat, but this is important down the road when we go to release this into the App Store in that this identifier is what Apple is going to use for your provisioning profiles and all that stuff, to make sure that people don’t install multiple copies of your app on their iPhone. You can also change this later, if you want. But you don’t want to change it after you’ve already published it to the App Store. But if you’re just getting up and running with your application then you don’t have to worry about getting it right right off the bat.


We’re going to also specify that we’re going to do as an iPhone application. With iOS apps and Xamarin-this isn’t unique to Xamarin, this is also what you can do with traditional iOS dev tools like Xcode-you can create what’s known as a hybrid application that can run on both iPhone and iPad with the same executable. A lot of apps do that. A lot of other apps have their HD iPad versions, which is a separate entity from the phone version. To make sure we’re not biting off more than we can chew, we’re just going to focus on iPhone for now.  Also, again, just to keep things simple, we’re just going to pretend like everyone is up to the latest version of iOS. We’re not going to worry too much about iOS 7.


We’re going to hit Next. This is asking you want you want to name your actual project. I’m going to say LilBigDev.Pomodoro. Then for my actual project I’m going to call this one iOS. But I want my solution to be LilBigDev.Pomodoro. To keep things simple, we’re not going to bother with git version control. By default, Xamarin Studio likes to put everything in your projects folder within your documents.


We hit Create. We’ll see what Xamarin Studio has generated for us. If we don’t do anything and we just pick a simulator and run it, the app will be compiled. This is some test cloud stuff which let’s us do automated UI Tests. We’re not going to bother with that in this lesson so I’m just going to go ahead and delete this all together. We might come back. I’m just going to remove it from the solution because I might want those files. Now, when we run, we got another error. What’s going on here? Assembly name, Lil Big Dev cannot have more than one dot. This is my fault for the naming convention. One of the things you can do is double click on the project up here. It will open up the project settings. One of the things I can do is in the output I need to change the assembly name. What the assembly is, it is the compiled code. Basically, your code gets compiled into a file that your application can then access and run. I’m going to try that. See if it now compiles. Hey, there we go!