• Stars
    star
    690
  • Rank 65,522 (Top 2 %)
  • Language
    Swift
  • License
    Other
  • Created over 4 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A highly-opinionated Xcode project template to build a new macOS app with.

DefaultApp README

DefaultApp is an open source starting point – a template - for native macOS developers.

I maintained it in Objective-C for over a decade before finally porting it to Swift in 2018. Anytime I start a new app – big or small, whether or not it’s something I plan on releasing publicly or if it’s just a small prototype or utility app I’m building for myself – I start with this project.

What's Included

  • It builds a native macOS app targeting 10.14 Mojave and 10.15 Catalina.
  • A hardened-runtime target ready for Notarization and designed to be distributed directly to your customers.
  • A second, duplicate target that is Sandboxed and ready for distribution via the Mac App Store.
  • Conditional build flags that let you differentiate between debug and production builds as well as Mac App Store and direct to consumer builds.
  • It also builds an iOS companion app target for iOS 13 with shared code between the two platforms.
  • Default NSWindowControllers for a primary app window and Preferences window are wired up and ready to go. They're also built using xibs because storyboards on macOS are dumb.
  • The app is AppleScript enabled by default and includes a sample .sdef scripting dictionary because you can pry AppleScript support out of my cold, dead hands.
  • Two helper classes that make building a typical macOS source list easy.
  • A few common controls and NSView subclasses that I find myself using in nearly every project.
  • Sane Xcode defaults for settings such as enabling insecure HTTP requests in web views but not in the rest of the app and also making the project compatible with agvtool. Little things such as those that are helpful but nearly impossible to google unless you know what you don't know.
  • Pre-configured to check for app updates with Sparkle. (And in the Mac App Store target, Sparkle is completely removed to appease the App Review gods.)
  • A fair amount of other miscellaneous code and helper extensions that always come up and no one wants to write from scratch each time.
  • Pre-written Podfile and Cartfiles that include the usual open source libraries I include in all of my projects. (I would have migrated to the Swift Package Manager instead, but not everything is available through it yet.)

Installation

  1. Clone this repo.

  2. Inside you'll find a small shell script called renameApp.sh. This will let you rename the project to something other than DefaultApp. To use it, just run this command in a command prompt:

    ./renameApp.sh MyAppName

If all goes well, everything will be renamed properly. Note: I haven't tested that command using a name with spaces, so YMMV.

  1. The app, by default, includes a few command open source libraries that I typically use in my apps such as AlamoFire, SwiftyJSON, and AppCenter. You can install these by doing the typical Cocoapods or Carthage dance. Or, just feel free to remove them entirely.

Feedback and Contributions

I'd love to hear your feedback - good or bad. And pull requests and bug reports are always appreciated.

However, I make no apologies for the fact that the choices made in this project are highly opinionated based on my 13 years as an independent developer working primarily on my own software. So, like the accompanying blog post says...

don’t use this as the basis for a billion dollar corporation’s enterprise app. Or with a team of “100 engineers” “solving hard problems”. But if you’re a one-person development shop or a team of just two or three engineers building a typical macOS shoebox or document based app? Please take a look.

More Repositories

1

simple-php-framework

The Simple PHP Framework
PHP
507
star
2

sosumi

A PHP client for Apple's Find My iPhone service. This allows you to programmatically retrieve your phone's current location and push messages (and an optional alarm) to the remote device.
PHP
310
star
3

Shine

An web dashboard for indie mac developers.
PHP
125
star
4

php-growl

Send Growl notifications over a network using PHP
PHP
122
star
5

Autosmush

Losslessly compresses images in your Amazon S3 buckets on-the-fly.
PHP
121
star
6

MacSosumi

Desktop Find My iPhone client for Mac OS X.
JavaScript
100
star
7

OpenFeedback

A Cocoa framework which allows your users to submit bug reports, feature requests, and ask support questions from directly within your application.
Objective-C
85
star
8

yui-app-theme

A generic, skinnable layout for web applications built using YUI Grids.
76
star
9

php-aws

A collection of PHP classes for working with Amazon's web services platform (AWS).
PHP
73
star
10

html-compressor

An HTML compressor/minifier written in PHP
PHP
63
star
11

s3up

Command line tool to upload files to Amazon S3 for static file hosting according to YSlow's best practices.
PHP
47
star
12

Highwire

Access your Mac's Bonjour services while away from home.
Objective-C
46
star
13

simple-url-shortener

Pretty much the simplest URL shortening service possible.
PHP
43
star
14

Roland

Blog-aware static site generator written in Swift (mostly)
Swift
40
star
15

AlfredSlackSearch

An Alfred.app workflow that searches your organization's Slack chat history.
38
star
16

smushit-php

A PHP wrapper around Yahoo!'s Smush.it image compressing web service.
PHP
34
star
17

google-voice-dialer

Initiates a call using Google Voice (at least until they offer an API)
PHP
33
star
18

photoz

Swift
31
star
19

AppleDocsChromeExtension

A simple Chrome extension that allows you to quickly search Apple's Mac and iOS documentation using Chrome's omnibox and jump to the matching result on developer.apple.com
31
star
20

SurtainlyNot

Swift
29
star
21

Shelley

Swift
28
star
22

capture-thing

A tiny Mac app for capturing notes and additional context throughout your workday.
Swift
27
star
23

ducking

Swift
22
star
24

Fastmail-macOS

A macOS wrapper around Fastmail.com that supports multiple accounts and notifications.
Swift
20
star
25

PebbleCam

A silly hack that lets you use your Pebble smart watch as a remote shutter for your iPhone's camera.
Objective-C
20
star
26

Rockwell

Objective-C
19
star
27

SosumiObjC

An Objective-C library for interacting with Apple's Find My iPhone web service
Objective-C
14
star
28

Gmail-SSB

A bare-bones Gmail single site browser tailored to my needs (not yours).
Objective-C
13
star
29

builder

This is the simplest, possibly dumbest, Xcode / iOS automated build script possible.
Shell
12
star
30

google-shell

A simple command line interface to Google's search index.
12
star
31

growl-twitter-plugin

A plugin for Growl that forwards you notifications to Twitter.
12
star
32

php-geoplanet

A PHP wrapper for Yahoo!'s GeoPlanet API.
PHP
11
star
33

FinderCatalog

Group related files together using a common catalog number and instantly find them on macOS using a URL.
Swift
11
star
34

import-pinboard-archive-to-devonthink

A small PHP script to import your Pinboard bookmarks archive into DEVONThink and convert them into searchable .webarchive files.
PHP
11
star
35

important-people

Quickly determine who are the most influential people talking about a particular search term on Twitter.
PHP
10
star
36

BespokeApp

BespokeApp is a simple open source iOS app that lets you group together realted websites that you frequently visit.
Swift
9
star
37

att-family-map-scraper

Scrapes your AT&T phone's real-time location from their FamilyMap service and publishes it to Fire Eagle.
PHP
9
star
38

roar

Let's reskin Notification Center
Swift
9
star
39

wordpress-social-media-importer

Import your Facebook and Instagram backups into WordPress.
PHP
8
star
40

CalendarHero

A small weekly calendar that floats on your Mac desktop. Probably doesn't work very well in non-US regions.
Swift
8
star
41

IndieFAQ

A simple, PHP based FAQ/help site for indie software developers.
PHP
8
star
42

UpNext

A simple Mac menubar app that tells you how much time is left until your next calendar appointment.
Objective-C
8
star
43

Nostalgia

Batch renames your photos based on their EXIF date.
Objective-C
7
star
44

PHPPayMe

A simple one-page PHP script to accept payments on your website.
PHP
6
star
45

XcodeThemes

Xcode themes I regularly use.
6
star
46

tadpoles-api

A PHP script which pretends to be the Tadpoles.com iPhone app and downloads/backs-up all of your kids' photos and videos from daycare.
PHP
5
star
47

TheTitle

Swift
5
star
48

FlickrDownloadAll

PHP script to download all of your original sized photos from Flickr. Sorts them into folders based on your sets.
PHP
4
star
49

dnc

Swift command line utility to test if a directory or any of its subdirectories do not contain files matching a query.
Swift
4
star
50

WCPE

A one-click iPhone app that streams music from WCPE.
Objective-C
3
star
51

mario-read-aloud

An iPad app I made for my son.
Swift
3
star
52

php-grandcentral-dialer

A simple PHP script that lets you dial a phone number using your Grand Central account.
PHP
3
star
53

Drafts.app-Actions

A collection of Drafts.app actions I've written.
JavaScript
3
star
54

Voxmail

PHP
3
star
55

VHX-Liftoff-Wordpress-Plugin

A WordPress plugin that enables your site to work with VirtualHostX Lift Off.
PHP
3
star
56

Apple-Extensions

Swift
2
star
57

HomeAway

A collection of PHP scripts I use for controlling my house via GeoHooks.io
PHP
2
star
58

wordpress-to-ghost-exporter

A simple PHP script to convert your WordPress blog to Ghost 2.2
PHP
1
star
59

thehitlist-qsb

Google Quick Search Box plugin for The Hit List
1
star
60

wayback-machine-server

PHP
1
star
61

BlurredWindow

Objective-C
1
star
62

cocoa-bindings

A sample Mac app that shows how little code is needed when using bindings.
Objective-C
1
star