No Profile for WebDriverAgentRunner is seen on java scripts , but works fine when AgentRunner is build from xcode

I did setup my machine for Appium 1.6.3 to work on Mac -iOS. Did follow the steps mentioned in the Github appium

When i run WebDriverAgentRunner from xcode it builds and succeeds without any error. Also when i used the command: It works fine, without any error, see the logs for this Below.
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=f0217f5ae1b2d491485727122a1abf2fa96baee5 test

Also i was able to install the IntegrationApp on the actual device and also the webDriverAgent was also installed
Now when i try to run my scripts for automation using eclipse, i get the Error saying - Also see the logs for this below
“Testing failed: No profiles for ‘com.facebook.WebDriverAgentRunnersRS’ were found: Xcode couldn’t find a provisioning profile matching ‘com.facebook.WebDriverAgentRunnersRS’. Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.2’ ** TEST FAILED **”

NOTE: Also i updated to appium 1.6.4 desktop version of the app for iOS Mac and started the server assuming it will work. But no luck

===Logs from the webDriver Agent Runner=====
writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/05/79kfthm94qjd3bngd2l5pv7r0mx69v/C/com.apple.DeveloperTools/All/Xc ode/EmbeddedAppDeltas/b9586745e5d50e5f0ab67fe98cee6082/86f963c77c0b8d2654fc1d0f6 8035e401c5d07a9/ManifestCache.plist
Test Suite ‘All tests’ started at 2017-03-24 11:39:27.539
Test Suite ‘WebDriverAgentRunner.xctest’ started at 2017-03-24 11:39:27.540
Test Suite ‘UITestingUITests’ started at 2017-03-24 11:39:27.541
Test Case ‘-[UITestingUITests testRunner]’ started.
t = 0.00s Start Test at 2017-03-24 11:39:27.542
t = 0.00s Set Up
^C** BUILD INTERRUPTED **

NCA1005547:WebDriverAgent gangaiahl$ export DEVICE_URL=http://10.65.212.72:8100
NCA1005547:WebDriverAgent gangaiahl$ export JSON_HEADER=’-H “Content-Type: application/json;charset=UTF-8, accept: application/json”’
NCA1005547:WebDriverAgent gangaiahl$ curl -X GET $JSON_HEADER $DEVICE_URL/status
curl: (6) Could not resolve host: application
curl: (6) Could not resolve host: accept
curl: (6) Could not resolve host: application
{
“value” : {
“state” : “success”,
“os” : {
“name” : “iOS”,
“version” : “10.2”
},
“ios” : {
“simulatorVersion” : “10.2”
},
“build” : {
“time” : “Mar 24 2017 11:13:50”
}
},
“sessionId” : “6D9969E1-0D7E-4C96-AA20-58FC6CB4C864”,
“status” : 0

----------Logs from the Automation scripts using eclipse------
[Xcode]
Testing failed:
No profiles for ‘com.facebook.WebDriverAgentRunnersRS’ were found: Xcode couldn’t find a provisioning profile matching ‘com.facebook.WebDriverAgentRunnersRS’.
Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.2’
** TEST FAILED **

The following build commands failed:
Check dependencies
(1 failure)

[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’
[XCUITest] Error: xcodebuild failed with code 65
at SubProcess. (…/…/lib/webdriveragent.js:355:25)
at emitTwo (events.js:106:13)
at SubProcess.emit (events.js:191:7)
at ChildProcess. (…/…/lib/teen_process.js:197:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
Error: xcodebuild failed with code 65
at SubProcess. (…/…/lib/webdriveragent.js:355:25)
at emitTwo (events.js:106:13)
at SubProcess.emit (events.js:191:7)
at ChildProcess. (…/…/lib/teen_process.js:197:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down Logger process (pid 2203)
[XCUITest] System log exited with code ‘0’
[debug] [XCUITest] Reset not set, continuing
[debug] [iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: xcodebuild failed with code 65
at SubProcess. (…/…/lib/webdriveragent.js:355:25)
at emitTwo (events.js:106:13)
at SubProcess.emit (events.js:191:7)
at ChildProcess. (…/…/lib/teen_process.js:197:14)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
[HTTP] <-- POST /wd/hub/session 500 6790 ms - 167

@All Finally it worked…Writting down here b’c it might help others as well – MAKE SURE - you have the webdriveragentrunner and all other associated file with it (WebDriverAgentLib , WebDriverAgentUSBClient and Unittest , IntegrationTests and IntegrationApp) all use the correct developer signed . This is Under General->team. When i say developer signed the https://developer.apple.com/account -user should be able to login and get it signed from there and u are using the same signed account