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