Failing Xcode Build

ios
swift
xcode

#1

Hello,

We are having trouble finding out why Circle is failing.

  • Build and unit tests are passing locally
  • Project contains Swift 3 and Objective C code
  • We use cocoapods, and we have script in pod file to update swift version setting
  • Schemes are all checked in and they are marked as “shared”

Here is my circle.yml file

machine:
  xcode:
    version: "8.1"
  environment:
    LANG: en_US.UTF-8
    XCODE_WORKSPACE: "Couchsurfing/Couchsurfing.xcworkspace"
    XCODE_PROJECT: "Couchsurfing/Couchsurfing.xcodeproj"
    XCODE_SCHEME: "LogicTests"
    LC_CTYPE: en_US.UTF-8

Error

2016-11-10 14:31:15.616 xcodebuild[1937:9754] Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected character / at line 1" UserInfo={NSDebugDescription=Unexpected character / at line 1, kCFPropertyListOldStyleParsingError=Error Domain=NSCocoaErrorDomain Code=3840 "Expected terminating ')' for array at line 6972" UserInfo={NSDebugDescription=Expected terminating ')' for array at line 6972}}
--- xcodebuild: WARNING: Unable to open project file '/Users/distiller/mobile-surfing-ios/Couchsurfing/Couchsurfing.xcodeproj' in workspace 'Couchsurfing/Couchsurfing.xcworkspace'.
xcodebuild: error: The workspace named "Couchsurfing" does not contain a scheme named "LogicTests". The "-list" option can be used to find the names of the schemes in the workspace.

export LC_CTYPE="en_US.UTF-8"
set -o pipefail && xcodebuild -workspace 'Couchsurfing/Couchsurfing.xcworkspace' -scheme 'LogicTests' clean build test -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=latest' CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= PROVISIONING_PROFILE= | tee $CIRCLE_ARTIFACTS/xcode_raw.log | xcpretty --color --report junit --output $CIRCLE_TEST_REPORTS/xcode/results.xml
 returned exit code 65

#2

This is happening for us, too.
Swift 3 and ObjC code in project, dependencies by Cocoapods.
When running the exact build-command in the commandline locally, everything works perfectly fine. The scheme is shared and checked in, I even tried unsharing and sharing it again in two commits, to no help.

Our circle.yml:

machine:
  environment:
    # CocoaPods versions greater than 0.34 require
    # your terminal to be using UTF-8 encoding.
    LANG: en_US.UTF-8
  xcode:
    version: "8.1"

dependencies:
  override:
    - gem install bundler
    - bundle install
    - pod install

test:
  override:
    - xcodebuild
      -workspace ResmioApp.xcworkspace
      -scheme "ResmioApp"
      -destination 'platform=iOS Simulator,name=iPad Air,OS=latest'
      clean build test

The error:

2016-11-16 00:59:37.290 xcodebuild[934:19403] Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected character / at line 1" UserInfo={NSDebugDescription=Unexpected character / at line 1, kCFPropertyListOldStyleParsingError=Error Domain=NSCocoaErrorDomain Code=3840 "Expected terminating ')' for array at line 3403" UserInfo={NSDebugDescription=Expected terminating ')' for array at line 3403}}
--- xcodebuild: WARNING: Unable to open project file '/Users/distiller/resmio-tables/ResmioApp.xcodeproj' in workspace 'ResmioApp.xcworkspace'.
xcodebuild: error: The workspace named "ResmioApp" does not contain a scheme named "ResmioApp". The "-list" option can be used to find the names of the schemes in the workspace.

xcodebuild -workspace ResmioApp.xcworkspace -scheme "ResmioApp" -destination 'platform=iOS Simulator,name=iPad Air,OS=latest' clean build test returned exit code 65

I’ve already let off a small rant in this thread and will repeat the TL;DR of it here:

###To the management of CircleCI:
####Please hire more developers.
Your developers are being put under a lot of pressure and seemingly have a big workload, else, these issues would be resolved quicker, as they’re affecting paying customers (such as us). Your devs are good, you just need more of them.


#3