OS X应用程序更新问题与Sparkle在小牛和XCode 5 [英] OS X app update issue with Sparkle under Mavericks and XCode 5

查看:149
本文介绍了OS X应用程序更新问题与Sparkle在小牛和XCode 5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Sparkle框架来处理我的应用程式更新。
当我升级到OS X 10.9 Mavericks和XCode 5.0.2时,一切都正常工作。

I use the Sparkle framework to handle my app updates. Everything worked fine until recently, when I upgraded to OS X 10.9 Mavericks and XCode 5.0.2.

当我在OS X 10.8.4和XCode 4.6.3,它可以更新没有问题。
但是当我编译完全相同的代码,使用相同的XCode项目和相同的代码签名在Mavericks和XCode 5.0.2下,生成的包不能更新,Sparkle崩溃在更新过程中出现以下错误:

When I compile my app under OS X 10.8.4 and XCode 4.6.3, it can then be updated with no issue. But when I compile the exact same code, with the same XCode project and the same code signing under Mavericks and XCode 5.0.2, the generated bundle can't be updated, Sparkle crashing during the update process with the following error :


由于未捕获的异常而终止应用程序
'NSDestinationInvalidException',原因:' * + [ SUPlainInstaller
performSelector:onThread:withObject:waitUntilDone:modes:]:target
线程在等待执行结束时退出
NSException类型的异常

Terminating app due to uncaught exception 'NSDestinationInvalidException', reason: '* +[SUPlainInstaller performSelector:onThread:withObject:waitUntilDone:modes:]: target thread exited while waiting for the perform' terminating with uncaught exception of type NSException

任何想法,这可以从哪里来?
是签名问题吗?编译问题?

Any ideas where this can come from? Is it a signing problem? A compiling problem?

推荐答案

我终于找到了解决方案,感谢这篇文章

I finally found the solution thanks to this post.

问题来自小牛改变了应用程式已签名。
现在应该对应用中嵌入的每个框架进行签名。

The problem comes from the fact that Mavericks has changed the way apps are signed. Every framework embedded in an app should be signed as well now.

为此,我添加了一个运行脚本构建阶段:

To do so, I just added a "Run Script" Build Phase with those lines:

LOCATION="${BUILT_PRODUCTS_DIR}"/"${FRAMEWORKS_FOLDER_PATH}"
IDENTITY="Developer ID"
codesign --verbose --force --sign "$IDENTITY" "$LOCATION/Sparkle.framework"
codesign --verbose --force --sign "$IDENTITY" "$LOCATION/../XPCServices/com.andymatuschak.Sparkle.SandboxService.xpc"

这篇关于OS X应用程序更新问题与Sparkle在小牛和XCode 5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆