Skip to content

Commit 2a71061

Browse files
authored
Merge pull request #290 from freakboy3742/macos-signing
Refs #174 - Adds code signing for macOS apps
2 parents d0d49fe + 42d98e9 commit 2a71061

45 files changed

Lines changed: 1137 additions & 359 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/how-to/code-signing/index.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
=================================
2+
Obtaining a Code Signing identity
3+
=================================
4+
5+
If you are intending to distribute an application, it is advisable (and, on
6+
some platforms, necessary) to code sign your application. This is a
7+
cryptographic process that identifies you as a developer, and identifies your
8+
application as something that has been distributed by you.
9+
10+
The process of obtaining a code signing identity is slightly different on
11+
every platform. The following are guides for every platform that Briefcase
12+
supports:
13+
14+
.. toctree::
15+
:maxdepth: 1
16+
17+
macOS

docs/how-to/code-signing/macOS.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
=====
2+
macOS
3+
=====
4+
5+
**TODO**

docs/how-to/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ stand alone.
1515

1616
contribute-code
1717
contribute-docs
18+
code-signing/index
1819
See errors on iOS <see_errors_on_ios>
1920
internal/index

docs/reference/commands/build.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
build
33
=====
44

5-
Compile/build an application installer. By default, targets the current
6-
platform's default output format.
5+
Compile/build an application. By default, targets the current platform's
6+
default output format.
7+
8+
This will only compile the components necessary to *run* the application. It
9+
won't necessarily result in the generation of an installable artefact.
710

811
Usage
912
=====
@@ -40,4 +43,4 @@ The following options can be provided at the command line.
4043
Update the application's source code before running. Equivalent to running::
4144

4245
$ briefcase update
43-
$ briefcase run
46+
$ briefcase build

docs/reference/commands/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ Command reference
1111
update
1212
build
1313
run
14+
package
1415
publish
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
=======
2+
package
3+
=======
4+
5+
Compile/build an application installer. By default, targets the current
6+
platform's default output format.
7+
8+
This will produce an installable artefact.
9+
10+
Usage
11+
=====
12+
13+
To build an installer of the default output format for the current platform::
14+
15+
$ briefcase package
16+
17+
To build an installer for a different platform::
18+
19+
$ briefcase package <platform>
20+
21+
To build an installer for a specific output format::
22+
23+
$ briefcase package <platform> <output format>
24+
25+
.. admonition:: Packaging tool dependencies
26+
27+
Building installers for some platforms depends on the build tools for the
28+
platform you're targetting being available on the platform you're using.
29+
For example, you will only be able to create iOS applications on macOS.
30+
Briefcase will check for any required tools, and will report an error if
31+
the platform you're targetting is not supported.
32+
33+
Options
34+
=======
35+
36+
The following options can be provided at the command line.
37+
38+
``-u`` / ``--update``
39+
---------------------
40+
41+
Update and recompile the application's code before running. Equivalent to
42+
running::
43+
44+
$ briefcase update
45+
$ briefcase package

docs/reference/platforms/iOS.rst

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,25 @@ provide splash images of the following sizes:
5050
* 2436x1125px
5151
* 2688x1242px
5252

53-
iOS Projects do not support installer images.
53+
iOS projects do not support installer images.
54+
55+
Additional options
56+
==================
57+
58+
The following options can be provided at the command line when producing
59+
iOS projects
60+
61+
build
62+
-----
63+
64+
``-d <device>`` / ``--device <device>``
65+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66+
67+
The device simulator to target. Can be either a UDID, a device name (e.g.,
68+
``"iPhone 11"``), or a device name and OS version (``"iPhone 11::13.3"``).
69+
70+
run
71+
---
72+
73+
The device simulator to target. Can be either a UDID, a device name (e.g.,
74+
``"iPhone 11"``), or a device name and OS version (``"iPhone 11::13.3"``).

docs/reference/platforms/macOS/app.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,22 @@ Image format
1818
============
1919

2020
``.app`` bundles do not support splash screens or installer images.
21+
22+
Additional options
23+
==================
24+
25+
The following options can be provided at the command line when producing
26+
``.app`` bundles.
27+
28+
publish
29+
-------
30+
31+
``--no-sign``
32+
~~~~~~~~~~~~~
33+
34+
Don't perform code signing on the ``.app`` bundles.
35+
36+
``-i <identity>`` / ``--identity <identity>``
37+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38+
39+
The code signing identity to use when signing the ``.app`` bundles.

docs/reference/platforms/macOS/dmg.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,22 @@ Image format
2525

2626
macOS DMGs do not support splash screens. The installer background must be
2727
in ``.png`` format.
28+
29+
Additional options
30+
==================
31+
32+
The following options can be provided at the command line when producing
33+
DMGs.
34+
35+
publish
36+
-------
37+
38+
``--no-sign``
39+
~~~~~~~~~~~~~
40+
41+
Don't perform code signing on the ``.app`` bundles in the DMG.
42+
43+
``-i <identity>`` / ``--identity <identity>``
44+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45+
46+
The code signing identity to use when signing the ``.app`` bundles in the DMG.

src/briefcase/cmdline.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ def parse_cmdline(args):
4242
# usage string so that the instructions displayed are correct
4343
parser.add_argument(
4444
'command',
45-
choices=['new', 'dev', 'create', 'update', 'build', 'run', 'publish'],
45+
choices=[
46+
'new', 'dev', 'create', 'update', 'build', 'run', 'package', 'publish'
47+
],
4648
metavar='command',
4749
nargs='?',
4850
help='the command to execute (one of: %(choices)s)',

0 commit comments

Comments
 (0)