I am getting the following error while running an app on iOS simulator 4.2/4.3. It's working fine 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 am using the AssetsLibrary and OpenCV frameworks in my app. I am not getting the cause of error.
Better yet you could keep it but change it from Link Binary With Libraries: from required to optional. Then in your code skip the framework methods when in a 4.x device.
You are getting this error because Accounts.framework is only available in iOS 5.0 or later. So you are not able to run it on iOS 4.2/4.3.
You can also mark Accounts.framework as optional. In Xcode, select Targets > Build Phases > Link with binary libraries > Accounts.framework and mark as optional.
Also please make sure to skip this code(code that requires iOS 5.0 or greater) in iOS 4.3. You can use the following code to check this :
NSString *reqSysVer = @"5.0";
NSString *currSysVer = [[UIDevice currentDevice] systemVersion];
if ([currSysVer compare:reqSysVer options:NSNumericSearch] != NSOrderedAscending) {
//Add any code that requires iOS 5.0
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With