加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

iphone – dyld:未加载库:/System/Library/Frameworks/Account

发布时间:2020-12-14 18:01:50 所属栏目:百科 来源:网络整理
导读:我在iOS模拟器4.2 / 4.3上运行应用程序时收到以下错误.它适用于iOS 5. dyld: Library not loaded: /System/Library/Frameworks/Accounts.framework/Accounts Referenced from: /Users/User/Library/Application Support/iPhone Simulator/4.3/Applications/F
我在iOS模拟器4.2 / 4.3上运行应用程序时收到以下错误.它适用于iOS 5.

dyld: Library not loaded: /System/Library/Frameworks/Accounts.framework/Accounts
  Referenced from: /Users/User/Library/Application Support/iPhone Simulator/4.3/Applications/FBFD053F-E816-4114-AFEB-D90A6A67259B/SampleApp.app/SampleApp
  Reason: image not found

我在我的应用程序中使用AssetsLibrary和OpenCV框架.
我没有得到错误的原因.

解决方法

您收到此错误的原因是Accounts.framework仅在iOS 5.0或更高版本中可用.所以你无法在iOS 4.2 / 4.3上运行它.

您还可以将Accounts.framework标记为可选.在Xcode中,选择Targets>构建阶段>链接二进制库> Accounts.framework并标记为可选.

另外,请确保在iOS 4.3中跳过此代码(需要iOS 5.0或更高版本的代码).您可以使用以下代码来检查:

NSString *reqSysVer = @"5.0";
NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending) {

     //Add any code that requires iOS 5.0
}

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读