Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. On February 28th the Feedback website will shut down and be redirected to the Unity forums. See the full post for more information.
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Unity 2018.3 is now released.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

[Solved]Using CocoaPods with cloud build ?

Discussion in 'Unity Cloud Build' started by thibouf, Sep 6, 2018.

  1. thibouf

    thibouf

    Joined:
    Mar 17, 2017
    Posts:
    57
    Hello,
    I am not very familiar with cocoa pod, but need it to integrate a 3rd party sdk ... I have seen that cloud build now support cocoa pods. But I could not find any documentation on how to use it ..

    Can we simply put a Podfile somewhere ? Or is there anything that must be done in postprocess script ?
    Could somebody give me some sample of projects using it ?
     
  2. thibouf

    thibouf

    Joined:
    Mar 17, 2017
    Posts:
    57
  3. ollieblanks

    ollieblanks

    Unity Technologies

    Joined:
    Aug 21, 2017
    Posts:
    126
    CocoaPods is now installed on the Cloud Build build agents, we simply run "pod install" to install the dependencies before building the IPA file in Xcode.

    I have found this great example for using PostProcessBuild and the Xcode Manipulation API to include CocoaPod dependence in the Xcode Project, this could be used in conjunction with Cloud Build.

    I hope that helps!
     
  4. thibouf

    thibouf

    Joined:
    Mar 17, 2017
    Posts:
    57
    Thank you for the answer. So if I understood I have to copy the pod file in the project forlder in the PostProcessBuild script.

    I don't know why, I was thinking that you had added something to automatically detect them and move them without the need for us to write a script
     
  5. ollieblanks

    ollieblanks

    Unity Technologies

    Joined:
    Aug 21, 2017
    Posts:
    126
    That is correct, the only thing that is automated on Cloud Build in regards to CocoaPods is the "pod install" step.
     
  6. thibouf

    thibouf

    Joined:
    Mar 17, 2017
    Posts:
    57
    Thank you very much . I have successfully built what I needed .

    For eventual future reader, the Podfile sample in the given link is outdated. To work with current CocoaPods version you need to define the target. Here is an exemple of a current working Podfile :


    source 'https://github.com/CocoaPods/Specs.git'

    target 'Unity-iPhone' do
    pod "WhatYouNeed"
    end


    And also you won need to copy files open_pods.command and pods.command as "pod install" is called automatically in the cloud build process.
     
    ollieblanks likes this.