xcodebuild: error: 'APP.xcworkspace' does not exist

14,345

Solution 1

I have solved this now!!

I just had to update the cocoapods repo, se this link: https://github.com/CocoaPods/CocoaPods/issues/5077

Looks like your specs repo was edited at some point, and now git can't update it. I'd recommend deleting and re-creating your Specs repo: pod repo remove master and running pod setup

Solution 2

On React Native I've solved this issue by running command inside /ios folder.

Solution 3

To share a scheme in Xcode:

  1. Choose Product > Scheme > Manage Schemes.

  2. Share your scheme:

    screenshot showing "share" checkbox

  3. Click on the Close button.

Solution 4

In my case i had project with same folder name("Project") ending with 1 , 2 ,3 ,4 (total 5 folders). when i was trying to install cocoapods in "Project 4" Directory it was getting installed in "Project" instead it should be for "Project 4".

I could find Xcworkspace in the folder "Project"

Hence i need to delete other folders with same name and then install pods in "Project" folder

Share:
14,345
Aleksander Aleksic
Author by

Aleksander Aleksic

Updated on June 17, 2022

Comments

  • Aleksander Aleksic
    Aleksander Aleksic almost 2 years

    I am trying to set up CI with gitlab. When I try to build locally, I get this error : xcodebuild: error: 'APP.xcworkspace' does not exist. "APP" not being the real name. I am also using CocoaPods.

    This happens after I run this command in terminal: gitlab-ci-multi-runner exec shell build_project

    I have checked and the file does exist in the same folder I call the command.

    This is my .gitlab-ci.yml file:

    stages:
      - build
    
    build_project:
      stage: build
      script:
        - xcodebuild clean -workspace APP.xcworkspace -scheme APP | xcpretty
        - xcodebuild test -workspace APP.xcworkspace -scheme APP -destination 'platform=iOS Simulator,name=iPhone 7,OS=10.2' | xcpretty -s
      tags:
        - v0.0.1
    

    Xcode version: 8.2.1

    Cocoapods version: 1.2.0

    Gitlab-runner version : 1.11.0

    Alex

  • Aleksander Aleksic
    Aleksander Aleksic about 7 years
    That image was from the tutorial i used, so that didnt sove it as i already have done it