Kudo
Kudo

Reputation: 51

swift linker command failed with exit code 1 Google Maps iOS Util pod install

My build failed with swift linker command failed with exit code 1. The logs specifically say symbol(s) not found for architecture x86_64

This happened ever since I tried setting up Google-Maps-iOS-Utils.

This is my Podfile. There is a pre_install portion because without it, pod install will have a 'Pods-Project' target has transitive dependencies that include static binaries error.

# platform :ios, '9.0'

target 'My App' do
  use_frameworks!

  platform :ios, '11.3'

  # Pods for My App
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils' #the new pod that caused issues
  pod 'Firebase/Core'
  pod 'Firebase/Auth'
  pod 'GoogleSignIn'
  pod 'Firebase/Database'
  pod 'Firebase/Storage'
  pod 'FirebaseUI/Storage'
  pod 'Fabric', '~> 1.7.9'
  pod 'Crashlytics', '~> 3.10.5'

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

end

pre_install do |installer|
    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end

This is my Bridging-Header.h

#ifndef Bridging_Header_h
#define Bridging_Header_h
#import <Google-Maps-iOS-Utils/GMUMarkerClustering.h>
#endif /* Bridging_Header_h */

Some troubleshooting measures I tried: Cleaning Build Folder and Building again; de-integrating pods and pod installing again.

Any help is appreciated. Thanks.

Upvotes: 1

Views: 438

Answers (2)

Nirbhay Singh
Nirbhay Singh

Reputation: 1298

Try to add library location in binary search path of build setting.

Upvotes: 0

Kudo
Kudo

Reputation: 51

This solution worked for me. There is no need for this portion in the Podfile as well.

pre_install do |installer|
    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end

I also had to delete the framework the binary search path in Build Phases.

Upvotes: 0

Related Questions