6

I have Cocoa application with custom XPC service. I would like to create tests for that XPC, so I created new test bundle for that and created some tests. But when I run those tests (whose doesn't show any error in Xcode), IDE is not able to link them to tested XPC bundle. Of course I set Target Dependency to my XPC bundle but it still doesn't work.

I think that problem will be at Test host settings but I'm not good at Xcode configuration. I also studied Apple's tutorial (Daemons and Services Programming Guide) but it doesn't mention testing XPC bundle. Neither their example SandboxedFetch.

  • 2
    Have you made any progress on this front? I'm also interested in a solution to this problem. – aLevelOfIndirection Oct 28 '13 at 10:59
  • Debugging of XPC services in Xcode 5 is in a similar state. Attempts to attach to the XPC process crashes Xcode. I have filed a bug report for the latter issue and recommend for you to do the same for XPC unit testing integration. – ctpenrose Nov 27 '13 at 22:53

1 Answers1

1

On Xcode 7, I managed to test my XPC by adding it in the Copy file build phase of my test target (specifying XPC Services for destination.

Martin Delille
  • 11,360
  • 15
  • 65
  • 132