Search Unity

Build Failed: Cocoapods

Discussion in 'Unity Build Automation' started by JACKARY, Aug 2, 2016.

  1. JACKARY

    JACKARY

    Joined:
    Nov 18, 2014
    Posts:
    4
    This is the related error message that appears in the log:

    8456: + Installing cocoapods:
    8457: /BUILD_PATH/.mason/buildpacks/xcode/bin/compile: line 156: pod: command not found

    The build fails shortly after this appears. Any help would by much appreciated!
     
  2. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    785
    Is there a Podfile in the root of your repo? Our build scripts will currently (incorrectly) try to run a "pod install" if a Podfile exists. This is something that needs to be fixed up on our end, but in the meantime the simplest thing to do would be to remove that Podfile (or move it somewhere other than the root).
     
    JACKARY likes this.
  3. JACKARY

    JACKARY

    Joined:
    Nov 18, 2014
    Posts:
    4
    Thanks, that fixed that issue with my build. Unfortunately it fell at a new hurdle:

    [xcode] /BUILD_PATH/jack-3368286.dotstopper1.default-ios/temp.wcbUDG/Libraries/Plugins/iOS/GADURequest.m:4:9: fatal error: module 'GoogleMobileAds' not found

    Not sure if I need to point it towards the GoogleMobileAds module or something else entirely...
     
  4. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    785
  5. JACKARY

    JACKARY

    Joined:
    Nov 18, 2014
    Posts:
    4
    Thanks, I'll check that out
     
  6. Rainbirth

    Rainbirth

    Joined:
    Aug 3, 2013
    Posts:
    110
    hello @dannyd still getting this error:

    Unity] Player export failed. Reason: 'pod' command not found; unable to generate a usable Xcode project. You can install cocoapods with the Ruby gem package manager:
    381: ! build of 'mermaid-match' failed. compile failed

    seems it's outdated, updated it on my mac and it builds. The reason is GoogleMobileAds new version needs it updated?
     
  7. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    785
    See my first comment in this thread - we don't actually support cocoapods currently.
     
  8. ciparis_

    ciparis_

    Joined:
    Feb 23, 2017
    Posts:
    2
    Hi Danny,

    Any timeframe for changing that? In the macOS & iOS development ecosystems, this is a pretty huge deal.

    cheers!
     
  9. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    785
    @ciparis_ : not currently scheduled. Out of curiosity, what kind of dependencies are you using that require cocoapods?
     
  10. ciparis_

    ciparis_

    Joined:
    Feb 23, 2017
    Posts:
    2
    Probably the most common ones on iOS right now are Alamofire, SwiftyJSON, & SocketRocket, but there are a ton of others. I haven't worked on a single iOS app in the last few years that didn't use Cocoapods in some capacity (usually several). Integrating 3rd-party frameworks manually isn't impossible, but it's a huge PITA in a community that long ago moved past doing all of that manually.
     
  11. plysaght47

    plysaght47

    Joined:
    Jul 2, 2015
    Posts:
    21
    @dannyd just ran into the same issue and I can't seem to find a Podfile. The only plugin in my project is GoogleMobileAds.

    Has anyone had success adding GoogleMobileAds Framework postbuild?
     
    anujsaini likes this.
  12. squarelover

    squarelover

    Joined:
    Nov 14, 2012
    Posts:
    31
    all firebase libraries are working correctly with unity 4.x if tuned correctly and cocoa pods library is used, but it wont work if binded to cloud build or if their package ver higher than 3.0.0 is used (it now requires unity 5.3 and higher) for instance

    BUT the main thing to consider here is if cloud build doesnt support using xcodeworkspace project(could be used 1 setting xcodeproject (default) or build from xcodeworkspace) then NO pod libraries could be used at all.
     
  13. LeandroGL

    LeandroGL

    Joined:
    Mar 24, 2017
    Posts:
    5
    I´ve created a topic about firebase exclusively, and it is cocoa pods fault as well :/ Been more than a year since the last response from someone in Unity in this topic, seems like pods still aren´t working.
     
    Last edited: Mar 31, 2017
  14. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    Sigh, dealing with Firebase and whatever this cocoapods thing is.

    Seems like everytime I get back to iOS development, there's some new thing that breaks everything else.
     
    Honikou likes this.
  15. timmmeh

    timmmeh

    Joined:
    Dec 9, 2016
    Posts:
    3
  16. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    412
    Does anyone else remember when libraries came as a lib file and a bunch of headers and you just had to figure it out yourself? Sometimes the name mangling wouldn't match. Sometimes other things went wrong. Sometimes compilers used different calling conventions. But that was easier than figuring out how to un-aaar the git tar pod framework postprocess cmake gradle jenkins nuget workspace package wibble...
     
  17. MechEthan

    MechEthan

    Joined:
    Mar 23, 2016
    Posts:
    166
    With Native support for Google VR SDK ("Cardboard" really) Unity produces a project that explicitly uses cocoapods to resolve some of the Google dependencies.

    Frankly that the whole native VR support is a mess right now, but currently the Unity Editor is generating a scenario itself that UCB can't support.

    But, I'd really rather it not use cocoapods (the worlds slowest dependency manager), personally.
     
    Remi_Sormain likes this.
  18. Otto_Oliveira

    Otto_Oliveira

    Joined:
    Jul 24, 2014
    Posts:
    33
    Hi Danny,
    is there any update regarding the cocoa pods?

    Thanks
     
  19. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    785
    Otto_Oliveira likes this.
  20. kripa1415

    kripa1415

    Joined:
    Oct 3, 2016
    Posts:
    2
    I have integrated firebase and trying to get cloud build but its keep getting failed because of cocopod integration...

    -Xlinker -bitcode_verify -Xlinker -bitcode_hide_symbols -Xlin...
    18656: [xcode] ld: warning: directory not found for option '-L/BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-fzbcgizoyyruydequqkhwdkxmjse/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos/GoogleToolboxForMac'
    18657: [xcode] ld: library not found for -lGoogleToolboxForMac
    18658: [xcode] clang: error: linker command failed with exit code 1 (use -v to see invocation)
    18659: [xcode] ** ARCHIVE FAILED **
    18660: [xcode] The following build commands failed:
    18661: [xcode] Ld /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-fzbcgizoyyruydequqkhwdkxmjse/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/twistyboard2 normal armv7
    18662: [xcode] Ld /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-fzbcgizoyyruydequqkhwdkxmjse/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/arm64/twistyboard2 normal arm64
    18663: [xcode] (2 failures)
    18664: ! build of 'default-ios' failed. compile failed
    18665: Publishing build 209 of kripa1415/twisty-boat for target 'default-ios'...
    18666: Uploading extra_data/artifacts/icon.png ...done
    18667: publishing finished successfully.
    18668: uninstalling iOS credentials for kripa1415/twisty-boat - default-ios
    18669: MAC verified OK


    Taking build with workspace manually works fine. But in cloud, its searching for xcode project rather than workspace ? is that the reason for failure ?

    Any workaround for this ?
     
  21. kathode

    kathode

    Joined:
    Jan 15, 2013
    Posts:
    63
    @kripa1415 As far as I can tell from all responses in the forum, there is no way to get an iOS Unity project with Firebase building using Cloud Build. You'll have to wait for them to get Cocoapods working, or come up with another workaround. Post #19 directly above yours is still the latest news we have. I also have a support ticket open with Firebase on the issue but I expect that it won't produce any useful results.
     
    Otto_Oliveira likes this.
  22. jcion

    jcion

    Joined:
    Jan 24, 2015
    Posts:
    7
    Has anyone tried this solution? I have tried but without success, would like to know if this method solves any of your issues.
     
  23. Otto_Oliveira

    Otto_Oliveira

    Joined:
    Jul 24, 2014
    Posts:
    33
    Hi @jcion ,
    I finally make a workaround to use Cloud Build + Firebase, I'm just waiting a response and then I'll post here the steps, if it's not off topic.
     
  24. MechEthan

    MechEthan

    Joined:
    Mar 23, 2016
    Posts:
    166
    Please do share -- Seems pretty on-topic to me!
     
  25. Otto_Oliveira

    Otto_Oliveira

    Joined:
    Jul 24, 2014
    Posts:
    33
    Hi @Ethan_VisualVocal ,
    you can check the instructions here, I'll post more detailed explanation tomorrow.
     
  26. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    785
    Following up to let you know cocoapods support was added into Unity Cloud Build as of today.
     
    paradizIsCool and Otto_Oliveira like this.
  27. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    412
    Out of interest, did you build a simple Firebase Auth+Database (and possibly Firebase analytics, but Unity Analytics + Raw Data Export is actually better...) project with UCB to test this? In practice, Firebase Auth+DB seem to account for the overwhelming majority of cocoapods-related (and Google JAR resolution mayhem) questions.
     
  28. Otto_Oliveira

    Otto_Oliveira

    Joined:
    Jul 24, 2014
    Posts:
    33
    Great news! Gonna test it and give a feedback.
     
  29. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    785
    @ferretnt - no, but I'll get someone to test it. We were focused on getting it supported since Cardboard on iOS requires it, but you're right there are a fair number of questions here about Firebase.
     
    ferretnt likes this.
  30. Taggler

    Taggler

    Joined:
    Apr 13, 2018
    Posts:
    6
    hi guys, has the issue been resolved yet ? Or is there any update on building Firebase using cocoapods on Unity Cloud Build ?
     
    Jeremy-Lv likes this.
  31. kathode

    kathode

    Joined:
    Jan 15, 2013
    Posts:
    63
    @Taggler See #26. It should work as of a year ago.
     
  32. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    412
    It definitely works in 2017.4.

    I haven't tested 2018.x because we don't use it for production development.
     
  33. Jeremy-Lv

    Jeremy-Lv

    Joined:
    Mar 17, 2013
    Posts:
    16
    2017 4.13f ,Unity IOS framework addition failed due to a Cocoapods installation failure.
    Can not find any solution to fix this .
     
  34. Jeremy-Lv

    Jeremy-Lv

    Joined:
    Mar 17, 2013
    Posts:
    16
    Hi~ how to do the project using cocoapod on Unity Cloud Build? Andy Idea?
     
  35. Jeremy-Lv

    Jeremy-Lv

    Joined:
    Mar 17, 2013
    Posts:
    16
    Hi , Where to add cocoapods on Cloud Build ? I can not find it
     
  36. Otto_Oliveira

    Otto_Oliveira

    Joined:
    Jul 24, 2014
    Posts:
    33
    Hi @Jeremy-Lv,
    I've been using Cloud Build with Firebase, which uses cocoapods, for a while. Perhaps checking out how firebase create the xCode solution?
     
    kamal_rlg likes this.