'The 'Pods' target has transitive dependencies that include static binaries' when installing GCM

前端 未结 5 1861
感情败类
感情败类 2020-12-06 04:45

I\'m trying to install Google Cloud Messaging for my iOS application (using swift). I\'ve added it to my Podfile like so:

# Uncomment this line to define a          


        
相关标签:
5条回答
  • 2020-12-06 04:59

    I had a similar problem. My pod was 0.37.2 . I updated to 0.38.2 as mentioned in https://github.com/googlesamples/google-services/issues/22. got it solved .

    0 讨论(0)
  • 2020-12-06 05:04

    Update

    With Cocoapods V 0.38.2 it is now possible to use GMC, or any other Objective-C frameworks with Swift frameworks like Alamofire

    Make sure that you use use_frameworks! in the podfile

    # Uncomment this line to define a global platform for your project
    # platform :ios, '8.2'
    use_frameworks!
    
    target 'Project' do
        pod 'Google'
        pod 'Google/CloudMessaging'
        pod 'Alamofire'
    end
    
    target 'ProjectTests' do
    
    end
    

    Old Answer

    I'm using a Swift project too and i'm only using Objective-C frameworks, because Swift & Objective-C frameworks didn't work for me yet.

    Try install GCM only without use_frameworks! and without the Alamofire framework (written in Swift)

    # Uncomment this line to define a global platform for your project
    # platform :ios, '8.2'
    
    target 'Project' do
        pod 'Google'
        pod 'Google/CloudMessaging'
    end
    
    target 'ProjectTests' do
    
    end
    

    I ran into some problems when I'm importing GCM in the bridging header file. I'm curious if you encounter the same problems.

    Solution for Google Cloud Messaging when the BridingHeader or GGLInstanceIDDelegate is not working, is to install 'Google' pod 'Google'

    0 讨论(0)
  • 2020-12-06 05:05

    Remove the pod from which are showing in warning and issue gona solve

    0 讨论(0)
  • 2020-12-06 05:08

    There is problem with Google/CloudMessaging pod itself. This pod cannot be build as framework, because of some static dependencies. You can try Carthage to build you swift dependencies.

    0 讨论(0)
  • 2020-12-06 05:19

    I met same problem with Google/Analytics pod.

    This issue may be resolved in the latest version of CocoaPods.

    See this: https://github.com/CocoaPods/CocoaPods/issues/3194

    0 讨论(0)
提交回复
热议问题