久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

從 Mac OS X 控制臺啟動 iOS 應用程序

launching iOS App from Mac OS X console(從 Mac OS X 控制臺啟動 iOS 應用程序)
本文介紹了從 Mac OS X 控制臺啟動 iOS 應用程序的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

為了自動測試應用程序,我想從我的 Mac 上重復啟動一個帶有不同參數的 iOS 應用程序.為簡單起見,我們假設它需要一個文件作為 argc,我有 100 個需要測試的文件.理論上,我只想重現 xcode build & 的行為.運行 - 在設備上運行,而不是越獄;該應用程序與硬件密切相關,因此僅靠模擬器是不夠的.

in order to automate testing an application, I want to repeatedly launch an iOS app with different arguments to it's main function from my mac; for simplicity let's just say it takes a file as argc and I have 100 files that I need to test. In theory, all I'd want to reproduce is the behaviour of xcode build & run - on the device, not jailbroken; the app is closely tied to the hardware, so the simulator alone will not suffice.

有幾個頁面做了類似的事情,但沒有一個使用該設備,也沒有一個真正說明控制臺上命令行的實際外觀.

There are a couple of pages that do something similar, but none of them use the device, and none of them actually spell out how the command line on the console would actually look like.

1) http://blog.carbonfive.com/2011/04/06/running-xcode-4-unit-tests-from-the-command-line/

此頁面設置最終在模擬器中運行的單元測試;他接著說

this page sets up a unit test that eventually runs in the simulator; he goes on to say that

單元測試構建目標的運行腳本"構建階段只是運行 >${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests"

The "Run Script" build phase of a unit test build target just runs >"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests"

我檢查了,但 RunPlatformUnitTests 和 RunUnitTests 都不是從 Xcode 4 執行的(我重命名了腳本以確保).

I checked that, but neither RunPlatformUnitTests nor RunUnitTests is executed from Xcode 4 (I renamed the scripts to make sure).

2) http://longweekendmobile.com/2011/04/17/xcode4-running-application-tests-from-the-command-line-in-ios/

此頁面從 1) 左側開始,但僅針對模擬器構建,并未指定應用程序的實際啟動方式.它很好地描述了它是如何從命令行構建的.

this page picks up where 1) left but only builds for the simulator and doesn't specify how the app is actually launched. It describes well how it's build from command line though.

3) 調試從命令行構建的 iOS 應用

我在 Xcode 4 中看到的是構建階段,它在簽名和驗證應用程序時停止.接下來我看到的是在設備上運行的 gdb 調試器.但是,我不知道如何訪問調試服務器 - 我沒有越獄我的 iPhone,所以我無法訪問它上面的任何東西,既沒有調試服務器也沒有 IP 地址.

What I see in Xcode 4 is the build phase, which stops at signing and validating the application. The next thing I see is the gdb debugger that runs on the device. However, I don't know how to access debugserver - I didn't jailbrake my iPhone so I have no access to just about anything on it, neither debugserver nor the IP adress.

我可以驗證的是,gdb 是從 xcode4/platforms/iPhoneOS.platform 調用的,因此遠程調試器必須以某種方式將自身附加到某些東西...

What I can verify is that gdb is called from xcode4/platforms/iPhoneOS.platform so the remote debugger must attach itself to something, somehow ...

推薦答案

命令行遠程GDB(或者只是上傳到設備)可以用這個小工具,選擇最接近你需要的fork,原作者不會再支持一下:https://github.com/ghughes/fruitstrap

For command line remote GDB (or just upload to device) you can use this little tool, choose the fork closest to what you need, the original author will not support it anymore: https://github.com/ghughes/fruitstrap

您可能無法按原樣使用它(我不得不調整 gdb 參數以供使用),但這是一個好的開始.

You may not be able to use it as-is (I had to tweak the gdb parameters for my use) but its a good start.

您可以通過自動運行此腳本來進一步自動化操作

You can further automate things by automatically run this script

for i in $(system_profiler SPUSBDataType | grep "Serial Number: " | grep -Po "[A-Za-z0-9]{40,}$") ; do
    echo "Installing on: $i"
    #use fruitstrap with device $i
end

這將簡單地檢查所有 USB 端口并僅保留當前連接到 iOS 設備的端口并返回其 UDID.

this will simply check all USB port and keep only the ones that are currently connected to an iOS device and return its UDID.

從那里你應該能夠為你的應用使用幾個不同的參數來自動化測試.

From there you should be able to automate the testing with several different arguments for your app.

這篇關于從 Mac OS X 控制臺啟動 iOS 應用程序的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Using Instruments to test an iOS app without having source code to the application(在沒有應用程序源代碼的情況下使用 Instruments 測試 iOS 應用程序)
KIF: How to auto-run/stress test an iOS app to find the cause of a rare UI bug?(KIF:如何自動運行/壓力測試 iOS 應用程序以找出罕見 UI 錯誤的原因?)
Can#39;t change target membership visibility in Xcode 4.5(無法更改 Xcode 4.5 中的目標成員身份可見性)
UITableView: Handle cell selection in a mixed cell table view static and dynamic cells(UITableView:在混合單元格表視圖靜態和動態單元格中處理單元格選擇)
How to remove Address Bar in Safari in iOS?(如何在 iOS 中刪除 Safari 中的地址欄?)
iOS 5 SDK is gone after upgrade to Xcode 4.5(升級到 Xcode 4.5 后,iOS 5 SDK 消失了)
主站蜘蛛池模板: 国产精品综合 | 欧美日韩精品久久久免费观看 | 久久久久久久久久久久91 | 欧美一级久久 | 国产资源网| 亚洲精品一区二区三区中文字幕 | 一级片av | 欧美成人精品一区二区三区 | 日韩不卡视频在线 | 亚洲福利一区二区 | 黄视频网站在线 | 成人福利网 | 久久久久久久久久久久久久av | 国产精品污www一区二区三区 | 精品毛片在线观看 | 羞羞视频免费在线观看 | 国产毛片毛片 | 五月网婷婷 | 欧美日韩在线播放 | 久久精品国产精品青草 | 国产精品18毛片一区二区 | 日韩免费中文字幕 | 久久久.com | 亚洲视频在线观看一区二区三区 | 可以免费观看的av | 欧美大片一区二区 | 国产成人精品在线播放 | 国产黄色精品 | 亚洲精品免费视频 | 在线视频第一页 | 日韩一区二区三区精品 | 欧美精品一区二区免费视频 | 狠狠爱视频 | 欧美一a一片一级一片 | 99视频免费在线观看 | 欧美视频二区 | 免费看的黄网站 | 国内自拍视频在线观看 | 亚洲福利一区二区 | 亚洲三区视频 | 国产精品一区二区欧美 |