├── app_screenshot.png
├── LineSDKStarterObjC
├── Default-568h@2x.png
├── LineSDKStarterObjC
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ ├── AppIcon.appiconset
│ │ │ ├── icon.png
│ │ │ ├── Icon-76.png
│ │ │ ├── Icon-60@2x.png
│ │ │ ├── Icon-60@3x.png
│ │ │ ├── Icon-76@2x.png
│ │ │ ├── Icon-Small.png
│ │ │ ├── Icon-83.5@2x.png
│ │ │ ├── Icon-Small-40.png
│ │ │ ├── Icon-Small@2x.png
│ │ │ ├── Icon-Small@3x.png
│ │ │ ├── Icon-Notification.png
│ │ │ ├── Icon-Small-40@2x.png
│ │ │ ├── Icon-Small-40@3x.png
│ │ │ ├── Icon-Notification@2x.png
│ │ │ ├── Icon-Notification@3x.png
│ │ │ └── Contents.json
│ │ ├── btn_login_base.imageset
│ │ │ ├── btn_login_base.png
│ │ │ ├── btn_login_base-1.png
│ │ │ ├── btn_login_base-2.png
│ │ │ └── Contents.json
│ │ └── btn_login_press.imageset
│ │ │ ├── btn_login_press.png
│ │ │ ├── btn_login_press-1.png
│ │ │ ├── btn_login_press-2.png
│ │ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── DisplayInfoType.h
│ ├── ProfileViewController.h
│ ├── UserInfoViewController.h
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── AppDelegate.m
│ ├── ViewController.m
│ ├── ProfileViewController.m
│ └── UserInfoViewController.m
├── LineSDKStarterObjC.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── LineSDKStarterObjC.xcscheme
│ └── project.pbxproj
├── LineSDKStarterObjC.xcworkspace
│ └── contents.xcworkspacedata
└── Podfile
├── .travis.yml
├── LICENSE.txt
├── .gitignore
└── README.md
/app_screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/app_screenshot.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/Default-568h@2x.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/icon.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-76.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Small.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Notification.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Notification@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Notification@2x.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Notification@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Icon-Notification@3x.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/btn_login_base.imageset/btn_login_base.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/btn_login_base.imageset/btn_login_base.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/btn_login_base.imageset/btn_login_base-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/btn_login_base.imageset/btn_login_base-1.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/btn_login_base.imageset/btn_login_base-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/btn_login_base.imageset/btn_login_base-2.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/btn_login_press.imageset/btn_login_press.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/btn_login_press.imageset/btn_login_press.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/btn_login_press.imageset/btn_login_press-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/btn_login_press.imageset/btn_login_press-1.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/btn_login_press.imageset/btn_login_press-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/line/line-sdk-starter-ios-v2/HEAD/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/btn_login_press.imageset/btn_login_press-2.png
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // LineSDKStarterObjC
4 | //
5 | // Created by Serrano Mark on 12/8/16.
6 | // Copyright © 2016 LINE. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment the next line to define a global platform for your project
2 | platform :ios, '10.0'
3 |
4 | target 'LineSDKStarterObjC' do
5 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
6 | # use_frameworks!
7 |
8 | # Pods for LineSDKStarterObjC
9 | pod 'LineSDK', '~> 5.0'
10 | end
11 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // LineSDKStarterObjC
4 | //
5 | // Created by Serrano Mark on 12/8/16.
6 | // Copyright © 2016 LINE. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: objective-c
2 | env:
3 | - PROJECTNAME=LineSDKStarterObjC
4 | rvm:
5 | - 2.2.5
6 | before_install:
7 | - sudo gem install cocoapods -v '1.2.0'
8 | - cd LineSDKStarterObjC
9 | - pod update
10 | - cd ..
11 | osx_image: xcode10
12 | script: "xcodebuild -workspace $PROJECTNAME/$PROJECTNAME.xcworkspace -scheme $PROJECTNAME -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO"
13 | podfile: $PROJECTNAME/Podfile
14 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // LineSDKStarterObjC
4 | //
5 | // Created by Serrano Mark on 12/8/16.
6 | // Copyright © 2016 LINE. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/DisplayInfoType.h:
--------------------------------------------------------------------------------
1 | //
2 | // DisplayInfoType.h
3 | // LineSDKStarterObjC
4 | //
5 | // Created by Serrano Mark on 2018/10/26.
6 | // Copyright © 2018 LINE. All rights reserved.
7 | //
8 |
9 | #ifndef DisplayInfoType_h
10 | #define DisplayInfoType_h
11 |
12 | typedef enum DisplayInfoTypes
13 | {
14 | DisplayInfoTypeProfile,
15 | DisplayInfoTypeOpenID,
16 | } DisplayInfoType;
17 |
18 | #endif /* DisplayInfoType_h */
19 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/ProfileViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ProfileViewController.h
3 | // LineSDKStarterObjC
4 | //
5 | // Created by Serrano Mark on 2016/12/12.
6 | // Copyright © 2016 LINE. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DisplayInfoType.h"
11 |
12 |
13 | @class LineSDKProfile;
14 |
15 |
16 | @interface ProfileViewController : UIViewController
17 | @property (weak, nonatomic) IBOutlet UILabel *viewTitle;
18 | @property (weak, nonatomic) IBOutlet UIStackView *infoView;
19 | @property (strong, nonatomic) NSDictionary * displayInfo;
20 | @property (strong, nonatomic) LineSDKProfile * userProfile;
21 |
22 | typedef enum InfoLabelStyles
23 | {
24 | InfoLabelStyleText,
25 | InfoLabelStyleTitle,
26 | } InfoLabelStyle;
27 |
28 |
29 | - (void)setupLabelsForType: (DisplayInfoType)type;
30 | - (void)createLabelWithText:(NSString *)text andStyle:(InfoLabelStyle)style;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017-2018 LINE Corporation
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/UserInfoViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // UserInfoViewController.h
3 | // LineSDKStarterObjC
4 | //
5 | // Created by Serrano Mark on 12/8/16.
6 | // Copyright © 2016 LINE. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "DisplayInfoType.h"
11 |
12 | @interface UserInfoViewController : UIViewController
13 |
14 | @property (copy, nonatomic) NSDictionary * profileData;
15 | @property (copy, nonatomic) NSDictionary * openIDData;
16 |
17 | @property (weak, nonatomic) IBOutlet UIImageView *profileImageView;
18 |
19 | @property (weak, nonatomic) IBOutlet UILabel *userIdLabel;
20 | @property (weak, nonatomic) IBOutlet UILabel *statusMessageLabel;
21 | @property (weak, nonatomic) IBOutlet UILabel *accessTokenLabel;
22 | @property (weak, nonatomic) IBOutlet UILabel *displayNameLabel;
23 | @property (weak, nonatomic) IBOutlet UIButton *profileButton;
24 | @property (weak, nonatomic) IBOutlet UIButton *openIDButton;
25 | @property (weak, nonatomic) IBOutlet UIButton *checkFriendshipButton;
26 |
27 | - (void) displayAlertDialogWithTitle:(NSString *)title AndMessage:(NSString *)message Dismiss:(BOOL)dismiss;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/btn_login_base.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "resizing" : {
5 | "mode" : "3-part-horizontal",
6 | "center" : {
7 | "mode" : "tile",
8 | "width" : 1
9 | },
10 | "cap-insets" : {
11 | "right" : 8,
12 | "left" : 44
13 | }
14 | },
15 | "idiom" : "universal",
16 | "filename" : "btn_login_base.png",
17 | "scale" : "1x"
18 | },
19 | {
20 | "resizing" : {
21 | "mode" : "3-part-horizontal",
22 | "center" : {
23 | "mode" : "tile",
24 | "width" : 1
25 | },
26 | "cap-insets" : {
27 | "right" : 16,
28 | "left" : 88
29 | }
30 | },
31 | "idiom" : "universal",
32 | "filename" : "btn_login_base-1.png",
33 | "scale" : "2x"
34 | },
35 | {
36 | "resizing" : {
37 | "mode" : "3-part-horizontal",
38 | "center" : {
39 | "mode" : "tile",
40 | "width" : 1
41 | },
42 | "cap-insets" : {
43 | "right" : 24,
44 | "left" : 135
45 | }
46 | },
47 | "idiom" : "universal",
48 | "filename" : "btn_login_base-2.png",
49 | "scale" : "3x"
50 | }
51 | ],
52 | "info" : {
53 | "version" : 1,
54 | "author" : "xcode"
55 | }
56 | }
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/btn_login_press.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "resizing" : {
5 | "mode" : "3-part-horizontal",
6 | "center" : {
7 | "mode" : "tile",
8 | "width" : 1
9 | },
10 | "cap-insets" : {
11 | "right" : 8,
12 | "left" : 44
13 | }
14 | },
15 | "idiom" : "universal",
16 | "filename" : "btn_login_press.png",
17 | "scale" : "1x"
18 | },
19 | {
20 | "resizing" : {
21 | "mode" : "3-part-horizontal",
22 | "center" : {
23 | "mode" : "tile",
24 | "width" : 1
25 | },
26 | "cap-insets" : {
27 | "right" : 16,
28 | "left" : 88
29 | }
30 | },
31 | "idiom" : "universal",
32 | "filename" : "btn_login_press-1.png",
33 | "scale" : "2x"
34 | },
35 | {
36 | "resizing" : {
37 | "mode" : "3-part-horizontal",
38 | "center" : {
39 | "mode" : "tile",
40 | "width" : 1
41 | },
42 | "cap-insets" : {
43 | "right" : 24,
44 | "left" : 135
45 | }
46 | },
47 | "idiom" : "universal",
48 | "filename" : "btn_login_press-2.png",
49 | "scale" : "3x"
50 | }
51 | ],
52 | "info" : {
53 | "version" : 1,
54 | "author" : "xcode"
55 | }
56 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xccheckout
23 | *.xcscmblueprint
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 | *.ipa
28 | *.dSYM.zip
29 | *.dSYM
30 |
31 | # CocoaPods
32 | #
33 | # We recommend against adding the Pods directory to your .gitignore. However
34 | # you should judge for yourself, the pros and cons are mentioned at:
35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
36 | #
37 | # Pods/
38 |
39 | # Carthage
40 | #
41 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
42 | # Carthage/Checkouts
43 |
44 | Carthage/Build
45 |
46 | # fastlane
47 | #
48 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
49 | # screenshots whenever they are needed.
50 | # For more information about the recommended setup visit:
51 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
52 |
53 | fastlane/report.xml
54 | fastlane/Preview.html
55 | fastlane/screenshots
56 | fastlane/test_output
57 |
58 | # Code Injection
59 | #
60 | # After new code Injection tools there's a generated folder /iOSInjectionProject
61 | # https://github.com/johnno1962/injectionforxcode
62 |
63 | iOSInjectionProject/
64 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleURLTypes
20 |
21 |
22 | CFBundleTypeRole
23 | Editor
24 | CFBundleURLSchemes
25 |
26 | line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER)
27 |
28 |
29 |
30 | CFBundleVersion
31 | 1
32 | LSApplicationQueriesSchemes
33 |
34 | lineauth2
35 |
36 | LSRequiresIPhoneOS
37 |
38 | LineSDKConfig
39 |
40 | ChannelID
41 | 1620019587
42 |
43 | UILaunchStoryboardName
44 | LaunchScreen
45 | UIMainStoryboardFile
46 | Main
47 | UIRequiredDeviceCapabilities
48 |
49 | armv7
50 |
51 | UISupportedInterfaceOrientations
52 |
53 | UIInterfaceOrientationPortrait
54 | UIInterfaceOrientationLandscapeLeft
55 | UIInterfaceOrientationLandscapeRight
56 |
57 | UISupportedInterfaceOrientations~ipad
58 |
59 | UIInterfaceOrientationPortrait
60 | UIInterfaceOrientationPortraitUpsideDown
61 | UIInterfaceOrientationLandscapeLeft
62 | UIInterfaceOrientationLandscapeRight
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // LineSDKStarterObjC
4 | //
5 | // Created by Serrano Mark on 12/8/16.
6 | // Copyright © 2016 LINE. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import
11 |
12 | @interface AppDelegate ()
13 |
14 | @end
15 |
16 | @implementation AppDelegate
17 |
18 |
19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
20 | {
21 | // Override point for customization after application launch.
22 | return YES;
23 | }
24 |
25 |
26 | - (void)applicationWillResignActive:(UIApplication *)application
27 | {
28 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
29 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
30 | }
31 |
32 |
33 | - (void)applicationDidEnterBackground:(UIApplication *)application
34 | {
35 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
36 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
37 | }
38 |
39 |
40 | - (void)applicationWillEnterForeground:(UIApplication *)application
41 | {
42 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
43 | }
44 |
45 |
46 | - (void)applicationDidBecomeActive:(UIApplication *)application
47 | {
48 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
49 | }
50 |
51 |
52 | - (void)applicationWillTerminate:(UIApplication *)application
53 | {
54 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
55 | }
56 |
57 |
58 | - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options
59 | {
60 | return [[LineSDKLogin sharedInstance] handleOpenURL:url];
61 | }
62 |
63 | - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray> * _Nullable))restorationHandler
64 | {
65 | if ([[LineSDKLogin sharedInstance] handleOpenURL:userActivity.webpageURL]) {
66 | return YES;
67 | }
68 | return NO;
69 | }
70 |
71 | @end
72 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-Notification@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-Notification@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-Small@2x.png",
19 | "scale" : "2x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-Small@3x.png",
25 | "scale" : "3x"
26 | },
27 | {
28 | "size" : "40x40",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-Small-40@2x.png",
31 | "scale" : "2x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-Small-40@3x.png",
37 | "scale" : "3x"
38 | },
39 | {
40 | "size" : "60x60",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-60@2x.png",
43 | "scale" : "2x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-60@3x.png",
49 | "scale" : "3x"
50 | },
51 | {
52 | "size" : "20x20",
53 | "idiom" : "ipad",
54 | "filename" : "Icon-Notification.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-Notification@2x.png",
61 | "scale" : "2x"
62 | },
63 | {
64 | "size" : "29x29",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-Small.png",
67 | "scale" : "1x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-Small@2x.png",
73 | "scale" : "2x"
74 | },
75 | {
76 | "size" : "40x40",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-Small-40.png",
79 | "scale" : "1x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-Small-40@2x.png",
85 | "scale" : "2x"
86 | },
87 | {
88 | "size" : "76x76",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-76.png",
91 | "scale" : "1x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-76@2x.png",
97 | "scale" : "2x"
98 | },
99 | {
100 | "size" : "83.5x83.5",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-83.5@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "1024x1024",
107 | "idiom" : "ios-marketing",
108 | "filename" : "icon.png",
109 | "scale" : "1x"
110 | }
111 | ],
112 | "info" : {
113 | "version" : 1,
114 | "author" : "xcode"
115 | }
116 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # line-ios-objc-v5-starter
2 | LINE iOS SDK V5 Objective-C starter
3 |
4 | # Introduction
5 |
6 | This is a sample application for LINE iOS SDK V5 that is written in Objective-C. It demonstrates the following functionality:
7 |
8 | * App-to-app Login
9 | * Web Login
10 | * GetProfile API
11 | * Verify Token API
12 | * Refresh Token API
13 | * Logout API
14 |
15 | # Before Starting
16 |
17 | * You must have Xcode installed.
18 | * You must have [Cocoapods](https://cocoapods.org/) installed.
19 | * You must create a LINE Login account on the [LINE Developer Console](/en/docs/ios-sdk/objective-c/link-a-bot/#use-social-api) that has the application type set to `NATIVE_APP`. You will need the account's Channel ID to set up the SDK.
20 |
21 | # Setup
22 |
23 | 1. Run `pod install` from the `LineSDKStarterObjC` folder.
24 | 2. Set the iOS bundle ID and iOS scheme in the technical configuration section of the Channel Console.
25 | 3. Set the LineSDKConfig/ChannelID element in the project's `Info.plist` to your channel's Channel ID and then build the application using Xcode.
26 |
27 | # How to Use
28 |
29 |
30 |
31 | The **Login with LINE** button will use the LINE app to log in and the **Browser Login** button will open a Web Login screen inside of a Safari Web View and prompt
32 | the user to log in using their LINE account's email and password.
33 |
34 | After logging in, the user's profile information and access token will be displayed on the screen in addition to four buttons:
35 |
36 | * **Get Profile** - Pushing this button will call the LINE SDK's `getProfileWithCompletion` method. The profile information retrieved from the API will appear in a different view.
37 | This information should be the same as the profile information that is initially displayed to the user after they log into this starter application.
38 | * **Verify Token** - Pushing this button will call the LINE SDK's `verifyTokenWithCompletion` method. An alert pop-up will display informing the user if their token is valid or not.
39 | * **Refresh Token** - Pushing this button will call the LINE SDK's `refreshTokenWithCompletion` method. This will update the access token that is displayed on the starter app's main screen.
40 | * **Check Friendship** - Pushing this button will call the [Friendship Status API](https://developers.line.me/en/docs/ios-sdk/objective-c/link-a-bot/#use-social-api). For this API to work properly, you must first [link a bot to your channel.](https://developers.line.me/en/docs/ios-sdk/objective-c/link-a-bot/#spy-displaying-the-option-to-add-your-bot-as-friend)
41 | * **Open ID** - Pushing this button will display the information that is contained in the [Open ID Token](https://developers.line.me/en/docs/ios-sdk/objective-c/managing-users/#spy-using-id-tokens-to-identify-users).
42 | * **Logout** - Pushing this button will call the LINE SDK's `logoutWithCompletion` method. This will revoke the access token and return the user to the "Select Login" page.
43 |
44 | # Documentation
45 |
46 | For detailed documentation, please refer to the following links:
47 |
48 | * [iOS SDK documentation](https://developers.line.me/en/docs/ios-sdk/objective-c/overview/)
49 | * [LINE SDK for iOS API reference](https://developers.line.me/en/reference/ios-sdk-objc/)
50 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // LineSDKStarterObjC
4 | //
5 | // Created by Serrano Mark on 12/8/16.
6 | // Copyright © 2016 LINE. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "UserInfoViewController.h"
11 | #import
12 |
13 | @interface ViewController ()
14 |
15 | @end
16 |
17 | @implementation ViewController
18 |
19 | - (void)viewDidLoad
20 | {
21 | [super viewDidLoad];
22 | // Do any additional setup after loading the view, typically from a nib.
23 |
24 | // Set the LINE Login Delegate
25 | [LineSDKLogin sharedInstance].delegate = self;
26 | }
27 |
28 |
29 | - (void)didReceiveMemoryWarning
30 | {
31 | [super didReceiveMemoryWarning];
32 | // Dispose of any resources that can be recreated.
33 | }
34 |
35 | - (IBAction)A2ALogin
36 | {
37 | [[LineSDKLogin sharedInstance] startLoginWithPermissions:@[@"profile", @"openid"]];
38 | }
39 |
40 | - (IBAction)WebLogin
41 | {
42 | [[LineSDKLogin sharedInstance] startWebLoginWithPermissions:@[@"profile", @"openid"]];
43 | }
44 |
45 |
46 | #pragma mark LineSDKLoginDelegate
47 |
48 | - (void)didLogin:(LineSDKLogin *)login
49 | credential:(LineSDKCredential *)credential
50 | profile:(LineSDKProfile *)profile
51 | error:(NSError *)error
52 | {
53 | if (error) {
54 | NSLog(@"LINE Login Failed with Error: %@", error.description);
55 | return;
56 | }
57 |
58 | NSLog(@"LINE Login Succeeded");
59 |
60 | UserInfoViewController *userInfoVC = [self.storyboard instantiateViewControllerWithIdentifier:@"userInfoViewController"];
61 |
62 | NSMutableDictionary *profileData = [@{
63 | @"userid" : profile.userID,
64 | @"displayname" : profile.displayName,
65 | @"accesstoken" : credential.accessToken.accessToken
66 | } mutableCopy];
67 |
68 | if(profile.pictureURL != nil) {
69 | profileData[@"pictureurl"] = profile.pictureURL;
70 | }
71 |
72 | if(profile.statusMessage != nil) {
73 | profileData[@"statusmessage"] = profile.statusMessage;
74 | }
75 |
76 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
77 | [formatter setDateFormat:@"dd-MM-yyyy HH:mm"];
78 |
79 | NSMutableDictionary *openIDData = [@{
80 | @"issuer" : credential.IDToken.issuer,
81 | @"subject" : credential.IDToken.subject,
82 | @"audience" : credential.IDToken.audience,
83 | @"expiration" : [formatter stringFromDate:credential.IDToken.expiration],
84 | @"issueAt" : [formatter stringFromDate:credential.IDToken.issueAt],
85 | @"name" : credential.IDToken.name,
86 | @"pictureUrl" : credential.IDToken.pictureURL.absoluteString
87 | }mutableCopy];
88 |
89 |
90 | // Pass the user information into the next view controller so that we can display it.
91 | userInfoVC.profileData = profileData;
92 | userInfoVC.openIDData = openIDData;
93 |
94 | [self presentViewController:userInfoVC animated:YES completion:nil];
95 | }
96 |
97 | @end
98 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC.xcodeproj/xcshareddata/xcschemes/LineSDKStarterObjC.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/ProfileViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ProfileViewController.m
3 | // LineSDKStarterObjC
4 | //
5 | // Created by Serrano Mark on 2016/12/12.
6 | // Copyright © 2016 LINE. All rights reserved.
7 | //
8 |
9 | #import "ProfileViewController.h"
10 | #import
11 |
12 | @interface ProfileViewController ()
13 |
14 | @end
15 |
16 | @implementation ProfileViewController
17 |
18 |
19 | - (void)viewDidLoad
20 | {
21 | [super viewDidLoad];
22 |
23 | [self setupLabelsForType:[self.displayInfo[@"type"] intValue]];
24 |
25 | }
26 |
27 | - (void)setupLabelsForType:(DisplayInfoType)type{
28 |
29 | switch(type){
30 | case DisplayInfoTypeProfile:
31 | self.viewTitle.text = @"Profile Information";
32 | [self createLabelWithText:@"User ID:" andStyle:InfoLabelStyleTitle];
33 | [self createLabelWithText:self.displayInfo[@"userId"] andStyle:InfoLabelStyleText];
34 | [self createLabelWithText:@"Status Message:" andStyle:InfoLabelStyleTitle];
35 | [self createLabelWithText:self.displayInfo[@"statusMessage"] andStyle:InfoLabelStyleText];
36 | [self createLabelWithText:@"Display Name:" andStyle:InfoLabelStyleTitle];
37 | [self createLabelWithText:self.displayInfo[@"displayName"] andStyle:InfoLabelStyleText];
38 | [self createLabelWithText:@"Picture URL:" andStyle:InfoLabelStyleTitle];
39 | [self createLabelWithText:self.displayInfo[@"pictureUrl"] andStyle:InfoLabelStyleText];
40 | break;
41 |
42 | case DisplayInfoTypeOpenID:
43 | self.viewTitle.text = @"OpenID Information";
44 | [self createLabelWithText:@"Issuer:" andStyle:InfoLabelStyleTitle];
45 | [self createLabelWithText:self.displayInfo[@"issuer"] andStyle:InfoLabelStyleText];
46 | [self createLabelWithText:@"Subject:" andStyle:InfoLabelStyleTitle];
47 | [self createLabelWithText:self.displayInfo[@"subject"] andStyle:InfoLabelStyleText];
48 | [self createLabelWithText:@"Audience:" andStyle:InfoLabelStyleTitle];
49 | [self createLabelWithText:self.displayInfo[@"audience"] andStyle:InfoLabelStyleText];
50 | [self createLabelWithText:@"Expiration:" andStyle:InfoLabelStyleTitle];
51 | [self createLabelWithText:self.displayInfo[@"expiration"] andStyle:InfoLabelStyleText];
52 | [self createLabelWithText:@"Issue At:" andStyle:InfoLabelStyleTitle];
53 | [self createLabelWithText:self.displayInfo[@"issueAt"] andStyle:InfoLabelStyleText];
54 | [self createLabelWithText:@"Name:" andStyle:InfoLabelStyleTitle];
55 | [self createLabelWithText:self.displayInfo[@"name"] andStyle:InfoLabelStyleText];
56 | [self createLabelWithText:@"Picture URL:" andStyle:InfoLabelStyleTitle];
57 | [self createLabelWithText:self.displayInfo[@"pictureUrl"] andStyle:InfoLabelStyleText];
58 | break;
59 | default:
60 | [self createLabelWithText:@"No Data Available" andStyle:InfoLabelStyleText];
61 | break;
62 |
63 | }
64 |
65 | }
66 |
67 | - (void)createLabelWithText:(NSString *)text andStyle:(InfoLabelStyle)style{
68 |
69 |
70 | UILabel * newLabel = [[UILabel alloc] init];
71 | newLabel.preferredMaxLayoutWidth = CGRectGetWidth(newLabel.frame);
72 | newLabel.lineBreakMode = NSLineBreakByWordWrapping;
73 | newLabel.numberOfLines = 0;
74 | newLabel.text = text;
75 | [newLabel sizeToFit];
76 |
77 | switch (style){
78 | case InfoLabelStyleTitle:
79 | newLabel.font = [UIFont boldSystemFontOfSize:20];
80 | break;
81 | default:
82 | newLabel.font = [newLabel.font fontWithSize:12];
83 | break;
84 | }
85 | [self.infoView addArrangedSubview:newLabel];
86 | }
87 |
88 | - (void)didReceiveMemoryWarning
89 | {
90 | [super didReceiveMemoryWarning];
91 | // Dispose of any resources that can be recreated.
92 | }
93 |
94 | /*
95 | #pragma mark - Navigation
96 |
97 | // In a storyboard-based application, you will often want to do a little preparation before navigation
98 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
99 | // Get the new view controller using [segue destinationViewController].
100 | // Pass the selected object to the new view controller.
101 | }
102 | */
103 |
104 | - (IBAction)pressOK:(id)sender
105 | {
106 | [self.presentingViewController dismissViewControllerAnimated:YES completion:nil];
107 | }
108 |
109 | @end
110 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/UserInfoViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // UserInfoViewController.m
3 | // LineSDKStarterObjC
4 | //
5 | // Created by Serrano Mark on 12/8/16.
6 | // Copyright © 2016 LINE. All rights reserved.
7 | //
8 |
9 | #import "UserInfoViewController.h"
10 | #import "ProfileViewController.h"
11 | #import
12 |
13 | @interface UserInfoViewController ()
14 |
15 | // LINE SDK API Client
16 | @property (strong, nonatomic) LineSDKAPI *apiClient;
17 |
18 | @end
19 |
20 | @implementation UserInfoViewController
21 |
22 | - (void)viewDidLoad
23 | {
24 | [super viewDidLoad];
25 | // Do any additional setup after loading the view.
26 |
27 | // Initialize the API Client so that we can use the LINE SDK's API
28 | self.apiClient = [[LineSDKAPI alloc] initWithConfiguration:[LineSDKConfiguration defaultConfig]];
29 |
30 | self.userIdLabel.text = self.profileData[@"userid"];
31 | self.statusMessageLabel.text = self.profileData[@"statusmessage"];
32 | self.accessTokenLabel.text = self.profileData[@"accesstoken"];
33 | self.displayNameLabel.text = self.profileData[@"displayname"];
34 |
35 | if (self.profileData[@"pictureurl"] != nil ){
36 | NSURLSession *session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
37 |
38 | [[session dataTaskWithURL:self.profileData[@"pictureurl"] completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
39 | dispatch_async(dispatch_get_main_queue(), ^{
40 | self.profileImageView.image = [UIImage imageWithData:data];
41 | });
42 | }]resume];
43 | }
44 | }
45 |
46 | - (void)didReceiveMemoryWarning
47 | {
48 | [super didReceiveMemoryWarning];
49 | // Dispose of any resources that can be recreated.
50 | }
51 |
52 | - (IBAction)pressGetProfile:(id)sender
53 | {
54 | [self.apiClient getProfileWithCompletion:^(LineSDKProfile * _Nullable profile, NSError * _Nullable error) {
55 |
56 | if(error){
57 | NSLog(@"Error getting profile: %@", error.description);
58 | [self displayAlertDialogWithTitle:@"Could not get Profile" AndMessage:@"The call to the getProfile API failed." Dismiss:NO];
59 | return;
60 | }
61 |
62 | ProfileViewController * profileVC = [self.storyboard instantiateViewControllerWithIdentifier:@"profileViewController"];
63 |
64 | profileVC.displayInfo = @{
65 | @"type": [NSNumber numberWithInt:DisplayInfoTypeProfile],
66 | @"userId": profile.userID ? profile.userID : @"",
67 | @"statusMessage": profile.statusMessage ? profile.statusMessage : @"",
68 | @"displayName": profile.displayName ? profile.displayName : @"",
69 | @"pictureUrl": profile.pictureURL.absoluteString ? profile.pictureURL.absoluteString : @""
70 | };
71 |
72 | [self presentViewController:profileVC animated:YES completion:nil];
73 | }];
74 | }
75 |
76 |
77 | - (IBAction)pressVerifyToken:(id)sender
78 | {
79 | [self.apiClient verifyTokenWithCompletion:^(LineSDKVerifyResult * _Nullable result, NSError * _Nullable error) {
80 | if (error) {
81 | NSLog(@"Token is Invalid: %@", error.description);
82 | [self displayAlertDialogWithTitle:@"Access Token is Invalid" AndMessage:@"Your access token is invalid." Dismiss:NO];
83 | return;
84 | }
85 |
86 | NSLog(@"Token is Valid");
87 | NSMutableString * dialogMessage = [[NSMutableString alloc]initWithString:@"Access Token is Valid and contains the following permissions: "];
88 |
89 | for (NSString* permission in result.permissions){
90 | [dialogMessage appendFormat:@"%@, ", permission];
91 | }
92 |
93 | [self displayAlertDialogWithTitle:@"Access Token is Valid" AndMessage:dialogMessage Dismiss:NO];
94 | }];
95 | }
96 |
97 | - (IBAction)pressRefreshToken:(id)sender
98 | {
99 | [self.apiClient refreshTokenWithCompletion:^(LineSDKAccessToken * _Nullable accessToken, NSError * _Nullable error) {
100 | if (error){
101 | NSLog(@"Error occurred when refreshing the access token: %@", error.description);
102 | [self displayAlertDialogWithTitle:@"Error refreshing access token" AndMessage:@"Error refreshing access token" Dismiss:NO];
103 | return;
104 | }
105 |
106 | NSLog(@"Access token was refreshed: %@", accessToken.accessToken);
107 | NSString * newAccessToken = accessToken.accessToken;
108 |
109 | self.accessTokenLabel.text = newAccessToken;
110 | [self displayAlertDialogWithTitle:@"Access Token Was Refreshed" AndMessage:@"Access Token Was Refreshed" Dismiss:NO];
111 | }];
112 | }
113 |
114 | - (IBAction)pressLogout:(id)sender
115 | {
116 | [self.apiClient logoutWithCompletion:^(BOOL success, NSError * _Nullable error){
117 | if (success){
118 | NSLog(@"Logout Succeeded");
119 | [self displayAlertDialogWithTitle:@"Logout Successful" AndMessage:@"You have successfully logged out." Dismiss:YES];
120 | }
121 | else {
122 | NSLog(@"Logout Failed: %@", error.description);
123 | [self displayAlertDialogWithTitle:@"Logout Failed" AndMessage:@"The LINE Logout Failed" Dismiss:NO];
124 | }
125 | }];
126 | }
127 |
128 | - (void) displayAlertDialogWithTitle:(NSString *)title AndMessage:(NSString *)message Dismiss:(BOOL)dismiss
129 | {
130 | UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
131 |
132 | void (^okHandler)(UIAlertAction * action) = nil;
133 |
134 | if (dismiss){
135 | okHandler = ^void(UIAlertAction * action) {
136 | [self.presentingViewController dismissViewControllerAnimated:YES completion:nil];
137 | };
138 | }
139 |
140 | UIAlertAction *ok = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:okHandler];
141 |
142 | [alertController addAction:ok];
143 | [self presentViewController:alertController animated:YES completion:nil];
144 | }
145 | - (IBAction)pressCheckFriendship:(id)sender {
146 |
147 | [self.apiClient getBotFriendshipStatusWithCompletion:^(LineSDKBotFriendshipStatusResult * _Nullable result, NSError * _Nullable error) {
148 |
149 | NSString * message;
150 | NSString * title;
151 |
152 | if (error){
153 |
154 | if ([error.domain isEqualToString:LineSDKServerErrorDomain] && error.code == 400) {
155 | title = @"Friendship API Error";
156 | message = @"Error calling the Friendship API. Perhaps you don't have a bot linked to your channel?";
157 | } else {
158 | title = @"Friendship API Error";
159 | message = @"Error calling the Friendship API.";
160 | }
161 | NSLog(@"Error calling friendship API: %@", error.description);
162 | } else {
163 | title = @"Friendship API";
164 | if (result.friendFlag){
165 | message = @"Friendship status has changed.";
166 | } else {
167 | message = @"Friendship status has not changed.";
168 | }
169 | }
170 |
171 | [self displayAlertDialogWithTitle:title AndMessage:message Dismiss:NO];
172 |
173 | }];
174 | }
175 |
176 | - (IBAction)pressOpenID:(id)sender {
177 |
178 |
179 | ProfileViewController * openIDVC = [self.storyboard instantiateViewControllerWithIdentifier:@"profileViewController"];
180 |
181 |
182 | openIDVC.displayInfo = @{
183 | @"type": [NSNumber numberWithInt:DisplayInfoTypeOpenID],
184 | @"issuer": self.openIDData[@"issuer"] ? self.openIDData[@"issuer"] : @"",
185 | @"subject": self.openIDData[@"subject"] ? self.openIDData[@"subject"] : @"",
186 | @"audience": self.openIDData[@"audience"] ? self.openIDData[@"audience"] : @"",
187 | @"expiration": self.openIDData[@"expiration"] ? self.openIDData[@"expiration"] : @"",
188 | @"issueAt": self.openIDData[@"issueAt"] ? self.openIDData[@"issueAt"] : @"",
189 | @"name": self.openIDData[@"name"] ? self.openIDData[@"name"] : @"",
190 | @"pictureUrl": self.openIDData[@"pictureUrl"] ? self.openIDData[@"pictureUrl"] : @"",
191 | };
192 |
193 | [self presentViewController:openIDVC animated:YES completion:nil];
194 |
195 | }
196 |
197 | @end
198 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 07A7A54B7D0A69BA4E3EC370 /* libPods-LineSDKStarterObjC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DE8A6DF20BA067DC9E51CCF /* libPods-LineSDKStarterObjC.a */; };
11 | 4408AC351DFE8C9F00741681 /* ProfileViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4408AC341DFE8C9F00741681 /* ProfileViewController.m */; };
12 | 444D00041DFFCD9E00A8EFD7 /* UserInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 444D00021DFFCD9E00A8EFD7 /* UserInfoViewController.m */; };
13 | 44914CFF1DF94F8D008A3FBA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 44914CFE1DF94F8D008A3FBA /* main.m */; };
14 | 44914D021DF94F8D008A3FBA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 44914D011DF94F8D008A3FBA /* AppDelegate.m */; };
15 | 44914D051DF94F8D008A3FBA /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 44914D041DF94F8D008A3FBA /* ViewController.m */; };
16 | 44914D081DF94F8D008A3FBA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 44914D061DF94F8D008A3FBA /* Main.storyboard */; };
17 | 44914D0A1DF94F8D008A3FBA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 44914D091DF94F8D008A3FBA /* Assets.xcassets */; };
18 | 44914D0D1DF94F8D008A3FBA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 44914D0B1DF94F8D008A3FBA /* LaunchScreen.storyboard */; };
19 | 44914D181DF9516F008A3FBA /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 44914D171DF9516F008A3FBA /* Security.framework */; };
20 | 44914D1A1DF95175008A3FBA /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 44914D191DF95175008A3FBA /* CoreTelephony.framework */; };
21 | 44D831AE21870160007D6383 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 44D831AD21870160007D6383 /* Default-568h@2x.png */; };
22 | /* End PBXBuildFile section */
23 |
24 | /* Begin PBXFileReference section */
25 | 2DE8A6DF20BA067DC9E51CCF /* libPods-LineSDKStarterObjC.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-LineSDKStarterObjC.a"; sourceTree = BUILT_PRODUCTS_DIR; };
26 | 4408AC331DFE8C9F00741681 /* ProfileViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProfileViewController.h; sourceTree = ""; };
27 | 4408AC341DFE8C9F00741681 /* ProfileViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProfileViewController.m; sourceTree = ""; };
28 | 44206EAA1E07BF03009B942D /* LineSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LineSDK.framework; path = LINE_iOS_SDK_V2_Starter/Frameworks/LineSDK.framework; sourceTree = ""; };
29 | 444D00021DFFCD9E00A8EFD7 /* UserInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserInfoViewController.m; sourceTree = ""; };
30 | 444D00031DFFCD9E00A8EFD7 /* UserInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInfoViewController.h; sourceTree = ""; };
31 | 444D00051DFFE22500A8EFD7 /* SafariServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SafariServices.framework; path = System/Library/Frameworks/SafariServices.framework; sourceTree = SDKROOT; };
32 | 445FF6FA2182E7590072BF9D /* DisplayInfoType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DisplayInfoType.h; sourceTree = ""; };
33 | 44914CFA1DF94F8D008A3FBA /* LineSDKStarterObjC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LineSDKStarterObjC.app; sourceTree = BUILT_PRODUCTS_DIR; };
34 | 44914CFE1DF94F8D008A3FBA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
35 | 44914D001DF94F8D008A3FBA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
36 | 44914D011DF94F8D008A3FBA /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
37 | 44914D031DF94F8D008A3FBA /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
38 | 44914D041DF94F8D008A3FBA /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
39 | 44914D071DF94F8D008A3FBA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
40 | 44914D091DF94F8D008A3FBA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
41 | 44914D0C1DF94F8D008A3FBA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
42 | 44914D0E1DF94F8D008A3FBA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
43 | 44914D171DF9516F008A3FBA /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
44 | 44914D191DF95175008A3FBA /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
45 | 44D831AD21870160007D6383 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; };
46 | 8C7321976CEB150530ACA060 /* Pods-LineSDKStarterObjC.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LineSDKStarterObjC.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LineSDKStarterObjC/Pods-LineSDKStarterObjC.debug.xcconfig"; sourceTree = ""; };
47 | DF14F4A2202F41C9C98DA769 /* Pods-LineSDKStarterObjC.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LineSDKStarterObjC.release.xcconfig"; path = "Pods/Target Support Files/Pods-LineSDKStarterObjC/Pods-LineSDKStarterObjC.release.xcconfig"; sourceTree = ""; };
48 | /* End PBXFileReference section */
49 |
50 | /* Begin PBXFrameworksBuildPhase section */
51 | 44914CF71DF94F8D008A3FBA /* Frameworks */ = {
52 | isa = PBXFrameworksBuildPhase;
53 | buildActionMask = 2147483647;
54 | files = (
55 | 44914D1A1DF95175008A3FBA /* CoreTelephony.framework in Frameworks */,
56 | 44914D181DF9516F008A3FBA /* Security.framework in Frameworks */,
57 | 07A7A54B7D0A69BA4E3EC370 /* libPods-LineSDKStarterObjC.a in Frameworks */,
58 | );
59 | runOnlyForDeploymentPostprocessing = 0;
60 | };
61 | /* End PBXFrameworksBuildPhase section */
62 |
63 | /* Begin PBXGroup section */
64 | 44914CF11DF94F8D008A3FBA = {
65 | isa = PBXGroup;
66 | children = (
67 | 44D831AD21870160007D6383 /* Default-568h@2x.png */,
68 | 44914CFC1DF94F8D008A3FBA /* LineSDKStarterObjC */,
69 | 44914CFB1DF94F8D008A3FBA /* Products */,
70 | 44914D141DF95168008A3FBA /* Frameworks */,
71 | B59F30A7BA293E4E6F05A6FF /* Pods */,
72 | );
73 | sourceTree = "";
74 | };
75 | 44914CFB1DF94F8D008A3FBA /* Products */ = {
76 | isa = PBXGroup;
77 | children = (
78 | 44914CFA1DF94F8D008A3FBA /* LineSDKStarterObjC.app */,
79 | );
80 | name = Products;
81 | sourceTree = "";
82 | };
83 | 44914CFC1DF94F8D008A3FBA /* LineSDKStarterObjC */ = {
84 | isa = PBXGroup;
85 | children = (
86 | 444D00021DFFCD9E00A8EFD7 /* UserInfoViewController.m */,
87 | 444D00031DFFCD9E00A8EFD7 /* UserInfoViewController.h */,
88 | 44914D001DF94F8D008A3FBA /* AppDelegate.h */,
89 | 44914D011DF94F8D008A3FBA /* AppDelegate.m */,
90 | 44914D031DF94F8D008A3FBA /* ViewController.h */,
91 | 44914D041DF94F8D008A3FBA /* ViewController.m */,
92 | 44914D061DF94F8D008A3FBA /* Main.storyboard */,
93 | 44914D091DF94F8D008A3FBA /* Assets.xcassets */,
94 | 44914D0B1DF94F8D008A3FBA /* LaunchScreen.storyboard */,
95 | 44914D0E1DF94F8D008A3FBA /* Info.plist */,
96 | 44914CFD1DF94F8D008A3FBA /* Supporting Files */,
97 | 4408AC331DFE8C9F00741681 /* ProfileViewController.h */,
98 | 4408AC341DFE8C9F00741681 /* ProfileViewController.m */,
99 | 445FF6FA2182E7590072BF9D /* DisplayInfoType.h */,
100 | );
101 | path = LineSDKStarterObjC;
102 | sourceTree = "";
103 | };
104 | 44914CFD1DF94F8D008A3FBA /* Supporting Files */ = {
105 | isa = PBXGroup;
106 | children = (
107 | 44914CFE1DF94F8D008A3FBA /* main.m */,
108 | );
109 | name = "Supporting Files";
110 | sourceTree = "";
111 | };
112 | 44914D141DF95168008A3FBA /* Frameworks */ = {
113 | isa = PBXGroup;
114 | children = (
115 | 44206EAA1E07BF03009B942D /* LineSDK.framework */,
116 | 444D00051DFFE22500A8EFD7 /* SafariServices.framework */,
117 | 44914D191DF95175008A3FBA /* CoreTelephony.framework */,
118 | 44914D171DF9516F008A3FBA /* Security.framework */,
119 | 2DE8A6DF20BA067DC9E51CCF /* libPods-LineSDKStarterObjC.a */,
120 | );
121 | name = Frameworks;
122 | sourceTree = "";
123 | };
124 | B59F30A7BA293E4E6F05A6FF /* Pods */ = {
125 | isa = PBXGroup;
126 | children = (
127 | 8C7321976CEB150530ACA060 /* Pods-LineSDKStarterObjC.debug.xcconfig */,
128 | DF14F4A2202F41C9C98DA769 /* Pods-LineSDKStarterObjC.release.xcconfig */,
129 | );
130 | name = Pods;
131 | sourceTree = "";
132 | };
133 | /* End PBXGroup section */
134 |
135 | /* Begin PBXNativeTarget section */
136 | 44914CF91DF94F8D008A3FBA /* LineSDKStarterObjC */ = {
137 | isa = PBXNativeTarget;
138 | buildConfigurationList = 44914D111DF94F8D008A3FBA /* Build configuration list for PBXNativeTarget "LineSDKStarterObjC" */;
139 | buildPhases = (
140 | 40B5D4BB88EC7CF63D76BB67 /* [CP] Check Pods Manifest.lock */,
141 | 44914CF61DF94F8D008A3FBA /* Sources */,
142 | 44914CF71DF94F8D008A3FBA /* Frameworks */,
143 | 44914CF81DF94F8D008A3FBA /* Resources */,
144 | E0EF734E90DFD2CE2C91D837 /* [CP] Copy Pods Resources */,
145 | );
146 | buildRules = (
147 | );
148 | dependencies = (
149 | );
150 | name = LineSDKStarterObjC;
151 | productName = LINE_iOS_SDK_V2_Starter;
152 | productReference = 44914CFA1DF94F8D008A3FBA /* LineSDKStarterObjC.app */;
153 | productType = "com.apple.product-type.application";
154 | };
155 | /* End PBXNativeTarget section */
156 |
157 | /* Begin PBXProject section */
158 | 44914CF21DF94F8D008A3FBA /* Project object */ = {
159 | isa = PBXProject;
160 | attributes = {
161 | LastUpgradeCheck = 1000;
162 | ORGANIZATIONNAME = LINE;
163 | TargetAttributes = {
164 | 44914CF91DF94F8D008A3FBA = {
165 | CreatedOnToolsVersion = 8.0;
166 | DevelopmentTeam = 9589S6PQ44;
167 | ProvisioningStyle = Automatic;
168 | SystemCapabilities = {
169 | com.apple.Keychain = {
170 | enabled = 1;
171 | };
172 | };
173 | };
174 | };
175 | };
176 | buildConfigurationList = 44914CF51DF94F8D008A3FBA /* Build configuration list for PBXProject "LineSDKStarterObjC" */;
177 | compatibilityVersion = "Xcode 3.2";
178 | developmentRegion = English;
179 | hasScannedForEncodings = 0;
180 | knownRegions = (
181 | en,
182 | Base,
183 | );
184 | mainGroup = 44914CF11DF94F8D008A3FBA;
185 | productRefGroup = 44914CFB1DF94F8D008A3FBA /* Products */;
186 | projectDirPath = "";
187 | projectRoot = "";
188 | targets = (
189 | 44914CF91DF94F8D008A3FBA /* LineSDKStarterObjC */,
190 | );
191 | };
192 | /* End PBXProject section */
193 |
194 | /* Begin PBXResourcesBuildPhase section */
195 | 44914CF81DF94F8D008A3FBA /* Resources */ = {
196 | isa = PBXResourcesBuildPhase;
197 | buildActionMask = 2147483647;
198 | files = (
199 | 44914D0D1DF94F8D008A3FBA /* LaunchScreen.storyboard in Resources */,
200 | 44D831AE21870160007D6383 /* Default-568h@2x.png in Resources */,
201 | 44914D0A1DF94F8D008A3FBA /* Assets.xcassets in Resources */,
202 | 44914D081DF94F8D008A3FBA /* Main.storyboard in Resources */,
203 | );
204 | runOnlyForDeploymentPostprocessing = 0;
205 | };
206 | /* End PBXResourcesBuildPhase section */
207 |
208 | /* Begin PBXShellScriptBuildPhase section */
209 | 40B5D4BB88EC7CF63D76BB67 /* [CP] Check Pods Manifest.lock */ = {
210 | isa = PBXShellScriptBuildPhase;
211 | buildActionMask = 2147483647;
212 | files = (
213 | );
214 | inputFileListPaths = (
215 | );
216 | inputPaths = (
217 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
218 | "${PODS_ROOT}/Manifest.lock",
219 | );
220 | name = "[CP] Check Pods Manifest.lock";
221 | outputFileListPaths = (
222 | );
223 | outputPaths = (
224 | "$(DERIVED_FILE_DIR)/Pods-LineSDKStarterObjC-checkManifestLockResult.txt",
225 | );
226 | runOnlyForDeploymentPostprocessing = 0;
227 | shellPath = /bin/sh;
228 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
229 | showEnvVarsInLog = 0;
230 | };
231 | E0EF734E90DFD2CE2C91D837 /* [CP] Copy Pods Resources */ = {
232 | isa = PBXShellScriptBuildPhase;
233 | buildActionMask = 2147483647;
234 | files = (
235 | );
236 | inputFileListPaths = (
237 | );
238 | inputPaths = (
239 | "${SRCROOT}/Pods/Target Support Files/Pods-LineSDKStarterObjC/Pods-LineSDKStarterObjC-resources.sh",
240 | "${PODS_CONFIGURATION_BUILD_DIR}/LineSDK/Resource.bundle",
241 | );
242 | name = "[CP] Copy Pods Resources";
243 | outputFileListPaths = (
244 | );
245 | outputPaths = (
246 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Resource.bundle",
247 | );
248 | runOnlyForDeploymentPostprocessing = 0;
249 | shellPath = /bin/sh;
250 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LineSDKStarterObjC/Pods-LineSDKStarterObjC-resources.sh\"\n";
251 | showEnvVarsInLog = 0;
252 | };
253 | /* End PBXShellScriptBuildPhase section */
254 |
255 | /* Begin PBXSourcesBuildPhase section */
256 | 44914CF61DF94F8D008A3FBA /* Sources */ = {
257 | isa = PBXSourcesBuildPhase;
258 | buildActionMask = 2147483647;
259 | files = (
260 | 444D00041DFFCD9E00A8EFD7 /* UserInfoViewController.m in Sources */,
261 | 44914D051DF94F8D008A3FBA /* ViewController.m in Sources */,
262 | 44914D021DF94F8D008A3FBA /* AppDelegate.m in Sources */,
263 | 44914CFF1DF94F8D008A3FBA /* main.m in Sources */,
264 | 4408AC351DFE8C9F00741681 /* ProfileViewController.m in Sources */,
265 | );
266 | runOnlyForDeploymentPostprocessing = 0;
267 | };
268 | /* End PBXSourcesBuildPhase section */
269 |
270 | /* Begin PBXVariantGroup section */
271 | 44914D061DF94F8D008A3FBA /* Main.storyboard */ = {
272 | isa = PBXVariantGroup;
273 | children = (
274 | 44914D071DF94F8D008A3FBA /* Base */,
275 | );
276 | name = Main.storyboard;
277 | sourceTree = "";
278 | };
279 | 44914D0B1DF94F8D008A3FBA /* LaunchScreen.storyboard */ = {
280 | isa = PBXVariantGroup;
281 | children = (
282 | 44914D0C1DF94F8D008A3FBA /* Base */,
283 | );
284 | name = LaunchScreen.storyboard;
285 | sourceTree = "";
286 | };
287 | /* End PBXVariantGroup section */
288 |
289 | /* Begin XCBuildConfiguration section */
290 | 44914D0F1DF94F8D008A3FBA /* Debug */ = {
291 | isa = XCBuildConfiguration;
292 | buildSettings = {
293 | ALWAYS_SEARCH_USER_PATHS = NO;
294 | CLANG_ANALYZER_NONNULL = YES;
295 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
296 | CLANG_CXX_LIBRARY = "libc++";
297 | CLANG_ENABLE_MODULES = YES;
298 | CLANG_ENABLE_OBJC_ARC = YES;
299 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
300 | CLANG_WARN_BOOL_CONVERSION = YES;
301 | CLANG_WARN_COMMA = YES;
302 | CLANG_WARN_CONSTANT_CONVERSION = YES;
303 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
304 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
305 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
306 | CLANG_WARN_EMPTY_BODY = YES;
307 | CLANG_WARN_ENUM_CONVERSION = YES;
308 | CLANG_WARN_INFINITE_RECURSION = YES;
309 | CLANG_WARN_INT_CONVERSION = YES;
310 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
311 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
312 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
313 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
314 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
315 | CLANG_WARN_STRICT_PROTOTYPES = YES;
316 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
317 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
318 | CLANG_WARN_UNREACHABLE_CODE = YES;
319 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
320 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
321 | COPY_PHASE_STRIP = NO;
322 | DEBUG_INFORMATION_FORMAT = dwarf;
323 | ENABLE_STRICT_OBJC_MSGSEND = YES;
324 | ENABLE_TESTABILITY = YES;
325 | GCC_C_LANGUAGE_STANDARD = gnu99;
326 | GCC_DYNAMIC_NO_PIC = NO;
327 | GCC_NO_COMMON_BLOCKS = YES;
328 | GCC_OPTIMIZATION_LEVEL = 0;
329 | GCC_PREPROCESSOR_DEFINITIONS = (
330 | "DEBUG=1",
331 | "$(inherited)",
332 | );
333 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
334 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
335 | GCC_WARN_UNDECLARED_SELECTOR = YES;
336 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
337 | GCC_WARN_UNUSED_FUNCTION = YES;
338 | GCC_WARN_UNUSED_VARIABLE = YES;
339 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
340 | MTL_ENABLE_DEBUG_INFO = YES;
341 | ONLY_ACTIVE_ARCH = YES;
342 | SDKROOT = iphoneos;
343 | TARGETED_DEVICE_FAMILY = "1,2";
344 | };
345 | name = Debug;
346 | };
347 | 44914D101DF94F8D008A3FBA /* Release */ = {
348 | isa = XCBuildConfiguration;
349 | buildSettings = {
350 | ALWAYS_SEARCH_USER_PATHS = NO;
351 | CLANG_ANALYZER_NONNULL = YES;
352 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
353 | CLANG_CXX_LIBRARY = "libc++";
354 | CLANG_ENABLE_MODULES = YES;
355 | CLANG_ENABLE_OBJC_ARC = YES;
356 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
357 | CLANG_WARN_BOOL_CONVERSION = YES;
358 | CLANG_WARN_COMMA = YES;
359 | CLANG_WARN_CONSTANT_CONVERSION = YES;
360 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
361 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
362 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
363 | CLANG_WARN_EMPTY_BODY = YES;
364 | CLANG_WARN_ENUM_CONVERSION = YES;
365 | CLANG_WARN_INFINITE_RECURSION = YES;
366 | CLANG_WARN_INT_CONVERSION = YES;
367 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
368 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
369 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
370 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
371 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
372 | CLANG_WARN_STRICT_PROTOTYPES = YES;
373 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
374 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
375 | CLANG_WARN_UNREACHABLE_CODE = YES;
376 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
377 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
378 | COPY_PHASE_STRIP = NO;
379 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
380 | ENABLE_NS_ASSERTIONS = NO;
381 | ENABLE_STRICT_OBJC_MSGSEND = YES;
382 | GCC_C_LANGUAGE_STANDARD = gnu99;
383 | GCC_NO_COMMON_BLOCKS = YES;
384 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
385 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
386 | GCC_WARN_UNDECLARED_SELECTOR = YES;
387 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
388 | GCC_WARN_UNUSED_FUNCTION = YES;
389 | GCC_WARN_UNUSED_VARIABLE = YES;
390 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
391 | MTL_ENABLE_DEBUG_INFO = NO;
392 | SDKROOT = iphoneos;
393 | TARGETED_DEVICE_FAMILY = "1,2";
394 | VALIDATE_PRODUCT = YES;
395 | };
396 | name = Release;
397 | };
398 | 44914D121DF94F8D008A3FBA /* Debug */ = {
399 | isa = XCBuildConfiguration;
400 | baseConfigurationReference = 8C7321976CEB150530ACA060 /* Pods-LineSDKStarterObjC.debug.xcconfig */;
401 | buildSettings = {
402 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
403 | CODE_SIGN_IDENTITY = "iPhone Developer";
404 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
405 | DEVELOPMENT_TEAM = 9589S6PQ44;
406 | FRAMEWORK_SEARCH_PATHS = "$(inherited)";
407 | INFOPLIST_FILE = "$(SRCROOT)/LineSDKStarterObjC/Info.plist";
408 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
409 | OTHER_LDFLAGS = "$(inherited)";
410 | PRODUCT_BUNDLE_IDENTIFIER = com.linecorp.linesdk.sample;
411 | PRODUCT_NAME = "$(TARGET_NAME)";
412 | };
413 | name = Debug;
414 | };
415 | 44914D131DF94F8D008A3FBA /* Release */ = {
416 | isa = XCBuildConfiguration;
417 | baseConfigurationReference = DF14F4A2202F41C9C98DA769 /* Pods-LineSDKStarterObjC.release.xcconfig */;
418 | buildSettings = {
419 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
420 | CODE_SIGN_IDENTITY = "iPhone Developer";
421 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
422 | DEVELOPMENT_TEAM = 9589S6PQ44;
423 | FRAMEWORK_SEARCH_PATHS = "$(inherited)";
424 | INFOPLIST_FILE = "$(SRCROOT)/LineSDKStarterObjC/Info.plist";
425 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
426 | OTHER_LDFLAGS = "$(inherited)";
427 | PRODUCT_BUNDLE_IDENTIFIER = com.linecorp.linesdk.sample;
428 | PRODUCT_NAME = "$(TARGET_NAME)";
429 | };
430 | name = Release;
431 | };
432 | /* End XCBuildConfiguration section */
433 |
434 | /* Begin XCConfigurationList section */
435 | 44914CF51DF94F8D008A3FBA /* Build configuration list for PBXProject "LineSDKStarterObjC" */ = {
436 | isa = XCConfigurationList;
437 | buildConfigurations = (
438 | 44914D0F1DF94F8D008A3FBA /* Debug */,
439 | 44914D101DF94F8D008A3FBA /* Release */,
440 | );
441 | defaultConfigurationIsVisible = 0;
442 | defaultConfigurationName = Release;
443 | };
444 | 44914D111DF94F8D008A3FBA /* Build configuration list for PBXNativeTarget "LineSDKStarterObjC" */ = {
445 | isa = XCConfigurationList;
446 | buildConfigurations = (
447 | 44914D121DF94F8D008A3FBA /* Debug */,
448 | 44914D131DF94F8D008A3FBA /* Release */,
449 | );
450 | defaultConfigurationIsVisible = 0;
451 | defaultConfigurationName = Release;
452 | };
453 | /* End XCConfigurationList section */
454 | };
455 | rootObject = 44914CF21DF94F8D008A3FBA /* Project object */;
456 | }
457 |
--------------------------------------------------------------------------------
/LineSDKStarterObjC/LineSDKStarterObjC/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
40 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
104 |
110 |
116 |
122 |
128 |
137 |
138 |
139 |
140 |
147 |
154 |
155 |
156 |
157 |
158 |
159 |
169 |
176 |
177 |
178 |
179 |
180 |
181 |
188 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
250 |
251 |
252 |
253 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
--------------------------------------------------------------------------------