Skip to content
This repository

MonoTouch sample programs

Octocat-spinner-32 AQTapDemo Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 AUSoundTriggeredPlayingSoundMemoryBased Fix comment January 11, 2013
Octocat-spinner-32 AVCaptureFrames Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 AVCompositionDebugVieweriOS Add AVCompositionDebugVieweriOS sample April 21, 2014
Octocat-spinner-32 AVTouchSample Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 AirLocate Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 AppPrefs [AppPref] Properly override the Window property of AppDelegate March 27, 2014
Octocat-spinner-32 AsyncDownloadImage [AsyncDownloadImage] This sample requires Xcode5 but can be executed … March 14, 2014
Octocat-spinner-32 AudioConverterFileConverter Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 AudioGenerator Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 AudioQueueOfflineRenderDemo Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 BackgroundExecution Rebuilt samples to fix bug 1842 April 09, 2014
Octocat-spinner-32 BindingSample Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 BubbleCell Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 ButtonEventDemo Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 ButtonTapper3000 Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 Calendars Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 CircleLayout Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 CollectionViewTransition Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 ContentControls removed duplicate samples, add moveto.md February 12, 2013
Octocat-spinner-32 CoreAnimation Rebuilt samples to fix bug 1842 April 09, 2014
Octocat-spinner-32 CoreImage Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 CoreLocation Rebuilt samples to fix bug 1842 April 09, 2014
Octocat-spinner-32 CoreMidiSample Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 CoreTelephonyDemo Rebuilt samples to fix bug 1842 April 09, 2014
Octocat-spinner-32 CustomCollectionViewLayoutAttributes [CustomCollectionViewLayout] Check system version to update center po… January 09, 2014
Octocat-spinner-32 CustomInputStream Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 CustomPropertyAnimation Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 Data Rebuilt samples to fix bug 1842 April 09, 2014
Octocat-spinner-32 DesignerWalkthrough Adding in deploy configurations so sample will run in VS April 04, 2014
Octocat-spinner-32 Drawing Rebuilt samples to fix bug 1842 April 09, 2014
Octocat-spinner-32 DynamicsCatalog Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 EvolveGraphicsAndAnimation Adding the Graphics & Animation code from Evolve 2013. January 09, 2014
Octocat-spinner-32 FileSystemSampleCode Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 FontList Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 FrogScroller Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 GLCameraRipple Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 GLPaint-GameView removing image March 05, 2014
Octocat-spinner-32 GameCenterSample Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 GoogleAdMobAds Google AdMobs documentation January 16, 2013
Octocat-spinner-32 HelloWorld_iPhone Rebuild samples to fix bug 1842 and set a deployment target April 08, 2014
Octocat-spinner-32 Hello_ComplexUniversal Rebuilt samples to fix bug 1842 April 09, 2014
Octocat-spinner-32 Hello_MultiScreen_iPhone Rebuild samples to fix bug 1842 and set a deployment target April 08, 2014
Octocat-spinner-32 Hello_Universal Rebuilt Hello_Universal/WorldCities with XS stable 4.2.3, to fix the … April 03, 2014
Octocat-spinner-32 Hello_iPad Rebuilt samples to fix bug 1842 April 09, 2014
Octocat-spinner-32 HttpClient Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 ImageProtocol Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 KeyValueObserving Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 Keychain Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 LazyTableImages Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 LineLayout Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 LowLevelGLPaint Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 MTDJsonDemo Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 MTDReflectionWalkthrough Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 MTDWalkthrough Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 MTGKTapper updating tags February 24, 2014
Octocat-spinner-32 MapCallouts Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 MapKitSearch Code cleanup in MapKitSearch July 24, 2013
Octocat-spinner-32 MediaCapture Set min version to 6.0 January 02, 2014
Octocat-spinner-32 MediaNotes [MediaNotes] Add null check in case a non-JPEG image is returned from… April 14, 2014
Octocat-spinner-32 MonoCatalog-MonoDevelop Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 MonoCatalogSample Fix MonoCatalogSample build and include basic instructions to use the… April 10, 2012
Octocat-spinner-32 MonoDevelopTouchCells Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 MotionGraphs Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 MoviePlayback Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 MultichannelMixer Add MultichannelMixer sample April 15, 2014
Octocat-spinner-32 NSZombieApocalypse Add NSZombieApocalypse sample March 22, 2014
Octocat-spinner-32 Notifications Rebuilt samples to fix bug 1842 April 14, 2014
Octocat-spinner-32 OpenGL Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 OpenGLESSample-GameView Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 OpenGLESSample Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 OpenGLScroller Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 PaintCode Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 PassKit Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 PinchIt Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 PokerNightVoting Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 Popovers Rebuilt samples to fix bug 1842 April 22, 2014
Octocat-spinner-32 PrintBanner Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 PrintSample Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 PrivacyPrompts Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 Protocols_Delegates_Events [events protocols delegates] fix error in sample, get rid of old code March 06, 2014
Octocat-spinner-32 QRchestra updating tags February 24, 2014
Octocat-spinner-32 QuartzSample Rebuilt samples to fix bug 1842 April 22, 2014
Octocat-spinner-32 Quotes Fix Quotes sample wrt new registrar spotting a bug [#18344] March 13, 2014
Octocat-spinner-32 ReachabilitySample Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 RecipesAndPrinting Rebuilt samples to fix bug 1842 April 14, 2014
Octocat-spinner-32 RegionDefiner Fix RegionDefiner sample wrt new registrar spotting a bug [#18344] March 13, 2014
Octocat-spinner-32 RosyWriter RosyWriter: Make portrait only March 31, 2014
Octocat-spinner-32 Rotation Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 SearchDemo Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 SharedResources Rebuilt samples to fix bug 1842 April 14, 2014
Octocat-spinner-32 SimpleBackgroundTransfer Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 SimpleCollectionView Fix SimpleCollectionView sample wrt new registrar spotting a bug [#18… March 13, 2014
Octocat-spinner-32 SimpleDrillDown Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 SimpleTextInput Rebuilt samples to fix bug 1842 April 14, 2014
Octocat-spinner-32 SoZoomy Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 SocialFrameworkDemo Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 Sound Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 SplitView Rebuilt samples to fix bug 1842 April 14, 2014
Octocat-spinner-32 SpriteKit Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 SpriteKitPhysicsCollisions Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 SpriteTour Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 StandardControls removed duplicate samples, add moveto.md February 12, 2013
Octocat-spinner-32 Stars Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 StoreKit Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 StreamingAudio Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 SysSound Rebuilt samples to fix bug 1842 April 14, 2014
Octocat-spinner-32 Tabbed_Images Rebuilt samples to fix bug 1842 April 14, 2014
Octocat-spinner-32 TableAndCellStyles removed duplicate samples, add moveto.md February 12, 2013
Octocat-spinner-32 TableEditing Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 TableParts Rebuilt samples to fix bug 1842 April 14, 2014
Octocat-spinner-32 TextKitDemo Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 ThreadedCoreData [ThreadedCoreData] Fix selector usages wrt new registrar [#18344] March 20, 2014
Octocat-spinner-32 TicTacToe Change TicTacToe to be Portrait only March 24, 2014
Octocat-spinner-32 Touch Rebuilt samples to fix bug 1842 April 14, 2014
Octocat-spinner-32 Touches_Classic Rebuilt samples to fix bug 1842 April 14, 2014
Octocat-spinner-32 Touches_GestureRecognizers Fix Touches_GestureRecognizers sample wrt new registrar spotting a bu… March 13, 2014
Octocat-spinner-32 Transitioning_To_Xcode_4 Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 TransitionsDemo updating tags February 24, 2014
Octocat-spinner-32 UIImageEffects Renaming Sample, formatting markdown better March 25, 2014
Octocat-spinner-32 ViewTransitions Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 WayUpSample Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 WeatherMap Rebuilt samples to fix bug 1842 April 14, 2014
Octocat-spinner-32 Working_with_images Added gallery opt-in to metadata February 20, 2014
Octocat-spinner-32 WorldCities Rebuilt Hello_Universal/WorldCities with XS stable 4.2.3, to fix the … April 03, 2014
Octocat-spinner-32 ZoomingPdfViewer Rebuilt samples to fix bug 1842 April 14, 2014
Octocat-spinner-32 ios7fonts Add new sample September 25, 2013
Octocat-spinner-32 .gitattributes Add sln file (and make sure it stays as CRLF because VS needs it) for… September 09, 2011
Octocat-spinner-32 .gitignore Readd Make.common and update .gitignore. October 03, 2011
Octocat-spinner-32 LICENSE Add License September 27, 2011
Octocat-spinner-32 Make.common Fix MonoCatalogSample build and include basic instructions to use the… April 10, 2012
Octocat-spinner-32 README.md updating README with list of tags February 20, 2014
Octocat-spinner-32 Xamarin.Edu.SampleGallery.Core.dll Update sample validator. July 05, 2012
Octocat-spinner-32 install-hook.sh Added CoreAnimation Sample + Chmod +x on git hook install September 30, 2011
Octocat-spinner-32 mdtool-build Fix mdtool build invocation. October 04, 2011
Octocat-spinner-32 pre-commit.posix Fix pre-commit script's use of ==. February 20, 2012
Octocat-spinner-32 validate.posix Fix usage of `find` in some scripts. February 17, 2012
Octocat-spinner-32 xcsv.exe Update sample validator. July 05, 2012
README.md

MonoTouch Samples

The samples in this directory use the MonoTouch toolchain and MonoDevelop project files to illustrate the basics of how to work with iOS and the SDK.

License

The Apache License 2.0 applies to all samples in this repository.

Copyright 2011 Xamarin Inc

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contributing

Before adding a sample to the repository, please run either install-hook.bat or install-hook.sh depending on whether you're on Windows or a Posix system. This will install a Git hook that runs the Xamarin code sample validator before a commit, to ensure that all samples are good to go.

Samples Submission Guidelines

Galleries

We love samples! Application samples show off our platform and provide a great way for people to learn our stuff. And we even promote them as a first-class feature of the docs site. You can find our two sample galleries here:

Sample GitHub Repositories

These sample galleries are populated by samples in our three sample GitHub repos:

The mobile-samples repository is for samples that are cross-platform.

Sample Requirements

We welcome sample submissions. Please ping Nat or Miguel for repo commit access.

However, because the sample galleries are powered by the github sample repos, each sample needs to have the following things:

  • Screenshots - a folder called Screenshots that has at least one screen shot of the sample (preferably a screen shot for every page or every major functionality piece, people really key off these things). for the xplat samples, the folder should be split into platform folders, e.g. iOS, Android, Windows. see https://github.com/xamarin/mobile-samples/tree/master/Tasky/Screenshots for an example of this.

  • Readme - a README.md file that has the name of the sample, a description, and author attribution. sample here: https://github.com/xamarin/mobile-samples/blob/master/Tasky/README.md

  • Metadata - Finally, it needs a Metadata.xml file (https://github.com/xamarin/mobile-samples/blob/master/Tasky/Metadata.xml) that has some information:

    • ID: a GUID for the sample. you can generate this in MD under Tools menu : Insert GUID. we need this to key between articles and their associated samples

    • IsFullApplication boolean flag (true or false): whether or not this is a full application such as the MWC App, Tasky, etc., or it's just a feature sample, such as, how to use 'x' feature. the basic test here is, if you would submit this to the app store because it's useful, then it's a full app, otherwise it's just a feature sample.

    • Level - Beginning, Intermediate, or Advanced: this is the intended audience level for the sample. only the getting started samples are Beginning, as they are intended for people who are just starting with the platform. most samples are Intermediate, and a few, that dive deep into difficult APIs, should be Advanced.

    • Minimum License Requirement - Starter, Indie, Business, or Enterprise: denotes the license that a user has to have in order to build/run the sample.

    • Tags: a list of relevant tags for the app. These are:

      • User Interface
      • Data
      • Games
      • Graphics (CoreDrawing, Animation, OpenGL...)
      • Media (Video, Sound, recording, photos)
      • Platform Features (Photo Library, Contacts, Calendars, etc.)
      • Device Features (NFC, Accelerometer, Compass, Magnemometer, Bluetooth, RFID)
      • Cloud (Web Services, Networking, etc.)
      • Backgrounding
      • Maps & Location
      • Binding + Interop (Projections)
      • Notifications
      • Touch
      • Getting Started
      • Async
    • SupportedPlatforms: this is only for cross plat samples. It's a comma-separated list, and the valid values are iOS, Android, and Windows.

    • Gallery: This tag must contain a value of true if you want the sample to show up in the samples gallery on the developer portal.

  • Buildable Sln and CSProj file - the project must build and have the appropriate project scaffolding (solution + proj).

A good example of this stuff is here in the drawing sample: https://github.com/xamarin/monotouch-samples/tree/master/Drawing

For a x-platform sample, please see: https://github.com/xamarin/mobile-samples/tree/master/Tasky

GitHub Integration

We integrate tightly with Git to make sure we always provide working samples to our customers. This is achieved through a pre-commit hook that runs before your commit goes through, as well as a post-receive hook on GitHub's end that notifies our samples gallery server when changes go through.

To you, as a sample committer, this means that before you push to the repos, you should run the "install-hook.bat" or "install-hook.sh" (depending on whether you're on Windows or OS X/Linux, respectively). These will install the Git pre-commit hook. Now, whenever you try to make a Git commit, all samples in the repo will be validated. If any sample fails to validate, the commit is aborted; otherwise, your commit goes through and you can go ahead and push.

This strict approach is put in place to ensure that the samples we present to our customers are always in a good state, and to ensure that all samples integrate correctly with the sample gallery (README.md, Metadata.xml, etc). Note that the master branch of each sample repo is what we present to our customers for our stable releases, so they must always Just Work.

Should you wish to invoke validation of samples manually, simply run "validate.windows" or "validate.posix" (again, Windows vs OS X/Linux, respectively). These must be run from a Bash shell (i.e. a terminal on OS X/Linux or the Git Bash terminal on Windows).

If you have any questions, don't hesitate to ask!

Something went wrong with that request. Please try again.