I am working on an jail broken iphone app that calls a shell command. To read the output I redirect the output of the command to file. That is where my problem lies. When I attempt to do the redirect sh reports that the operation is not permitted.this is the exact output of gdb: sh: ./tmp/tmp.out: Operation not permitted
Also I call my command using the system() function. thank you in advance
views:
43answers:
1
+1
A:
You might instead want to use NSTask which is built for these sorts of things.
cobbal
2010-08-17 21:39:35
to the best of my knowledge nstask is not apart of the cocoa touch library any other ideas?
romejoe
2010-08-17 21:52:01
@romejoe It's there (I checked), not documented though
cobbal
2010-08-17 22:06:29
ok what header or framework file do I have to import in order to access it? also is nstask available in all firmware versions?
romejoe
2010-08-17 23:35:03
@romejoe I would try copying `NSTask.h` from `Foundation.framework` for Mac. You shouldn't have to link against anything extra. I would imagine it's available on all firmwares, but I can only confirm iOS 4.
cobbal
2010-08-17 23:47:22
thank you this works after im done testing ill reply with if nstask works on all firmwares
romejoe
2010-08-18 04:01:23