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 121077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:54:46+00:00 2026-05-11T03:54:46+00:00

I am in the middle of solving a problem which requires me to do

  • 0

I am in the middle of solving a problem which requires me to do the following in my 64-bit Cocoa application:

  1. Spawn a 32-bit Cocoa helper tool (command line tool) from within my application. This helper will open a file (a quicktime movie to be precise) and access information about that file using 32-bit only APIs (Quicktime-C APIs)
  2. The data gathered from the 32-bit process needs to be passed back to the 64-bit application.
  3. The 64-bit app should wait until the 32-bit process completes before continuing

There are many ways to accomplish this in Cocoa, but from what I gather these are two approaches I could take.

Option 1: NSTask with Pipes

  1. Use NSTask to spawn the 32-bit process
  2. Redirect the NSTasks stdoutput to a pipe, and read data from that pipe in the 64-bit process.
  3. Parse the data from the pipe, which will involve converting strings from stdout into data (ints, floats, strings, etc.)

Option 2: NSTask with NSDistributedNotificationCenter

  1. Use NSTask to spawn the 32-bit process
  2. When data is ready in the 32-bit process, send an NSNotification to the Distributed notification center, and inlude a dictionary in the event with all of the pertinent data.
  3. In the 64-bit app subscribe to the same NSNotification

So my question for StackOverflowers’ is, which option is ‘better’?
Which is a better practice?
Which is more efficient?

I’m leaning towards Option 2 because is seems like there will be less code involved. If these two approaches aren’t great, is there a better way to do this?

  • 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. 2026-05-11T03:54:47+00:00Added an answer on May 11, 2026 at 3:54 am

    You say that the subprocess will be an application. Don’t use NSTask for that—it confuses Launch Services. (If you mean it’s a helper tool, such that a curious expert user could run it from the command line, then NSTask is OK.)

    The DNC will work either way, but if the subprocess really is an application, don’t use NSTask+NSPipe—use distributed objects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I port a middle-sized application from C to C++. It doesn't deal anywhere with
I am in the middle of developing a Django application, which has quite complicated
Middle-tier component will execute the data access routines in application. The component will call
I'm in the middle of modifying a test message application and one of the
I have a middle size query with 500.000 registers from an Oracle to an
I'm in the middle of writing a simple hash function which get the input
I am building a CSS site and fail solving this partial problem: On the
We are in the middle of creating an n-tier Silverlight LOB application and are
I'm facing a huge problem here which is driving me crazy, I've made an
I am in the middle of moving a permission system from PHP to MySQL

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.