title: Load OpenSSL lib to MacOS app
body: <p>I'm having trouble incorporating OpenSSL to my MacOS app for validating apple's receipt.
  Here's what I get:</p>
  
  <blockquote>
    <p>dyld: Library not loaded: /usr/local/ssl/lib/libcrypto.1.0.0.dylib</p>
  </blockquote>
  
  <p>Here's what I'm doing:</p>
  
  <p>I'm using this script to compile my OpenSSL lib:</p>
  
  <pre><code>#!/bin/bash
  
  OPENSSL_VERSION="1.0.1e"
  
  curl -O -L http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz
  tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
  mv openssl-$OPENSSL_VERSION openssl_i386
  tar -xvzf openssl-$OPENSSL_VERSION.tar.gz
  mv openssl-$OPENSSL_VERSION openssl_x86_64
  cd openssl_i386
  ./Configure darwin-i386-cc -shared
  make
  cd ../
  cd openssl_x86_64
  ./Configure darwin64-x86_64-cc -shared
  make
  cd ../
  lipo -create openssl_i386/libcrypto.dylib openssl_x86_64/libcrypto.dylib -output libcrypto.dylib
  lipo -create openssl_i386/libssl.dylib openssl_x86_64/libssl.dylib -output libssl.dylib
  rm openssl-$OPENSSL_VERSION.tar.gz
  </code></pre>
  
  <p>Which gives me <code>libssl.dylib</code> and <code>libcrypto.dylib</code> </p>
  
  <p>Then I run <code>pod install</code> with my podfile:</p>
  
  <pre><code>target 'MyApp' do
  use_frameworks!
  pod 'OpenSSL', '~&gt; 1.0'
  end
  </code></pre>
  
  <p>I then try to run my project just to get:</p>
  
  <pre><code>dyld: Library not loaded: /usr/local/ssl/lib/libcrypto.1.0.0.dylib
    Referenced from: /Users/me/Source/myApp/DerivedData/myApp/Build/Products/Debug/myApp.app/Contents/MacOS/myApp
    Reason: image not found
  </code></pre>
  
  <p>I understand I didn't add the librypto lib yet, but why does it try to find it in my <code>/usr/local/ssl/lib/</code>? Where should I place it?</p>