This article uses parts of JMA’s gaming software to demonstrate these features. To download these games, please click here.
This article uses a sample 2D shooter game with MonoGame on iOS. The shooter can be found at the MonoGame starter kits page.
- MonoGame (assemblies included in download)
Lib has all the referred assemblies. Call you game folder ShooterMT for MonoTouch. To the right, add a folder called Shooter. This contains the XNA version of the game and its content folder. Here is an image of the folder structure:
In MonoDevelop, create a new iOS blank universal project:
In your program.cs file, add this code (if it doesn’t already exist):
class Program : UIApplicationDelegate
private Game1 game;
public override void FinishedLaunching (UIApplication app)
// Fun begins..
game = new Game1();
static void Main (string  args)
NOTE: Do not create a MacOS project. Otherwise, it won’t go onto the phones.
Reference Mono.Framework.iOS.dll and Lindgren.Networking.dll.
These are included in the lib folder of the download.
NOTE: Do not reference Mono.Framework.MacOS.dll. Although it might work, it will cause several technical issues with your application.
Create a folder called Content in the root directory of your application. Right click the folder and select add > add files from folder.
Go to the bin/Windows Phone/Debug/Content folder and open.
Click include all to choose all the XNB files.
You’ll be asked to link the files, so select the third option:
If you have folders, you’ll need to create them under your content directory and link the files.
In your iOS project, right click your linked files. Select Build Action > Content. and under Quick Properties, select Copy to Output Directory:
This will copy these files to the Content directory of the deployment folder.
Similar to content, go to the root directory of your Windows XNA application. Link the files, which you did in the Content area above this paragraph.
Some code won’t work in iOS. You can surround it with conditional statements like #if windows_phone, so your project will build.
To change the orientation of the phone, go to Hardware > Rotate Right. Here is the final result:
Posted: 9/24/2012 6:26:59 AM