Aaron BockoverXamarinabock@xamarin.com@abockWriting Native Mac Appsin C# with Xamarin.Mac
2.6 Billion Devices
MacOSXThe world’s most advanceddesktop operating systemC#
It’s all about sharing codeShared C# CodeXamarin.MobileBusiness LogicCloud AccessDatabase AccessDesktopDesktop MobileMobil...
It’s all about sharing codeShared C# CodeXamarin.MobileBusiness LogicCloud AccessDatabase AccessDesktopDesktop MobileMobil...
TouchDraw runs on iPad,Android, and Mac, achievingover 70% code reuse acrossthe platforms.39%61%TouchDrawfor iPad24%76%Tou...
Xamarin.Mac at a glance• Write native Mac applications in C#• Access Mac OS X APIs for rich integration• Leverage the full...
Xamarin.Mac at a glanceXamarin.MacFrameworksXamarin Toolsand SDK• Binder• Bundler• Linker• Packager Mono Runtime.NET Base ...
Xamarin.Mac at a glanceXamarin.MacFrameworksXamarin Toolsand SDK• Binder• Bundler• Linker• Packager Mono Runtime.NET Base ...
Xamarin.Mac FrameworksGraphicsGraphicsCoreGraphics ImageKitCoreImage ImageIOCoreText OpenGLCoreVideo PDFKitUser InterfaceU...
Many are shared with Xamarin.iOSGraphicsGraphicsCoreGraphics ImageKitCoreImage ImageIOCoreText OpenGLCoreVideo PDFKitUser ...
The BasicsGraphicsGraphicsCoreGraphics ImageKitCoreImage ImageIOCoreText OpenGLCoreVideo PDFKitUser InterfaceUser Interfac...
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-CFull...
How does Xamarin.Mac work?• OS X APIs are projected into C#1:1 mapping for full platform coverage• 80% are Objective-CFull...
How does Xamarin.Mac work?• OS X APIs are projected into C#1:1 mapping for full platform coverageCheck out “BindingObjecti...
DIVE IN
Anatomy of a Xamarin.Mac application
Anatomy of a Xamarin.Mac applicationInfo.plistApplication metadata, used by Mac OS(app name, version, publisher, etc.)
Anatomy of a Xamarin.Mac applicationInfo.plistApplication metadata, used by Mac OS(app name, version, publisher, etc.)Reso...
Anatomy of a Xamarin.Mac applicationApplication DelegateCalled with application events such asFinishedLaunching or OpenFil...
Anatomy of a Xamarin.Mac applicationApplication DelegateCalled with application events such asFinishedLaunching or OpenFil...
Anatomy of a Xamarin.Mac applicationApplication DelegateCalled with application events such asFinishedLaunching or OpenFil...
Anatomy of a Xamarin.Mac applicationApplication DelegateCalled with application events such asFinishedLaunching or OpenFil...
First Run
01020304050607080910111213141516Building out our NSWindowpublic	  override	  void	  WindowControllerDidLoadNib	  (NSWindow...
01020304050607080910111213141516Building out our NSWindowpublic	  override	  void	  WindowControllerDidLoadNib	  (NSWindow...
01020304050607080910111213141516Building out our NSWindowpublic	  override	  void	  WindowControllerDidLoadNib	  (NSWindow...
01020304050607080910111213141516Building out our NSWindowpublic	  override	  void	  WindowControllerDidLoadNib	  (NSWindow...
01020304050607080910111213141516Building out our NSWindowpublic	  override	  void	  WindowControllerDidLoadNib	  (NSWindow...
Hello Mac!
Hello Mac!
Hello Mac!
Designing the UI: Xcode Interface BuilderDouble click .xibfiles to open inXcode
Designing the UI: Xcode Interface Builder
Designing the UI: Xcode Interface BuilderInspectorsApplies to the selected control:• Properties• Sizing• Connections
Designing the UI: Xcode Interface BuilderInspectorsApplies to the selected control:• Properties• Sizing• ConnectionsObject...
Connecting the UI• UI built in Interface Builder connects to code in two waysActionsOutlets
Connecting the UI: Actions• Methods defined in C#; invoked directly by controls• Partial methods and always have the same ...
Connecting the UI: Actions• Methods defined in C#; invoked directly by controls• Partial methods and always have the same ...
Connecting the UI: Outlets• Surface controls from Interface Builder to C# properties• The property type is that of the con...
Connecting the UI: Outlets• Surface controls from Interface Builder to C# properties• The property type is that of the con...
Connecting the UISwitch to theAssistant editor(aka Butler mode)
Connecting the UISwitch to theAssistant editor(aka Butler mode)
Connecting the UIControl-Drag from the selected control into the @interface	  inside the header file to create an outlet o...
Connecting the UIControl-Drag from the selected control into the @interface	  inside the header file to create an outlet o...
01020304050607080910111213141516Connecting the UI@interface	  MyDocument	  :	  NSDocument	  {	  	  	  	  NSTextField	  *Co...
01020304050607080910111213141516Behind the Scenes in Xamarin.Mac[Register	  ("MyDocument")]partial	  class	  MyDocument{	 ...
Events and Callbacks• In C#, events are a very common communication pattern:var	  window	  =	  new	  NSWindow	  ();window....
Events and Callbacks• With Apple’s pattern however, objects send interesting events,or messages, to a delegate:new	  NSWin...
Events and Callbacks
Events and Callbacks• Xamarin.Mac supports both modelsYou are free to choose on a per-instance basis
Events and Callbacks• Xamarin.Mac supports both modelsYou are free to choose on a per-instance basis• The Apple Delegate p...
Events and Callbacks• Xamarin.Mac supports both modelsYou are free to choose on a per-instance basis• The Apple Delegate p...
AppKit
AppKit• Pervasive use of Model-View-ControllerAll logic goes in the controller classUnless writing a custom control (NSVie...
AppKit• Pervasive use of Model-View-ControllerAll logic goes in the controller classUnless writing a custom control (NSVie...
NSDocument
override	  void	  WindowControllerDidLoadNib	  (NSWindowController	  windowController)NSDocument
override	  void	  WindowControllerDidLoadNib	  (NSWindowController	  windowController)override	  bool	  ReadFromUrl	  (NSU...
override	  void	  WindowControllerDidLoadNib	  (NSWindowController	  windowController)override	  bool	  ReadFromUrl	  (NSU...
Structure of the UI• NSWindowTop-level window• NSWindow.ContentViewAn NSView that contains controls for the application• N...
Structure of the UI• Some controls have many faces and rolesNSTextField implements both “label” and “entry” rolesInstead o...
NSView: a powerful container• Can contain (and perform layout of) subviews• Handles events• Paints itself• Can be backed b...
SHIP IT
Ship Your App: by yourself• The app is unrestricted and has full access to the system• Shipped as a “bundle”Typically a zi...
Gatekeeper• Apple recently turned on Gatekeeper which prevents unsignedapps from running by default☹
Gatekeeper• Apple recently turned on Gatekeeper which prevents unsignedapps 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.MacProject Options →...
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 f...
Ship Your App: in the App Store• Must apply for the Mac developer program through Apple• Must sign app• App is submitted f...
Ship Your App: in the App Store• Must apply for the Mac developer program through Apple• Must sign app• App is submitted f...
Mac OS X Sandbox• Kernel-enforced sandbox• Limits access to the systemLimitations on filesystem accessUse of special open/...
Mac OS X Sandbox• Edit Sandbox entitlements in Info.plist in Xamarin Studio
?
Xamarin makes for Happy DevicesLearn more:xamarin.com/macdocs.xamarin.com/macgithub.com/xamarin/mac-samplesAaron Bockover@...
Writing native Mac apps in C# with Xamarin.Mac - Aaron Bockover
Upcoming SlideShare
Loading in …5
×

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

3,442 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,442
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
52
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

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

  1. 1. Aaron BockoverXamarinabock@xamarin.com@abockWriting Native Mac Appsin C# with Xamarin.Mac
  2. 2. 2.6 Billion Devices
  3. 3. MacOSXThe world’s most advanceddesktop operating systemC#
  4. 4. It’s all about sharing codeShared C# CodeXamarin.MobileBusiness LogicCloud AccessDatabase AccessDesktopDesktop MobileMobileMobileWindows iOSWindowsPhoneAndroid
  5. 5. It’s all about sharing codeShared C# CodeXamarin.MobileBusiness LogicCloud AccessDatabase AccessDesktopDesktop MobileMobileMobileWindows iOSWindowsPhoneAndroidMac
  6. 6. TouchDraw runs on iPad,Android, and Mac, achievingover 70% code reuse acrossthe platforms.39%61%TouchDrawfor iPad24%76%TouchDrawfor Mac28%72%TouchDrawfor AndroidShared CodePlatform Specific
  7. 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. 8. Xamarin.Mac at a glanceXamarin.MacFrameworksXamarin Toolsand SDK• Binder• Bundler• Linker• Packager Mono Runtime.NET Base Class Libraries System LibrariesDarwin OSCocoa FrameworksXcode(UI designer)Xamarin Studio IDE
  9. 9. Xamarin.Mac at a glanceXamarin.MacFrameworksXamarin Toolsand SDK• Binder• Bundler• Linker• Packager Mono Runtime.NET Base Class Libraries System LibrariesDarwin OSCocoa FrameworksXcode(UI designer)Xamarin Studio IDE
  10. 10. Xamarin.Mac FrameworksGraphicsGraphicsCoreGraphics ImageKitCoreImage ImageIOCoreText OpenGLCoreVideo PDFKitUser InterfaceUser InterfaceAppKit QuickLookCoreAnima?on SceneKitQCComposer WebKitAudio and VideoAudio and VideoAVFounda?on CoreMidiAudioToolbox CoreMediaAudioUnit OpenALSystem ServicesSystem ServicesAddressBook CoreWLANBluetooth Scrip?ngBridgeCoreLoca?on StoreKitCoreServicesInfrastructureInfrastructureCoreData Founda?onCoreFounda?on ObjCRun?meDarwin Security
  11. 11. Many are shared with Xamarin.iOSGraphicsGraphicsCoreGraphics ImageKitCoreImage ImageIOCoreText OpenGLCoreVideo PDFKitUser InterfaceUser InterfaceAppKit QuickLookCoreAnima?on SceneKitQCComposer WebKitAudio and VideoAudio and VideoAVFounda?on CoreMidiAudioToolbox CoreMediaAudioUnit OpenALSystem ServicesSystem ServicesAddressBook CoreWLANBluetooth Scrip?ngBridgeCoreLoca?on StoreKitCoreServicesInfrastructureInfrastructureCoreData Founda?onCoreFounda?on ObjCRun?meDarwin Security
  12. 12. The BasicsGraphicsGraphicsCoreGraphics ImageKitCoreImage ImageIOCoreText OpenGLCoreVideo PDFKitUser InterfaceUser InterfaceAppKit QuickLookCoreAnima?on SceneKitQCComposer WebKitAudio and VideoAudio and VideoAVFounda?on CoreMidiAudioToolbox CoreMediaAudioUnit OpenALSystem ServicesSystem ServicesAddressBook CoreWLANBluetooth Scrip?ngBridgeCoreLoca?on StoreKitCoreServicesInfrastructureInfrastructureCoreData Founda5onCoreFounda?on ObjCRun?meDarwin Security
  13. 13. How does Xamarin.Mac work?
  14. 14. How does Xamarin.Mac work?• OS X APIs are projected into C#1:1 mapping for full platform coverage
  15. 15. How does Xamarin.Mac work?• OS X APIs are projected into C#1:1 mapping for full platform coverage• 80% are Objective-CFull object system is mappedSubclassing and overriding supported
  16. 16. How does Xamarin.Mac work?• OS X APIs are projected into C#1:1 mapping for full platform coverage• 80% are Objective-CFull object system is mappedSubclassing and overriding supported• 20% are CExposed as C# structs/classes/methodsNo support for subclassing or overriding
  17. 17. How does Xamarin.Mac work?• OS X APIs are projected into C#1:1 mapping for full platform coverageCheck out “BindingObjective-C Libraries” for adeep dive at 1:30!• 80% are Objective-CFull object system is mappedSubclassing and overriding supported• 20% are CExposed as C# structs/classes/methodsNo support for subclassing or overriding
  18. 18. DIVE IN
  19. 19. Anatomy of a Xamarin.Mac application
  20. 20. Anatomy of a Xamarin.Mac applicationInfo.plistApplication metadata, used by Mac OS(app name, version, publisher, etc.)
  21. 21. Anatomy of a Xamarin.Mac applicationInfo.plistApplication metadata, used by Mac OS(app name, version, publisher, etc.)Resources FolderPlace any resources (images, icons,static data) to be bundled with the app
  22. 22. Anatomy of a Xamarin.Mac applicationApplication DelegateCalled with application events such asFinishedLaunching or OpenFilesInfo.plistApplication metadata, used by Mac OS(app name, version, publisher, etc.)Resources FolderPlace any resources (images, icons,static data) to be bundled with the app
  23. 23. Anatomy of a Xamarin.Mac applicationApplication DelegateCalled with application events such asFinishedLaunching or OpenFilesInfo.plistApplication metadata, used by Mac OS(app name, version, publisher, etc.)Application Main MenuInterface definition pre-populated withmany common defaultsResources FolderPlace any resources (images, icons,static data) to be bundled with the app
  24. 24. Anatomy of a Xamarin.Mac applicationApplication DelegateCalled with application events such asFinishedLaunching or OpenFilesInfo.plistApplication metadata, used by Mac OS(app name, version, publisher, etc.)Application Main MenuInterface definition pre-populated withmany common defaultsMain Window User InterfaceThe primary window definitioneditable in the Xcode UI BuilderResources FolderPlace any resources (images, icons,static data) to be bundled with the app
  25. 25. Anatomy of a Xamarin.Mac applicationApplication DelegateCalled with application events such asFinishedLaunching or OpenFilesInfo.plistApplication metadata, used by Mac OS(app name, version, publisher, etc.)Application Main MenuInterface definition pre-populated withmany common defaultsMain Window User InterfaceThe primary window definitioneditable in the Xcode UI BuilderMain Window ImplementationClass for implementing the features ofyour Main WindowResources FolderPlace any resources (images, icons,static data) to be bundled with the app
  26. 26. First Run
  27. 27. 01020304050607080910111213141516Building out our NSWindowpublic  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);}
  28. 28. 01020304050607080910111213141516Building out our NSWindowpublic  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
  29. 29. 01020304050607080910111213141516Building out our NSWindowpublic  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’ versionAllocate andconfigure a button
  30. 30. 01020304050607080910111213141516Building out our NSWindowpublic  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’ versionAllocate andconfigure a buttonConnect a lambdato run whenactivated (clicked)
  31. 31. 01020304050607080910111213141516Building out our NSWindowpublic  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’ versionAllocate andconfigure a buttonConnect a lambdato run whenactivated (clicked)Add the button to thedocument window
  32. 32. Hello Mac!
  33. 33. Hello Mac!
  34. 34. Hello Mac!
  35. 35. Designing the UI: Xcode Interface BuilderDouble click .xibfiles to open inXcode
  36. 36. Designing the UI: Xcode Interface Builder
  37. 37. Designing the UI: Xcode Interface BuilderInspectorsApplies to the selected control:• Properties• Sizing• Connections
  38. 38. Designing the UI: Xcode Interface BuilderInspectorsApplies to the selected control:• Properties• Sizing• ConnectionsObject LibraryDrag controls toyour window
  39. 39. Connecting the UI• UI built in Interface Builder connects to code in two waysActionsOutlets
  40. 40. Connecting the UI: Actions• Methods defined in C#; invoked directly by controls• Partial methods and always have the same signature
  41. 41. 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-CC#
  42. 42. Connecting the UI: Outlets• Surface controls from Interface Builder to C# properties• The property type is that of the connected control
  43. 43. 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-CC#
  44. 44. Connecting the UISwitch to theAssistant editor(aka Butler mode)
  45. 45. Connecting the UISwitch to theAssistant editor(aka Butler mode)
  46. 46. Connecting the UIControl-Drag from the selected control into the @interface  inside the header file to create an outlet or action
  47. 47. Connecting the UIControl-Drag from the selected control into the @interface  inside the header file to create an outlet or action
  48. 48. 01020304050607080910111213141516Connecting the UI@interface  MyDocument  :  NSDocument  {        NSTextField  *CounterLabel;}@property  (assign)  IBOutlet  NSTextField  *CounterLabel;-­‐  (IBAction)IncreaseButtonActivated:(id)sender;@end
  49. 49. 01020304050607080910111213141516Behind the Scenes in Xamarin.Mac[Register  ("MyDocument")]partial  class  MyDocument{        [Outlet]        TextField  CounterLabel  {  get;  set;  }        [Action  ("IncreaseButtonActivated:")]        partial  void  IncreaseButtonActivated  (NSObject  sender);}
  50. 50. Events and Callbacks• In C#, events are a very common communication pattern:var  window  =  new  NSWindow  ();window.DidBecomeKey  +=  HandleDidBecomeKey;window.DidResignKey  +=  HandleDidResignKey;NSWindowHandleDidBecomeKeyHandleDidResignKey
  51. 51. Events and Callbacks• With Apple’s pattern however, objects send interesting events,or messages, to a delegate:new  NSWindow  {        Delegate  =  new  MyWindowDelegate  ()};NSWindowMyWindowDelegateclass  MyWindowDelegate  :  NSWindowDelegate{        override  void  DidBecomeKey  (...)        override  void  DidResignKey  (...)}
  52. 52. Events and Callbacks
  53. 53. Events and Callbacks• Xamarin.Mac supports both modelsYou are free to choose on a per-instance basis
  54. 54. Events and Callbacks• Xamarin.Mac supports both modelsYou are free to choose on a per-instance basis• The Apple Delegate pattern maps to C# eventsInternally we create the Delegate class and map it tosubscribed event handlers
  55. 55. Events and Callbacks• Xamarin.Mac supports both modelsYou are free to choose on a per-instance basis• The Apple Delegate pattern maps to C# eventsInternally we create the Delegate class and map it tosubscribed event handlers• One pattern replaces the other
  56. 56. AppKit
  57. 57. AppKit• Pervasive use of Model-View-ControllerAll logic goes in the controller classUnless writing a custom control (NSView)Controller orchestrates the work of views
  58. 58. AppKit• Pervasive use of Model-View-ControllerAll logic goes in the controller classUnless writing a custom control (NSView)Controller orchestrates the work of views• Goes well beyond the basics of UIHigh-level NSDocument does the heavy li!ingFull menus, saving, loading, window restoration, multi-window support: all for free
  59. 59. NSDocument
  60. 60. override  void  WindowControllerDidLoadNib  (NSWindowController  windowController)NSDocument
  61. 61. override  void  WindowControllerDidLoadNib  (NSWindowController  windowController)override  bool  ReadFromUrl  (NSUrl  url,                                                      string  typeName,                                                      out  NSError  outError)NSDocument
  62. 62. 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
  63. 63. Structure of the UI• NSWindowTop-level window• NSWindow.ContentViewAn NSView that contains controls for the application• NSView is a class from which most controls deriveCan contain any number of children (NSView.Subviews)
  64. 64. Structure of the UI• Some controls have many faces and rolesNSTextField implements both “label” and “entry” rolesInstead of being discrete controls, properties are modifiedto fit the desired roleXcode provides pre-set properties for controls
  65. 65. NSView: a powerful container• Can contain (and perform layout of) subviews• Handles events• Paints itself• Can be backed by a CALayerCALayers are GPU accelerated• Its properties can be animated
  66. 66. SHIP IT
  67. 67. 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 folderFully self-containedXamarin Studio generates this by default
  68. 68. Gatekeeper• Apple recently turned on Gatekeeper which prevents unsignedapps from running by default☹
  69. 69. Gatekeeper• Apple recently turned on Gatekeeper which prevents unsignedapps from running by default☹BADText
  70. 70. Gatekeeper• Code sign your app for the best user experience• Xamarin Studio supports this for Xamarin.Mac☺
  71. 71. Gatekeeper• Code sign your app for the best user experience• Xamarin Studio supports this for Xamarin.MacProject Options → Mac OS X Packaging☺
  72. 72. Ship Your App: in the App Store
  73. 73. Ship Your App: in the App Store• Must apply for the Mac developer program through Apple• Must sign app• App is submitted for review
  74. 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• The app will be sandboxed
  75. 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• Xamarin Studio signs, packages, and submits the app• Shipping to the App Store is the best end-user experience
  76. 76. Mac OS X Sandbox• Kernel-enforced sandbox• Limits access to the systemLimitations on filesystem accessUse of special open/save panelsLimits access to some services and APIs
  77. 77. Mac OS X Sandbox• Edit Sandbox entitlements in Info.plist in Xamarin Studio
  78. 78. ?
  79. 79. Xamarin makes for Happy DevicesLearn more:xamarin.com/macdocs.xamarin.com/macgithub.com/xamarin/mac-samplesAaron Bockover@abockabock@xamarin.com

×