开发者

Running a terminal command inside an iPhone app

Hey guys. So, I'm trying to have my iPhone app (jailbreaked) run a terminal command, and show the output. For those who don't see what I mean, I want to do the same thing as Cydia does when installing a package (b开发者_运维问答lack screen with the command output)

I'm using xCode 4.

Thanks!


Cydia is not directly running external programs: it is linked against libapt-inst, which indirectly runs dpkg to generate some (but not all) of that output.

In general, you just want to render a black text box with some white text, and then use popen to run your external program, freading any data from the pipe into your app to add to the end of the box.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜