我该如何为推送通知签署Mac应用?

Sam*_*man 6 macos apple-push-notifications provisioning-profile

我正在尝试开发一个具有推送通知的小型企业工具.我有通过开发证书和开发配置和证书到达的通知,但不是在发布模式下.

我得到的错误是

2015-07-14 15:34:32.507 My App Name[14254:2683449] application:didFailToRegisterForRemoteNotificationsWithError: with error = Error Domain=NSOSStatusErrorDomain Code=1 "The operation couldn’t be completed. (OSStatus error 1.)" (kCFHostErrorHostNotFound / kCFStreamErrorSOCKSSubDomainVersionCode / kCFStreamErrorSOCKS5BadResponseAddr / kCFStreamErrorDomainPOSIX / evtNotEnb / siInitSDTblErr / kUSBPending / dsBusError / kStatusIsError / kOTSerialSwOverRunErr / cdevResErr / EPERM: / Error code is the version of SOCKS which the server wishes to use / / POSIX errno; interpret using <sys/errno.h> / event not enabled at PostEvent / slot int dispatch table could not be initialized. / / bus error / / / Couldn't get a needed resource; alert / Operation not permitted)

如果我只想分发.app文件,我应该使用开发者ID吗?或者,我可以使用我现在要做的事情,只使用Mac Distribution配置文件和Mac App Distribution证书吗?

ssn*_*ody 0

您可以尝试使用以下方式对应用程序进行签名codesign

就像是codesign --sign "Developer ID Application: MyCompany (123)" /path/to/myapp.app