Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

How to get Unity to build an Xcode Workspace or xcworkspace file?

Discussion in 'Editor & General Support' started by SpiderJones, Dec 21, 2019.

  1. SpiderJones

    SpiderJones

    Joined:
    Mar 29, 2014
    Posts:
    224
    My Unity project is not building an xcworkspace file. Any tips? Thanks.
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,798
    SpiderJones likes this.
  3. SpiderJones

    SpiderJones

    Joined:
    Mar 29, 2014
    Posts:
    224
    @TreyK-47 Thanks! Assets -> Play Services Resolver -> iOS Resolver -> Settings and then setting Cocoapods to Generate an xcworkspace worked!
     
    dkurokawa likes this.
  4. WhosTheBoss

    WhosTheBoss

    Joined:
    Jan 8, 2013
    Posts:
    64
    It doesn't work for me.

    I have Unity 2019.2.1f1 and I have XCode 11.3.

    In Unity, I goto: Assets --> Play Services Resolver --> iOS Resolver --> Settings.
    I select from the drop-down list: Xcode Workspace - Add Cocoapods to the Xcode workspace.
    Build my game
    Yet, no XCodeWorkspace is generated. Only xcodeproject is generated
     
  5. btzlatin

    btzlatin

    Joined:
    Dec 9, 2018
    Posts:
    1
    Did you ever find a solution for this? I have the same issue
     
    Tony_Max likes this.
  6. WhosTheBoss

    WhosTheBoss

    Joined:
    Jan 8, 2013
    Posts:
    64
    Nothing yet!
     
  7. stanislavdol

    stanislavdol

    Joined:
    Aug 3, 2013
    Posts:
    282
    Hi, any update on this?
     
  8. Menion-Leah

    Menion-Leah

    Joined:
    Nov 5, 2014
    Posts:
    189

    Same issue here (Unity 2018.4.22f1, FB SDK 7.19.2, Windows 10)
     
  9. faizanmohd

    faizanmohd

    Joined:
    Jun 3, 2017
    Posts:
    2
    Just reinstall cocoapods
    sudo gem uninstall cocoapods
    and then,
    sudo gem install cocoapods
    This worked for me finally after wasting hours in Unity 2019.2.21f and Xcode 11.5, problem occurred after updating mac OS version.
    Hope this helps!!
     
    dave_oak and andreyul like this.
  10. SortOth

    SortOth

    Joined:
    Jul 3, 2017
    Posts:
    3
    No, this also does not generate .xcworkspace. Tested on Unity 2020.1.7f1.
    If I will ever find a solution, I will write it here since this thread is in the top of the Google search for this issue.
     
  11. andrew_pearce

    andrew_pearce

    Joined:
    Aug 5, 2019
    Posts:
    9
    I had the same issues and here is how I fixed it. I tried to install cocoapods manually in the system. Run the following command in terminal under su "gem install cocoapods". Then I moved to the project and run "pod install --repo-update" as it was suggested here ('GoogleMobileAds/GoogleMobileAds.h' file not found) Even though I can see that almost 1Gb of data was downloaded and installed, I was not able to see .xcworkspace file.

    So I manually edit Podfile within built project and comment the following line "#install! 'cocoapods', :integrate_targets => false". Finally I repeat "pod install" command and saw "[!] Please close any current Xcode sessions and use `Unity-iPhone.xcworkspace` for this project from now on." It's VERY IMPORTANT to make sure that xcode is closed otherwise when you will open .xcworkspace, you will see error. In this case close xcode and start it again via .xcworkspace. This time you will see both Unity-iPhone and Pod on left panel. I hope it will help someone.

    BTW I tried to build project under Windows and Mac, the issue was the same in both cases. Under iOS resolve settings, it was properly selected to integrate cocoapods to xcode workplace. I personally found building under Windows faster, sharing that folder with Mac and then compiling with Mac.
     
    masterton, Eltayeb and Playbosh-Games like this.
  12. Playbosh-Games

    Playbosh-Games

    Joined:
    Apr 16, 2019
    Posts:
    2
    Thank you very much andrew_pearce you save my day
     
  13. isac_cab

    isac_cab

    Joined:
    Dec 16, 2019
    Posts:
    1


    Hi man! where can I find the Podfile in the built project?? thanks in advance!
     
  14. cdr9042

    cdr9042

    Joined:
    Apr 22, 2018
    Posts:
    165
    This worked for me. After doing this, when I build, I select Replace instead of Append and the xcworkspace was generated
     
  15. FlurinJenal

    FlurinJenal

    Joined:
    Nov 18, 2018
    Posts:
    14
    Not working for me. Where is the "Play Services Resolver"? Can't see it in Unity.
     
  16. cdr9042

    cdr9042

    Joined:
    Apr 22, 2018
    Posts:
    165
  17. iGAMONIC

    iGAMONIC

    Joined:
    Oct 27, 2017
    Posts:
    16
  18. mirzoabdurauf

    mirzoabdurauf

    Joined:
    Jan 5, 2019
    Posts:
    2
    check is pod installed correctly. i tried find pod logs and write pod command in console and i found pod command is not working. i reinstalled cocoapods many times while pod command has not worked on console. after that i write pod install command on builded folder. if unity generated Podfile, pod install command generates .xcworkspace file
    (I'm sorry if it's not clear, I don't know English well)
     
  19. wana7262

    wana7262

    Joined:
    Jul 2, 2012
    Posts:
    101
    in my case, I tried to Build and Run and that gave me an extended error, I figured out that my Unity Mediation Adapter requires a higher build target version, it was set to 9.0 changing it to 11.0 solved my issue.
     
  20. Poullo_Games

    Poullo_Games

    Joined:
    May 30, 2023
    Posts:
    1
    Solved by install CocoaPods with this cmd in the project folder after build with Unity
    sudo gem install cocoapods

    And installing pod with
    pod install

    I now have my Unity-iPhone.xcworkspace file to run my project on Xcode