XPC test bundle on Xcode 5
Asked Answered
E

1

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.

Ese answered 25/9, 2013 at 13:1 Comment(2)
Have you made any progress on this front? I'm also interested in a solution to this problem.Infix
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.Throne
B
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.

Bawdyhouse answered 8/5, 2016 at 20:56 Comment(1)
Did you figure out how to make the test coverage work under this arrangement?Cynthea

© 2022 - 2024 — McMap. All rights reserved.