Commit 7a035955e79088ff7c37e76ab3fe93073a147a76
1 parent
5111c4db95
Exists in
master
and in
1 other branch
Share LINE
Showing 3 changed files with 25 additions and 9 deletions Side-by-side Diff
LifeLog/LifeLog/Info.plist
... | ... | @@ -16,12 +16,29 @@ |
16 | 16 | <string>APPL</string> |
17 | 17 | <key>CFBundleShortVersionString</key> |
18 | 18 | <string>1.0</string> |
19 | + <key>CFBundleURLTypes</key> | |
20 | + <array> | |
21 | + <dict/> | |
22 | + </array> | |
19 | 23 | <key>CFBundleVersion</key> |
20 | 24 | <string>1</string> |
25 | + <key>LSApplicationQueriesSchemes</key> | |
26 | + <array> | |
27 | + <string>line</string> | |
28 | + </array> | |
21 | 29 | <key>LSRequiresIPhoneOS</key> |
22 | 30 | <true/> |
31 | + <key>NSAppTransportSecurity</key> | |
32 | + <dict> | |
33 | + <key>NSAllowsArbitraryLoads</key> | |
34 | + <true/> | |
35 | + </dict> | |
36 | + <key>NSCameraUsageDescription</key> | |
37 | + <string>to take photos and video</string> | |
23 | 38 | <key>NSMotionUsageDescription</key> |
24 | 39 | <string>$(PRODUCT_NAME) motion use</string> |
40 | + <key>NSPhotoLibraryUsageDescription</key> | |
41 | + <string>to save photos and videos</string> | |
25 | 42 | <key>UILaunchStoryboardName</key> |
26 | 43 | <string>LaunchScreen</string> |
27 | 44 | <key>UIRequiredDeviceCapabilities</key> |
... | ... | @@ -43,15 +60,6 @@ |
43 | 60 | </array> |
44 | 61 | <key>UIViewControllerBasedStatusBarAppearance</key> |
45 | 62 | <false/> |
46 | - <key>NSAppTransportSecurity</key> | |
47 | - <dict> | |
48 | - <key>NSAllowsArbitraryLoads</key> | |
49 | - <true/> | |
50 | - </dict> | |
51 | - <key>NSCameraUsageDescription</key> | |
52 | - <string>to take photos and video</string> | |
53 | - <key>NSPhotoLibraryUsageDescription</key> | |
54 | - <string>to save photos and videos</string> | |
55 | 63 | </dict> |
56 | 64 | </plist> |
LifeLog/LifeLog/Utilities.m
... | ... | @@ -7,6 +7,7 @@ |
7 | 7 | // |
8 | 8 | |
9 | 9 | #import <Social/Social.h> |
10 | +#import <LineKit/Line.h> | |
10 | 11 | |
11 | 12 | #import "Utilities.h" |
12 | 13 | |
... | ... | @@ -103,6 +104,12 @@ |
103 | 104 | } |
104 | 105 | |
105 | 106 | + (void) shareLine : (NSString *) content withViewController:(UIViewController *)vc { |
107 | + if (![Line isLineInstalled]) { | |
108 | + [self showErrorMessage:@"Install Line app first" withViewController:vc]; | |
109 | + } | |
110 | + else { | |
111 | + [Line shareText:content]; | |
112 | + } | |
106 | 113 | } |
107 | 114 | |
108 | 115 | + (void) shareEmail : (NSString *) content withViewController:(UIViewController *)vc { |