Unable to load libcrypto.dylib in iOS Simulator

I've created an Xcode app for iOS simulator, which is basically the template code, save for this:


- (void)viewDidLoad { [super viewDidLoad];

  void *handle = dlopen("/usr/lib/libcrypto.0.9.8.dylib", 1);

  if (!handle) {

    printf("[%s] Unable to load dylib: %s\n", __FILE__, dlerror());

  }

}


Which results in a message that contains:


"Unable to load dylib: dlopen(/usr/lib/libcrypto.0.9.8.dylib, 1): no suitable image found. Did find: /usr/lib/libcrypto.0.9.8.dylib: mach-o, but not built for iOS simulator"


Using the file command reports that the file supports i386 and x86_64 architectures.


Is iOS simulator just blocking the loading of this file, or is it genuinely not built for simulator? If the latter, how does one tell the difference?

Right, not built for. 'mach-o' is OS X, not iOS.

Unable to load libcrypto.dylib in iOS Simulator
 
 
Q