未加载库 [英] Library not loaded

查看:86
本文介绍了未加载库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中添加了Social.framework,以同样的方式添加其他框架作品。我已经下载xcode 4.5和iOS 6。但我的应用程序崩溃与以下错误只有在设备上。它在模拟器上正常工作。

I added Social.framework in my application in the same way i use to add the other frame works. I have downloaded xcode 4.5 and iOS 6 . but my application crashes with follwing error only on device. It works fine on simulator.

    dyld: Library not loaded: /System/Library/Frameworks/Social.framework/Social
  Referenced from: /var/mobile/Applications/FC88291D-2052-45D6-A7BB-65CE340F07BF/Uploading       Image.app/Uploading Image
 Reason: image not found


推荐答案

我得到这个确切的错误。我的应用程序目前的部署目标为5.1。我想添加Facebook分享。我找到了这个旧帖子,有条件地包含针对不同iOS SDK的库版本?。所有我做的是将Social.framework设置为可选,它做的伎俩,然后我的应用程序将运行在ios 5.1和ios 6.0。当然,您需要在运行时检查设备运行的操作系统,否则如果您尝试访问ios 5.1或更早版本中的social.framework,您可能会遇到崩溃。希望有所帮助!

I was getting this exact error. My app currently has a deployment target of 5.1. I wanted to add Facebook sharing. I found this old post, Conditionally including a library for different iOS SDK versions?. All I did was set "Social.framework" to 'optional' and it did the trick, then my app would run on ios 5.1 and ios 6.0. Of course you need to do checks at runtime for what OS the device is running otherwise you could run into a crash if you try to access social.framework in ios 5.1 or earlier. Hope that helps!

这篇关于未加载库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆