SlideShare a Scribd company logo
Aaron Bockover
Xamarin
abock@xamarin.com
@abock
Writing Native Mac Apps
in C# with Xamarin.Mac
2.6 Billion Devices
MacOSX
The world’s most advanced
desktop operating system
C#
It’s all about sharing code
Shared C# Code
Xamarin.Mobile
Business Logic
Cloud Access
Database Access
DesktopDesktop MobileMobileMobile
Windows iOS
Windows
Phone
Android
It’s all about sharing code
Shared C# Code
Xamarin.Mobile
Business Logic
Cloud Access
Database Access
DesktopDesktop MobileMobileMobile
Windows iOS
Windows
Phone
AndroidMac
TouchDraw runs on iPad,
Android, and Mac, achieving
over 70% code reuse across
the platforms.
39%
61%
TouchDraw
for iPad
24%
76%
TouchDraw
for Mac
28%
72%
TouchDraw
for Android
Shared Code
Platform Specific
Xamarin.Mac at a glance
• Write native Mac applications in C#
• Access Mac OS X APIs for rich integration
• Leverage the full power of C# and .NET
• Integrated with the Xamarin experience
• Deploy directly to the Mac AppStore
Xamarin.Mac at a glance
Xamarin.Mac
Frameworks
Xamarin Tools
and SDK
• Binder
• Bundler
• Linker
• Packager Mono Runtime
.NET Base Class Libraries System Libraries
Darwin OS
Cocoa Frameworks
Xcode
(UI designer)
Xamarin Studio IDE
Xamarin.Mac at a glance
Xamarin.Mac
Frameworks
Xamarin Tools
and SDK
• Binder
• Bundler
• Linker
• Packager Mono Runtime
.NET Base Class Libraries System Libraries
Darwin OS
Cocoa Frameworks
Xcode
(UI designer)
Xamarin Studio IDE
Xamarin.Mac Frameworks
GraphicsGraphics
CoreGraphics ImageKit
CoreImage ImageIO
CoreText OpenGL
CoreVideo PDFKit
User InterfaceUser Interface
AppKit QuickLook
CoreAnima?on SceneKit
QCComposer WebKit
Audio and VideoAudio and Video
AVFounda?on CoreMidi
AudioToolbox CoreMedia
AudioUnit OpenAL
System ServicesSystem Services
AddressBook CoreWLAN
Bluetooth Scrip?ngBridge
CoreLoca?on StoreKit
CoreServices
InfrastructureInfrastructure
CoreData Founda?on
CoreFounda?on ObjCRun?me
Darwin Security
Many are shared with Xamarin.iOS
GraphicsGraphics
CoreGraphics ImageKit
CoreImage ImageIO
CoreText OpenGL
CoreVideo PDFKit
User InterfaceUser Interface
AppKit QuickLook
CoreAnima?on SceneKit
QCComposer WebKit
Audio and VideoAudio and Video
AVFounda?on CoreMidi
AudioToolbox CoreMedia
AudioUnit OpenAL
System ServicesSystem Services
AddressBook CoreWLAN
Bluetooth Scrip?ngBridge
CoreLoca?on StoreKit
CoreServices
InfrastructureInfrastructure
CoreData Founda?on
CoreFounda?on ObjCRun?me
Darwin Security
The Basics
GraphicsGraphics
CoreGraphics ImageKit
CoreImage ImageIO
CoreText OpenGL
CoreVideo PDFKit
User InterfaceUser Interface
AppKit QuickLook
CoreAnima?on SceneKit
QCComposer WebKit
Audio and VideoAudio and Video
AVFounda?on CoreMidi
AudioToolbox CoreMedia
AudioUnit OpenAL
System ServicesSystem Services
AddressBook CoreWLAN
Bluetooth Scrip?ngBridge
CoreLoca?on StoreKit
CoreServices
InfrastructureInfrastructure
CoreData Founda5on
CoreFounda?on ObjCRun?me
Darwin Security
How does Xamarin.Mac work?
How does Xamarin.Mac work?
• OS X APIs are projected into C#
1:1 mapping for full platform coverage
How does Xamarin.Mac work?
• OS X APIs are projected into C#
1:1 mapping for full platform coverage
• 80% are Objective-C
Full object system is mapped
Subclassing and overriding supported
How does Xamarin.Mac work?
• OS X APIs are projected into C#
1:1 mapping for full platform coverage
• 80% are Objective-C
Full object system is mapped
Subclassing and overriding supported
• 20% are C
Exposed as C# structs/classes/methods
No support for subclassing or overriding
How does Xamarin.Mac work?
• OS X APIs are projected into C#
1:1 mapping for full platform coverage
Check out “Binding
Objective-C Libraries” for a
deep dive at 1:30!
• 80% are Objective-C
Full object system is mapped
Subclassing and overriding supported
• 20% are C
Exposed as C# structs/classes/methods
No support for subclassing or overriding
DIVE IN
Anatomy of a Xamarin.Mac application
Anatomy of a Xamarin.Mac application
Info.plist
Application metadata, used by Mac OS
(app name, version, publisher, etc.)
Anatomy of a Xamarin.Mac application
Info.plist
Application metadata, used by Mac OS
(app name, version, publisher, etc.)
Resources Folder
Place any resources (images, icons,
static data) to be bundled with the app
Anatomy of a Xamarin.Mac application
Application Delegate
Called with application events such as
FinishedLaunching or OpenFiles
Info.plist
Application metadata, used by Mac OS
(app name, version, publisher, etc.)
Resources Folder
Place any resources (images, icons,
static data) to be bundled with the app
Anatomy of a Xamarin.Mac application
Application Delegate
Called with application events such as
FinishedLaunching or OpenFiles
Info.plist
Application metadata, used by Mac OS
(app name, version, publisher, etc.)
Application Main Menu
Interface definition pre-populated with
many common defaults
Resources Folder
Place any resources (images, icons,
static data) to be bundled with the app
Anatomy of a Xamarin.Mac application
Application Delegate
Called with application events such as
FinishedLaunching or OpenFiles
Info.plist
Application metadata, used by Mac OS
(app name, version, publisher, etc.)
Application Main Menu
Interface definition pre-populated with
many common defaults
Main Window User Interface
The primary window definition
editable in the Xcode UI Builder
Resources Folder
Place any resources (images, icons,
static data) to be bundled with the app
Anatomy of a Xamarin.Mac application
Application Delegate
Called with application events such as
FinishedLaunching or OpenFiles
Info.plist
Application metadata, used by Mac OS
(app name, version, publisher, etc.)
Application Main Menu
Interface definition pre-populated with
many common defaults
Main Window User Interface
The primary window definition
editable in the Xcode UI Builder
Main Window Implementation
Class for implementing the features of
your Main Window
Resources Folder
Place any resources (images, icons,
static data) to be bundled with the app
First Run
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Building out our NSWindow
public	
  override	
  void	
  WindowControllerDidLoadNib	
  (NSWindowController	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  windowController)
{
	
  	
  	
  	
  base.WindowControllerDidLoadNib	
  (windowController);
	
  	
  	
  	
  var	
  button	
  =	
  new	
  NSButton	
  (new	
  RectangleF	
  (10,	
  10,	
  200,	
  32))	
  {
	
  	
  	
  	
  	
  	
  	
  	
  Title	
  =	
  "Hello	
  Mac"
	
  	
  	
  	
  	
  	
  	
  	
  BezelStyle	
  =	
  NSBezelStyle.Rounded
	
  	
  	
  	
  };
	
  	
  	
  	
  
	
  	
  	
  	
  button.Activated	
  +=	
  (sender,	
  e)	
  =>
	
  	
  	
  	
  	
  	
  	
  	
  new	
  NSAlert	
  {	
  MessageText	
  =	
  "You	
  clicked	
  me!"	
  }
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .BeginSheet	
  (windowController.Window);
	
  	
  	
  	
  
	
  	
  	
  	
  windowController.Window.ContentView.AddSubview	
  (button);
}
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Building out our NSWindow
public	
  override	
  void	
  WindowControllerDidLoadNib	
  (NSWindowController	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  windowController)
{
	
  	
  	
  	
  base.WindowControllerDidLoadNib	
  (windowController);
	
  	
  	
  	
  var	
  button	
  =	
  new	
  NSButton	
  (new	
  RectangleF	
  (10,	
  10,	
  200,	
  32))	
  {
	
  	
  	
  	
  	
  	
  	
  	
  Title	
  =	
  "Hello	
  Mac"
	
  	
  	
  	
  	
  	
  	
  	
  BezelStyle	
  =	
  NSBezelStyle.Rounded
	
  	
  	
  	
  };
	
  	
  	
  	
  
	
  	
  	
  	
  button.Activated	
  +=	
  (sender,	
  e)	
  =>
	
  	
  	
  	
  	
  	
  	
  	
  new	
  NSAlert	
  {	
  MessageText	
  =	
  "You	
  clicked	
  me!"	
  }
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .BeginSheet	
  (windowController.Window);
	
  	
  	
  	
  
	
  	
  	
  	
  windowController.Window.ContentView.AddSubview	
  (button);
}
Call the base class’ version
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Building out our NSWindow
public	
  override	
  void	
  WindowControllerDidLoadNib	
  (NSWindowController	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  windowController)
{
	
  	
  	
  	
  base.WindowControllerDidLoadNib	
  (windowController);
	
  	
  	
  	
  var	
  button	
  =	
  new	
  NSButton	
  (new	
  RectangleF	
  (10,	
  10,	
  200,	
  32))	
  {
	
  	
  	
  	
  	
  	
  	
  	
  Title	
  =	
  "Hello	
  Mac"
	
  	
  	
  	
  	
  	
  	
  	
  BezelStyle	
  =	
  NSBezelStyle.Rounded
	
  	
  	
  	
  };
	
  	
  	
  	
  
	
  	
  	
  	
  button.Activated	
  +=	
  (sender,	
  e)	
  =>
	
  	
  	
  	
  	
  	
  	
  	
  new	
  NSAlert	
  {	
  MessageText	
  =	
  "You	
  clicked	
  me!"	
  }
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .BeginSheet	
  (windowController.Window);
	
  	
  	
  	
  
	
  	
  	
  	
  windowController.Window.ContentView.AddSubview	
  (button);
}
Call the base class’ version
Allocate and
configure a button
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Building out our NSWindow
public	
  override	
  void	
  WindowControllerDidLoadNib	
  (NSWindowController	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  windowController)
{
	
  	
  	
  	
  base.WindowControllerDidLoadNib	
  (windowController);
	
  	
  	
  	
  var	
  button	
  =	
  new	
  NSButton	
  (new	
  RectangleF	
  (10,	
  10,	
  200,	
  32))	
  {
	
  	
  	
  	
  	
  	
  	
  	
  Title	
  =	
  "Hello	
  Mac"
	
  	
  	
  	
  	
  	
  	
  	
  BezelStyle	
  =	
  NSBezelStyle.Rounded
	
  	
  	
  	
  };
	
  	
  	
  	
  
	
  	
  	
  	
  button.Activated	
  +=	
  (sender,	
  e)	
  =>
	
  	
  	
  	
  	
  	
  	
  	
  new	
  NSAlert	
  {	
  MessageText	
  =	
  "You	
  clicked	
  me!"	
  }
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .BeginSheet	
  (windowController.Window);
	
  	
  	
  	
  
	
  	
  	
  	
  windowController.Window.ContentView.AddSubview	
  (button);
}
Call the base class’ version
Allocate and
configure a button
Connect a lambda
to run when
activated (clicked)
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Building out our NSWindow
public	
  override	
  void	
  WindowControllerDidLoadNib	
  (NSWindowController	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  windowController)
{
	
  	
  	
  	
  base.WindowControllerDidLoadNib	
  (windowController);
	
  	
  	
  	
  var	
  button	
  =	
  new	
  NSButton	
  (new	
  RectangleF	
  (10,	
  10,	
  200,	
  32))	
  {
	
  	
  	
  	
  	
  	
  	
  	
  Title	
  =	
  "Hello	
  Mac"
	
  	
  	
  	
  	
  	
  	
  	
  BezelStyle	
  =	
  NSBezelStyle.Rounded
	
  	
  	
  	
  };
	
  	
  	
  	
  
	
  	
  	
  	
  button.Activated	
  +=	
  (sender,	
  e)	
  =>
	
  	
  	
  	
  	
  	
  	
  	
  new	
  NSAlert	
  {	
  MessageText	
  =	
  "You	
  clicked	
  me!"	
  }
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .BeginSheet	
  (windowController.Window);
	
  	
  	
  	
  
	
  	
  	
  	
  windowController.Window.ContentView.AddSubview	
  (button);
}
Call the base class’ version
Allocate and
configure a button
Connect a lambda
to run when
activated (clicked)
Add the button to the
document window
Hello Mac!
Hello Mac!
Hello Mac!
Designing the UI: Xcode Interface Builder
Double click .xib
files to open in
Xcode
Designing the UI: Xcode Interface Builder
Designing the UI: Xcode Interface Builder
Inspectors
Applies to the selected control:
• Properties
• Sizing
• Connections
Designing the UI: Xcode Interface Builder
Inspectors
Applies to the selected control:
• Properties
• Sizing
• Connections
Object Library
Drag controls to
your window
Connecting the UI
• UI built in Interface Builder connects to code in two ways
Actions
Outlets
Connecting the UI: Actions
• Methods defined in C#; invoked directly by controls
• Partial methods and always have the same signature
Connecting the UI: Actions
• Methods defined in C#; invoked directly by controls
• Partial methods and always have the same signature
-­‐	
  (IBAction)IncreaseButtonActivated:(id)sender;
partial	
  void	
  IncreaseButtonActivated	
  (NSObject	
  sender);
Objective-C
C#
Connecting the UI: Outlets
• Surface controls from Interface Builder to C# properties
• The property type is that of the connected control
Connecting the UI: Outlets
• Surface controls from Interface Builder to C# properties
• The property type is that of the connected control
@property	
  (assign)	
  IBOutlet	
  NSButton	
  *IncreaseButton;
[Outlet]	
  NSButton	
  IncreaseButton	
  {	
  get;	
  set;	
  }
Objective-C
C#
Connecting the UI
Switch to the
Assistant editor
(aka Butler mode)
Connecting the UI
Switch to the
Assistant editor
(aka Butler mode)
Connecting the UI
Control-Drag from the selected control into the @interface	
  
inside the header file to create an outlet or action
Connecting the UI
Control-Drag from the selected control into the @interface	
  
inside the header file to create an outlet or action
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Connecting the UI
@interface	
  MyDocument	
  :	
  NSDocument	
  {
	
  	
  	
  	
  NSTextField	
  *CounterLabel;
}
@property	
  (assign)	
  IBOutlet	
  NSTextField	
  *CounterLabel;
-­‐	
  (IBAction)IncreaseButtonActivated:(id)sender;
@end
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Behind the Scenes in Xamarin.Mac
[Register	
  ("MyDocument")]
partial	
  class	
  MyDocument
{
	
  	
  	
  	
  [Outlet]
	
  	
  	
  	
  TextField	
  CounterLabel	
  {	
  get;	
  set;	
  }
	
  	
  	
  	
  [Action	
  ("IncreaseButtonActivated:")]
	
  	
  	
  	
  partial	
  void	
  IncreaseButtonActivated	
  (NSObject	
  sender);
}
Events and Callbacks
• In C#, events are a very common communication pattern:
var	
  window	
  =	
  new	
  NSWindow	
  ();
window.DidBecomeKey	
  +=	
  HandleDidBecomeKey;
window.DidResignKey	
  +=	
  HandleDidResignKey;
NSWindow
HandleDidBecomeKey
HandleDidResignKey
Events and Callbacks
• With Apple’s pattern however, objects send interesting events,
or messages, to a delegate:
new	
  NSWindow	
  {
	
  	
  	
  	
  Delegate	
  =	
  new	
  MyWindowDelegate	
  ()
};
NSWindow
MyWindowDelegate
class	
  MyWindowDelegate	
  :	
  NSWindowDelegate
{
	
  	
  	
  	
  override	
  void	
  DidBecomeKey	
  (...)
	
  	
  	
  	
  override	
  void	
  DidResignKey	
  (...)
}
Events and Callbacks
Events and Callbacks
• Xamarin.Mac supports both models
You are free to choose on a per-instance basis
Events and Callbacks
• Xamarin.Mac supports both models
You are free to choose on a per-instance basis
• The Apple Delegate pattern maps to C# events
Internally we create the Delegate class and map it to
subscribed event handlers
Events and Callbacks
• Xamarin.Mac supports both models
You are free to choose on a per-instance basis
• The Apple Delegate pattern maps to C# events
Internally we create the Delegate class and map it to
subscribed event handlers
• One pattern replaces the other
AppKit
AppKit
• Pervasive use of Model-View-Controller
All logic goes in the controller class
Unless writing a custom control (NSView)
Controller orchestrates the work of views
AppKit
• Pervasive use of Model-View-Controller
All logic goes in the controller class
Unless writing a custom control (NSView)
Controller orchestrates the work of views
• Goes well beyond the basics of UI
High-level NSDocument does the heavy li!ing
Full menus, saving, loading, window restoration, multi-
window support: all for free
NSDocument
override	
  void	
  WindowControllerDidLoadNib	
  (NSWindowController	
  windowController)
NSDocument
override	
  void	
  WindowControllerDidLoadNib	
  (NSWindowController	
  windowController)
override	
  bool	
  ReadFromUrl	
  (NSUrl	
  url,
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  string	
  typeName,
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  out	
  NSError	
  outError)
NSDocument
override	
  void	
  WindowControllerDidLoadNib	
  (NSWindowController	
  windowController)
override	
  bool	
  ReadFromUrl	
  (NSUrl	
  url,
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  string	
  typeName,
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  out	
  NSError	
  outError)
override	
  bool	
  SaveToUrl	
  (NSUrl	
  url,
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  string	
  typeName,
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  NSSaveOperationType	
  saveOperation,
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  out	
  NSError	
  outError)
NSDocument
Structure of the UI
• NSWindow
Top-level window
• NSWindow.ContentView
An NSView that contains controls for the application
• NSView is a class from which most controls derive
Can contain any number of children (NSView.Subviews)
Structure of the UI
• Some controls have many faces and roles
NSTextField implements both “label” and “entry” roles
Instead of being discrete controls, properties are modified
to fit the desired role
Xcode provides pre-set properties for controls
NSView: a powerful container
• Can contain (and perform layout of) subviews
• Handles events
• Paints itself
• Can be backed by a CALayer
CALayers are GPU accelerated
• Its properties can be animated
SHIP IT
Ship Your App: by yourself
• The app is unrestricted and has full access to the system
• Shipped as a “bundle”
Typically a zipped up .app folder
Fully self-contained
Xamarin Studio generates this by default
Gatekeeper
• Apple recently turned on Gatekeeper which prevents unsigned
apps from running by default
☹
Gatekeeper
• Apple recently turned on Gatekeeper which prevents unsigned
apps from running by default
☹
BADText
Gatekeeper
• Code sign your app for the best user experience
• Xamarin Studio supports this for Xamarin.Mac
☺
Gatekeeper
• Code sign your app for the best user experience
• Xamarin Studio supports this for Xamarin.Mac
Project Options → Mac OS X Packaging
☺
Ship Your App: in the App Store
Ship Your App: in the App Store
• Must apply for the Mac developer program through Apple
• Must sign app
• App is submitted for review
Ship Your App: in the App Store
• Must apply for the Mac developer program through Apple
• Must sign app
• App is submitted for review
• The app will be sandboxed
Ship Your App: in the App Store
• Must apply for the Mac developer program through Apple
• Must sign app
• App is submitted for review
• The app will be sandboxed
• Xamarin Studio signs, packages, and submits the app
• Shipping to the App Store is the best end-user experience
Mac OS X Sandbox
• Kernel-enforced sandbox
• Limits access to the system
Limitations on filesystem access
Use of special open/save panels
Limits access to some services and APIs
Mac OS X Sandbox
• Edit Sandbox entitlements in Info.plist in Xamarin Studio
?
Xamarin makes for Happy Devices
Learn more:
xamarin.com/mac
docs.xamarin.com/mac
github.com/xamarin/mac-samples
Aaron Bockover
@abock
abock@xamarin.com

More Related Content

Similar to Writing native Mac apps in C# with Xamarin.Mac - Aaron Bockover

CodeStock :: Introduction To MacRuby and HotCocoa
CodeStock :: Introduction To MacRuby and HotCocoaCodeStock :: Introduction To MacRuby and HotCocoa
CodeStock :: Introduction To MacRuby and HotCocoa
Doc Norton
 
20150728 100분만에 배우는 windows 10 앱 개발
20150728 100분만에 배우는 windows 10 앱 개발20150728 100분만에 배우는 windows 10 앱 개발
20150728 100분만에 배우는 windows 10 앱 개발
영욱 김
 
20150812 4시간만에 따라해보는 windows 10 앱 개발
20150812  4시간만에 따라해보는 windows 10 앱 개발20150812  4시간만에 따라해보는 windows 10 앱 개발
20150812 4시간만에 따라해보는 windows 10 앱 개발
영욱 김
 
WPF - the future of GUI is near
WPF - the future of GUI is nearWPF - the future of GUI is near
WPF - the future of GUI is near
Bartlomiej Filipek
 
JavaScript on the Desktop
JavaScript on the DesktopJavaScript on the Desktop
JavaScript on the Desktop
Domenic Denicola
 
Cross platform mobile development with visual studio and xamarin
Cross platform mobile development with visual studio and xamarinCross platform mobile development with visual studio and xamarin
Cross platform mobile development with visual studio and xamarinIbon Landa
 
Titanium Appcelerator - Beginners
Titanium Appcelerator - BeginnersTitanium Appcelerator - Beginners
Titanium Appcelerator - Beginners
Ambarish Hazarnis
 
360 Flex Atlanta
360 Flex Atlanta360 Flex Atlanta
360 Flex Atlanta
rtretola
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
Abid Khan
 
unit 4.docx
unit 4.docxunit 4.docx
unit 4.docx
Sadhana Sreekanth
 
APAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.FormsAPAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.Forms
Nish Anil
 
Xamarin.iOS introduction
Xamarin.iOS introductionXamarin.iOS introduction
Xamarin.iOS introduction
Guido Magrin
 
제 4회 DGMIT R&D 컨퍼런스 : Making a JavaScript based Application in Mac OS X
제 4회 DGMIT R&D 컨퍼런스 : Making a JavaScript based Application in Mac OS X제 4회 DGMIT R&D 컨퍼런스 : Making a JavaScript based Application in Mac OS X
제 4회 DGMIT R&D 컨퍼런스 : Making a JavaScript based Application in Mac OS X
dgmit2009
 
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
.NET Conf UY
 
Hello world ios v1
Hello world ios v1Hello world ios v1
Hello world ios v1
Teodoro Alonso
 
The Ring programming language version 1.5.1 book - Part 67 of 180
The Ring programming language version 1.5.1 book - Part 67 of 180The Ring programming language version 1.5.1 book - Part 67 of 180
The Ring programming language version 1.5.1 book - Part 67 of 180
Mahmoud Samir Fayed
 
Introduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKIntroduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDK
Brendan Lim
 
Going Desktop with Electron
Going Desktop with ElectronGoing Desktop with Electron
Going Desktop with Electron
Leo Lindhorst
 
06 win forms
06 win forms06 win forms
06 win forms
mrjw
 

Similar to Writing native Mac apps in C# with Xamarin.Mac - Aaron Bockover (20)

CodeStock :: Introduction To MacRuby and HotCocoa
CodeStock :: Introduction To MacRuby and HotCocoaCodeStock :: Introduction To MacRuby and HotCocoa
CodeStock :: Introduction To MacRuby and HotCocoa
 
20150728 100분만에 배우는 windows 10 앱 개발
20150728 100분만에 배우는 windows 10 앱 개발20150728 100분만에 배우는 windows 10 앱 개발
20150728 100분만에 배우는 windows 10 앱 개발
 
20150812 4시간만에 따라해보는 windows 10 앱 개발
20150812  4시간만에 따라해보는 windows 10 앱 개발20150812  4시간만에 따라해보는 windows 10 앱 개발
20150812 4시간만에 따라해보는 windows 10 앱 개발
 
WPF - the future of GUI is near
WPF - the future of GUI is nearWPF - the future of GUI is near
WPF - the future of GUI is near
 
JavaScript on the Desktop
JavaScript on the DesktopJavaScript on the Desktop
JavaScript on the Desktop
 
Cross platform mobile development with visual studio and xamarin
Cross platform mobile development with visual studio and xamarinCross platform mobile development with visual studio and xamarin
Cross platform mobile development with visual studio and xamarin
 
Titanium Appcelerator - Beginners
Titanium Appcelerator - BeginnersTitanium Appcelerator - Beginners
Titanium Appcelerator - Beginners
 
360 Flex Atlanta
360 Flex Atlanta360 Flex Atlanta
360 Flex Atlanta
 
Android
AndroidAndroid
Android
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
unit 4.docx
unit 4.docxunit 4.docx
unit 4.docx
 
APAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.FormsAPAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.Forms
 
Xamarin.iOS introduction
Xamarin.iOS introductionXamarin.iOS introduction
Xamarin.iOS introduction
 
제 4회 DGMIT R&D 컨퍼런스 : Making a JavaScript based Application in Mac OS X
제 4회 DGMIT R&D 컨퍼런스 : Making a JavaScript based Application in Mac OS X제 4회 DGMIT R&D 컨퍼런스 : Making a JavaScript based Application in Mac OS X
제 4회 DGMIT R&D 컨퍼런스 : Making a JavaScript based Application in Mac OS X
 
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
Tips & tricks for sharing C# code on iOS, Android and Windows Phone by Jaime ...
 
Hello world ios v1
Hello world ios v1Hello world ios v1
Hello world ios v1
 
The Ring programming language version 1.5.1 book - Part 67 of 180
The Ring programming language version 1.5.1 book - Part 67 of 180The Ring programming language version 1.5.1 book - Part 67 of 180
The Ring programming language version 1.5.1 book - Part 67 of 180
 
Introduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKIntroduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDK
 
Going Desktop with Electron
Going Desktop with ElectronGoing Desktop with Electron
Going Desktop with Electron
 
06 win forms
06 win forms06 win forms
06 win forms
 

More from Xamarin

Xamarin University Presents: Building Your First Intelligent App with Xamarin...
Xamarin University Presents: Building Your First Intelligent App with Xamarin...Xamarin University Presents: Building Your First Intelligent App with Xamarin...
Xamarin University Presents: Building Your First Intelligent App with Xamarin...
Xamarin
 
Xamarin University Presents: Ship Better Apps with Visual Studio App Center
Xamarin University Presents: Ship Better Apps with Visual Studio App CenterXamarin University Presents: Ship Better Apps with Visual Studio App Center
Xamarin University Presents: Ship Better Apps with Visual Studio App Center
Xamarin
 
Get the Most Out of iOS 11 with Visual Studio Tools for Xamarin
Get the Most Out of iOS 11 with Visual Studio Tools for XamarinGet the Most Out of iOS 11 with Visual Studio Tools for Xamarin
Get the Most Out of iOS 11 with Visual Studio Tools for Xamarin
Xamarin
 
Get the Most out of Android 8 Oreo with Visual Studio Tools for Xamarin
Get the Most out of Android 8 Oreo with Visual Studio Tools for XamarinGet the Most out of Android 8 Oreo with Visual Studio Tools for Xamarin
Get the Most out of Android 8 Oreo with Visual Studio Tools for Xamarin
Xamarin
 
Creative Hacking: Delivering React Native App A/B Testing Using CodePush
Creative Hacking: Delivering React Native App A/B Testing Using CodePushCreative Hacking: Delivering React Native App A/B Testing Using CodePush
Creative Hacking: Delivering React Native App A/B Testing Using CodePush
Xamarin
 
Build Better Games with Unity and Microsoft Azure
Build Better Games with Unity and Microsoft AzureBuild Better Games with Unity and Microsoft Azure
Build Better Games with Unity and Microsoft Azure
Xamarin
 
Exploring UrhoSharp 3D with Xamarin Workbooks
Exploring UrhoSharp 3D with Xamarin WorkbooksExploring UrhoSharp 3D with Xamarin Workbooks
Exploring UrhoSharp 3D with Xamarin Workbooks
Xamarin
 
Desktop Developer’s Guide to Mobile with Visual Studio Tools for Xamarin
Desktop Developer’s Guide to Mobile with Visual Studio Tools for XamarinDesktop Developer’s Guide to Mobile with Visual Studio Tools for Xamarin
Desktop Developer’s Guide to Mobile with Visual Studio Tools for Xamarin
Xamarin
 
Developer’s Intro to Azure Machine Learning
Developer’s Intro to Azure Machine LearningDeveloper’s Intro to Azure Machine Learning
Developer’s Intro to Azure Machine Learning
Xamarin
 
Customizing Xamarin.Forms UI
Customizing Xamarin.Forms UICustomizing Xamarin.Forms UI
Customizing Xamarin.Forms UI
Xamarin
 
Session 4 - Xamarin Partner Program, Events and Resources
Session 4 - Xamarin Partner Program, Events and ResourcesSession 4 - Xamarin Partner Program, Events and Resources
Session 4 - Xamarin Partner Program, Events and Resources
Xamarin
 
Session 3 - Driving Mobile Growth and Profitability
Session 3 - Driving Mobile Growth and ProfitabilitySession 3 - Driving Mobile Growth and Profitability
Session 3 - Driving Mobile Growth and Profitability
Xamarin
 
Session 2 - Emerging Technologies in your Mobile Practice
Session 2 - Emerging Technologies in your Mobile PracticeSession 2 - Emerging Technologies in your Mobile Practice
Session 2 - Emerging Technologies in your Mobile Practice
Xamarin
 
Session 1 - Transformative Opportunities in Mobile and Cloud
Session 1 - Transformative Opportunities in Mobile and Cloud Session 1 - Transformative Opportunities in Mobile and Cloud
Session 1 - Transformative Opportunities in Mobile and Cloud
Xamarin
 
SkiaSharp Graphics for Xamarin.Forms
SkiaSharp Graphics for Xamarin.FormsSkiaSharp Graphics for Xamarin.Forms
SkiaSharp Graphics for Xamarin.Forms
Xamarin
 
Building Games for iOS, macOS, and tvOS with Visual Studio and Azure
Building Games for iOS, macOS, and tvOS with Visual Studio and AzureBuilding Games for iOS, macOS, and tvOS with Visual Studio and Azure
Building Games for iOS, macOS, and tvOS with Visual Studio and Azure
Xamarin
 
Intro to Xamarin.Forms for Visual Studio 2017
Intro to Xamarin.Forms for Visual Studio 2017Intro to Xamarin.Forms for Visual Studio 2017
Intro to Xamarin.Forms for Visual Studio 2017
Xamarin
 
Connected Mobile Apps with Microsoft Azure
Connected Mobile Apps with Microsoft AzureConnected Mobile Apps with Microsoft Azure
Connected Mobile Apps with Microsoft Azure
Xamarin
 
Introduction to Xamarin for Visual Studio 2017
Introduction to Xamarin for Visual Studio 2017Introduction to Xamarin for Visual Studio 2017
Introduction to Xamarin for Visual Studio 2017
Xamarin
 
Building Your First iOS App with Xamarin for Visual Studio
Building Your First iOS App with Xamarin for Visual StudioBuilding Your First iOS App with Xamarin for Visual Studio
Building Your First iOS App with Xamarin for Visual Studio
Xamarin
 

More from Xamarin (20)

Xamarin University Presents: Building Your First Intelligent App with Xamarin...
Xamarin University Presents: Building Your First Intelligent App with Xamarin...Xamarin University Presents: Building Your First Intelligent App with Xamarin...
Xamarin University Presents: Building Your First Intelligent App with Xamarin...
 
Xamarin University Presents: Ship Better Apps with Visual Studio App Center
Xamarin University Presents: Ship Better Apps with Visual Studio App CenterXamarin University Presents: Ship Better Apps with Visual Studio App Center
Xamarin University Presents: Ship Better Apps with Visual Studio App Center
 
Get the Most Out of iOS 11 with Visual Studio Tools for Xamarin
Get the Most Out of iOS 11 with Visual Studio Tools for XamarinGet the Most Out of iOS 11 with Visual Studio Tools for Xamarin
Get the Most Out of iOS 11 with Visual Studio Tools for Xamarin
 
Get the Most out of Android 8 Oreo with Visual Studio Tools for Xamarin
Get the Most out of Android 8 Oreo with Visual Studio Tools for XamarinGet the Most out of Android 8 Oreo with Visual Studio Tools for Xamarin
Get the Most out of Android 8 Oreo with Visual Studio Tools for Xamarin
 
Creative Hacking: Delivering React Native App A/B Testing Using CodePush
Creative Hacking: Delivering React Native App A/B Testing Using CodePushCreative Hacking: Delivering React Native App A/B Testing Using CodePush
Creative Hacking: Delivering React Native App A/B Testing Using CodePush
 
Build Better Games with Unity and Microsoft Azure
Build Better Games with Unity and Microsoft AzureBuild Better Games with Unity and Microsoft Azure
Build Better Games with Unity and Microsoft Azure
 
Exploring UrhoSharp 3D with Xamarin Workbooks
Exploring UrhoSharp 3D with Xamarin WorkbooksExploring UrhoSharp 3D with Xamarin Workbooks
Exploring UrhoSharp 3D with Xamarin Workbooks
 
Desktop Developer’s Guide to Mobile with Visual Studio Tools for Xamarin
Desktop Developer’s Guide to Mobile with Visual Studio Tools for XamarinDesktop Developer’s Guide to Mobile with Visual Studio Tools for Xamarin
Desktop Developer’s Guide to Mobile with Visual Studio Tools for Xamarin
 
Developer’s Intro to Azure Machine Learning
Developer’s Intro to Azure Machine LearningDeveloper’s Intro to Azure Machine Learning
Developer’s Intro to Azure Machine Learning
 
Customizing Xamarin.Forms UI
Customizing Xamarin.Forms UICustomizing Xamarin.Forms UI
Customizing Xamarin.Forms UI
 
Session 4 - Xamarin Partner Program, Events and Resources
Session 4 - Xamarin Partner Program, Events and ResourcesSession 4 - Xamarin Partner Program, Events and Resources
Session 4 - Xamarin Partner Program, Events and Resources
 
Session 3 - Driving Mobile Growth and Profitability
Session 3 - Driving Mobile Growth and ProfitabilitySession 3 - Driving Mobile Growth and Profitability
Session 3 - Driving Mobile Growth and Profitability
 
Session 2 - Emerging Technologies in your Mobile Practice
Session 2 - Emerging Technologies in your Mobile PracticeSession 2 - Emerging Technologies in your Mobile Practice
Session 2 - Emerging Technologies in your Mobile Practice
 
Session 1 - Transformative Opportunities in Mobile and Cloud
Session 1 - Transformative Opportunities in Mobile and Cloud Session 1 - Transformative Opportunities in Mobile and Cloud
Session 1 - Transformative Opportunities in Mobile and Cloud
 
SkiaSharp Graphics for Xamarin.Forms
SkiaSharp Graphics for Xamarin.FormsSkiaSharp Graphics for Xamarin.Forms
SkiaSharp Graphics for Xamarin.Forms
 
Building Games for iOS, macOS, and tvOS with Visual Studio and Azure
Building Games for iOS, macOS, and tvOS with Visual Studio and AzureBuilding Games for iOS, macOS, and tvOS with Visual Studio and Azure
Building Games for iOS, macOS, and tvOS with Visual Studio and Azure
 
Intro to Xamarin.Forms for Visual Studio 2017
Intro to Xamarin.Forms for Visual Studio 2017Intro to Xamarin.Forms for Visual Studio 2017
Intro to Xamarin.Forms for Visual Studio 2017
 
Connected Mobile Apps with Microsoft Azure
Connected Mobile Apps with Microsoft AzureConnected Mobile Apps with Microsoft Azure
Connected Mobile Apps with Microsoft Azure
 
Introduction to Xamarin for Visual Studio 2017
Introduction to Xamarin for Visual Studio 2017Introduction to Xamarin for Visual Studio 2017
Introduction to Xamarin for Visual Studio 2017
 
Building Your First iOS App with Xamarin for Visual Studio
Building Your First iOS App with Xamarin for Visual StudioBuilding Your First iOS App with Xamarin for Visual Studio
Building Your First iOS App with Xamarin for Visual Studio
 

Recently uploaded

Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 

Recently uploaded (20)

Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 

Writing native Mac apps in C# with Xamarin.Mac - Aaron Bockover

  • 3. MacOSX The world’s most advanced desktop operating system C#
  • 4. It’s all about sharing code Shared C# Code Xamarin.Mobile Business Logic Cloud Access Database Access DesktopDesktop MobileMobileMobile Windows iOS Windows Phone Android
  • 5. It’s all about sharing code Shared C# Code Xamarin.Mobile Business Logic Cloud Access Database Access DesktopDesktop MobileMobileMobile Windows iOS Windows Phone AndroidMac
  • 6. TouchDraw runs on iPad, Android, and Mac, achieving over 70% code reuse across the platforms. 39% 61% TouchDraw for iPad 24% 76% TouchDraw for Mac 28% 72% TouchDraw for Android Shared Code Platform Specific
  • 7. Xamarin.Mac at a glance • Write native Mac applications in C# • Access Mac OS X APIs for rich integration • Leverage the full power of C# and .NET • Integrated with the Xamarin experience • Deploy directly to the Mac AppStore
  • 8. Xamarin.Mac at a glance Xamarin.Mac Frameworks Xamarin Tools and SDK • Binder • Bundler • Linker • Packager Mono Runtime .NET Base Class Libraries System Libraries Darwin OS Cocoa Frameworks Xcode (UI designer) Xamarin Studio IDE
  • 9. Xamarin.Mac at a glance Xamarin.Mac Frameworks Xamarin Tools and SDK • Binder • Bundler • Linker • Packager Mono Runtime .NET Base Class Libraries System Libraries Darwin OS Cocoa Frameworks Xcode (UI designer) Xamarin Studio IDE
  • 10. Xamarin.Mac Frameworks GraphicsGraphics CoreGraphics ImageKit CoreImage ImageIO CoreText OpenGL CoreVideo PDFKit User InterfaceUser Interface AppKit QuickLook CoreAnima?on SceneKit QCComposer WebKit Audio and VideoAudio and Video AVFounda?on CoreMidi AudioToolbox CoreMedia AudioUnit OpenAL System ServicesSystem Services AddressBook CoreWLAN Bluetooth Scrip?ngBridge CoreLoca?on StoreKit CoreServices InfrastructureInfrastructure CoreData Founda?on CoreFounda?on ObjCRun?me Darwin Security
  • 11. Many are shared with Xamarin.iOS GraphicsGraphics CoreGraphics ImageKit CoreImage ImageIO CoreText OpenGL CoreVideo PDFKit User InterfaceUser Interface AppKit QuickLook CoreAnima?on SceneKit QCComposer WebKit Audio and VideoAudio and Video AVFounda?on CoreMidi AudioToolbox CoreMedia AudioUnit OpenAL System ServicesSystem Services AddressBook CoreWLAN Bluetooth Scrip?ngBridge CoreLoca?on StoreKit CoreServices InfrastructureInfrastructure CoreData Founda?on CoreFounda?on ObjCRun?me Darwin Security
  • 12. The Basics GraphicsGraphics CoreGraphics ImageKit CoreImage ImageIO CoreText OpenGL CoreVideo PDFKit User InterfaceUser Interface AppKit QuickLook CoreAnima?on SceneKit QCComposer WebKit Audio and VideoAudio and Video AVFounda?on CoreMidi AudioToolbox CoreMedia AudioUnit OpenAL System ServicesSystem Services AddressBook CoreWLAN Bluetooth Scrip?ngBridge CoreLoca?on StoreKit CoreServices InfrastructureInfrastructure CoreData Founda5on CoreFounda?on ObjCRun?me Darwin Security
  • 14. How does Xamarin.Mac work? • OS X APIs are projected into C# 1:1 mapping for full platform coverage
  • 15. How does Xamarin.Mac work? • OS X APIs are projected into C# 1:1 mapping for full platform coverage • 80% are Objective-C Full object system is mapped Subclassing and overriding supported
  • 16. How does Xamarin.Mac work? • OS X APIs are projected into C# 1:1 mapping for full platform coverage • 80% are Objective-C Full object system is mapped Subclassing and overriding supported • 20% are C Exposed as C# structs/classes/methods No support for subclassing or overriding
  • 17. How does Xamarin.Mac work? • OS X APIs are projected into C# 1:1 mapping for full platform coverage Check out “Binding Objective-C Libraries” for a deep dive at 1:30! • 80% are Objective-C Full object system is mapped Subclassing and overriding supported • 20% are C Exposed as C# structs/classes/methods No support for subclassing or overriding
  • 19.
  • 20. Anatomy of a Xamarin.Mac application
  • 21. Anatomy of a Xamarin.Mac application Info.plist Application metadata, used by Mac OS (app name, version, publisher, etc.)
  • 22. Anatomy of a Xamarin.Mac application Info.plist Application metadata, used by Mac OS (app name, version, publisher, etc.) Resources Folder Place any resources (images, icons, static data) to be bundled with the app
  • 23. Anatomy of a Xamarin.Mac application Application Delegate Called with application events such as FinishedLaunching or OpenFiles Info.plist Application metadata, used by Mac OS (app name, version, publisher, etc.) Resources Folder Place any resources (images, icons, static data) to be bundled with the app
  • 24. Anatomy of a Xamarin.Mac application Application Delegate Called with application events such as FinishedLaunching or OpenFiles Info.plist Application metadata, used by Mac OS (app name, version, publisher, etc.) Application Main Menu Interface definition pre-populated with many common defaults Resources Folder Place any resources (images, icons, static data) to be bundled with the app
  • 25. Anatomy of a Xamarin.Mac application Application Delegate Called with application events such as FinishedLaunching or OpenFiles Info.plist Application metadata, used by Mac OS (app name, version, publisher, etc.) Application Main Menu Interface definition pre-populated with many common defaults Main Window User Interface The primary window definition editable in the Xcode UI Builder Resources Folder Place any resources (images, icons, static data) to be bundled with the app
  • 26. Anatomy of a Xamarin.Mac application Application Delegate Called with application events such as FinishedLaunching or OpenFiles Info.plist Application metadata, used by Mac OS (app name, version, publisher, etc.) Application Main Menu Interface definition pre-populated with many common defaults Main Window User Interface The primary window definition editable in the Xcode UI Builder Main Window Implementation Class for implementing the features of your Main Window Resources Folder Place any resources (images, icons, static data) to be bundled with the app
  • 28. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Building out our NSWindow public  override  void  WindowControllerDidLoadNib  (NSWindowController                                                                                                    windowController) {        base.WindowControllerDidLoadNib  (windowController);        var  button  =  new  NSButton  (new  RectangleF  (10,  10,  200,  32))  {                Title  =  "Hello  Mac"                BezelStyle  =  NSBezelStyle.Rounded        };                button.Activated  +=  (sender,  e)  =>                new  NSAlert  {  MessageText  =  "You  clicked  me!"  }                        .BeginSheet  (windowController.Window);                windowController.Window.ContentView.AddSubview  (button); }
  • 29. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Building out our NSWindow public  override  void  WindowControllerDidLoadNib  (NSWindowController                                                                                                    windowController) {        base.WindowControllerDidLoadNib  (windowController);        var  button  =  new  NSButton  (new  RectangleF  (10,  10,  200,  32))  {                Title  =  "Hello  Mac"                BezelStyle  =  NSBezelStyle.Rounded        };                button.Activated  +=  (sender,  e)  =>                new  NSAlert  {  MessageText  =  "You  clicked  me!"  }                        .BeginSheet  (windowController.Window);                windowController.Window.ContentView.AddSubview  (button); } Call the base class’ version
  • 30. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Building out our NSWindow public  override  void  WindowControllerDidLoadNib  (NSWindowController                                                                                                    windowController) {        base.WindowControllerDidLoadNib  (windowController);        var  button  =  new  NSButton  (new  RectangleF  (10,  10,  200,  32))  {                Title  =  "Hello  Mac"                BezelStyle  =  NSBezelStyle.Rounded        };                button.Activated  +=  (sender,  e)  =>                new  NSAlert  {  MessageText  =  "You  clicked  me!"  }                        .BeginSheet  (windowController.Window);                windowController.Window.ContentView.AddSubview  (button); } Call the base class’ version Allocate and configure a button
  • 31. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Building out our NSWindow public  override  void  WindowControllerDidLoadNib  (NSWindowController                                                                                                    windowController) {        base.WindowControllerDidLoadNib  (windowController);        var  button  =  new  NSButton  (new  RectangleF  (10,  10,  200,  32))  {                Title  =  "Hello  Mac"                BezelStyle  =  NSBezelStyle.Rounded        };                button.Activated  +=  (sender,  e)  =>                new  NSAlert  {  MessageText  =  "You  clicked  me!"  }                        .BeginSheet  (windowController.Window);                windowController.Window.ContentView.AddSubview  (button); } Call the base class’ version Allocate and configure a button Connect a lambda to run when activated (clicked)
  • 32. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Building out our NSWindow public  override  void  WindowControllerDidLoadNib  (NSWindowController                                                                                                    windowController) {        base.WindowControllerDidLoadNib  (windowController);        var  button  =  new  NSButton  (new  RectangleF  (10,  10,  200,  32))  {                Title  =  "Hello  Mac"                BezelStyle  =  NSBezelStyle.Rounded        };                button.Activated  +=  (sender,  e)  =>                new  NSAlert  {  MessageText  =  "You  clicked  me!"  }                        .BeginSheet  (windowController.Window);                windowController.Window.ContentView.AddSubview  (button); } Call the base class’ version Allocate and configure a button Connect a lambda to run when activated (clicked) Add the button to the document window
  • 36. Designing the UI: Xcode Interface Builder Double click .xib files to open in Xcode
  • 37. Designing the UI: Xcode Interface Builder
  • 38. Designing the UI: Xcode Interface Builder Inspectors Applies to the selected control: • Properties • Sizing • Connections
  • 39. Designing the UI: Xcode Interface Builder Inspectors Applies to the selected control: • Properties • Sizing • Connections Object Library Drag controls to your window
  • 40. Connecting the UI • UI built in Interface Builder connects to code in two ways Actions Outlets
  • 41. Connecting the UI: Actions • Methods defined in C#; invoked directly by controls • Partial methods and always have the same signature
  • 42. Connecting the UI: Actions • Methods defined in C#; invoked directly by controls • Partial methods and always have the same signature -­‐  (IBAction)IncreaseButtonActivated:(id)sender; partial  void  IncreaseButtonActivated  (NSObject  sender); Objective-C C#
  • 43. Connecting the UI: Outlets • Surface controls from Interface Builder to C# properties • The property type is that of the connected control
  • 44. Connecting the UI: Outlets • Surface controls from Interface Builder to C# properties • The property type is that of the connected control @property  (assign)  IBOutlet  NSButton  *IncreaseButton; [Outlet]  NSButton  IncreaseButton  {  get;  set;  } Objective-C C#
  • 45. Connecting the UI Switch to the Assistant editor (aka Butler mode)
  • 46. Connecting the UI Switch to the Assistant editor (aka Butler mode)
  • 47. Connecting the UI Control-Drag from the selected control into the @interface   inside the header file to create an outlet or action
  • 48. Connecting the UI Control-Drag from the selected control into the @interface   inside the header file to create an outlet or action
  • 49. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Connecting the UI @interface  MyDocument  :  NSDocument  {        NSTextField  *CounterLabel; } @property  (assign)  IBOutlet  NSTextField  *CounterLabel; -­‐  (IBAction)IncreaseButtonActivated:(id)sender; @end
  • 50. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Behind the Scenes in Xamarin.Mac [Register  ("MyDocument")] partial  class  MyDocument {        [Outlet]        TextField  CounterLabel  {  get;  set;  }        [Action  ("IncreaseButtonActivated:")]        partial  void  IncreaseButtonActivated  (NSObject  sender); }
  • 51. Events and Callbacks • In C#, events are a very common communication pattern: var  window  =  new  NSWindow  (); window.DidBecomeKey  +=  HandleDidBecomeKey; window.DidResignKey  +=  HandleDidResignKey; NSWindow HandleDidBecomeKey HandleDidResignKey
  • 52. Events and Callbacks • With Apple’s pattern however, objects send interesting events, or messages, to a delegate: new  NSWindow  {        Delegate  =  new  MyWindowDelegate  () }; NSWindow MyWindowDelegate class  MyWindowDelegate  :  NSWindowDelegate {        override  void  DidBecomeKey  (...)        override  void  DidResignKey  (...) }
  • 54. Events and Callbacks • Xamarin.Mac supports both models You are free to choose on a per-instance basis
  • 55. Events and Callbacks • Xamarin.Mac supports both models You are free to choose on a per-instance basis • The Apple Delegate pattern maps to C# events Internally we create the Delegate class and map it to subscribed event handlers
  • 56. Events and Callbacks • Xamarin.Mac supports both models You are free to choose on a per-instance basis • The Apple Delegate pattern maps to C# events Internally we create the Delegate class and map it to subscribed event handlers • One pattern replaces the other
  • 58. AppKit • Pervasive use of Model-View-Controller All logic goes in the controller class Unless writing a custom control (NSView) Controller orchestrates the work of views
  • 59. AppKit • Pervasive use of Model-View-Controller All logic goes in the controller class Unless writing a custom control (NSView) Controller orchestrates the work of views • Goes well beyond the basics of UI High-level NSDocument does the heavy li!ing Full menus, saving, loading, window restoration, multi- window support: all for free
  • 61. override  void  WindowControllerDidLoadNib  (NSWindowController  windowController) NSDocument
  • 62. override  void  WindowControllerDidLoadNib  (NSWindowController  windowController) override  bool  ReadFromUrl  (NSUrl  url,                                                      string  typeName,                                                      out  NSError  outError) NSDocument
  • 63. override  void  WindowControllerDidLoadNib  (NSWindowController  windowController) override  bool  ReadFromUrl  (NSUrl  url,                                                      string  typeName,                                                      out  NSError  outError) override  bool  SaveToUrl  (NSUrl  url,                                                  string  typeName,                                                  NSSaveOperationType  saveOperation,                                                  out  NSError  outError) NSDocument
  • 64. Structure of the UI • NSWindow Top-level window • NSWindow.ContentView An NSView that contains controls for the application • NSView is a class from which most controls derive Can contain any number of children (NSView.Subviews)
  • 65. Structure of the UI • Some controls have many faces and roles NSTextField implements both “label” and “entry” roles Instead of being discrete controls, properties are modified to fit the desired role Xcode provides pre-set properties for controls
  • 66. NSView: a powerful container • Can contain (and perform layout of) subviews • Handles events • Paints itself • Can be backed by a CALayer CALayers are GPU accelerated • Its properties can be animated
  • 68. Ship Your App: by yourself • The app is unrestricted and has full access to the system • Shipped as a “bundle” Typically a zipped up .app folder Fully self-contained Xamarin Studio generates this by default
  • 69. Gatekeeper • Apple recently turned on Gatekeeper which prevents unsigned apps from running by default ☹
  • 70. Gatekeeper • Apple recently turned on Gatekeeper which prevents unsigned apps from running by default ☹ BADText
  • 71. Gatekeeper • Code sign your app for the best user experience • Xamarin Studio supports this for Xamarin.Mac ☺
  • 72. Gatekeeper • Code sign your app for the best user experience • Xamarin Studio supports this for Xamarin.Mac Project Options → Mac OS X Packaging ☺
  • 73. Ship Your App: in the App Store
  • 74. Ship Your App: in the App Store • Must apply for the Mac developer program through Apple • Must sign app • App is submitted for review
  • 75. Ship Your App: in the App Store • Must apply for the Mac developer program through Apple • Must sign app • App is submitted for review • The app will be sandboxed
  • 76. Ship Your App: in the App Store • Must apply for the Mac developer program through Apple • Must sign app • App is submitted for review • The app will be sandboxed • Xamarin Studio signs, packages, and submits the app • Shipping to the App Store is the best end-user experience
  • 77. Mac OS X Sandbox • Kernel-enforced sandbox • Limits access to the system Limitations on filesystem access Use of special open/save panels Limits access to some services and APIs
  • 78. Mac OS X Sandbox • Edit Sandbox entitlements in Info.plist in Xamarin Studio
  • 79. ?
  • 80. Xamarin makes for Happy Devices Learn more: xamarin.com/mac docs.xamarin.com/mac github.com/xamarin/mac-samples Aaron Bockover @abock abock@xamarin.com