Skip to content
Xamarin.iOS sample apps http://xamarin.com/
C# Objective-C Makefile F# HTML Shell Metal
Find file
Latest commit ab6f937 @rzaitov rzaitov Update README.md
Failed to load latest commit information.
AQTapDemo no message
AUSoundTriggeredPlayingSoundMemoryBased [AUSoundTriggeredPlayingSoundMemoryBased] Setup root view controller …
AVCaptureFrames Mass update of MinimumOSVersion value in Info.plist
AVCompositionDebugVieweriOS no message
AVCustomEdit [AVCustomEdit] fix nre and make syntax analyzer happy
AVTouchSample Mass update of MinimumOSVersion value in Info.plist
AirLocate Add required call and setting for iOS 8
AppPrefs [AppPrefs] Add bundle id
ApplicationFundamentals [touch] docs samples moved out of ZIP (updated to Unified)
AsyncDownloadImage Mass update of MinimumOSVersion value in Info.plist
AudioConverterFileConverter Add brief description tag to metadata.xml
AudioGenerator [AudioGenerator] Add minimum OS version
AudioQueueOfflineRenderDemo Mass update of MinimumOSVersion value in Info.plist
AudioTapProcessor Switched copyright notice per Bryan C.
BackgroundExecution Mass update of MinimumOSVersion value in Info.plist
BindingSample Mono touch Samples - Readme Formatting
BouncingGameCompleteiOS [BouncingGame] update packages
BouncingGameEmptyiOS [Entitlements] Remove custom entitlements from project's configuration
BubbleCell [BubbleCell] deprecate sample
ButtonEventDemo [ButtonEventDemo] Add minimum OS version
ButtonTapper3000 [ButtonTapper3000] resolve warnings
Calendars no message
Chat [Entitlements] Remove custom entitlements from project's configuration
CircleLayout no message
CollectionViewTransition no message
ContentControls removed duplicate samples, add moveto.md
Controls [Entitlements] Remove custom entitlements from project's configuration
CoreAnimation Mass update of MinimumOSVersion value in Info.plist
CoreImage Mass update of MinimumOSVersion value in Info.plist
CoreLocation [Keychain][monocatalog][ExtensionsDemo][Touch][avTouch][reachability]…
CoreMidiSample Resolving and clearing out warning messages
CoreTelephonyDemo Mass update of MinimumOSVersion value in Info.plist
CreatingTabbedApplications [Entitlements] Remove custom entitlements from project's configuration
CustomCollectionViewLayoutAttributes Further resolved warnings and errors in monotouch-samples
CustomInputStream Mass update of MinimumOSVersion value in Info.plist
CustomPropertyAnimation Mass update of MinimumOSVersion value in Info.plist
Data Mass update of MinimumOSVersion value in Info.plist
DesignerWalkthrough [Entitlements] Remove custom entitlements from project's configuration
DispatchSourceExamples [Entitlements] Remove custom entitlements from project's configuration
Drawing Mass update of MinimumOSVersion value in Info.plist
DynamicsCatalog [Entitlements] Remove custom entitlements from project's configuration
EvolveGraphicsAndAnimation Adding readme for moved file.
FileSystemSampleCode Mass update of MinimumOSVersion value in Info.plist
FontList Mass update of MinimumOSVersion value in Info.plist
FrogScroller [FrogScroller] Add bundle identifier and app name
GLCameraRipple [GLCameraRipple] Fix #34018: use GLKViewDelegate method instead of event
GLPaint-GameView Mass update of MinimumOSVersion value in Info.plist
GameCenterSample Add a convenient Makefile to build the samples
GoogleAdMobAds/binding Pull from upstream
GraphicsAndAnimation Mass update of MinimumOSVersion value in Info.plist
GrowRowTable Add a convenient Makefile to build the samples
HelloComponents [HelloComponents] Remove unused methods from AppDelegate class
HelloWorld_iPhone Add brief description tag to metadata.xml
Hello_ComplexUniversal Mass update of MinimumOSVersion value in Info.plist
Hello_MultiScreen_iPhone Mass update of MinimumOSVersion value in Info.plist
Hello_Universal Mass update of MinimumOSVersion value in Info.plist
Hello_iOS [ios] getting-started add storyboard id to prevent confusion for new …
Hello_iPad Mass update of MinimumOSVersion value in Info.plist
HomeKit/HomeKitIntro iOS 8: Handoff App
HttpClient [HttpClient] Use https://xamarin.com for HttpClient to avoid a 302 fr…
ImageProtocol Mass update of MinimumOSVersion value in Info.plist
InfColorPicker [InfColorPicker] Recompile native library to target iOS 8.0
IntroToAppearance [IntoToAppearance]Adding new sample for docs purposes
IntroToiOS7 Mass update of MinimumOSVersion value in Info.plist
IntroductionToiCloud Mass update of MinimumOSVersion value in Info.plist
KeyValueObserving [KeyValueObserving] Observe View's layer changes, bug #29339
Keychain Mass update of MinimumOSVersion value in Info.plist
LazyTableImages [LazyTableImages] Fix crash on startup
LazyTableImagesAsync [imagesasync] fixes #56
LifecycleDemo Mass update of MinimumOSVersion value in Info.plist
LineLayout Further resolved warnings and errors in monotouch-samples
LocalNotifications Mass update of MinimumOSVersion value in Info.plist
Location adding PausesLocationUpdatesAutomatically property
LowLevelGLPaint Mass update of MinimumOSVersion value in Info.plist
MTDJsonDemo [MTDJsonDemo] fix warning about supported orientations
MTDReflectionWalkthrough Add brief description tag to metadata.xml
MTDWalkthrough Further resolved warnings and errors in monotouch-samples
MTGKTapper [MTGKTapper] fix method names. remove system version check because we…
ManualCameraControls [ManualCameraControls] Fix wrong exposure duration, bug #35326
ManualStoryboard [Entitlements] Remove custom entitlements from project's configuration
MapCallouts Mass update of MinimumOSVersion value in Info.plist
MapDemo [MapDemo]Formatting fixes re. feedback from Oleg
MapKitSearch Further resolved warnings and errors in monotouch-samples
MediaCapture [MediaCapture] Set root view controller
MediaNotes Mass update of MinimumOSVersion value in Info.plist
MidiTest [Entitlements] Remove custom entitlements from project's configuration
MonoCatalog-MonoDevelop Mass update of MinimumOSVersion value in Info.plist
MonoCatalogSample Pull from upstream
MonoDevelopTouchCells Mass update of MinimumOSVersion value in Info.plist
MotionGraphs [MotionGraphs] Fix UIView ctor to be called from nib
MoviePlayback Further resolved warnings and errors in monotouch-samples
MultichannelMixer [Entitlements] Remove custom entitlements from project's configuration
NSZombieApocalypse Mass update of MinimumOSVersion value in Info.plist
Newsstand [Newsstand] Update reference to a project file
Notifications Mass update of MinimumOSVersion value in Info.plist
OpenGL Mass update of MinimumOSVersion value in Info.plist
OpenGLESSample-GameView Mass update of MinimumOSVersion value in Info.plist
OpenGLESSample Mass update of MinimumOSVersion value in Info.plist
OpenGLScroller Add brief description tag to metadata.xml
PaintCode Further resolved warnings and errors in monotouch-samples
PassKit Add brief description tag to metadata.xml
PinchIt Further resolved warnings and errors in monotouch-samples
PokerNightVoting Add brief description tag to metadata.xml
Popovers Switched copyright notice per Bryan C.
PrintBanner Add brief description tag to metadata.xml
PrintSample Mass update of MinimumOSVersion value in Info.plist
PrivacyPrompts [PrivacyPromts] Update entitlements
Protocols_Delegates_Events [Entitlements] Remove custom entitlements from project's configuration
QRchestra Resolved warnings in QRchestra sample
QuartzSample Mass update of MinimumOSVersion value in Info.plist
Quotes Resolved warnings in Quotes sample
ReachabilitySample Mass update of MinimumOSVersion value in Info.plist
RecipesAndPrinting [RecipesAndPrinting] UIMarkupTextPrintFormatter is uikit class, so ct…
RegionDefiner Resolved warnings in RegionDefiner sample
RosyWriter Resolved warnings in RosyWriter sample
Rotation Mass update of MinimumOSVersion value in Info.plist
ScratchTicket [Entitlements] Remove custom entitlements from project's configuration
SearchDemo [SearchDemp] Add minimum OS version
SharedResources Mass update of MinimumOSVersion value in Info.plist
SimpleBackgroundFetch [SimpleBackgroundFetch] fix warnings about restoration id
SimpleBackgroundTransfer [SimpleBackgroundTransfer] Fix #71(#37341 in bugzilla) + code formatt…
SimpleCollectionView Resolved warnings in SimpleCollectionView sample
SimpleDrillDown Mass update of MinimumOSVersion value in Info.plist
SimpleLogin [Entitlements] Remove custom entitlements from project's configuration
SimpleTextInput Mass update of MinimumOSVersion value in Info.plist
SoZoomy Add brief description tag to metadata.xml
SocialFrameworkDemo Add brief description tag to metadata.xml
Sound [sound] update screenshots for iOS 8
SplitView Mass update of MinimumOSVersion value in Info.plist
SpriteKit [Entitlements] Remove custom entitlements from project's configuration
SpriteKitPhysicsCollisions Add brief description tag to metadata.xml
SpriteTour Shorten brief descriptions
StandardControls removed duplicate samples, add moveto.md
Stars Mass update of MinimumOSVersion value in Info.plist
StateRestoration Switched copyright notice per Bryan C.
StoreKit Mass update of MinimumOSVersion value in Info.plist
StoryboardTable [Entitlements] Remove custom entitlements from project's configuration
StoryboardTable_LocalAuthentication [StoryboardTable_LocalAuthentication] fix target
StreamingAudio [Entitlements] Remove custom entitlements from project's configuration
SysSound [Entitlements] Remove custom entitlements from project's configuration
Tabbed_Images Mass update of MinimumOSVersion value in Info.plist
TableAndCellStyles removed duplicate samples, add moveto.md
TableEditing Mass update of MinimumOSVersion value in Info.plist
TableParts Mass update of MinimumOSVersion value in Info.plist
TextKitDemo [TextKitDemo] Fix ctor, we must use initWithCoder when loading from a…
ThreadedCoreData [ThreadedCoreData] Disable app transport security
TicTacToe Resolved warnings in TicTacToe sample
Touch [touch] update screenshots, link to doc
Touches_Classic Mass update of MinimumOSVersion value in Info.plist
Touches_GestureRecognizers Mass update of MinimumOSVersion value in Info.plist
Transitioning_To_Xcode_4 Mass update of MinimumOSVersion value in Info.plist
TransitionsDemo Resolved warnings in TransitionsDemo sample
UIImageEffects Update brief tags description
ViewTransitions Add brief description tag to metadata.xml
WalkingGameCompleteiOS [WalkingGame] Update sample code
WalkingGameEmptyiOS [Entitlements] Remove custom entitlements from project's configuration
WatchKit [WatchKitCatalog] Fixed up WatchApp arch
WayUpSample Mass update of MinimumOSVersion value in Info.plist
WeatherMap Mass update of MinimumOSVersion value in Info.plist
WorkingWithImages [Entitlements] Remove custom entitlements from project's configuration
WorkingWithTables Mass update of MinimumOSVersion value in Info.plist
Working_with_images [Working_with_images] Add minimum OS version
WorldCities [WorldCities] Fix table cell style, fix for #35688
ZoomingPdfViewer Mass update of MinimumOSVersion value in Info.plist
iOS7-ui-updates Mass update of MinimumOSVersion value in Info.plist
intro-to-extensions [Entitlements] Remove custom entitlements from project's configuration
ios7fonts [Entitlements] Remove custom entitlements from project's configuration
ios8 Update README.md
ios9 Add a convenient Makefile to build the samples
tvos Switched copyright notice per Bryan C.
watchOS Fixed WatchOS2 WatchKitCatalog ProjectTypeGuids
.gitattributes Add sln file (and make sure it stays as CRLF because VS needs it) for…
.gitignore Add a convenient Makefile to build the samples
LICENSE Add License
Make.common Fix MonoCatalogSample build and include basic instructions to use the…
Makefile Add a convenient Makefile to build the samples
README.md Add a convenient Makefile to build the samples
Xamarin.Edu.SampleGallery.Core.dll Update sample validator.
install-hook.sh Added CoreAnimation Sample + Chmod +x on git hook install
mdtool-build Fix mdtool build invocation.
pre-commit.posix Fix pre-commit script's use of ==.
validate.posix Fix usage of `find` in some scripts.
xcsv.exe Update sample validator.

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.

Samples Layout

Version Specific Samples

Starting with iOS 8, we started adding samples that showcase specific features introduced in a release into a directory for the release. So all the new iOS 8 feature samples live in the ios8 directory, and the iOS 9 features live in the ios9 directory.

WatchKit

WatchKit samples are in the WatchKit directory, there are a couple of them:

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 six sample GitHub repos:

The mobile-samples repository is for samples that are cross-platform. The mac-ios-samples repository is for samples that are Mac/iOS only.

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.

    • Brief - Short description or what your sample does. This allows us to display a nice and clean vignette on the sample page.

    • 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:

      • Data
      • User Interface
      • 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
      • Extension
      • iOS8
      • iOS9
      • Watch
      • Keyboard
      • SceneKit
      • FSharp
    • 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.