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

Introducing PingHub (...and friends) #6331

Closed
wants to merge 15 commits into from
Closed

Introducing PingHub (...and friends) #6331

wants to merge 15 commits into from

Conversation

koke
Copy link
Member

@koke koke commented Dec 14, 2016

This is a first basic approach to #6164. I've added the PingHub client and very basic logic:

  • Connect when the app launches/log in/foreground
  • Disconnect when app goes to background/sign out
  • On push, sync the note pushed
  • On delete, delete the note deleted

Things I haven't done yet:

  • Reconnect when connection drops, reachability
  • Coalescing multiple push events into a full sync
  • Smarter sync so we don't always sync when notifications appear as long as PingHub is connected

Also, Carthage. Because Cocoapods won't let me have it my way.

We've chatted about this a few times, and I'd like to propose we start using more frameworks but not more repos, and this is my take on it. I started adding a PingHub target, but I also wanted tests, so that was 2 more targets. Which could be fine for now, but I think it might get noisy if we do a few more components. So I'd rather have a separate project. I think this will also help if we want the framework to support being a Cocoapods/Carthage dependency, but I haven't explored that yet.

Cocoapods won't let me have a framework with an embedded framework, so instead of working around Cococapods one more time I decided to include Starscream as a binary with Carthage (actually Punic, hence the punic.yml).

To test:

  • Launch the app, switch to notifications tab
  • From a browser with another account, like a post, the like notification should appear immediately.
  • From the browser, unlike the post, the like notification should disappear immediately.

Needs review: @jleandroperez (PingHub) @astralbodies (Project setup, Carthage)

koke added 12 commits December 9, 2016 10:04
I think I reached the limits of what you can sanely achieve with Cocoapods.
I split PingHub into a separate project to keep things organized, and Cocoapods
didn't like that much. Apparently you can't have a framework target that embeds
it's dependencies unless you copy them manually, which kind of defeats the
purpose of having Cocoapods to manage them.

So I introduce Carthage/Punic for Starscream on PingHub.

And now, we are one step closer of saying goodbye to Cocoapods.
WordPress wasn't picking the right one, so I removed it and re-added the
framework and it works now ¯\_(ツ)_/¯
@koke koke added this to the 6.9 milestone Dec 14, 2016
@koke
Copy link
Member Author

koke commented Dec 14, 2016

Buddybuild is failing to run the test suite although it works locally. I'll investigate tomorrow

@koke
Copy link
Member Author

koke commented Dec 15, 2016

Closing in favor of #6336

@koke koke closed this Dec 15, 2016
@koke koke deleted the feature/pinghub branch December 15, 2016 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants