Just go to the location where your WebDriverAgent.xcodeproj present and open same in Xcode .
Once it is open update bundle id and developer profile with same bundle id on which the app is build.
To complete above step please follow below steps:
• Go to build settings of the project as shown in below screenshot and add the development team.
• If no options are available in development team to select then follow the below procedure to add the account.
• Click on xcode and navigate to preferences.
• Click on Accounts.
• Click on ‘+’ symbol and add the account same as the account used for the code signing activity.
• Now you can select the added account in Development Team.
• The account selected for the development team should be same as the account selected for code signing activity.
• Now add development team for all the “Targets” also similarly by navigating to build settings.
• Now go to “WebdriverAgent.lib” under Target and update bundleid in General Tab with bundleid used in test app.
• Similarly repeat above step for “WebdriverAgentRunner” and “Integration.app” targets.
• Run the code to check for any errors and build succeeded message should be displayed.
Once all above steps are done then again run the appium script .Now it should download webdriver agent runner app in real device.