erikdoe / ocmock

Mock objects for Objective-C
http://ocmock.org
Apache License 2.0
2.16k stars 606 forks source link

Add watchOS #374

Closed morganchen12 closed 4 years ago

morganchen12 commented 5 years ago

WIP watchOS support. Tests can't be run on watchOS yet (unless using SwiftFoundation and swift-corelibs-xctest).

larryonoff commented 5 years ago

any progress on this PR ?

morganchen12 commented 5 years ago

This PR is ready for review, but since tests can't be run on watchOS yet, I haven't marked this PR for review.

larryonoff commented 5 years ago

@morganchen12 Do you mean that it cannot be run on watchOs simulator or on real devices? I assume that on real devices it won't be possible.

morganchen12 commented 5 years ago

Tests can be run on simulator, but not on device.

larryonoff commented 5 years ago

@morganchen12 I think that running tests on real Apple Watches won't come in here future. What do you think about adding watchOS support, but limiting it on simulator only?

morganchen12 commented 5 years ago

Sounds worthwhile; I'll open this PR and we can continue discussion with the maintainers.

erikdoe commented 4 years ago

So, I finally had a chance to look at this. And I have a few questions. ;-)

1) It looks like there's a new file OCMock watchOS-Info.plist in the source root. This made me realise that the situation around the info.plist files is confused. The tvOS target simply uses the file also used by macOS. iOS has its own version in the OCMock iOS folder. Now this PR introduces another file with yet another naming convention. Is there a specific reason not to use OCMock/OCMock-Info.plist for watchOS? The contents of the two files seem identical.

2) The build.rb script uses the iphonesimulator for watchOS. Is this correct?

3) In the build.rb script the output for watchOS is not being signed. Is this an oversight or are there issues with signing for watchOS?

Thanks for the PR and thank you also for updating the pods file and build script.

morganchen12 commented 4 years ago
  1. Removed the extra plist.
  2. afaik watchOS tests still can't be run on-device, so they have to be run in the watchOS simulator.
  3. This was an oversight; it has since been fixed.