繁体   English   中英

通过CocoaPods问题安装ShareKit

[英]ShareKit install via CocoaPods issue

我通过CocoaPods安装SareKit

当我尝试将消息发布到vk.com服务时,我获得了此项豁免:

由于未捕获的异常“ NSInternalInconsistencyException”而终止应用程序,原因:“ ShareKit已重构为用作Xcode子项目。 请遵循更新的安装Wiki,然后将其重新添加到项目中。 请不要忘记随后清理项目和清理构建文件夹。 如果您使用CocoaPods覆盖-(NSNumber *)isUsingCocoaPods; 配置器子类中的方法,并返回[NSNumber numberWithBool:YES]'

我试图找到更新的安装Wiki,但没有成功。

我还在DefaultSHKConfigurator子类中添加了以下方法,ShareKit现在可以工作了,但我认为仅适用于6.0 ios。

- (NSNumber *)isUsingCocoaPods {
    return [NSNumber numberWithBool:YES];
}

对于iOS 5.1,出现此错误:

dyld: Symbol not found: _OBJC_CLASS_$_SKStoreProductViewController
  Referenced from: /Users/alexander/Library/Application Support/iPhone Simulator/5.1/Applications/2D844C7C-6864-4C4C-BFB8-F330AAE73EAE/test.app/test
  Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/StoreKit.framework/StoreKit
 in /Users/alexander/Library/Application Support/iPhone Simulator/5.1/Applications/2D844C7C-6864-4C4C-BFB8-F330AAE73EAE/test.app/test

确保StoreKit.framework标记为可选。 现在在iOS 6中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM