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

  • Home
  • SEARCH
  • 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 148939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:02:52+00:00 2026-05-11T09:02:52+00:00

So I’ve just started digging into Objective-C, Cocoa, and iPhone development. I’ve ran into

  • 0

So I’ve just started digging into Objective-C, Cocoa, and iPhone development. I’ve ran into a little weird thing which I don’t really get tho.

I’m trying to get process information, process name works fine, but things get weird when I try to also get the process ID.

Here’s the piece of code I have, which evidently doesn’t output anything to the console:

NSProcessInfo *processInfo = [NSProcessInfo processInfo]; NSString *processName = [processInfo processName]; int processID = [processInfo processIdentifier]; NSLog(@'Process Name: '%@' Process ID:'%@'', processName, processID); 

After this block of code, all other NSLog calls are also ignored. And the process keeps running stating something about GDB, and I get this in the console:

Loading program into debugger… GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 UTC 2008) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type 'show copying' to see the conditions. There is absolutely no warranty for GDB. Type 'show warranty' for details. This GDB was configured as 'i386-apple-darwin'.Program loaded. sharedlibrary apply-load-rules all Attaching to program: '/Users/jim/Documents/Xcode Projects/CS 193P/Assignment1B (WhatATool)/WhatATool/build/Debug/WhatATool', process 28700. (gdb)

I’m probably a bit of an idiot here, but hey, I’ve never messed with Objective-C before… lol __whistles innocently__

  • 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-11T09:02:53+00:00Added an answer on May 11, 2026 at 9:02 am

    The line

    NSLog(@'Process Name: '%@' Process ID:'%@'', processName, processID); 

    should be

    NSLog(@'Process Name: '%@' Process ID:'%d'', processName, processID); /*                          change here ^                          */ 

    as processID is just a int and no Objective-C object

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

Sidebar

Ask A Question

Stats

  • Questions 71k
  • Answers 71k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer In javascript you can use 'confirm' to prevent a form… May 11, 2026 at 1:21 pm
  • added an answer First question to ask is: Why do I need to… May 11, 2026 at 1:21 pm
  • added an answer A long time ago I had a conversation with Ken… May 11, 2026 at 1:21 pm

Related Questions

No related questions found

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.