dyld: Library not loaded: GoogleUtilities.framework

Viewed 338

I have project MySingleViewApp and framework MyFramework. Both are fresh created xcode projects and just added podfile to MySingleViewApp and podspec file to MyFramework.

this is MySingleVIewApp pod file;

target 'MySingleVIewApp' do

  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks! :linkage => :static

  pod 'MyFramework', :path => '../MyFramework'

  target 'MySingleVIewAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'MySingleVIewAppUITests' do
    # Pods for testing
  end

end

And this is MyFramework podspec file

Pod::Spec.new do |s|
  s.name         = "MyFramework"
  s.version      = "1.0.0"
  s.summary      = "bla"
  s.description  = <<-DESC
                  some description
                   DESC
  s.homepage     = "https://github.com/github_account/my-framework"
  # brief license entry:
  s.license      = "MIT"
  # optional - use expanded license entry instead:
  # s.license    = { :type => "MIT", :file => "LICENSE" }
  s.authors      = { "Your Name" => "yourname@email.com" }
  s.platforms    = { :ios => "11.0" }
  s.source       = { :git => "https://github.com/github_account/my-framework.git", :tag => "#{s.version}" }
  s.requires_arc = true
  s.swift_version = "5.1.2"
  s.vendored_frameworks    = 'MyFramework.framework'

  s.static_framework = true
  s.dependency "UserSDK"

end

When run MySingleVIewApp project i get error

dyld: Library not loaded: @rpath/GoogleUtilities.framework/GoogleUtilities Referenced from: Frameworks/UserSDK.framework/UserSDK Reason: image not found

If i add UserSDK(which is spec dependency of MyFramework) and remove MyFramework from podfile it works

target 'MySingleVIewApp' do

  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks! :linkage => :static

  pod 'UserSDK'

  target 'MySingleVIewAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'MySingleVIewAppUITests' do
    # Pods for testing
  end

end
0 Answers
Related