2016-12-12 10 views
1

ポッド付きのスピーディなxcodeプロジェクトにGoogle Maps IOSユーティリティ(マーカークラスタリング用)を追加する際に問題があります。 私はpod installを実行すると、それは次のエラーで失敗します。GoogleマップユーティリティIOSポッドエラー

The 'Pods-App' target has transitive dependencies that include static binaries: (/Users/warrick/Projects/orix/App/Pods/GoogleMaps/Subspecs/Base/Frameworks/GoogleMapsBase.framework, /Users/warrick/Projects/orix/App/Pods/GoogleMaps/Subspecs/Maps/Frameworks/GoogleMapsCore.framework, and /Users/warrick/Projects/orix/App/Pods/GoogleMaps/Subspecs/Maps/Frameworks/GoogleMaps.framework)

のGoogleマップは、すぐに私はそれが壊れるのユーティリティを追加すると正常に動作しますが、。

このエラーメッセージは何を意味し、どのように解決することができますか?ここで

は私Podfileです:

# Uncomment the next line to define a global platform for your project 
# platform :ios, '9.0' 
workspace '../app' 

target 'App' do 
    # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 
    use_frameworks! 

    pod 'GoogleMaps' 
    pod 'Google-Maps-iOS-Utils' 

    # Firebase - used for notifications 
    pod 'Firebase/Core' 
    pod 'Firebase/Messaging' 

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

end 

答えて

9

これは、Cocoapodsの制限ボックスソリューションのアウトを持っていない問題です。この制限は、アプリケーションがSwiftで構築され、use_frameworks!をpodfileに含め、静的ライブラリとして提供される推移的依存関係を使用している場合に発生します(Google Mapsなど)。

Googleが動的なフレームワーク(iOS 7をサポートするまで)を提供しないようにするには、現時点での回避策はGoogle Maps IOS Utilitiesをプロジェクトに手動で統合することです。

統合手順は、ここで説明されていますhttps://github.com/googlemaps/google-maps-ios-utils/blob/master/Swift.md

  • Remove Google-Maps-iOS-Utils from the Podfile (if it is there). In your project create a group named 'Google-Maps-iOS-Utils' .
  • Download the repo into your local computer.
  • Add the folders inside the src directory into your project by right clicking on the 'Google-Maps-iOS-Utils' group and selecting "Add Files to ..." (Make sure you select the target as your app target to avoid undefined symbols issue).
  • Make sure "Use Header Map" is ON for your app target in XCode Settings (it is ON by default in XCode).
  • Add a bridging header file with #import "GMUMarkerClustering.h" (note the relative path).
  • Open the umbrella header GMUMarkerClustering.h (under the Google-Maps-iOS-Utils/Cluster group) and change all the import paths to relative. For example, change #import <Google-Maps-iOS-Utils/GMUCluster.h> to #import "GMUCluster.h" . (The 'Use Header Map' setting will resolve the relative path correctly).
  • Build your project.
  • That's it.
関連する問題