I have a simple, Swift based, macOS application, written & maintained in Xcode, that I now want to run through Apple's Developer-ID "notarisation" service for distribution. However, whenever I try to upload an archived build of the application, Xcode gets stuck at the "Uploading package to Apple Services..."
step of the process.
My process is as follows:
- In Xcode "Build --> Archive"
- In Xcode's Organizer: Distribute App --> Developer ID --> Upload --> Automatic Code Signing
- The issue now occurs during upload.
I have already tried notarising a simple sample-app with no code beyond what the standard Swift macOS project template includes and that app also gets stuck at this step. (So this should eliminate issues with the Code / binary of my project itself.)
I have also attempted to use xcrun altool
to upload my binary to the notarisation service using the command: xcrun altool --notarize-app --primary-bundle-id "com.me.myapp" --username "myuser@memyselfandi" --password "mypasswd" --file myfile.zip
.
The result here is similar: The command gives no output and hangs.
Every time I attempt an upload to Apple Services I also notice that a process called ascp
is uploading rather large amounts of data, many multiples of the size of the archive I'm attempting to upload to Apple. I'm not 100% certain of how this might be related, but the process always appears when uploading through Organizer or the xcrun altool
command.
I'm using Xcode 10.2.1 and macOS Mojave 10.14.4.
Having been pointed in the right direction by @Tochiji, here's a workaround for my problem:
It appears as though my network or ISP are having issues with Apple's choice of transfer protocol for uploads to the notary service. I've come to this conclusion by having looked at ascp
's traffic using Little Snitch. The program is uploading & downloading packets on port 33001
from and to multiple .apple.com
domains. However, it never "gets anywhere" and the upload remains stuck, leading me to believe that there is a problem with my ISP not supporting the "Aspera"
protocol that is running on port 33001
.
Following previous answers on similar issues I tested uploading to the Mac App Store using Application Loader with the Aspera protocol disabled and sure enough, that upload goes through.
Problem is: Application Loader does not support uploads to the Developer-ID notary system & Xcode's integrated uploader does not have the same options as Application Loader.
My workaround is as follows:
Using Little Snitch (or any other competent macOS firewall) I'm now blocking all connections on port 33001.
This way, Xcode can detect Aspera not being an option and selects a fallback-protocol that works just fine. Using this workaround, uploads to the Developer-ID notarization service are possible even behind a restrictive firewall / with an ISP that makes interesting decisions.