iOS 升級了測試版本 電腦不想升級 真機調試 Flutter 應用

iOS升級了開發者版本。這個時候調試 Flutter 會見到下面這段日誌。

Launching lib/main.dart on 郭大鵬的iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: BBAXGSNKQ3
Running Xcode build...
Xcode build done.                                           29.1s
Installing and launching...                                     




Installing and launching...                                        13.1s
2020-07-07 14:43:14.160 ios-deploy[28235:306916] [ !! ] Unable to locate DeviceSupport directory with suffix 'DeveloperDiskImage.dmg'. This probably means you don't have Xcode installed, you will need to launch the app manually and logging output will not be shown!
Could not run build/ios/iphoneos/Runner.app on d0801019273b8ab47b043e04519da43b76a32c03.
Try launching Xcode and selecting "Product > Run" to fix the problem:
  open ios/Runner.xcworkspace

Error launching application on 郭大鵬的iPhone.

調試沒成功。這個時候不要慌,下載開發者版本的 Xcode 裏面有你需要的。

➜  DeviceSupport pwd
/Users/felix/Downloads/Xcode-beta.app/Contents/Developer/platforms/iPhoneOS.platform/DeviceSupport
➜  DeviceSupport sudo cp -R 14.0  /Applications/Xcode.app/Contents/Developer/platforms/iPhoneOS.platform/DeviceSupport
Password:

大概的意思是 Xcode 軟件的 Contents/Developer/platforms/iPhoneOS.platform/DeviceSupport 這個目錄裏面,有各個 iOS 版本對應的文件,複製過去,就可以了。

Launching lib/main.dart on 郭大鵬的iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: BBAXGSNKQ3
Running Xcode build...
Xcode build done.                                           25.5s
Installing and launching...                                        27.4s
Debug service listening on ws://localhost:1024/ws
Syncing files to device 郭大鵬的iPhone...

然後就成功了。

iOS 升級了測試版本 電腦不想升級 真機調試 Flutter 應用

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章