問題:Provisioning profile "iOS Team Provisioning Profile: com.jiejing.WebDriverAgentRunner" doesn't match the entitlements file's value for the get-task-allow entitlement.
這個問題我搞了一下午也沒有通過免費的apple Id搞出來,最後我只能求助ios開發人員將我的apple Id添加入公司的ios開發羣組,然後像我第一篇appium:http://www.javashuo.com/article/p-cafvfyrt-nu.html中的第四步,用Xcode打開WebDriverAgent中的WebDriverAgent.xcodeproj, 然後將WebDriverAgent和WebDriverAgentLib和WebDriverAgentRunner的Bundle identifier改爲你公司app的bunleid就可以了,然後將Team改爲你團隊開發者就好了。
最後測試一下:
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=<udid>' test
出現下圖就說明代碼簽名配置成功了:
Test Suite 'All tests' started at 2019-03-16 16:37:33.795 Test Suite 'WebDriverAgentRunner.xctest' started at 2019-03-16 16:37:33.801 Test Suite 'UITestingUITests' started at 2019-03-16 16:37:33.807 Test Case '-[UITestingUITests testRunner]' started. t = 0.04s Start Test at 2019-03-16 16:37:33.899 t = 0.12s Set Up