When I run my app for Mac on XCode register .app takes more than 15 minutes

Whenever I hit play on my app to test it on the Mac the register .app part starts taking more than 15 minutes, this is severely impacting my work.

There's no indication on what's wrong and how can I fix this.

Answered by DTS Engineer in 863606022

Is there any other way I can diagnose what lsregister is doing and why it's taking so long?

I can’t think of any way that’ll yield guaranteed results. You could, for example, run sample against it to see what it’s doing at that time. However, it’s likely that you’ll find that it’s always blocked in some sort of XPC to a system daemon or agent. You can repeat the process, or deploy spindump, but the deeper you get the less likely you are to get results that are easy to interpret.

Another option is to dig into the system log to see if anything interesting shows up there. I have lots of hints and tips on that front in Your Friend the System Log.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Can you share more context or some screenshots of what you mean by registering your app? I can interpret this to mean several different things that happen during the build and deployment of an app.

— Ed Ford,  DTS Engineer

It's the register application.app command

It says:

RegisterWithLaunchServices application.app

cd [into project folder]

lsregister -f -R -trusted application.app

(dupe post)

[Ed asked me to step in here because Launch Services is in my wheelhouse.]

It's the register application.app command

Oh, interesting. I’d appreciate you filing a bug about this:

  1. Reproduce the issue.
  2. During the 15 minute delay, trigger a sysdiagnose per the Xcode Sysdiagnose instructions on our Bug Reporting > Profiles and Logs page.
  3. Include that sysdiagnose in your bug report.

Once you’re done, reply here with your bug number.

My guess is that that Xcode isn’t doing anything wrong here. Rather, there’s something weird about the state of your machine and Xcode is just an innocent victim.

If you run the lsregister command manually from Terminal, does it reproduce the issue?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

It’s better to reply as a reply, rather than in the comments; see Quinn’s Top Ten DevForums Tips for this and other titbits.

although Apple is my customer on this project

I’d like to clarify what you mean by that. Please drop me a line via email (my address is in my signature). Make sure to reference this thread, because I get a lot of email |-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Is there any other way I can diagnose what lsregister is doing and why it's taking so long?

I can’t think of any way that’ll yield guaranteed results. You could, for example, run sample against it to see what it’s doing at that time. However, it’s likely that you’ll find that it’s always blocked in some sort of XPC to a system daemon or agent. You can repeat the process, or deploy spindump, but the deeper you get the less likely you are to get results that are easy to interpret.

Another option is to dig into the system log to see if anything interesting shows up there. I have lots of hints and tips on that front in Your Friend the System Log.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

When I run my app for Mac on XCode register .app takes more than 15 minutes
 
 
Q