Search Unity

Can you disable UCB from attempting to use cocoapods? Trying to get firebase + iOS + UCB to work.

Discussion in 'Unity Build Automation' started by jcion, Sep 5, 2017.

  1. jcion

    jcion

    Joined:
    Jan 24, 2015
    Posts:
    7
    Attempting to get firebase analytics working with UCB. Unity version 5.6.1f1, xcode version 8.3.3.
    I have disabled cocoapods on Unity.

    Building on unity works.
    Building locally on a test iPhone through xCode works.
    I am receiving firebase events fine while building locally.

    Here is the error log from UCB:

    28607: [xcode] ld: warning: directory not found for option '-L /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-fibczwgsrggdjsedcvqtnaphmjym/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos/GoogleToolboxForMac /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-fibczwgsrggdjsedcvqtnaphmjym/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/BuildProductsPath/Release-iphoneos/nanopb'
    28608: [xcode] ld: warning: directory not found for option '-F /BUILD_PATH/brainplus.evolution-brain-training.firebase-branch-development-ios/Unity/EvolutionApp/temp.KBi6Be/Pods/FirebaseAnalytics/Frameworks /BUILD_PATH/brainplus.evolution-brain-training.firebase-branch-development-ios/Unity/EvolutionApp/temp.KBi6Be/Pods/FirebaseCore/Frameworks /BUILD_PATH/brainplus.evolution-brain-training.firebase-branch-development-ios/Unity/EvolutionApp/temp.KBi6Be/Pods/FirebaseInstanceID/Frameworks'
    28609: [xcode] ld: library not found for -lz}
    28610: [xcode] clang: error: linker command failed with exit code 1 (use -v to see invocation)
    28611: [xcode] ** ARCHIVE FAILED **
    28612: [xcode] The following build commands failed:
    28613: [xcode] Ld /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-fibczwgsrggdjsedcvqtnaphmjym/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/evolution normal armv7
    28614: [xcode] Ld /BUILD_PATH/Library/Developer/Xcode/DerivedData/Unity-iPhone-fibczwgsrggdjsedcvqtnaphmjym/Build/Intermediates/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/arm64/evolution normal arm64
    28615: [xcode] (2 failures)
    28616: ! build of 'firebase-branch-development-ios' failed. compile failed


    Any help would be greatly appreciated :)

    I've already tried this fix, as well as a few others:
    https://stackoverflow.com/a/44205255
     
  2. schizofunky

    schizofunky

    Joined:
    Mar 6, 2014
    Posts:
    3
    Hi jcion,

    I was having this exact error and in the end I realised that the way I was disabling CocoaPods locally was only persisting locally and it was still in fact running on UCB and messing up/causing that error.

    I fixed it by creating a Pre-Export method for UCB and added the following code to disable it fully:

    Google.IOSResolver.CocoapodsIntegrationMethodPref = Google.IOSResolver.CocoapodsIntegrationMethod.None;
    Google.IOSResolver.PodfileGenerationEnabled = false;


    Hope this helps you out, it was a nightmare to get it to succeed!
     
    jcion likes this.
  3. jcion

    jcion

    Joined:
    Jan 24, 2015
    Posts:
    7
    Hey schizofunky,

    Thanks for your reply! I had almost given up on integrating firebase before this. I seem to be on a different version of the IOSResolver, and I don't have those functions available in my dll. I did, however, find this:

    Code (CSharp):
    1. // Google.IOSResolver
    2. public static bool Enabled
    3. {
    4.     get
    5.     {
    6.         return EditorPrefs.GetBool("Google.IOSResolver.Enabled", true) && IOSResolver.iOSXcodeExtensionLoaded;
    7.     }
    8.     set
    9.     {
    10.         EditorPrefs.SetBool("Google.IOSResolver.Enabled", value);
    11.     }
    12. }
    Is there anything similar in your dll?
     
  4. henriqueranj

    henriqueranj

    Joined:
    Feb 18, 2016
    Posts:
    177
  5. jcion

    jcion

    Joined:
    Jan 24, 2015
    Posts:
    7