From c97783dfa54de7063e366032472b2499a30a42ff Mon Sep 17 00:00:00 2001 From: Tobias Tiemerding Date: Wed, 15 Oct 2014 16:31:53 +0200 Subject: [PATCH] Added delegate, Update pod --- TTOpenInAppActivity.podspec | 6 +++--- TTOpenInAppActivity/TTOpenInAppActivity.h | 1 + TTOpenInAppActivity/TTOpenInAppActivity.m | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/TTOpenInAppActivity.podspec b/TTOpenInAppActivity.podspec index 0683bf5..fda2ab9 100644 --- a/TTOpenInAppActivity.podspec +++ b/TTOpenInAppActivity.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TTOpenInAppActivity' - s.version = '1.0.1' + s.version = '1.1' s.license = 'MIT' s.summary = 'TTOpenInAppActivity is a UIActivity subclass that provides an "Open In ..." action to a UIActivityViewController.' s.description = <<-DESC @@ -10,11 +10,11 @@ Pod::Spec.new do |s| DESC s.homepage = 'https://github.com/honkmaster/TTOpenInAppActivity' s.authors = { 'Tobias Tiemerding' => 'http://www.tiemerding.com' } - s.source = { :git => 'https://github.com/honkmaster/TTOpenInAppActivity.git', :tag => '1.0' } + s.source = { :git => 'https://github.com/honkmaster/TTOpenInAppActivity.git', :tag => '1.1' } s.source_files = 'TTOpenInAppActivity/*.{h,m}' s.resources = 'TTOpenInAppActivity/*.png' s.resource_bundles = { 'TTOpenInAppActivity' => ['bundles/*.lproj'] } - s.frameworks = 'UIKit', 'MobileCoreServices' + s.frameworks = 'UIKit', 'MobileCoreServices', 'Coregraphics', 'ImageIO', 'Foundation' s.requires_arc = true s.platform = :ios, '6.0' end diff --git a/TTOpenInAppActivity/TTOpenInAppActivity.h b/TTOpenInAppActivity/TTOpenInAppActivity.h index 9c75e6b..92f27f6 100644 --- a/TTOpenInAppActivity/TTOpenInAppActivity.h +++ b/TTOpenInAppActivity/TTOpenInAppActivity.h @@ -16,6 +16,7 @@ @optional - (void)openInAppActivityWillPresentDocumentInteractionController:(TTOpenInAppActivity*)activity; - (void)openInAppActivityDidDismissDocumentInteractionController:(TTOpenInAppActivity*)activity; +- (void)openInAppActivityDidEndSendingToApplication:(TTOpenInAppActivity*)activity; @end @interface TTOpenInAppActivity : UIActivity diff --git a/TTOpenInAppActivity/TTOpenInAppActivity.m b/TTOpenInAppActivity/TTOpenInAppActivity.m index d1afd55..5ba46d1 100644 --- a/TTOpenInAppActivity/TTOpenInAppActivity.m +++ b/TTOpenInAppActivity/TTOpenInAppActivity.m @@ -250,6 +250,11 @@ - (void) documentInteractionControllerDidDismissOpenInMenu: (UIDocumentInteracti - (void) documentInteractionController:(UIDocumentInteractionController *)controller didEndSendingToApplication:(NSString *)application { + // Inform delegate + if([self.delegate respondsToSelector:@selector(openInAppActivityDidEndSendingToApplication:)]) { + [self.delegate openInAppActivityDidDismissDocumentInteractionController:self]; + } + // Inform app that the activity has finished [self activityDidFinish:YES]; }