From 7a035955e79088ff7c37e76ab3fe93073a147a76 Mon Sep 17 00:00:00 2001 From: nvtu Date: Wed, 9 Aug 2017 15:33:32 +0700 Subject: [PATCH] Share LINE --- LifeLog/LifeLog/Info.plist | 26 +++++++++++++++++--------- LifeLog/LifeLog/Utilities.m | 7 +++++++ LifeLog/Podfile | 1 + 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/LifeLog/LifeLog/Info.plist b/LifeLog/LifeLog/Info.plist index 1bd7ec8..f27f8b7 100644 --- a/LifeLog/LifeLog/Info.plist +++ b/LifeLog/LifeLog/Info.plist @@ -16,12 +16,29 @@ APPL CFBundleShortVersionString 1.0 + CFBundleURLTypes + + + CFBundleVersion 1 + LSApplicationQueriesSchemes + + line + LSRequiresIPhoneOS + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSCameraUsageDescription + to take photos and video NSMotionUsageDescription $(PRODUCT_NAME) motion use + NSPhotoLibraryUsageDescription + to save photos and videos UILaunchStoryboardName LaunchScreen UIRequiredDeviceCapabilities @@ -43,14 +60,5 @@ UIViewControllerBasedStatusBarAppearance - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - NSCameraUsageDescription - to take photos and video - NSPhotoLibraryUsageDescription - to save photos and videos diff --git a/LifeLog/LifeLog/Utilities.m b/LifeLog/LifeLog/Utilities.m index fff0348..cbdf89d 100644 --- a/LifeLog/LifeLog/Utilities.m +++ b/LifeLog/LifeLog/Utilities.m @@ -7,6 +7,7 @@ // #import +#import #import "Utilities.h" @@ -103,6 +104,12 @@ } + (void) shareLine : (NSString *) content withViewController:(UIViewController *)vc { + if (![Line isLineInstalled]) { + [self showErrorMessage:@"Install Line app first" withViewController:vc]; + } + else { + [Line shareText:content]; + } } + (void) shareEmail : (NSString *) content withViewController:(UIViewController *)vc { diff --git a/LifeLog/Podfile b/LifeLog/Podfile index 5155032..9ac025e 100644 --- a/LifeLog/Podfile +++ b/LifeLog/Podfile @@ -5,4 +5,5 @@ target 'LifeLog' do pod 'CircleProgressBar' pod 'MBProgressHUD', '~> 1.0.0' pod 'Charts' + pod 'LineKit' end -- 1.8.5.3