title: cocoapods dylib dependency use_frameworks
body: <p>I have built a dynamic library (to add ICU support in this case) which i need to add as a dependency to a pod. For that I created a pod with the following podspec (I removed things like authors, license, ... to keep it short)</p>
  
  <pre><code>Pod::Spec.new do |s|
    s.name     = 'unicode'
    s.version  = '57.0'
    s.source              = { :git =&gt; "git@bitbucket.org:mycompany/unicode.git", :tag =&gt; "#{s.version}" }
    s.requires_arc = false
    s.platform = :ios, '8.0'
  
    s.default_subspecs = 'all'
  
    s.subspec 'all' do |ss|
      ss.header_mappings_dir = 'icu4c/include'
      ss.source_files = 'icu4c/include/**/*.h'
      ss.public_header_files = 'icu4c/include/**/*.h'
      ss.vendored_libraries = 'Frameworks/lib*.dylib'
    end
  
  end
  </code></pre>
  
  <p>Here i have a second pod where i need to link these libraries too</p>
  
  <pre><code>Pod::Spec.new do |s|
    s.name     = 'sqlite3'
    s.version  = '3.14.2'
    s.summary  = 'SQLite is an embedded SQL database engine'
    s.documentation_url = 'https://sqlite.org/docs.html'
    s.homepage = 'https://github.com/clemensg/sqlite3pod'
    s.authors  = { 'Clemens Gruber' =&gt; 'clemensgru@gmail.com' }
  
    v = s.version.to_s.split('.')
    archive_name = "sqlite-amalgamation-"+v[0]+v[1].rjust(2, '0')+v[2].rjust(2, '0')+"00"
    #s.source   = { :http =&gt; "https://www.sqlite.org/#{Time.now.year}/#{archive_name}.zip" }
    s.source              = { :git =&gt; "git@bitbucket.org:wrthphoenixspeedy/sqlite3.git", :tag =&gt; "#{s.version}" }
    s.requires_arc = false
    s.platform = :ios, '8.0'
  
    s.default_subspecs = 'common'
  
    s.subspec 'common' do |ss|
      ss.source_files = "#{archive_name}/sqlite*.{h,c}"
      ss.osx.pod_target_xcconfig = { 'OTHER_CFLAGS' =&gt; '$(inherited) -DHAVE_USLEEP=1' }
      # Disable OS X / AFP locking code on mobile platforms (iOS, tvOS, watchOS)
      sqlite_xcconfig_ios = { 'OTHER_CFLAGS' =&gt; '$(inherited) -DHAVE_USLEEP=1 -DSQLITE_ENABLE_LOCKING_STYLE=0' }
      ss.ios.pod_target_xcconfig = sqlite_xcconfig_ios
      ss.tvos.pod_target_xcconfig = sqlite_xcconfig_ios
      ss.watchos.pod_target_xcconfig = sqlite_xcconfig_ios
    end
  
    # enable support for icu - International Components for Unicode
    s.subspec 'icu' do |ss|
      ss.dependency 'sqlite3/common'
      ss.pod_target_xcconfig = { 'OTHER_CFLAGS' =&gt; '$(inherited) -DSQLITE_ENABLE_ICU=1' }
      ss.dependency           'unicode', '57.0'
      ss.libraries = 'icucore', 'icudata.57.1', 'icui18n.57.1', 'icuio.57.1', 'icule.57.1', 'iculx.57.1', 'icutu.57.1', 'icuuc.57.1'
    end
  
  end
  </code></pre>
  
  <p>And with these i am able to compile it. Cocoapods is copying these libraries on build time into the folder <em>../Frameworks/</em> rather than to do while on run time. Instead it fails because it says that it doesn't find the library in <em>../lib</em>.</p>
  
  <pre><code>dyld: Library not loaded: ../lib/libicudata.57.1.dylib
    Referenced from: /var/containers/Bundle/Application/9663CB3A-6ACD-487E-A92D-48F8AFE5260C/MyApp.app/MyApp
    Reason: image not found
  </code></pre>
  
  <p>I have to use <em>use_frameworks!</em> because i am using some Swift frameworks too.</p>
  
  <p>So i am doing something wrong... the question is, can i link a dylib from one pod to another pod? and if so... how?</p>