Search Unity

iOS framework addition failed due to a Cocoapods installation failure.

Discussion in 'iOS and tvOS' started by Dakattack64, Jul 15, 2017.

  1. Dakattack64

    Dakattack64

    Joined:
    Sep 28, 2016
    Posts:
    3

    I've been trying to build my Unity game to iOS with Admob, Unity IAP, and Firebase Analytics.
    • Unity Version: 5.6.2f1 Personal
    After importing all the packages, putting the GoogleMobileAds.framework in the Assets/Plugins/iOS folder, I get this error. Anyone know how to resolve it? I've tried uninstalling and reinstalling Cocoapods (using commands from the blog below). But I still get the error. Anything else I can try?

    https://bhaveshdhaduk.wordpress.com/2014/05/07/cocoapods-uninstall-and-install/
     
    rob_ice likes this.
  2. Alond

    Alond

    Joined:
    Dec 9, 2013
    Posts:
    12
    I have the same issue. Have you managed to solve it?
     
  3. Yalfbal

    Yalfbal

    Joined:
    Nov 20, 2012
    Posts:
    23
    Hi,

    Same issue here.
     
  4. rob_ice

    rob_ice

    Joined:
    Nov 11, 2016
    Posts:
    112
    Same issue here, tried installing and uninstalling many times
     
  5. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    Do you have a folder called PlayServicesResolver? If so if has Cocoapods enabled for iOS, just disable it in iOS Resolver Settings

    .
     
    joseGuate97 likes this.
  6. rob_ice

    rob_ice

    Joined:
    Nov 11, 2016
    Posts:
    112
    Already tried hoping it would be an easy fix (stop the thing erroring so everything else runs)

    Have found that if we disable cocoapods integrations, the app (in this case, Google ARCore Lightboards multiplayer demo or a fresh ARCore project with cloud anchor scene) will error out in xcode with the code below.

    To workaround this, we go into the generated podfile and delete the line referring to sso://cpdc-internal/spec as it is causing errors, then open terminal, cd to the build folder and pod install or pod update.

    However after doing so, we can't get the multiplayer devices to connect to each other running the build!


    Code (CSharp):
    1. Undefined symbols for architecture arm64:
    2.   "_ArSession_resolveAndAcquireNewCloudAnchor", referenced from:
    3.       _ExternApi_ArSession_resolveAndAcquireNewCloudAnchor_m2495464753 in Bulk_Assembly-CSharp_1.o
    4.      (maybe you meant: _ExternApi_ArSession_resolveAndAcquireNewCloudAnchor_m2495464753)
    5.   "_ArSession_create", referenced from:
    6.       _ExternApi_ArSession_create_m3070864988 in Bulk_Assembly-CSharp_1.o
    7.      (maybe you meant: _ExternApi_ArSession_create_m3070864988)
    8.   "_ArSession_hostAndAcquireNewCloudAnchor", referenced from:
    9.       _ExternApi_ArSession_hostAndAcquireNewCloudAnchor_m1431695018 in Bulk_Assembly-CSharp_1.o
    10.      (maybe you meant: _ExternApi_ArSession_hostAndAcquireNewCloudAnchor_m1431695018)
    11.   "_OBJC_CLASS_$_FIRApp", referenced from:
    12.       objc-class-ref in libApp.a(app_ios_c76c7d869e568a9b561ea55e25a7dcc0.o)
    13.   "_ArFrame_release", referenced from:
    14.       _ExternApi_ArFrame_release_m628435846 in Bulk_Assembly-CSharp_1.o
    15.      (maybe you meant: _ExternApi_ArFrame_release_m628435846)
    16.   "_ArFrame_getTimestamp", referenced from:
    17.       _ExternApi_ArFrame_getTimestamp_m1073587907 in Bulk_Assembly-CSharp_1.o
    18.      (maybe you meant: _ExternApi_ArFrame_getTimestamp_m1073587907)
    19.   "_ArPose_getPoseRaw", referenced from:
    20.       _ExternApi_ArPose_getPoseRaw_m1977369023 in Bulk_Assembly-CSharp_1.o
    21.      (maybe you meant: _ExternApi_ArPose_getPoseRaw_m1977369023)
    22.   "_ARKitAnchor_release", referenced from:
    23.       _ExternApi_ARKitAnchor_release_m1718714435 in Bulk_Assembly-CSharp_1.o
    24.      (maybe you meant: _ExternApi_ARKitAnchor_release_m1718714435)
    25.   "_ArPose_destroy", referenced from:
    26.       _ExternApi_ArPose_destroy_m418214798 in Bulk_Assembly-CSharp_1.o
    27.      (maybe you meant: _ExternApi_ArPose_destroy_m418214798)
    28.   "_ARKitAnchor_create", referenced from:
    29.       _ExternApi_ARKitAnchor_create_m1300657135 in Bulk_Assembly-CSharp_1.o
    30.      (maybe you meant: _ExternApi_ARKitAnchor_create_m1300657135)
    31.   "_ArSession_updateAndAcquireArFrame", referenced from:
    32.       _ExternApi_ArSession_updateAndAcquireArFrame_m2690757634 in Bulk_Assembly-CSharp_1.o
    33.      (maybe you meant: _ExternApi_ArSession_updateAndAcquireArFrame_m2690757634)
    34.   "_ArSession_destroy", referenced from:
    35.       _ExternApi_ArSession_destroy_m328869300 in Bulk_Assembly-CSharp_1.o
    36.      (maybe you meant: _ExternApi_ArSession_destroy_m328869300)
    37.   "_ArAnchor_getCloudAnchorState", referenced from:
    38.       _ExternApi_ArAnchor_getCloudAnchorState_m1094921979 in Bulk_Assembly-CSharp_1.o
    39.      (maybe you meant: _ExternApi_ArAnchor_getCloudAnchorState_m1094921979)
    40.   "_ArAnchorList_create", referenced from:
    41.       _ExternApi_ArAnchorList_create_m3950048780 in Bulk_Assembly-CSharp_1.o
    42.      (maybe you meant: _ExternApi_ArAnchorList_create_m3950048780)
    43.   "_ArAnchorList_destroy", referenced from:
    44.       _ExternApi_ArAnchorList_destroy_m657488677 in Bulk_Assembly-CSharp_1.o
    45.      (maybe you meant: _ExternApi_ArAnchorList_destroy_m657488677)
    46.   "_OBJC_CLASS_$_FIROptions", referenced from:
    47.       objc-class-ref in libApp.a(app_ios_c76c7d869e568a9b561ea55e25a7dcc0.o)
    48.   "_ArPose_create", referenced from:
    49.       _ExternApi_ArPose_create_m2618691603 in Bulk_Assembly-CSharp_1.o
    50.      (maybe you meant: _ExternApi_ArPose_create_m2618691603)
    51.   "_ArAnchor_getPose", referenced from:
    52.       _ExternApi_ArAnchor_getPose_m2236763152 in Bulk_Assembly-CSharp_1.o
    53.      (maybe you meant: _ExternApi_ArAnchor_getPose_m2236763152)
    54.   "_ArAnchorList_getSize", referenced from:
    55.       _ExternApi_ArAnchorList_getSize_m1986663875 in Bulk_Assembly-CSharp_1.o
    56.      (maybe you meant: _ExternApi_ArAnchorList_getSize_m1986663875)
    57.   "_ArAnchor_release", referenced from:
    58.       _ExternApi_ArAnchor_release_m1224335882 in Bulk_Assembly-CSharp_1.o
    59.      (maybe you meant: _ExternApi_ArAnchor_release_m1224335882)
    60.   "_ArAnchor_getTrackingState", referenced from:
    61.       _ExternApi_ArAnchor_getTrackingState_m2024388030 in Bulk_Assembly-CSharp_1.o
    62.      (maybe you meant: _ExternApi_ArAnchor_getTrackingState_m2024388030)
    63.   "_ArAnchor_detach", referenced from:
    64.       _ExternApi_ArAnchor_detach_m1073046060 in Bulk_Assembly-CSharp_1.o
    65.      (maybe you meant: _ExternApi_ArAnchor_detach_m1073046060)
    66.   "_ArAnchor_acquireCloudAnchorId", referenced from:
    67.       _ExternApi_ArAnchor_acquireCloudAnchorId_m2670563512 in Bulk_Assembly-CSharp_1.o
    68.      (maybe you meant: _ExternApi_ArAnchor_acquireCloudAnchorId_m2670563512)
    69.   "_ArAnchorList_acquireItem", referenced from:
    70.       _ExternApi_ArAnchorList_acquireItem_m2701054485 in Bulk_Assembly-CSharp_1.o
    71.      (maybe you meant: _ExternApi_ArAnchorList_acquireItem_m2701054485)
    72.   "_ArString_release", referenced from:
    73.       _ExternApi_ArString_release_m2224595556 in Bulk_Assembly-CSharp_1.o
    74.      (maybe you meant: _ExternApi_ArString_release_m2224595556, _ExternApi_ArString_release_m268636687 )
    75. ld: symbol(s) not found for architecture arm64
    76. clang: error: linker command failed with exit code 1 (use -v to see invocation)
    77.  
     
  7. Jeremy-Lv

    Jeremy-Lv

    Joined:
    Mar 17, 2013
    Posts:
    16
    same issue ,can not find a solution ,and no useful answer can be found anywhere.
    bad for weeks with firebase .
     
  8. TonismoGames

    TonismoGames

    Joined:
    Jun 12, 2018
    Posts:
    111
    this is a serious issue,i cant release my game on iOS because of this
     
    rehanazhar87 likes this.
  9. rehanazhar87

    rehanazhar87

    Joined:
    May 31, 2017
    Posts:
    4
    same error with no success :(
     
  10. sujanth

    sujanth

    Joined:
    Jan 29, 2016
    Posts:
    1
    Execute
    Code (CSharp):
    1. sudo gem install pods
    on the Terminal, it can solve this issue.
     
  11. mistergreen2016

    mistergreen2016

    Joined:
    Dec 4, 2016
    Posts:
    226
    I'm installing Firebase analytics SDK. Why does Unity need cocoapod anyway? I'm on a MAC, don't we just build this into Xcode anyway?
     
    Last edited: Aug 20, 2019
  12. pwshaw

    pwshaw

    Joined:
    Sep 16, 2014
    Posts:
    13
    i'm having the same issue.
     
  13. re-cheid

    re-cheid

    Joined:
    Apr 10, 2017
    Posts:
    34
    We had the same problem. For us the problem was, that we switched to another branch which was configured on another Unity version but we didn't close unity when switching branches.

    So closing unity, switching branch, then opening again solved this.
     
  14. hdeekshith

    hdeekshith

    Joined:
    Sep 11, 2017
    Posts:
    1
    I got this issue solved by taking the build(build target location) in the new folder or replacing instead of appending to the existing folder
     
    multimediamarkers likes this.
  15. Cuicui_Studios

    Cuicui_Studios

    Joined:
    May 3, 2014
    Posts:
    72
    Any update on this @rob_ice? We are facing the same issue. We've tried adding some frameworks using unity editor FireBase settings. We also tried the iOS resolver settings. Nothing. Been stuck there for several days. Impossible to post an update to our iOS app.

    [edit] So, after updating Firebase iOS plugin, I exported XCode project and upon opening the workspace file, I can see that all the *.a files inside Pods project are shown in red. All the libFirebaseAuth.a, libFirebaseCore.a, libFirebase*.a files and a few others appear in red, which I suppose must be some kind of problem linking the libraries or something similar.
    Any ideas?
     
    Last edited: Oct 30, 2019
  16. santafeast

    santafeast

    Joined:
    Feb 23, 2017
    Posts:
    3
    Anyone solved this issue, because i am having same issue when i try to build my ios build....
     
  17. mathiagr

    mathiagr

    Joined:
    Feb 16, 2016
    Posts:
    19
    Having the same issue. Any solution?
     
  18. ddooms

    ddooms

    Joined:
    Jun 10, 2015
    Posts:
    7
    Same issue here. Last time I solved this by updating cocoapods via the ios resolver, but this time cocoa pods is already updated. Going to try uninstalling and reinstalling to potentially reset the folder.
     
  19. doarp

    doarp

    Joined:
    Sep 24, 2019
    Posts:
    147
    Same issue here. no solution found :(
     
  20. YoNeyers

    YoNeyers

    Joined:
    Feb 10, 2017
    Posts:
    32
    any idea how to fix it?
     
  21. ocnenued

    ocnenued

    Joined:
    Apr 4, 2018
    Posts:
    26
    Same issue, we're experiencing this one on unity cloud as well.
     
  22. damosuzuki432

    damosuzuki432

    Joined:
    May 27, 2019
    Posts:
    1
    Same issue. Waiting for a hero rescuing us.. We're prisoners of this problem...
     
  23. ansyal2006

    ansyal2006

    Joined:
    Dec 1, 2019
    Posts:
    1
    • open terminal and go into the app project folder. Run the following commands :
    pod deintegrate && pod cache clean --all

    pod install
    Use .xcworkspace file
     
  24. pauliuso

    pauliuso

    Joined:
    Dec 11, 2014
    Posts:
    8
    I managed to fix it, here's what I did:
    1. Deleted game's xcode project folder so that no overwriting should happen when building.
    2. In terminal type
    Code (CSharp):
    1. gem list
    3. Delete all listed packages:
    upload_2020-11-21_23-33-52.png
    By typing:
    Code (CSharp):
    1. gem uninstall cocoapods
    2. gem uninstall cocoapods-core
    3. gem uninstall cocoapods-deintegrate
    And so on.
    4. After deleting all cocoapods packages go back to unity.
    5. Then Assets -> External dependency manager -> IOS resolver -> Install Cocoapods
    6. Make sure that cocoapods installed correctly by typing 'pod' in your terminal, if it says that command was not found then run 'sudo gem install cocoapods'
     
    Last edited: Dec 5, 2020
  25. Doraemon231

    Doraemon231

    Joined:
    Dec 18, 2018
    Posts:
    22
    Same problem.. I did everything as you said, but it doesn't solve. When I install firebase, it works, but when I get admob on it, I get an error. Is there a solution? I want to see the xcworkspace file.
     
  26. Doraemon231

    Doraemon231

    Joined:
    Dec 18, 2018
    Posts:
    22
    Google Mobile Ads Unity Plugin v5.4.0 => Pain for 3 days me

    Google Mobile Ads Unity Plugin v5.3.0 => xcworkspace comes out, but

    AdMob Banner not appear yet
    Is it because of IFDA? If so, please come up with a solution that someone can easily apply.
     
    baminipour likes this.
  27. Tislami

    Tislami

    Joined:
    Feb 18, 2019
    Posts:
    1
    vozcn likes this.
  28. egorovsa2

    egorovsa2

    Joined:
    Apr 14, 2019
    Posts:
    6
  29. AHMSALEEM

    AHMSALEEM

    Joined:
    Jun 21, 2019
    Posts:
    2
  30. oguz1ak

    oguz1ak

    Joined:
    Jul 10, 2015
    Posts:
    5
    Hello everyone, I was taking the same error, the project was not created xcworkspace. I try to reinstall cocoapods, unity versions etc, but it did not worked for me. Finally I tried to work "pod install" at the xcode output of unity project (actually the unity gives this error but creates pod file. ) I implement as follows;
    1- Open terminal and open project output folder (cd [folder path])
    2- I run the code "pod install", it created the xcworkscape file.
    3- I open the xcworkspace file in xcode and it works without error on device (I used admob 6.10 plugin with unity 2021.10.1 on xcode 12.4, in this implementation I cancel adding manual frameworks)

    Maybe it helps somehow.
     
  31. Nakel

    Nakel

    Joined:
    Sep 28, 2017
    Posts:
    106
    It definitely works!

    The downside: you got to do it for every build.
     
    thaerabozena82 likes this.
  32. tadjou25

    tadjou25

    Joined:
    Oct 17, 2019
    Posts:
    2
    Use” pod update “ instead of “ pod install”
     
  33. AvenousLee117

    AvenousLee117

    Joined:
    Jan 4, 2017
    Posts:
    7
    For me I resolve this issue by switch the target build platform to other than ios/tvos (e.g android) and than switch back to ios and then build and run my ios project.

    Hope this may help you with your issue as well.
     
    sama-van likes this.
  34. AdrianMesa

    AdrianMesa

    Joined:
    Oct 8, 2021
    Posts:
    10
    I couldn't resolve the issue until I found this solution:


    The problem is related with installing pods in Macs computers with M1 Chip
     
    cujino, hfts, MANA3DGames and 2 others like this.
  35. onur_uzun

    onur_uzun

    Joined:
    May 12, 2018
    Posts:
    12
    (Macbook Air M1) "arch -x86_64 pod install". Not working:

    "arch: Can't find pod in PATH"

    Help Please?
     
    Last edited: Nov 1, 2021
    SohailBukhari likes this.
  36. anyBooks

    anyBooks

    Joined:
    Feb 22, 2018
    Posts:
    1
    For guys, who "Can't find pod in path", you have to install pod in the build's folder path with 'sudo gem install cocoapods' first. Try "arch -x86_64 pod install" again, it should be work.
     
    onur_uzun likes this.
  37. onur_uzun

    onur_uzun

    Joined:
    May 12, 2018
    Posts:
    12
    Thank you. I will try.
     
  38. Danief_

    Danief_

    Joined:
    Feb 2, 2019
    Posts:
    20
    Looking deeper in the logs, it seemed to be failing in the shell.

    This fixed it for me: Within "iOS Resolver Settings" uncheck "use shell to execute cocoapod tool".
     
    shoopi, hfts, elaine_unity694 and 5 others like this.
  39. TimKyn

    TimKyn

    Joined:
    Aug 24, 2014
    Posts:
    6
    Thanks! This also worked for me.
     
  40. sohailciit38

    sohailciit38

    Joined:
    Apr 2, 2019
    Posts:
    14
    I have the same issue. Using firebase and Admob mediation SDK. When build xcode project from unity i got this error.
    This means that cocoapods is not able to Update your library files. So you have to manually install these. To do so you have to
    "Open terminal"
    "Go to Xcode project folder" (simple write 'cd " and drag and drop the folder to terminal and press enter this will take you to the folder
    "pod install"
    That's all. It will install all the required pods.
     
    ckocank likes this.
  41. AlbaDM

    AlbaDM

    Joined:
    Dec 15, 2020
    Posts:
    1
    I tried all the above. :( Nothing worked. In the terminal, before telling me 8 pods were installed, it said "
    Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6", maybe that has something to do?
     
  42. elaine_unity694

    elaine_unity694

    Joined:
    Oct 12, 2020
    Posts:
    26
    This worked for me. Thank you !!
     
  43. iMalonrio

    iMalonrio

    Joined:
    May 15, 2019
    Posts:
    5
    add
    export LANG=en_US.UTF-8
    to /etc/profile resolved.
     
    nic01991 likes this.
  44. mekartikshah

    mekartikshah

    Joined:
    Jan 10, 2017
    Posts:
    89
    I have resolved the issue by doing below changes, I have faced the problem in Unity 2021.07 LTS with M1 Mac

    1. Go to GoogleSignIn > Editor > GoogleSignInDependencies - replace line number 15 with [STORE THE REPLACED LINE, WE NEED IT IN NEXT STEPS]
    Code (CSharp):
    1. <iosPod name="GoogleSignIn" version="4.4.0" bitcodeEnabled="false"
    2. Do the below changes from terminal

    Code (CSharp):
    1. # Uninstall the local cocoapods gem
    2. sudo gem uninstall cocoapods
    3.  
    4. # Reinstall cocoapods via Homebrew
    5. brew install cocoapods
    3. Restart the unity and build for iOS - it will build sucessful without any error.

    4. Open xcworkspace to open your project.

    5. If you found any "ARC Semantic Issue : No visible @interface for 'GIDSignIn' declares the selector 'handleURL:'" then go to podfile (you will find this in build folder) and change the verions back to what it is before we changed the line in #1

    6. after changing the line open terminal at your project directory and type "pod install" -> it will update your pod to the new version.

    and try building in xcode - it will work.

    The #2 is from below answer :
    https://stackoverflow.com/a/65334677/2757497
     
    Last edited: Aug 16, 2022
    sama-van likes this.
  45. ckocank

    ckocank

    Joined:
    Sep 29, 2020
    Posts:
    9
    Works for me, unity 2021 and mac m1
     
    sohailciit38 likes this.
  46. joseGuate97

    joseGuate97

    Joined:
    Mar 1, 2018
    Posts:
    57
    This was so straight forward and what ultimately worked for me after struggling for several hours and trying several solutions here...

    The problem started after I imported the Firebase Messaging custom package into my project.
     
  47. ayza95

    ayza95

    Joined:
    Jan 14, 2023
    Posts:
    1
    Hello I came from the future to say that this works!! Thank you so much.
     
  48. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    Unity 2021.3.16f1
    Been a bunch of headache.
    Let me share more below :

    Following whats been said as first step is a good practice :
    or :

    However here are some more advice I usually apply in every project from scratch or already going from Office or clients :
    1. List every plugins the project is depending on such as Facebook, Twitter, ads thing, etc...
    2. Be sure you got the every plugins package locally and keep them up to date outside the Unity project.
    3. Remove every of those plugin from your project.
    4. If you got massive error from class missing and extra depending, then learn using the Scripting Define Symbole such as #if FACEBOOK or #if TWITTER, etc... Your project shouldn't depend of 3rd party plugins. This way you can connect or replace a plugin anytime simple using those Define Symbole (sometimes client may change their mind, etc...).
    5. Once the project is compiling fine without the whole plugin thing, be sure to build again as 'Replace'.
    6. Also make sure the project is compiling fine in xcode > running fine on device. (without plugin it should be a piece of cake).
    7. Then one by one, import every of your plugins package in your Unity project.
    8. Be sure the project compile fine.
    9. Activate the Define Symbole one by one.
    10. Compile again and again to be sure all going fine.

    This may be an headache and a bunch of work but it will help you to keep scripts clean without constant dependency.
    You'll be more ready to remove a plugin anytime, more flexible, fast to react.
    More ready to remove and import the last up to date plugin package.

    Note that when you remove a plugin and have error compile, it's not because you import that plugin it again, it may be imported correctly. Make sure the code of your project depending of the plugin should be sent to "sleep" removing the DefineSymbole from the Build setting while you update a plugin. One thing at the time is the safest way to process.

    Finally some plugin may not be updated properly by third party and that won't be Unity or Xcode fault.
    You can track those thing easier and report to the concerned party the error occured.
     
  49. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    Unity 2021.3.16f1 // OS Ventura 13.2

    Got some more issue on that one :
    Screenshot 2566-01-26 at 17.42.58 (1).png

    Basically adding it to the .profile only is not enough.
    Also there are a bunch of other LANG format to add there and there.

    Found a lot of information in that thread :
    - https://stackoverflow.com/questions...minal-to-be-using-utf-8-encoding-after-latest

    But to be honest I ended up adding the 3 following lines :

    export LANG=en_US.UTF-8
    export LANGUAGE=en_US.UTF-8
    export LC_ALL=en_US.UTF-8

    ... in those 3 files :
    • .bash_profile
    • .profile
    • .zshrc
    Now it builds just fine.
     
    Last edited: Jan 26, 2023
    wicea, andreyk729 and aselecky like this.
  50. Kapteeni-Studios

    Kapteeni-Studios

    Joined:
    Apr 5, 2014
    Posts:
    39
    I'm trying to add Facebook SDK 15.1. to Unity 2019.4.31f. I've tried lots of things and I'm stuck with this.

    Is it even possible to install this to Unity 2019.4?

    Any help?

    ....

    iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project.

    After the failure, "pod repo update" was executed and succeeded. "pod install" was then attempted again, and still failed. This may be due to a broken CocoaPods installation. See: https://guides.cocoapods.org/using/troubleshooting.html for potential solutions.

    pod install output:

    Analyzing dependencies
    [!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit":
    In Podfile:
    FBSDKCoreKit (~> 15.1)

    Specs satisfying the `FBSDKCoreKit (~> 15.1)` dependency were found, but they required a higher minimum deployment target.