开发者

Linking libsvn Objective-C

I would like to add SVN support to my application that I'm developing in Xcode. I've heard that Apple has added SVN as a standard library to OS X, and I notice the header files under /usr/include/subversion-1.

What's the best of linking and using th开发者_如何学Goe library correctly in Xcode?


In XCode right click the Frameworks/Linked Frameworks folder and choose Add->Existing Frameworks...

From there you should be able to choose the libsvn_client-1.dylib


WARNING Be careful about using it with any projects for which you already have version control activated in Xcode… the two apps, for some reason, don’t work in sync. I’m not entirely sure what the problem is, but Xcode will give errors for projects that Versions touches, and isn’t able to sync until you re-checkout the project (using Xcode). Versions also runs every single file, and freaks out when my PPC machine makes an extra or different build file than my Intel machine. Again, I don’t know what it’s doing – only that I’m going to keep using only Xcode for this project until the authors of Versions work to integrate the two programs better.

STEPS I installed the Subversion

1.5.1-2 Universal package from Collabnet, which installs its things in /opt/subversion/ and creates symlinks for the command line tools in /usr/local/bin/.

The subversion installation which comes with Mac OS X has the libraries in /usr/lib/. I removed (renamed) all of the actual libsvn* libraries and replaced by them by symlinks to the 1.5- libraries in /opt/subversion/lib/. This kind of worked with Xcode 3.1 (after fixing the name change from libsvn_ra_dav-1.0.0.0.dylib to libsvn_ra_neon-1.0.0.0.dylib via naming the symlink properly).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜