9

I am trying to install 'Google-Maps-iOS-Utils' but it gives me above error. Here is Podfile :

platform :ios, '9.0'
 use_frameworks! 
 target 'MapClusters' do
  pod 'Alamofire'
  pod 'SwiftyJSON'
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils'
end

I tried to remove pod 'Google-Maps-iOS-Utils' and it did work. So I guess Google-Maps-iOS-Utils is the one causing problem. Here is the full error :

[!] The 'Pods-MapClusters' target has transitive dependencies that include static binaries: (/Users/BAPS/Documents/Test/MapClusters/Pods/GoogleMaps/Subspecs/Base/Frameworks/GoogleMapsBase.framework, /Users/BAPS/Documents/Test/MapClusters/Pods/GoogleMaps/Subspecs/Maps/Frameworks/GoogleMapsCore.framework, and /Users/BAPS/Documents/Test/MapClusters/Pods/GoogleMaps/Subspecs/Maps/Frameworks/GoogleMaps.framework)

I have already gone through lot of answers here or elsewhere on web. Till now I have tried these solution :

  1. Disabling the check for transitive dependencies.

    2.pre_install do |installer| def installer.verify_no_static_framework_transitive_dependencies; end end

    post_install do |installer| find Pods -regex 'Pods/GoogleMaps.*\\.h' -print0 | xargs -0 sed -i '' 's/\\(<\\)GoogleMaps\\/\\(.*\\)\\(>\\)/\\"\\2\\"/' find Pods -regex 'Pods/Google-Maps-iOS-Utils.*\\.h' -print0 | xargs -0 sed -i '' 's/\\(<\\)Google-Maps-iOS-Utils\\/\\(.*\\)\\(>\\)/\\"\\2\\"/' end

After adding above two points in Podfile, installation works but then when I try to run the app I get this error:

Error

After removing pod 'SwiftyJSON' it works but I need it there.

I tried few other things too but nothing seems helping. I am new to ios development so I am not able to help myself.

I am using swift, xcode 7.3 and latest cocoapods.

Dipen Panchasara
  • 13,480
  • 5
  • 47
  • 57
Abrar
  • 341
  • 5
  • 13
  • Check in your framework by expanding whether `GoogleMaps.h` file is there or not. Add framework properly with all header files. – Dipen Panchasara Aug 25 '16 at 11:50
  • @DipenPanchasara I am not able to figure it out. Where exactly I have to look. And if it's not present then how can I add it there? – Abrar Aug 25 '16 at 15:06
  • I am little busy, give me some time i will look into it tomorrow for sure. – Dipen Panchasara Aug 25 '16 at 16:03
  • Open your framework directory expand it you will find a `header` directory inside it, all the header files for that framework resides there, if its missing download it from [github](https://github.com/googlemaps/google-maps-ios-utils) or use [cocoapods](https://cocoapods.org/?q=google%20maps%20ios%20util) – Dipen Panchasara Aug 26 '16 at 05:38

3 Answers3

10

I had figured out this after much struggle. On request google guys have put a tutorial on their git repository. Here is the link

Abrar
  • 341
  • 5
  • 13
1

Used this code in podfile to avoid error while pod install:

pre_install do |installer|
    def installer.verify_no_static_framework_transitive_dependencies; end
end

But still need solution for pod lib.

Marlon Ruiz
  • 1,774
  • 16
  • 14
0

please update your pod file

    platform :ios, '9.0'
 use_frameworks! 
 target 'MapClusters' do
  pod 'Alamofire'
  pod 'SwiftyJSON'
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils', :git => 'https://github.com/googlemaps/google-maps-ios-utils'
end
Bibin Joseph
  • 234
  • 2
  • 7