Dyld: library not loaded: /System/Library/Frameworks/Accounts.framework/Accounts

When starting the application on iOS simulator 4.2 / 4.3, the following error appears. It works great with 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

I use the AssetsLibrary and OpenCV framework in my application. I do not get the cause of the error.

+5
source share
2 answers

You get this error because Accounts.framework is only available in iOS 5.0 or later. Therefore, you cannot run it on iOS 4.2 / 4.3.

You can also mark Accounts.framework as optional. In Xcode, select "Goals"> "Generate Phases"> "Link with Binary Libraries"> "Accounts" and mark it as optional.

, (, iOS 5.0 ) iOS 4.3. , :

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

     //Add any code that requires iOS 5.0
}
+3

, , Link Binary With Libraries: . , 4.x.

+5

All Articles