0

i have an ios project where i have written my ios ui testcases.

Now i have created another osx(swift) command line tool and there from main file, i want to run my ios project ui tests.

For this, i use the below command:

xcodebuild test -project /Users/usernamer/Desktop/Xocde/ios-ui-automation-demo-master/ios-ui-automation-demo.xcodeproj -scheme ios-ui-automation-demo -destination 'platform=iOS Simulator,name=iPad Air'

if i run this command from the terminal, than ios project ui test run properly.

But if i run the command from my osx command line tool swift file(In a new OSX project), this shows an error. The code is

import Foundation

func shell(args: String...) -> Int32 {
let task = NSTask()
task.launchPath = "/usr/bin/xcodebuild"
task.arguments = args
task.currentDirectoryPath = "/Users/username/Desktop/Xocde/ios-ui-automation-demo-master/"
task.launch()
task.waitUntilExit()
return task.terminationStatus
}

print("This is test version edit")

shell("xcodebuild test -project /Users/username/Desktop/Xocde/ios-ui-automation-demo-master/ios-ui-automation-demo.xcodeproj -scheme ios-ui-automation-demo -destination 'platform=iOS Simulator,name=iPad Air'")

this code shows the following error:

Build settings from command line:
xcodebuild test -project ios-ui-automation-demo.xcodeproj -scheme ios-ui-automation-demo -destination 'platform = iOS Simulator,name=iPad Air'

=== BUILD TARGET ios-ui-automation-demo OF PROJECT ios-ui-automation-demo WITH THE DEFAULT CONFIGURATION (Release) ===

Check dependencies
Code Sign error: No provisioning profiles found: No non–expired provisioning profiles were found.

** BUILD FAILED **


The following build commands failed:
Check dependencies
(1 failure)
Program ended with exit code: 9

ihave go through this Xcode 7.2 no matching provisioning profiles found

But no way, Please help me what is my error.

i am using swift 2.2 xcode 7.3

Community
  • 1
  • 1

1 Answers1

1

Take a look at your apple developer page at http://developer.apple.com .

  • Go to your "Certificates, Identifiers & Profiles" page
  • On the left side is a navigation
  • Scroll down until you reach "Provisioning Profiles"
  • Click on "Development" or "Distribution" and look if there are any profiles related to your app

If there aren't any, create one.

schmidi000
  • 310
  • 3
  • 14
  • actually i am completely new to mac .... i am not able to find Certificates, Identifiers & Profiles option in the page u have given me. –  Jun 14 '16 at 08:38
  • After navigation to that page, on the upper right you can see a navigation entry called "Account". Click on that an log in. After logging in, you are getting forwarded to the main page. At this page you can see a gear icon with a label "Certificates, Identifiers & Profiles". Clicking on that will forward you to the Certificates page. Now just scroll down and on the left side you can see a point "Provisioning Profiles". Below that click either "Development" or "Distribution". What you choose depends on your purpose. If you're testing, or currently developing, chose "Development". – schmidi000 Jun 14 '16 at 09:58