Sample programs showing how to use Xamarin.Mac on OSX.
C# C GLSL HTML Makefile Objective-C Other
Clone or download
Latest commit 0151e41 Aug 6, 2018
Permalink
Failed to load latest commit information.
AnimatedClock Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
AnimatingViews Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
AzureTodoMac Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
ButtonMadness Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
CAQuartzComposition Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
CFNetwork updated CFNetwork sample to Full Profile framework Jul 26, 2018
Constraints Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
CoreAnimationBook Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
CoreTextArcMonoMac Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
CoreWLANWirelessManager fix CountryCode NRE May 24, 2018
CustomFont Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
DatePicker Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
DockAppIcon Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
DocumentSample Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
DragAndDropExample Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
DrawerMadness Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
ExtensionSamples added `SdkOnly` option to release mode Jul 25, 2018
FSEvents Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
Fire Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
GLFullScreen Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
GLSLShader update formatting Jul 17, 2018
GlossyClock Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
HeartRateMonitor Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
Hello_Mac Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
HttpClient Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
ImageKitDemoStep1 http => https Jun 27, 2018
ImageProtocolSample Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacCollectionNew Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacControls Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacCopyPaste INSCoding => INSSecureCoding to fix runtime error on paste. Jul 19, 2018
MacCustomControl Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacDatabase Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacDatabinding-Storyboard Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacDatabinding-XIBs Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacDialog Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacImages Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacInspector Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacMenus Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacOpenTK Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacOutlines Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacSourceLists Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacTables Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacToolbar Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacWindows Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MacXibless Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MarkdownViewer updated make file (arch of a native lib) Aug 6, 2018
MicroSamples [MicroSamples] Update code formatting and readme Aug 23, 2016
MonoMacGameWindow Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
MouseTrackingExample Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
NSAlert Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
NSComboBoxTest Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
NSCustomView Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
NSImageName Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
NSOutlineViewAndTableView Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
NSPortExample Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
NSScrollExample Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
NSTableViewBinding Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
NSTextViewSample Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
OpenGL-NeHe Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
OpenGLLayer Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
OpenGLViewSample Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
OutlineView Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
PopupBindings Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
PredicateEditorSample Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
ProgressBarExample Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
QTRecorder Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
ReactiveUIExample Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
RoundedTransparentWindow Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
Rulers Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
SCNetworkReachability Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
SceneKitViewer Fix for path names with spaces Jul 6, 2018
SearchField Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
SkinnableApp Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
SourceWriter Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
StartupTiming Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
StillMotion Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
TouchBarExample Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
UseMSBuildToCopyFilesToBundleExample Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
UserNotificationExample Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
VillainTracker Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
WhereIsMyMac Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
XMBindingExample Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
XMLocalizationSample Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
guiunit-example GUIUnit Feb 16, 2016
yosemite Set HttpClientHandler to NSUrlSessionHandler for all samples May 2, 2018
.gitignore updated deployment target version and gitignore (#73) Mar 5, 2018
AUTHORS AUTHORS: add myself Feb 21, 2013
Makefile bxc#10532: TwoMinuteGrowler: remove Feb 25, 2013
README.md minor corrections in readme Mar 1, 2018
config.mk Makefile: clean up Makefile Feb 21, 2013
list-tags list-tags, make-sample-metadata: helper tools Feb 20, 2013
make-sample-metadata list-tags, make-sample-metadata: helper tools Feb 20, 2013
migrate-to-xammac migrate-to-xammac: convert 'MonoMac, ...' references Feb 25, 2013

README.md

Mac Samples

Sample code for Xamarin's C# APIs to develop Mac applications. Visit the Mac Sample Gallery to download individual samples.

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 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 sample galleries here:

Sample GitHub Repositories

These sample galleries are populated by samples in these 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 start by creating an issue with your proposal.

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
      • 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
      • SceneKit
      • FSharp
      • Yosemite
      • El Capitan
    • 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 cross-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!