honkmaster / ttopeninappactivity Goto Github PK
View Code? Open in Web Editor NEWUIActivity to display "Open In ..." and open UIDocumentInteractionController
License: MIT License
UIActivity to display "Open In ..." and open UIDocumentInteractionController
License: MIT License
AirDrop will fail when a relative url is sent to UIDocumentInteractionController
. It can be solved with changing line 165 to this:
self.docController = [UIDocumentInteractionController interactionControllerWithURL:[fileURL absoluteURL]];
Please add ImageIO.framework
Hi, Tobias!
I've already integrated TTOpenInAppActivity into my app WriteDown and it is available on the App Store. I'm very happy with it and I think my users would definitely love to have this feature included in the app.
Thank you very much for this awesome work!
Cheers,
hi,
Is there any way to listen cancel button in activitiy ?
Hey,
I am very happy I have detected TTOpenInAppActivity. I have actually expected UIActivityViewController to offer this feature right away - so TTOpenInAppActivity is just what I need. Thanks for open sourcing it.
I will include it within the next Update of Calex.
I'm trying to use a custom UIActivityItemProvider with your AppActivity, but for some reason the AppActivity is completely ignored if a custom provider is set. Basically I'm trying to pass only a file URL to your AppActivity while using a web URL for Facebook, Twitter, etc sharing. Thoughts on what could be wrong?
- (id)initWithPlaceholderString:(NSString*)placeholder
{
self = [super initWithPlaceholderItem:placeholder];
if (self) {
}
return self;
}
- (id)item
{
if ([self.activityType isEqualToString:@"TTOpenInAppActivity"])
return [NSURL fileURLWithPath:@"file_path"];
else
return [NSURL URLWithString:@"file_path"];
return nil;
}
@end
And then I initialize like this:
CustomActivityProvider *customItem = [[CustomActivityProvider alloc] initWithPlaceholderString:@""];
NSArray *activityItems = @[customItem];
TTOpenInAppActivity *openInAppActivity = [[TTOpenInAppActivity alloc] initWithView:self.view andRect:CGRectMake(0, 0, 1, 1)];
UIActivityViewController *activityController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:@[openInAppActivity]];
Add a completion handler to UIActivityViewController (setCompletionWithItemsHandler:).
Open the UIActivityViewController in a UIPopoverController.
_popover = [[UIPopoverController alloc] initWithContentViewController:activityViewController];
// Store reference to superview (UIPopoverController) to allow dismissal
openInAppActivity.superViewController = _popover;
[_popover presentPopoverFromBarButtonItem:barButtonItem permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
Tap on "Open in ..." button.
Tap on "More" button.
Completion handler is incorrectly called. It is then never called again (even when dismissing the popover).
Hi,
Thanks again for this great control. I wanted to let you know about an issue with iOS 8. I'm using the iOS 8 GM build and TTOpenInAppActivity is not getting presented.
The Open In apps menu never displays and there are no errors in the console or in Xcode. Same behavior in my app and with the example app.
Using TTOpenInAppActivity in Name2Brain and Name2Brain Free
Hi, thanks for the great control. I've added it on our app My Wonderful Days from latest version 3.0
Here is the link. Thanks again and have a wonderful day! :)
I don't know if it's included by default now, but I couldn't compile your code until I added the Coreservices framework. ๐ Just not mentioned in your readme.
In line 135
I think it should be "presentingViewController"
if ([self.superViewController presentingViewController]) {}
not "presentedViewController"
if ([self.superViewController presentedViewController]) {
Someone recently added TTOpenInAppActivity
to the CocoaPods package manager repo.
CocoaPods is a tool for managing dependencies for OS X and iOS Xcode projects and provides a central repository for iOS/OS X libraries. This makes adding libraries to a project and updating them extremely easy and it will help users to resolve dependencies of the libraries they use.
However, TTOpenInAppActivity
doesn't have any version tags. Someone added the previous HEAD as version 0.0.1, but a version tag will make dependency resolution much easier.
Semantic version tags (instead of plain commit hashes/revisions) allow for resolution of cross-dependencies.
In case you didnโt know this yet; you can tag the current HEAD as, for instance, version 1.0.0, like so:
$ git tag -a 1.0.0 -m "Tag release 1.0.0"
$ git push --tags
Hello! Just writing to let you know that we've just released two apps (one an update, the other brand new) that use TTOpenInActivity to export sketches as PDF or bitmap files. More about the apps here:
SyncSpace: http://infinitekind.com/syncspace
and here:
SketchTo: http://infinitekind.com/sketchto
Cheers!
Sean
Hey, just wanted to let you know that I'm using TTOpenInAppActivity in an update for my app Trail Maker. The update isn't actually done yet, but it should be up in a couple weeks. Thank you for the work you put into this, it's great to be able to share with other applications!
Looks like it's not up there, would love to switch back to a version number instead of a git ref!
I noticed that if a device doesn't have an app installed to open a document, activityDidFinish isn't called. I ended up adding the line [self activityDidFinish:YES] to the end of the openDocumentInteractionController method, right after showing the alert. I did this because I use the UIActivityViewController's completion handler to clean up the document after sharing it, so as not to accumulate disk space. There doesn't seem to be an issue with doing this, which is why I recommend you include it in an update.
Also, I love the iOS 7 icons! Awesome that this sharing system will be ready for it!
Thanks for making this excellent control available. I'm using TTOpenInAppActivity in version 2.1 of deGeo.
I've implemented in my application a gallery with remote resources, and the one that I can't represent like images, gifs, videos.. I would like to open them with TTOpenInAppActivity. The problem is that I don't have the resources downloaded, I have their URLs. If I add the items to TTOpenInAppActivity in url format and for example the resource is a PDF I can't open it with external apps like Dropbox/Books...
I've tried to download it before and passing NSData to TTOpenInAppActivity, but I still have the same problem. Any suggestion about how can I get it?
Thanks
Reproduce:
In line 82 it should be "Greater than or Equal"
else if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.