Can not work on Real iOS Device

Thanks for your reading.

I use a free account, not developer account, and follow the step of

First i run xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=’ test

  1. First time, it show Fail, then I go to Device Settting -> Trust APP
  2. Second time , it show following then stuck
    Test Suite ‘All tests’ started at 2019-03-22 15:47:03.122
    Test Suite ‘WebDriverAgentRunner.xctest’ started at 2019-03-22 15:47:03.122
    Test Suite ‘UITestingUITests’ started at 2019-03-22 15:47:03.122
    Test Case ‘-[UITestingUITests testRunner]’ started.
    t = 0.00s Start Test at 2019-03-22 15:47:03.131
    t = 0.00s Set Up
    2019-03-22 15:47:03.135929+0800 WebDriverAgentRunner-Runner[414:153837] Built at Mar 21 2019 15:29:41
    2019-03-22 15:47:03.151624+0800 WebDriverAgentRunner-Runner[414:153837] ServerURLHere->http://10.0.3.102:8100<-ServerURLHere
    2019-03-22 15:47:03.152008+0800 WebDriverAgentRunner-Runner[414:153856] Using singleton test manager

and I open another terminal to input following:
export DEVICE_URL=‘http://10.0.3.102:8100
export JSON_HEADER=’-H “Content-Type: application/json;charset=UTF-8, accept: application/json”’
curl -X GET $JSON_HEADER $DEVICE_URL/status

then it show following and stuck (I am sure my mac in the same Wifi as device)
curl: (7) Failed to connect to 10.0.3.102 port 8100: Operation timed out.

Appium 1.11.0 (1.11.0)
Device iPhone XR
iOS 12.1.4
macOS 10.14
XCode 10

Sorry for my poor English.

I use appium-doctor, it show all ok.

I didn’t use real devices connected by WiFi. I am using them connected by USB.

But there is one special option in Xcode according to WiFi connection:
Xcode -> Window -> Devices and Simulators, choose your real Phone from list and you’ll see checkbox “Connect via network”. Did you checked it? By the way, for checking it, you need to set passcode on device.