Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Framework project A build only device cannot be used to run this target

It's a Framework only project (SWIFT) that builds a library (.framework module) to be linked against projects along with unit tests and is ending up with following errors.

** BUILD SUCCEEDED **
xcodebuild: error: Failed to build project HelloWorld with scheme HelloWorld.
    Reason: A build only device cannot be used to run this target.
The command "xcodebuild clean build test -project HelloWorld.xcodeproj -scheme HelloWorld CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO" exited with 70.

My travis yml file is

language: objective-c

branches:
 only:
 - master

xcode_project: HelloWorld.xcodeproj
xcode_scheme: HelloWorld
osx_image: xcode7.2 

script:
- xcodebuild clean build test -project HelloWorld.xcodeproj -scheme HelloWorld CODE_SIGN_IDENTITY=""
  CODE_SIGNING_REQUIRED=NO
like image 309
user2727195 Avatar asked Mar 26 '16 15:03

user2727195


1 Answers

For Xcode 7.2

Try adding -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0'

script: - xcodebuild clean build test -project HelloWorld.xcodeproj -scheme HelloWorld CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0'

like image 199
Cris Uy Avatar answered Nov 15 '22 00:11

Cris Uy