mah*_*aut 5 iphone xcode linker ios
我在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
Run Code Online (Sandbox Code Playgroud)
我在我的应用程序中使用AssetsLibrary和OpenCV框架.我没有得到错误的原因.
您收到此错误是因为 Accounts.framework 仅在 iOS 5.0 或更高版本中可用。所以你无法在 iOS 4.2/4.3 上运行它。
您还可以将 Accounts.framework 标记为可选。在 Xcode 中,选择“目标”>“构建阶段”>“与二进制库链接”>“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
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2101 次 |
| 最近记录: |