Random Acts of MAC Development
What, a book?
The web is awash with tutorials for developing iOS applications. So many words on a very broad topic. Go in search of tutorials on developing for the Mac desktop and it's like looking for an oasis in a desert. They are there, but finding one and, more importantly, finding one that is in SWIFT and is still relevant, is a major undertaking.
So it's obvious that, when I get into Apple development, I want to make a Mac desktop application. No point making it easy!
Along my journey to becoming a passable Apple desktop developer, I decided the best way to reinforce what I learn is to write it down. I'm not the sort to have rough notes, so I decided to compound the learning experience and try to produce a book. This is the work-in-progress version of that book.
I have no idea whether it will be of use to anyone but me and I have already been told the 'writing style' of the book could do with some work. That's something I will address when the book matures if I end up making it public and supported. For now, it's my book of notes and anyone who finds this page is welcome to grab a copy.
Key Learning Points
Whats in the book?
I ripped this table of contents from the book (good old VBA in Word - got to love it). Not every topic has content yet, but most have something useful in them. It's along way from completion, will almost certainly have typos and will definitely have pagination issues. It's a start though.
- Message Boxes
- NSAlert, the long way
- Changing the Image
- With buttons
- NSAlert wrapped up
- Parts of a message
- Defining the icon.
- Defining the buttons
- Defining the text
- Adding Buttons
- Adding The Icon
- File Prompts
- File Open Prompt
- Save file
- Sandboxing
- Selecting Folders
- Toolbars
- Creating Toolbars
- Customising our button
- Adding to the toolbar
- Connecting the icon
- Where next
- Menus
- Overview
- Connecting via Storyboard
- Connect Via Code
- Menu Helpers
- Adding A Handler
- Handling A Menu Item
- Connecting the Menu Item
- What's With The \u{2026} ?
- Refactor for Safety
- Menu Item Tags
- Menu Enum
- Menu Helper
- Usage Refactoring
- Enabling and Disabling Menu Items
- Enabling the Enable/Disable Functionality
- Recently Used Files
- Minimal Initialisation
- Building the Recent Items menu
- The Main Problem
- Project Structure
- About Box
- About Box
- Creating The Storyboard
- Connecting The Menu
- Displaying The Dialog
- Displaying the About Box Modally.
- Cleaning up
- Making the window movable
- Alternate Ending
- Initial Controller
- Preferences Window
- Preferences Windows
- Basic Setup
- The Tab View
- Connecting our view
- Trying it out
- Changing the Tab Type
- Adding Tabs
- Getting a Little More Adventurous
- Transitioning between tabs
- Reusing our window
- Making your tabs do something
- Wrapping Up
- Master Detail Views
- Master Detail View Communications
- Getting the views to communicate
- Notifications
- Notifications
- Other examples?
- Basic Theory
- Defining Notifications
- Listening for Notifications
- Creating Notifications
- Going Further - Passing simple data
- Going Further - Passing more complex data
- NSOutline
- Basic Outlining
- Tips
- Closing your application
- Dragging a Window
- Window Position
- XML Parsing
- Parsing an XML file
- Basic File Structure
- Lets create some objects
- NodeHelpers
- Header Class
- Body Wrapper
- Outline Items
- Wrapping It All Up
- Code recap
- Tooling
- Checking code syntax - Swift Lint
- Install
- Integrate into Xcode
- Configuring
- Automated cleanup
- Logging
- Set-up
- Logging
Where is it?
Can I have a copy?
While the book was far from complete when I stopped working on it, it still contains a lot of useful information on Mac development. Having switched to SwiftUI, the book no longer helps with what I want to achieve, so is unlikely to get any more love and attention. However, you may want to take a look, so feel free to download what's here.
Random Acts of Mac Development
Testimonials
Am I really any good?
Don't take my word for my abilities, take a look at other peoples opinions about me.