OHHTTPStubs icon indicating copy to clipboard operation
OHHTTPStubs copied to clipboard

Add support to WatchOS

Open linksmt opened this issue 7 years ago • 8 comments

Checklist

  • [ ] I've checked that all new and existing tests pass
  • [ ] I've updated the documentation if necessary
  • [ ] I've added an entry in the CHANGELOG to credit myself

Description

Motivation and Context

linksmt avatar Aug 02 '18 06:08 linksmt

I'm a bit concerned if those changes are enough, as there is on several places code like #if defined(__IPHONE_7_0), that should be extended with __WATCHOS_2_0

tfonfara avatar Aug 16 '18 07:08 tfonfara

good point.

AliSoftware avatar Aug 17 '18 14:08 AliSoftware

Ping @linksmt about the #if defined(__IPHONE_7_0) remark above 😉

AliSoftware avatar Aug 28 '18 09:08 AliSoftware

I tried to come up with a solution by myself, but things are petty weird. I've added all necessary precompiler defines, but OHHTTPStubsProtocol isn't working properly. canInitWithRequest is being called and also returns true, but neither initWithRequest nor startLoading gets called. I also tried with a simple approach in a fresh project to implement NSURLProtocol but found same behaviour.

tfonfara avatar Dec 05 '18 09:12 tfonfara

Can you accept merge? Thanks

linksmt avatar Mar 30 '19 13:03 linksmt

@linksmt thank you for submitting this!

Everything looks great for the added target, but I think we should probably have some tests to go along with it so we can make sure we don't break it. 😄

Would you be comfortable adding some tests to the watchOS target?

I think it would also be helpful if you update the CHANGELOG.md to give yourself credit and update the original description of this PR.

jeffctown avatar Apr 03 '19 01:04 jeffctown

Would you be comfortable adding some tests to the watchOS target?

Unless I’m missing something, Xcode doesn’t support watchOS test targets yet.

1ec5 avatar Dec 18 '19 17:12 1ec5

Hi! @AliSoftware @linksmt, what is the status of this PR? I mean, OHHTTPStubs is still not supporting watchOS, doesn't it?

Juanpe avatar Aug 06 '21 13:08 Juanpe