Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Conversation

@davbeck
Copy link

@davbeck davbeck commented Dec 2, 2012

PocketAPIActivity is a UIActivity subclass that can be used with UIActivityViewController to save NSURLs to Pocket. To use it, simply add [[PocketAPIActivity alloc] init] to the array of activities when you create a UIActivityViewController:

[[UIActivityViewController alloc] initWithActivityItems:@[ [NSURL URLWithString:@"http://google.com"] ] applicationActivities:@[ [[PocketAPIActivity alloc] init] ]];

The activity will add all NSURL activity items to pocket, returning a failure if any of them return an error.

The activity will show up in the view controller only if:

  1. There is at least 1 NSURL in the activity items
  2. The Pocket iOS app is installed or the user has logged in

This behavior means that you can add the activity to all your UIActivityViewControllers and it will only appear when relevant.

It seriously shocks me how many Xcode projects don't include this.
PocketAPIActivity is a UIActivity subclass that can be used with UIActivityViewController to save NSURLs to Pocket.
@stevestreza
Copy link
Contributor

Hey David,

Thanks for the pull request! We'll be reviewing this soon and integrating it into an upcoming release of the SDK. We have some things to do on our side to fully integrate (documentation, sample app, etc) so it might take a couple weeks to be merged in. But we're definitely looking to integrate it, and we'll credit you in the readme when it goes out. Thanks again!

@jdg
Copy link

jdg commented Mar 31, 2013

It's been a few months, still plans to integrate this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants