2

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.

This is where Xcode gets stuck for extended periods of time

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.

4

2 回答 2

4

@Tochiji 指出了正确的方向,这是我的问题的解决方法:

似乎我的网络或 ISP 在 Apple 选择上传到公证服务的传输协议方面存在问题。我通过ascp使用 Little Snitch 查看 's 流量得出了这个结论。33001该程序正在从多个.apple.com域上传和下载端口上的数据包。但是,它永远不会“到达任何地方”并且上传仍然卡住,让我相信我的 ISP 不支持"Aspera"在 port 上运行的协议存在问题33001

按照之前关于类似问题的答案,我测试了使用禁用 Aspera 协议的 Application Loader 上传到 Mac App Store,果然,上传通过了。

问题是:Application Loader 不支持上传到 Developer-ID 公证系统,并且 Xcode 的集成上传器没有与 Application Loader 相同的选项。

我的解决方法如下:
使用 Little Snitch(或任何其他合格的 macOS 防火墙)我现在阻止端口 33001 上的所有连接

这样,Xcode 可以检测到 Aspera 不是一个选项,并选择一个运行良好的后备协议。使用此解决方法,即使在限制性防火墙之后/使用做出有趣决定的 ISP,也可以上传到 Developer-ID 公证服务。

于 2019-04-26T12:50:39.867 回答
1

如果您的防火墙阻止了除 HTTPS 之外的传输端口,以下答案可能会对您有所帮助。

使用防火墙后的应用程序加载器进行 iTunes 连接

使用端口 443 将 iOS 应用上传到 AppStore

于 2019-04-26T04:53:20.457 回答