从官网和之前的帖子上看到需要拿到 udid 才能连接到真机,但现在貌似已经无法拿到 udid 了,不知道大家是怎么做的……
从 Xcode 的 Organizer 中就可以看到啊
那里看到的是 device id。试过了,不行。找不到设备
加头像
现在的报错,还有个 warning,但能读到我的手机名称,是不是说不是 udid 的问题,而是另有问题?
error: Failed to start an Appium session, err was: Error: Unable to install [/Users/xxxxxx/TestApp.app] to device with id [d80ffdd9ac3............978936346ec18569]. Error [Error: Command failed: ]
info: Error: Unable to install [/Users/xxxxxxxx/TestApp.app] to device with id [d80ffdd9ac3............978936346ec18569]. Error [Error: Command failed: ]
at /Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/common.js:130:10
at ChildProcess.exithandler (child_process.js:651:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:753:16)
at Socket. (child_process.js:966:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:465:12)
info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Unable to install [/Users/xxxxxxxx/TestApp.app] to device with id [d80ffdd9ac3............978936346ec18569]. Error [Error: Command failed: ])","origValue":"Unable to install [/Users/xxxxxxx/TestApp.app] to device with id [d80ffdd9ac3............978936346ec18569]. Error [Error: Command failed: ]"},"sessionId":null}
POST /wd/hub/session 500 2749ms - 536b
debug: [IOS_SYSLOG_ROW ] Jun 18 20:21:28 我的 iPhone 名称 mobile_installation_proxy[2751] : LaunchServices: Please include the kCFBundleIdentifierKey in the options dictionary when installing an app.
#2 楼 @nailgogogogo 就是那个 Identifier 啊,我的可以
你应用都没装上去啊
确实是 identifier,运行代码安装应用,然后去测试就是 ok 的。
应用没装上,先确认下手机中是否安装授权文件 mobileprovision(这个 mobileprovision 是要包含你手机的 UUID 的授权文件)
不好意思,回复晚了,的确如 yujie 所说,是开发证书没装的问题。安装上去就 ok 了。
@nailgogogogo ,开发证书是要怎么安装到真机上的呢?