1.缺少development team
$ xcodebuild -project WebDriverAgent.xcodeproj \
> -scheme WebDriverAgentRunner \
> -destination 'platform=iOS,name=iPhone (2)' \
> test
2019-12-17 09:20:29.973 xcodebuild[30451:2032814] DTDeviceKit: deviceType from aa3c395a15b4edcc21c4df8f0182a7ffc307e61f was NULL
2019-12-17 09:20:30.026 xcodebuild[30451:2032862] DTDeviceKit: deviceType from aa3c395a15b4edcc21c4df8f0182a7ffc307e61f was NULL
... //中間內容省略
Testing failed:
Signing for "WebDriverAgentRunner" requires a development team. Select a development team in the Signing & Capabilities editor.
Testing cancelled because the build failed.
** TEST FAILED **
解決:將Automatically manage signing進行勾選后選擇一個Team,注意要進入WebDriverAgentRunner中進行設置


2.bundle indentifler不唯一,提示“The app ID "com.facebook.WebDriverAgentRunner" cannot be registered to your development team. Change your bundle identifier to a unique string to try again.”

解決:請進入WebDriverAgentRunner -> Build Settings設置中,找到Packaging中的選項,將其內容修改為唯一識別的字符串,如下圖所示


3.build的時候有兩個fail報錯
1)Semantic issue: 'assign' property of object type may become a dangling reference; consider using 'unsafe_unretained'
2)Parse Issue: Could not build module 'RoutingHTTPServer'

解決:報錯出雙擊,進入到報錯代碼處,將assign改為strong后再次build


4.提示配置證書信任


解決:打開iphone5s 設置-通用功能-描述文件與設備管理-開發者應用-添加信任,配置證書信任后重試
轉載:https://blog.csdn.net/weixin_43291944/article/details/103562488
