Do I have to be a paid developer to develop MacOS programs for personal use?

I am currently working with XCode 13.3.1 on OSX Monterey 12.3.1 on a Mac Mini M1. I have written some programs in Swift for personal use using a personal team certificate. I haven't paid the $99.

Every couple of weeks or so, some of my programs will pop up a message saying "This Program Could Harm Your Mac" and won't let me run it when I try to launch them. It seems I have to recompile it and then it will work for a few more weeks. Other programs have run for several months.

The programs are using Sandbox and Hardened runtime.

Someone suggested that I try compiling the program without a certificate. I did that last night and the program ran. But this morning when I launched the program, I got a message that the program had unexpectedly quit. The "report" message said something about a code signature.

FWIW, I am copying the program to my Applications folder.

Answered by szymczyk in 713546022

You do not need a paid developer account to develop Mac apps for personal use. You need a paid account to do the following:

  • Submit an app to the Mac App Store
  • Use Apple capabilities like iCloud and Game Center
  • Sign and notarize your app with a developer ID to work with Apple's Gatekeeper feature

Gatekeeper makes it painful to open apps that aren't notarized. Without a paid developer account you won't be able to notarize your apps. Your options are to rebuild the apps periodically or bypass Gatekeeper. The following article shows how to bypass Gatekeeper for a single app:

https://disable-gatekeeper.github.io

Accepted Answer

You do not need a paid developer account to develop Mac apps for personal use. You need a paid account to do the following:

  • Submit an app to the Mac App Store
  • Use Apple capabilities like iCloud and Game Center
  • Sign and notarize your app with a developer ID to work with Apple's Gatekeeper feature

Gatekeeper makes it painful to open apps that aren't notarized. Without a paid developer account you won't be able to notarize your apps. Your options are to rebuild the apps periodically or bypass Gatekeeper. The following article shows how to bypass Gatekeeper for a single app:

https://disable-gatekeeper.github.io

This isn’t part of Gatekeeper per se [1] but some other component of the trusted execution system. I suspect it’s a result of some resource for your Personal Team expiring, either the provisioning profile or the signing certificate.

Does your app use a provisioning profile? To check this:

  1. Chose Product > Show Build Folder in Finder.

  2. Navigate to Products > Build.

  3. Select your app.

  4. Control click and choose Show Package Contents.

  5. Navigate to Contents.

Is there an embedded.provisionprofile file there?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Gatekeeper only kicks in when you move code from one machine to another.

The error happened again today on my old 2014 MBA which is limited to Big Sur. It happened after the upgrade to 11.6. This time, whenever I try to start the app, I get a dump. Maybe it will help diagnose things:

Process:               FCC Database [1004]
Path:                  /Applications/FCC Database.app/Contents/MacOS/FCC Database
Identifier:            FCC Database
Version:               ???
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           FCC Database [1004]
User ID:               501

Date/Time:             2022-05-16 18:29:20.133 -0400
OS Version:            macOS 11.6.6 (20G624)
Report Version:        12
Anonymous UUID:        DAF76B35-38D8-E814-26F9-9397EDA649C7


Time Awake Since Boot: 1200 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_CRASH (Code Signature Invalid)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace CODESIGNING, Code 0x1

kernel messages:

VM Regions Near 0 (cr2):
--> 
    __TEXT                      105451000-1054d9000    [  544K] r-x/r-x SM=COW  

Thread 0 Crashed:
0                                	0x000000010fe0a000 _dyld_start + 0

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000000000000  rcx: 0x0000000000000000  rdx: 0x0000000000000000
  rdi: 0x0000000000000000  rsi: 0x0000000000000000  rbp: 0x0000000000000000  rsp: 0x00007ffeea7aebc8
   r8: 0x0000000000000000   r9: 0x0000000000000000  r10: 0x0000000000000000  r11: 0x0000000000000000
  r12: 0x0000000000000000  r13: 0x0000000000000000  r14: 0x0000000000000000  r15: 0x0000000000000000
  rip: 0x000000010fe0a000  rfl: 0x0000000000000200  cr2: 0x0000000000000000
  
Logical CPU:     0
Error Code:      0x00000000
Trap Number:     0

Thread 0 instruction stream not available.

Thread 0 last branch register state not available.


Binary Images:
       0x105451000 -        0x1054d8fff +??? (0) <B8C214B1-A5BD-3CCD-ADB5-E79B13206011> (null)
       0x10fe09000 -        0x10fea4fff + (852.2) <2E400646-C53E-329B-8301-2478447C89F8> 

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=2480K resident=0K(0%) swapped_out_or_unallocated=2480K(100%)
Writable regions: Total=8416K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8416K(100%)
 
                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
STACK GUARD                       56.0M        1 
Stack                             8192K        1 
VM_ALLOCATE                          8K        2 
__DATA                             272K        4 
__DATA_CONST                        48K        2 
__LINKEDIT                        1328K        3 
__TEXT                            1168K        2 
===========                     =======  ======= 
TOTAL                             66.8M       15 

Model: MacBookAir6,1, BootROM 433.120.6.0.0, 2 processors, Dual-Core Intel Core i5, 1.4 GHz, 4 GB, SMC 2.12f143
Graphics: kHW_IntelHD5000Item, Intel HD Graphics 5000, spdisplays_builtin
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1600 MHz, 0x02FE, 0x45424A3230554638454455302D474E2D4620
Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1600 MHz, 0x02FE, 0x45424A3230554638454455302D474E2D4620
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x117), Broadcom BCM43xx 1.0 (7.77.111.1 AirPortDriverBrcmNIC-1680.9)
Bluetooth: Version 8.0.5d7, 3 services, 19 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD TS0128F, 121.33 GB
USB Device: USB 3.0 Bus
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Air, Apple Inc., 23.6

There is no embedded.provisionprofile

Weird. There are two things that could potentially expire here:

  • The certificate in your signing identity

  • The provisioning profile

The latter has a short expiry date. I signed something with a Personal Team and dumped the profile [1] and saw an expiry date of 7 days. That gels with your experience.

However, most macOS programs don’t need a profile and if there’s no profile then the only thing that could expire is the signing identity’s certificate. My tests suggest that this certificate is valid for a year.

The error happened again today on my old 2014 MBA which is limited to Big Sur.

OK. First do this:

% codesign -d --entitlements - "/Applications/FCC Database.app"
… output …

What does it show?

Then this:

% codesign -d --extract-certificates "/Applications/FCC Database.app"
… output …

It should generate a series of files, codesign0, codesign1, and so on. Rename codesign0 to codesign0.cer and then Quick Look it in the Finder. What are its “Not Valid Before” and “Not Valid After” dates?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Using the techniques shown by TN3125 Inside Code Signing: Provisioning Profiles.

Here is the entitlements output:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.security.app-sandbox</key>
	<true/>
	<key>com.apple.security.files.downloads.read-only</key>
	<true/>
	<key>com.apple.security.get-task-allow</key>
	<true/>
	<key>com.apple.security.network.client</key>
	<true/>
	<key>com.apple.security.network.server</key>
	<true/>
	<key>com.apple.security.personal-information.location</key>
	<true/>
</dict>
</plist>

The certificate shows not valid before date of April 30, 2022 and a not valid after date of April 30, 2023.

Do I have to be a paid developer to develop MacOS programs for personal use?
 
 
Q