Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for watchOS and tvOS #187

Merged
merged 6 commits into from
Apr 5, 2017

Conversation

victorcotap
Copy link
Contributor

  • Added new targets and schemes
  • Added correct Foundation class mapping for the two new OS
  • Bypasses memory warning logic for watchOS as it is not supported

@@ -30,6 +33,9 @@ internal final class WeakCache<K: Hashable, V: AnyObject>

init()
{
#if os(watchOS)
return
Copy link
Member

@pcantrell pcantrell Mar 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What’s the rationale for this? watchOS also supports NotificationCenter…doesn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

watchOS does support NotificationCenter.
watchOS unfortunately doesn't support MemoryWarningNotification so since it's the only use of NotificationCenter here, I returned early since the #if needs a statement.
I'm open to suggestions on how to make it cleaner

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, just making sure! macOS has the same problem, which is why MemoryWarningNotification is a Siesta-defined type that takes a different type on different platforms. watchOS can use the same solution.

I'm pushing a couple of commits with this and a minor refactoring. Would you mind giving them a test before I merge them?

@pcantrell
Copy link
Member

Thanks for this! One question above, and then I think we can merge it.

@victorcotap
Copy link
Contributor Author

I will rebase on 1.1 and upgrade to swift 3.1 during the week, can't deal with having Xcode mess my dependency management at the moment ;)

@pcantrell
Copy link
Member

No rebase needed, I think! Just the one code question above.

@victorcotap
Copy link
Contributor Author

I replied into your question above ;)

@victorcotap
Copy link
Contributor Author

Ok through the swift 3.1 Xcode 8.3 update, it somehow botched the schemes so I had to re do them.
I've also checked all your changes and it seems to be working fine.
In theory it should be rebased on master, working with Xcode 8.3 and Swift 3.1 but I could use a second pair of eyes on this.

@pcantrell
Copy link
Member

Thanks, @victorcotap! I’ll merge this once it’s passed CI. Alas, looks like we can’t run the tests on tvOS (because Nocilla doesn't support it) or watchOS (because it doesn’t support tests at all?!) — but I'm willing to live with that.

Thanks for seeing this through.

@pcantrell pcantrell merged commit fa9fc23 into bustoutsolutions:master Apr 5, 2017
@xuaninbox
Copy link

Hi, is there any plan for adding watchOS and tvOS deployment_target to podspec?

@pcantrell
Copy link
Member

@xuaninbox Please see the checklist at the top of #28. This is essentially waiting for community members who are actually using Siesta with tvOS to report back on whether it’s working, and to send PRs. Please comment on that issue, let us know what is working and what is not, and if you had to tweak anything, please send a PR!

@MageMasher
Copy link

Hey @pcantrell , I'm going to try putting this in a tvOS app and will report back the status. We are shipping a tvOS MVP (emphasis on M) tomorrow and need to get a polling solution in place so I'll let you know what I find. If you want to talk in person at some point we could do that (i'm at corner coffee as I type this haha) since I live close by BustOut.

@pcantrell
Copy link
Member

I'd love to hear about your project! I'm rarely actually in the Bust Out offices (mostly remote), but drop me a note and we can set up a meeting at Corner Coffee. My first name @ bustoutsolutions.com.

@MageMasher
Copy link

Hey @pcantrell , our MVP was a success! Here were the changes I had to make to siesta Dept24c@10d437c

I then referenced this git fork in my podspec and everything worked smoothly. The big thing was removing the call to UIApplication.shared.isNetworkActivityIndicatorVisible . I'm quite ignorant of what the right thing to do here was, however this worked to make our deliverable.

@mpaclark
Copy link

@xuaninbox Please see the checklist at the top of #28. This is essentially waiting for community members who are actually using Siesta with tvOS to report back on whether it’s working, and to send PRs. Please comment on that issue, let us know what is working and what is not, and if you had to tweak anything, please send a PR!

@pcantrell is WatchOS a platform already accepted as working correctly? I see there is a tvOS issue that you referenced but didn't see a similar one for WatchOS.
I've tried to use the framework with my project which will have a WatchOS extension, but I'm using cocoapods and the spec is missing a line such as:
s.watchos.deployment_target = "5.1"

Just curious if this was an oversight or if WatchOS support is in a similar place as tvOS.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants