ShareKit

转自:http://blog.csdn.net/wave_1102/article/details/6081253

 

ShareKit has recently become one of my favorite iPhone open source projects. Just add a few lines of code to your app and you can instantly share text, URLs and other data via Email, Twitter, Facebook and a whole slew of other services.

I’ve found a couple of minor issues with the current release (version 0.2.1) of ShareKit, and I thought I’d share them to save you a couple of hours of debugging.

Error when building for device

This seems to be a known issue, that may depend on your Xcode install.

If you get 12 compiler errors when building for a device, starting with:

ShareKit/Core/SHK.m:35:28: error: objc/objc-class.h: No such file or directory

Then the solution is to change this import statement in SHK.m:

  1. #import <objc/objc-class.h>

to:

  1. #import </usr/include/objc/objc-class.h>

or:

  1. #import <objc/runtime.h>

Hardcoding the path to something outside of Xcode or your project directories seems like bad idea. So I went with the second solution.

Conflicting Localizable.strings

The ShareKit project contains its own Localizable.strings files in the ShareKit / Localization directory. If your project is also localized there will be a conflict over which Localizable.strings file will be used at runtime.

There are a couple of ways to resolve this conflict:

  1. Remove the ShareKit files from your build target. This is the quickest solution, but you will lose the localizations provided in ShareKit (currently only German).
  2. Copy the contents of the Localizable.strings files from ShareKit to your Localizable.strings files. And then remove the ShareKit files from your build target. This works well when you have corresponding localizations.
  3. Rename the ShareKit files to ShareKitLocalizable.strings and then replace the NSLocalizedString macros in the ShareKit code with NSLocalizedStringFromTable where you can specify the ShareKitLocalizable.strings filename as the tableName.

 

From:  http://iphoneincubator.com/blog/open-source/sharekit

转载于:https://www.cnblogs.com/kiao295338444/archive/2012/03/08/2384865.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值