Re: stdout or stderr file path on iPhone?
Re: stdout or stderr file path on iPhone?
- Subject: Re: stdout or stderr file path on iPhone?
- From: Manfred Schwind <email@hidden>
- Date: Tue, 30 Aug 2011 21:43:18 +0200
> From OS/X man pages and I'm thinking this probably works as well on iOS
That's what I thought, too. But unfortunately it doesn't work.
> So e.g., stdout would be /dev/stdout. See if that works for you...
Does not work. I tried that:
[@"\n****\nTEST\n****\n\n" writeToFile:@"/dev/stdout" atomically:NO encoding:NSUTF8StringEncoding error:NULL];
I get the output when running the app in the Simulator, but not when running it on the device.
Then I tried this:
NSLog(@"Contents of /dev:\n%@", [[NSFileManager defaultManager] contentsOfDirectoryAtPath:@"/dev" error:NULL]);
In the Simulator I get a long list including stdin, stdout, stderr etc.
But on the device I just get this:
-------------------------------
Contents of /dev:
(
console,
tty,
null,
zero,
klog,
pf,
ttyp0,
ptyp0,
ttyp1,
ptyp1,
ttyp2,
ptyp2,
ttyp3,
ptyp3,
ttyp4,
ptyp4,
ttyp5,
ptyp5,
ttyp6,
ptyp6,
ttyp7,
ptyp7,
ttyp8,
ptyp8,
ttyp9,
ptyp9,
ttypa,
ptypa,
ttypb,
ptypb,
ttypc,
ptypc,
ttypd,
ptypd,
ttype,
ptype,
ttypf,
ptypf,
ptmx,
vn0,
vn1,
bpf0,
bpf1,
bpf2,
bpf3,
random,
urandom,
"cu.iap",
"tty.iap",
"uart.iap",
"cu.gas-gauge",
"tty.gas-gauge",
"uart.gas-gauge",
io8log,
io8logmt,
disk0,
rdisk0,
disk0s1,
rdisk0s1,
"aes_0",
"sha1_0",
"mux.spi-baseband",
"cu.debug",
"tty.debug",
"uart.debug",
"cu.umts",
"tty.umts",
"uart.umts",
"cu.bluetooth",
"tty.bluetooth",
"uart.bluetooth",
btreset,
btwake,
disk0s2,
rdisk0s2,
disk0s2s1,
rdisk0s2s1,
disk1,
rdisk1,
"dlci.spi-baseband.call",
"dlci.spi-baseband.reg",
"dlci.spi-baseband.sms",
"dlci.spi-baseband.low",
"dlci.spi-baseband.pdp_ctl",
"dlci.spi-baseband.chatty",
"dlci.spi-baseband.cl1",
"dlci.spi-baseband.pdp_0",
"dlci.spi-baseband.pdp_1",
"dlci.spi-baseband.pdp_2",
"dlci.spi-baseband.iq",
"dlci.spi-baseband.pdp_3",
"dlci.spi-baseband.extra_0",
ttys000
)
-------------------------------
I tried /dev/console and /dev/tty and some others, but nothing lands in the Xcode console.
Some more ideas?
Regards,
Mani
--
http://mani.de - friendly software
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden