Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OS X app update issue with Sparkle under Mavericks and XCode 5

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.

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 :

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?

like image 353
ink Avatar asked Dec 25 '22 17:12

ink


1 Answers

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"
like image 109
ink Avatar answered Apr 07 '23 19:04

ink