Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3788724
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:02:40+00:00 2026-05-19T12:02:40+00:00

When I debug an OSX application from XCode, I can communicate with the application’s

  • 0

When I debug an OSX application from XCode, I can communicate with the application’s console from the XCode debugging console – for example, the application can printf() to stdout and that’s displayed on the XCode debugging console, and my application can call fgets() on stdin to which I can type input in the XCode debug console.

It seems like XCode, when debugging iOS iPhone applications, hooks up stdout (printf() et. al. work fine), but not stdin?

Has anyone made stdin on iOS/iPhone work? This would be just tremendously useful during debugging – even with an iOS Cocoa app. I could get this to work in some more complicated way, like with a socket, but I’d just rather have XCode do this for me.

UPDATE:

Well, this would explain it. The iOS simulator actually opens /dev/null for stdin. It’s possible to find out where stdout is going (typically /dev/ttys00X) and then reopen that with O_RDONLY and assign it to stdin. This works great for the iOS simulator, but it looks like the line discipline for the serial connection to the iphone hardware is wrong – you can keep typing input in the xcode debug console and it never gets sent to the iphone hardware (and your program running on the iPhone hardware will just sit waiting for something to show up on stdin aka /dev/ttys00X).

I wonder if there’s any way to get this working with the iPhone hardware?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T12:02:40+00:00Added an answer on May 19, 2026 at 12:02 pm

    I don’t have a solution to this exact problem and it’s quite possible that there’s no way to do that. I have an alternative suggestion. I used it in one of my projects and it worked quite well.

    I used the AsyncSocket library to implement a micro TCP server, which I could connect to using telnet and communicate with my app. There’s a few advantages to this approach:

    • you don’t have to run under the debugger
    • the app is accessible from any computer
    • it’s possible to access the app on somebody else’s phone (handy when in a team)
    • it’s scriptable (can batch multiple commands)
    • extendable (easy to make an HTTP server out of this to connect with a browser)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.