Sparkle 10.9 Linking Error

我是研究僧i 提交于 2019-12-08 11:14:57

问题


Having an issue where when trying to add Sparkle to my project with Xcode 5 running 10.9.

I have followed the tutorial to a T, but when I get to the point where I need to copy the framework and set its copy location that is where there seems to be no way to set the copy destination in the copy bundle resources section and it just puts the framework int the /Resources folder.

I have ready through this tread thoroughly and have tried all the suggestions here.

http://www.lists.apple.com/archives/xcode-users/2012/Aug/msg00249.html

I recompiled Sparkle from the latest source and set the Installation Directory to @executable_path/../Frameworks from @loader_path/../Frameworks I get the following error.

dyld: Library not loaded: @executable_path/../Frameworks/Sparkle.framework/

when I revert and try to re add the framework I get this error.

dyld: Library not loaded: @loader_path/../Frameworks/Sparkle.framework/

If I remove the framework from the link framework from binaries altogether and just focus on the Copy Bundle Resources then I get this error.

Unknown class 'SUUpdater', using 'NSObject' instead.

The tutorial is written for Xcode 4 I know. One step says to use Copy File Location but that seems to be gone in Xcode 5 any help is appreciated.

UPDATE

I found a work around but its very messy.

  1. Add the framework to the "Add files to build" build step.
  2. Unlink the sparkle framework.
  3. Open Derived Data folder and then open the App Build, then browse to Resources. Move the sparkle.framework folder to the root of the app and place the framework into a folder named Framework in the root level of the app.
  4. Remove the framework from the "Add files to build" step.
  5. Re-Link the framework.
  6. Rebuild the App and voila it works.

Basically your adding the framework in a Framework folder manually and then linking it up at the end. What makes it messy is that the build changes occasionally in the Derived Data folder.


回答1:


I have the same problem. And I think I have solved it.

It happens because the Sparkle.framework isn't copied to Frameworks folder(where it should be), it is copied to Resources folder when you build the application. To solved it:

  1. Download the source of Sparkle from GIT (https://github.com/sparkle-project/Sparkle) and open the project in Xcode 5;

  2. Go to Build Settings of every targets, then find Base SDK, change the value to macosx.

  3. Go to Sparkle.framework's Build Settings. Find Installation Directory, Change its value from @loader_path/../Frameworks to @loader_path/../Resources under Sparkle.framework's Build Settings.

  4. Build.

  5. Copy Sparkle.framework under Products group in Project Navigator to your project.

  6. Say YES and take a self highfive.




回答2:


I was suffering from the same problem, then I found this: http://www.lantean.co/sparkle-in-sandbox-mode/

The key is to add the Sparkle.framework to the Frameworks folder using the "Copy Files" section from "Build Phases".



来源:https://stackoverflow.com/questions/19348239/sparkle-10-9-linking-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!