Skip to content

Commit 90ecf27

Browse files
committed
Add quickstart instructions to README.
1 parent da9f2b5 commit 90ecf27

File tree

3 files changed

+43
-7
lines changed

3 files changed

+43
-7
lines changed

README.md

+41-5
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,48 @@ This is a barebones Python app that can be submitted to the Mac App Store.
44

55
It displays a simple dialog and exits.
66

7-
## Choosing a GUI Library
7+
## Quickstart
8+
9+
### How to Build
10+
11+
1. Clone this repository or download a ZIP file of it:
12+
* `git clone https://github.com/davidfstr/Python-in-Mac-App-Store.git`
13+
* `cd Python-in-Mac-App-Store`
14+
2. Configure code signing:
15+
* **(Option 1)** If you have Mac App Store signing certificates, update the `SIGNING_IDENTITY` line in `./build-app.sh` and `./build-pkg.sh` to refer to them:
16+
* You will need an [Apple Developer account](https://developer.apple.com/devcenter/mac/) and a subscription to the Mac Developer Program ($99/year) to get signing certificates.
17+
* Create the appropriate Mac App Store certificates in the [Mac Dev Center](https://developer.apple.com/account/mac/certificate/) and download them to your dev machine.
18+
* **(Option 2)** If you do not have a Mac App Store signing certificate:
19+
1. Comment out all `codesign` commands in `./build-app.sh`.
20+
2. Remove the `--sign "$SIGNING_IDENTITY"` option from `./build-pkg.sh`
21+
3. With these modifications you will be able to build the app and the installer package, but you will not be able to submit them to the store.
22+
4. Build the app package `dist/HelloAppStore.app`:
23+
* `./build-app.sh`
24+
5. Build the installer package `dist/HelloAppStore.pkg`:
25+
* `./build-pkg.sh`
26+
27+
### How to Submit
28+
29+
1. Create a record for your app inside [iTunes Connect](https://itunesconnect.apple.com/).
30+
* Fill out app metadata, including its description, keywords, screenshots, etc.
31+
* Press "Ready to Upload Binary".
32+
2. Open Application Loader:
33+
* Open Xcode.
34+
* From the menubar, select Xcode > Open Developer Tool > Application Loader.
35+
3. Click "Deliver Your App" and select the app record you created in iTunes Connect.
36+
3. When you are prompted for an item to upload, select `dist/HelloAppStore.pkg`.
37+
38+
## Writing your Own App?
39+
40+
41+
### Choosing a GUI Library
842

943
Any app you submit to the Mac App Store must have a GUI. In Python there are a few libraries available to create a GUI:
1044

1145
* **[Tkinter] / Tk** - Built-in to Python. Just works.
1246
* Poorly documented. Limited widget set.
1347
* Overhead: Nothing
14-
* **[PyObjC] / Cocoa**
48+
* **[PyObjC] / Cocoa** - Full bindings to the Cocoa frameworks.
1549
* Reasonably documented and maintained. (But requires you to learn Cocoa.)
1650
* Provides full access to all OS X native widgets.
1751
* Overhead: Nothing
@@ -22,14 +56,14 @@ Any app you submit to the Mac App Store must have a GUI. In Python there are a f
2256
* Overhead: Nothing
2357
* **[wxPython] / wxWidgets**
2458
* Well documented. Lots of widgets.
25-
* Cannot be submitted to Mac App Store due to wxPython's reliance on [deprecated QuickTime APIs](https://groups.google.com/forum/#!topic/wxpython-mac/BeUS9GHigvE).
59+
* **Note:** Cannot be submitted to Mac App Store due to wxPython's reliance on [deprecated QuickTime APIs](https://groups.google.com/forum/#!topic/wxpython-mac/BeUS9GHigvE).
2660
* Overhead: 38.7 MB uncompressed, 13.3 MB compressed
2761
* **[PySide] / QT**
2862
* Well documented. Unsure if maintained.
29-
* The app created by py2app crashes with a segmentation fault. My guess is that the py2app needs a special "recipe" for PySide. I don't feel like writing one myself.
63+
* **Note:** The app created by py2app crashes with a segmentation fault. My guess is that the py2app needs a special "recipe" for PySide. I don't feel like writing one myself.
3064
* Overhead: 16.6 MB uncompressed, 6.3 MB compressed (estimated)
3165
* **[PyQt]4 / QT**
32-
* Unable to build from source and no binary installers for OS X are available. Seriously don't people test anything these days?
66+
* **Note:** I am unable to build from source and no binary installers for OS X are available. Seriously don't people test anything these days?
3367

3468
The above assessment leaves the following choices for Mac App Store apps:
3569

@@ -41,6 +75,8 @@ Probably PyObjC is the best choice to get full functionality. I'm disappointed t
4175

4276
This example app uses PyObjC by default but includes samples for several of the other GUI libraries.
4377

78+
If you'd like to try the other samples, open `src/HelloAppStore.py` and change the `main` function to call one of the other libraries.
79+
4480
[ctypes]: https://docs.python.org/2/library/ctypes.html
4581
[Tkinter]: https://wiki.python.org/moin/TkInter
4682
[wxPython]: http://wxpython.org

build-app.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
APP_PATH=dist/HelloAppStore.app
77

8-
# The package signing identity corresponds to a "Developer ID Application"
8+
# The package signing identity corresponds to a "3rd Party Mac Developer Application"
99
# certificate that resides within the Keychain Access application.
1010
SIGNING_IDENTITY="3rd Party Mac Developer Application: David Foster"
1111

build-pkg.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# using XCode's Application Loader tool
55
#
66

7-
# The package signing identity corresponds to a "Developer ID Installer"
7+
# The package signing identity corresponds to a "3rd Party Mac Developer Installer"
88
# certificate that resides within the Keychain Access application.
99
SIGNING_IDENTITY="3rd Party Mac Developer Installer: David Foster"
1010

0 commit comments

Comments
 (0)