├── ImageDiscovery
├── Assets.xcassets
│ ├── Contents.json
│ ├── Camera.imageset
│ │ ├── Camera.png
│ │ ├── Camera@2x.png
│ │ ├── Camera@3x.png
│ │ └── Contents.json
│ ├── Search.imageset
│ │ ├── Search.png
│ │ ├── Search@2x.png
│ │ ├── Search@3x.png
│ │ └── Contents.json
│ ├── PlaceHolder.imageset
│ │ ├── PlaceHolder.png
│ │ ├── PlaceHolder@2x.png
│ │ ├── PlaceHolder@3x.png
│ │ └── Contents.json
│ ├── SamplePhoto.imageset
│ │ ├── SamplePhoto.png
│ │ ├── SamplePhoto@2x.jpg
│ │ ├── SamplePhoto@3x.png
│ │ └── Contents.json
│ ├── SettingsIcon.imageset
│ │ ├── SettingsIcon.png
│ │ ├── SettingsIcon@2x.png
│ │ ├── SettingsIcon@3x.png
│ │ └── Contents.json
│ ├── Background Image.imageset
│ │ ├── Background Image.png
│ │ ├── Background Image@2x.png
│ │ ├── Background Image@3x.png
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── ImageResult.m
├── InitialViewController.h
├── ViewController.h
├── CameraViewController.h
├── AppDelegate.h
├── ImageActionTableViewController.h
├── ImageResult.h
├── main.m
├── ImageDiscovery.entitlements
├── ImageSearchViewController.h
├── ImageSearchManager.h
├── ImageFilterViewController.h
├── AuthenticationConstants.h
├── ViewController.m
├── EmailPostContent.json
├── AuthenticationConstants.m
├── AuthenticationManager.h
├── Info.plist
├── AppDelegate.m
├── ImageSearchManager.m
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── ImageFilterViewController.m
├── AuthenticationManager.m
├── InitialViewController.m
├── ImageSearchViewController.m
├── CameraViewController.m
└── ImageActionTableViewController.m
├── Images
├── camera.gif
└── search.gif
├── ImageDiscovery.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── project.pbxproj
├── Podfile
├── ImageDiscovery.xcworkspace
└── contents.xcworkspacedata
├── Podfile.lock
├── Notices.md
├── License.txt
├── .gitignore
├── README.md
└── CONTRIBUTING.md
/ImageDiscovery/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Images/camera.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/Images/camera.gif
--------------------------------------------------------------------------------
/Images/search.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/Images/search.gif
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/Camera.imageset/Camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/Camera.imageset/Camera.png
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/Search.imageset/Search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/Search.imageset/Search.png
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/Camera.imageset/Camera@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/Camera.imageset/Camera@2x.png
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/Camera.imageset/Camera@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/Camera.imageset/Camera@3x.png
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/Search.imageset/Search@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/Search.imageset/Search@2x.png
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/Search.imageset/Search@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/Search.imageset/Search@3x.png
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/PlaceHolder.imageset/PlaceHolder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/PlaceHolder.imageset/PlaceHolder.png
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/SamplePhoto.imageset/SamplePhoto.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/SamplePhoto.imageset/SamplePhoto.png
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/SettingsIcon.imageset/SettingsIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/SettingsIcon.imageset/SettingsIcon.png
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/PlaceHolder.imageset/PlaceHolder@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/PlaceHolder.imageset/PlaceHolder@2x.png
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/PlaceHolder.imageset/PlaceHolder@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/PlaceHolder.imageset/PlaceHolder@3x.png
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/SamplePhoto.imageset/SamplePhoto@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/SamplePhoto.imageset/SamplePhoto@2x.jpg
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/SamplePhoto.imageset/SamplePhoto@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/SamplePhoto.imageset/SamplePhoto@3x.png
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/SettingsIcon.imageset/SettingsIcon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/SettingsIcon.imageset/SettingsIcon@2x.png
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/SettingsIcon.imageset/SettingsIcon@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/SettingsIcon.imageset/SettingsIcon@3x.png
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/Background Image.imageset/Background Image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/Background Image.imageset/Background Image.png
--------------------------------------------------------------------------------
/ImageDiscovery.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/Background Image.imageset/Background Image@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/Background Image.imageset/Background Image@2x.png
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/Background Image.imageset/Background Image@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/master/ImageDiscovery/Assets.xcassets/Background Image.imageset/Background Image@3x.png
--------------------------------------------------------------------------------
/ImageDiscovery/ImageResult.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import "ImageResult.h"
7 |
8 | @implementation ImageResult
9 |
10 | @end
11 |
--------------------------------------------------------------------------------
/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '6.0'
3 |
4 | source 'https://github.com/CocoaPods/Specs.git'
5 | platform :ios, '8.0'
6 | target 'ImageDiscovery' do
7 | pod 'AFNetworking', '~> 3.0'
8 | pod 'ADALiOS'
9 | end
10 |
--------------------------------------------------------------------------------
/ImageDiscovery/InitialViewController.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import
7 |
8 | @interface InitialViewController : UIViewController
9 |
10 | @end
11 |
--------------------------------------------------------------------------------
/ImageDiscovery/ViewController.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import
7 |
8 | @interface ViewController : UIViewController
9 |
10 |
11 | @end
12 |
13 |
--------------------------------------------------------------------------------
/ImageDiscovery.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ImageDiscovery/CameraViewController.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import
7 |
8 | @interface CameraViewController : UIViewController
9 |
10 | @property (strong, nonatomic) UIImage *selectedImage;
11 |
12 | @end
13 |
--------------------------------------------------------------------------------
/ImageDiscovery/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import
7 |
8 | @interface AppDelegate : UIResponder
9 |
10 | @property (strong, nonatomic) UIWindow *window;
11 |
12 |
13 | @end
14 |
15 |
--------------------------------------------------------------------------------
/ImageDiscovery/ImageActionTableViewController.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import
7 |
8 | @interface ImageActionTableViewController : UITableViewController
9 |
10 | @property (nonatomic, strong) UIImage *image;
11 |
12 | @end
13 |
--------------------------------------------------------------------------------
/ImageDiscovery/ImageResult.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import
7 |
8 | @interface ImageResult : NSObject
9 |
10 | @property (nonatomic, strong) NSString *thumbnailURLString;
11 | @property (nonatomic, strong) NSString *imageURLString;
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ImageDiscovery/main.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import
7 | #import "AppDelegate.h"
8 |
9 | int main(int argc, char * argv[]) {
10 | @autoreleasepool {
11 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ImageDiscovery/ImageDiscovery.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | keychain-access-groups
6 |
7 | $(AppIdentifierPrefix)com.microsoft.ImageDiscovery
8 | $(AppIdentifierPrefix)com.microsoft.adalcache
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ImageDiscovery/ImageSearchViewController.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import
7 |
8 | @interface ImageSearchViewController : UICollectionViewController
9 |
10 | @property (strong, nonatomic) UIImage *selectedImage;
11 | @property (strong, nonatomic) NSString *fullImageURLString;
12 |
13 | - (void) dismissKeyboard;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ImageDiscovery/ImageSearchManager.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import
7 |
8 | @interface ImageSearchManager : NSObject
9 |
10 | // Searches and returns array of results in ImageResult form.
11 | + (void)searchForImage:(NSString *)searchTerm
12 | completion:(void (^)(NSArray *, NSError *))completion;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/ImageDiscovery/ImageFilterViewController.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import
7 |
8 | @interface ImageFilterViewController : UIViewController
9 |
10 | @property (nonatomic, strong) UIImage *selectedImage;
11 | @property (nonatomic, strong) UIImage *thumbnailImage;
12 | @property (nonatomic, strong) NSString *fullSizeImageURLString;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/Camera.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "Camera.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "Camera@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "Camera@3x.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/Search.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "Search.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "Search@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "Search@3x.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/PlaceHolder.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "PlaceHolder.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "PlaceHolder@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "PlaceHolder@3x.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/SamplePhoto.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "SamplePhoto.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "SamplePhoto@2x.jpg",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "SamplePhoto@3x.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/SettingsIcon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "SettingsIcon.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "SettingsIcon@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "SettingsIcon@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/Background Image.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "Background Image.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "Background Image@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "Background Image@3x.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/ImageDiscovery/AuthenticationConstants.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import
7 |
8 | @interface AuthenticationConstants : NSObject
9 |
10 | // Application Information
11 | extern NSString *const kRedirectUri;
12 | extern NSString *const kClientId;
13 | extern NSString *const kResourceId;
14 | extern NSString *const kAuthority;
15 |
16 | // Google Custom Search API Key and CX
17 | extern NSString *const kGoogleAPIKey;
18 | extern NSString *const kGoogleCX;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/ImageDiscovery/ViewController.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import "ViewController.h"
7 |
8 | @interface ViewController ()
9 |
10 | @end
11 |
12 | @implementation ViewController
13 |
14 | - (void)viewDidLoad {
15 | [super viewDidLoad];
16 | // Do any additional setup after loading the view, typically from a nib.
17 | }
18 |
19 | - (void)didReceiveMemoryWarning {
20 | [super didReceiveMemoryWarning];
21 | // Dispose of any resources that can be recreated.
22 |
23 | }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/ImageDiscovery/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/ImageDiscovery/EmailPostContent.json:
--------------------------------------------------------------------------------
1 | {
2 | "Message": {
3 | "Subject": "Check out this picture",
4 | "Body": {
5 | "ContentType": "Text",
6 | "Content": "Check out this picture from Image Discovery App!"
7 | },
8 | "ToRecipients": [
9 | {
10 | "EmailAddress": {
11 | "Address": ""
12 | }
13 | }
14 | ],
15 |
16 | "Attachments": [
17 | {
18 | "@odata.type": "#Microsoft.OutlookServices.FileAttachment",
19 | "Name": "image.jpg",
20 | "contentBytes": "",
21 | }
22 | ]
23 | },
24 | "SaveToSentItems": "true"
25 | }
26 |
--------------------------------------------------------------------------------
/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - ADALiOS (1.2.7)
3 | - AFNetworking (3.1.0):
4 | - AFNetworking/NSURLSession (= 3.1.0)
5 | - AFNetworking/Reachability (= 3.1.0)
6 | - AFNetworking/Security (= 3.1.0)
7 | - AFNetworking/Serialization (= 3.1.0)
8 | - AFNetworking/UIKit (= 3.1.0)
9 | - AFNetworking/NSURLSession (3.1.0):
10 | - AFNetworking/Reachability
11 | - AFNetworking/Security
12 | - AFNetworking/Serialization
13 | - AFNetworking/Reachability (3.1.0)
14 | - AFNetworking/Security (3.1.0)
15 | - AFNetworking/Serialization (3.1.0)
16 | - AFNetworking/UIKit (3.1.0):
17 | - AFNetworking/NSURLSession
18 |
19 | DEPENDENCIES:
20 | - ADALiOS
21 | - AFNetworking (~> 3.0)
22 |
23 | SPEC CHECKSUMS:
24 | ADALiOS: 6b59a796c6a431a5038cfc979751fcaea2144371
25 | AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
26 |
27 | PODFILE CHECKSUM: a54fd1be3e8921c05cbc599a66edfeea3ed82482
28 |
29 | COCOAPODS: 1.0.1
30 |
--------------------------------------------------------------------------------
/ImageDiscovery/AuthenticationConstants.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import "AuthenticationConstants.h"
7 |
8 | @implementation AuthenticationConstants
9 |
10 | // You will set your application's clientId and redirect URI.
11 | NSString * const kRedirectUri = @"ENTER_YOUR_REDIRECT_URI";
12 | NSString * const kClientId = @"ENTER_YOUR_CLIENT_ID";
13 | NSString * const kResourceId = @"https://graph.microsoft.com";
14 | NSString * const kAuthority = @"https://login.microsoftonline.com/common";
15 |
16 | // This app uses Google Custom Search.
17 | // To enable image search in the app, you'll need to supply the
18 | // API Key and custom search engine ID (cx) for Google Custom Search
19 | NSString * const kGoogleAPIKey = @"ENTER_Google_API_KEY";
20 | NSString * const kGoogleCX = @"ENTER_Google_CX";
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/ImageDiscovery/AuthenticationManager.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import
7 | #import
8 | #import
9 |
10 | /**
11 | * AuthenticationManager
12 | * This class is used as an interface between a UIViewController and authentication.
13 | * If additional authentication mechanisms are used, this class is scalable.
14 | */
15 |
16 | @interface AuthenticationManager : NSObject
17 |
18 | + (AuthenticationManager*)sharedInstance;
19 |
20 | @property (nonatomic, strong) NSString *accessToken;
21 | @property (nonatomic, strong) ADTokenCacheStoreItem *tokenCacheItem;
22 |
23 | // Authenticate
24 | - (void)acquireAuthTokenCompletion:(void (^)(ADAuthenticationResult *result))completion;
25 | - (void)acquireAuthTokenSilentlyWithCompletion:(void (^)(ADAuthenticationResult *result))completion;
26 |
27 | // Clears the ADAL token cache and the cookie cache.
28 | - (void) clearCredentials;
29 |
30 | // Check for status
31 | - (BOOL) isConnected;
32 |
33 | @end
34 |
35 |
--------------------------------------------------------------------------------
/Notices.md:
--------------------------------------------------------------------------------
1 | #Third Party Notices for Office 365 Microsoft Graph Image Discovery for iOS
2 |
3 | This project incorporates material from the project(s) listed below (collectively, "Third Party Code"). Microsoft is not the original author of the Third Party Code. The original copyright notices and licenses, under which Microsoft received such Third Party Code, are set out below together with the full text of such licenses. These notices and licenses are provided for informational purposes only. This Third Party Code is licensed to you under the terms set forth in the licenses set forth below. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise.
4 |
5 |
6 |
7 | - [Azure Active Directory Authentication Library for iOS](https://github.com/AzureAD/azure-activedirectory-library-for-objc), which is Copyright (c) Microsoft Open Technologies, Inc. and is available under the Apache 2.0 license: [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) ("License").
8 |
9 | - [AFNetworking](https://github.com/AFNetworking/AFNetworking), which is Copyright (c) Alamofire Software Foundation and is available under the MIT license.
10 |
--------------------------------------------------------------------------------
/License.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 |
4 | Copyright (c) 2016 Microsoft Corporation
5 |
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 |
15 | The above copyright notice and this permission notice shall be included in
16 | all copies or substantial portions of the Software.
17 |
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | THE SOFTWARE.
--------------------------------------------------------------------------------
/ImageDiscovery/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
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 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | NSAppTransportSecurity
26 |
27 | NSAllowsArbitraryLoads
28 |
29 |
30 | UILaunchStoryboardName
31 | LaunchScreen
32 | UIMainStoryboardFile
33 | Main
34 | UIRequiredDeviceCapabilities
35 |
36 | armv7
37 |
38 | UISupportedInterfaceOrientations
39 |
40 | UIInterfaceOrientationPortrait
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/.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 | *.xccheckout
22 | *.moved-aside
23 | *.xcuserstate
24 | *.xcscmblueprint
25 |
26 | ## Obj-C/Swift specific
27 | *.hmap
28 | *.ipa
29 |
30 | # CocoaPods
31 | #
32 | # We recommend against adding the Pods directory to your .gitignore. However
33 | # you should judge for yourself, the pros and cons are mentioned at:
34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
35 | #
36 | Pods/
37 |
38 | # Carthage
39 | #
40 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
41 | # Carthage/Checkouts
42 |
43 | Carthage/Build
44 |
45 | # fastlane
46 | #
47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48 | # screenshots whenever they are needed.
49 | # For more information about the recommended setup visit:
50 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md
51 |
52 | fastlane/report.xml
53 | fastlane/screenshots
54 |
--------------------------------------------------------------------------------
/ImageDiscovery/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import "AppDelegate.h"
7 |
8 | @interface AppDelegate ()
9 |
10 | @end
11 |
12 | @implementation AppDelegate
13 |
14 |
15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
16 | // Override point for customization after application launch.
17 | return YES;
18 | }
19 |
20 | - (void)applicationWillResignActive:(UIApplication *)application {
21 | // 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.
22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
23 | }
24 |
25 | - (void)applicationDidEnterBackground:(UIApplication *)application {
26 | // 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.
27 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
28 | }
29 |
30 | - (void)applicationWillEnterForeground:(UIApplication *)application {
31 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
32 | }
33 |
34 | - (void)applicationDidBecomeActive:(UIApplication *)application {
35 | // 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.
36 | }
37 |
38 | - (void)applicationWillTerminate:(UIApplication *)application {
39 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/ImageDiscovery/ImageSearchManager.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import "AuthenticationConstants.h"
7 | #import "ImageResult.h"
8 | #import "ImageSearchManager.h"
9 | #import
10 |
11 |
12 | @implementation ImageSearchManager
13 |
14 | /**
15 | * Searches images and returns array of ImageResult.
16 | * This uses Google Custom Search but can be replaced with any other search engines
17 | */
18 | + (void)searchForImage:(NSString *)searchTerm
19 | completion:(void (^)(NSArray *, NSError *))completion
20 | {
21 | NSString *URLString = @"https://www.googleapis.com/customsearch/v1";
22 | NSDictionary *parameters = @{@"key":kGoogleAPIKey,
23 | @"cx":kGoogleCX,
24 | @"searchType":@"image",
25 | @"rights":@"cc_publicdomain",
26 | @"start":@"1",
27 | @"num":@"10",
28 | @"q":searchTerm,
29 | };
30 | AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
31 |
32 | [manager GET:URLString
33 | parameters:parameters progress:nil
34 | success:^(NSURLSessionTask *task, id responseObject) {
35 | NSMutableArray *result = [NSMutableArray new];
36 | NSArray *items = [responseObject objectForKey:@"items"];
37 |
38 | [items enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
39 | ImageResult *image = [ImageResult new];
40 | image.thumbnailURLString = [[obj objectForKey:@"image"] objectForKey:@"thumbnailLink"];
41 | image.imageURLString = [obj objectForKey:@"link"];
42 |
43 | [result addObject:image];
44 | }];
45 | completion(result, nil);
46 | } failure:^(NSURLSessionTask *operation, NSError *error) {
47 | NSLog(@"Error: %@", error);
48 | completion(nil, error);
49 | }];
50 | }
51 |
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/ImageDiscovery/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/ImageDiscovery/ImageFilterViewController.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import "ImageActionTableViewController.h"
7 | #import "ImageFilterViewController.h"
8 | #import
9 |
10 |
11 | @interface ImageFilterViewController ()
12 | @property (weak, nonatomic) IBOutlet UIImageView *mainPreviewImageView;
13 |
14 | @end
15 |
16 | @implementation ImageFilterViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 |
21 | self.mainPreviewImageView.image = self.thumbnailImage;
22 | }
23 |
24 | - (void)viewDidAppear:(BOOL)animated {
25 | [super viewDidAppear:animated];
26 | if (self.fullSizeImageURLString) {
27 |
28 | [self.mainPreviewImageView setImageWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.fullSizeImageURLString] ] placeholderImage:self.thumbnailImage success:^(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image) {
29 | self.mainPreviewImageView.image = image;
30 | self.selectedImage = image;
31 | } failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error) {
32 | NSLog(@"error fetching full size image\n%@", error.localizedDescription);
33 | }];
34 | }
35 | }
36 |
37 | - (void)didReceiveMemoryWarning {
38 | [super didReceiveMemoryWarning];
39 | }
40 |
41 | - (void)viewWillAppear:(BOOL)animated {
42 | [super viewWillAppear:animated];
43 | [self.navigationController setNavigationBarHidden:NO animated:YES];
44 | }
45 |
46 | - (IBAction)originalButtonPressed:(id)sender {
47 |
48 | self.mainPreviewImageView.image = self.selectedImage;
49 | }
50 |
51 | - (IBAction)blackAndWhitePressed:(id)sender {
52 |
53 | UIImage *image = self.selectedImage;
54 | CGRect imageRect = CGRectMake(0, 0, image.size.width, image.size.height);
55 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray();
56 |
57 | CGContextRef context = CGBitmapContextCreate(nil, image.size.width, image.size.height, 8, 0, colorSpace, kCGImageAlphaNone);
58 | CGContextDrawImage(context, imageRect, [image CGImage]);
59 |
60 | CGImageRef grayImage = CGBitmapContextCreateImage(context);
61 | CGColorSpaceRelease(colorSpace);
62 | CGContextRelease(context);
63 |
64 | context = CGBitmapContextCreate(nil, image.size.width, image.size.height, 8, 0, nil, kCGImageAlphaOnly);
65 | CGContextDrawImage(context, imageRect, [image CGImage]);
66 | CGImageRef mask = CGBitmapContextCreateImage(context);
67 | CGContextRelease(context);
68 |
69 |
70 | UIImage *grayScaleImage = [UIImage imageWithCGImage:CGImageCreateWithMask(grayImage, mask)
71 | scale:image.scale orientation:image.imageOrientation];
72 | CGImageRelease(grayImage);
73 | CGImageRelease(mask);
74 |
75 | self.mainPreviewImageView.image = grayScaleImage;
76 |
77 | }
78 |
79 | - (IBAction)selectPressed:(id)sender {
80 | [self performSegueWithIdentifier:@"sendStoreImage" sender:nil];
81 | }
82 |
83 |
84 | #pragma mark - Navigation
85 |
86 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
87 | if ([segue.identifier isEqualToString:@"sendStoreImage"]) {
88 | ImageActionTableViewController *vc = segue.destinationViewController;
89 | vc.image = self.mainPreviewImageView.image;
90 | }
91 |
92 | }
93 |
94 |
95 | @end
96 |
--------------------------------------------------------------------------------
/ImageDiscovery/AuthenticationManager.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import "AuthenticationConstants.h"
7 | #import "AuthenticationManager.h"
8 | #import
9 | #import
10 | #import
11 |
12 |
13 | NSString * const kUserConnectionKey = @"USER_CONNECTED";
14 |
15 | @interface AuthenticationManager()
16 |
17 | @property (nonatomic, strong) ADAuthenticationContext *context;
18 |
19 | @end
20 |
21 | @implementation AuthenticationManager
22 |
23 | // Use a single authentication manager for the application.
24 | + (AuthenticationManager *)sharedInstance {
25 | static AuthenticationManager *sharedInstance;
26 | static dispatch_once_t onceToken;
27 |
28 | // Initialize the AuthenticationManager only once.
29 | dispatch_once(&onceToken, ^{
30 | sharedInstance = [[AuthenticationManager alloc] init];
31 | ADAuthenticationError *error;
32 | sharedInstance.context = [ADAuthenticationContext authenticationContextWithAuthority:kAuthority error:&error];
33 |
34 | if (error) {
35 | NSLog(@"%@", error.localizedDescription);
36 | sharedInstance = nil;
37 | }
38 | });
39 | return sharedInstance;
40 | }
41 |
42 | #pragma mark - acquire token
43 | - (void)acquireAuthTokenCompletion:(void (^)(ADAuthenticationResult *result))completion {
44 | [self.context acquireTokenWithResource:kResourceId
45 | clientId:kClientId
46 | redirectUri:[NSURL URLWithString:kRedirectUri]
47 | completionBlock:^(ADAuthenticationResult *result) {
48 | if (result.status == AD_SUCCEEDED){
49 | self.accessToken = result.accessToken;
50 | self.tokenCacheItem = result.tokenCacheStoreItem;
51 | [[NSUserDefaults standardUserDefaults] setBool:YES forKey:kUserConnectionKey];
52 | }
53 | completion(result);
54 | }];
55 | }
56 |
57 | - (void)acquireAuthTokenSilentlyWithCompletion:(void (^)(ADAuthenticationResult *result))completion {
58 | [self.context acquireTokenSilentWithResource:kResourceId
59 | clientId:kClientId
60 | redirectUri:[NSURL URLWithString:kRedirectUri]
61 | completionBlock:^(ADAuthenticationResult *result) {
62 | if (result.status ==AD_SUCCEEDED){
63 | self.accessToken = result.accessToken;
64 | self.tokenCacheItem = result.tokenCacheStoreItem;
65 | [[NSUserDefaults standardUserDefaults] setBool:YES forKey:kUserConnectionKey];
66 | }
67 | completion(result);
68 | }];
69 | }
70 |
71 | #pragma mark - clear credentials
72 | //Clears the ADAL token cache and the cookie cache.
73 | - (void)clearCredentials{
74 |
75 | // Remove all the cookies from this application's sandbox. The authorization code is stored in the
76 | // cookies and ADAL will try to get to access tokens based on auth code in the cookie.
77 | NSHTTPCookieStorage *cookieStore = [NSHTTPCookieStorage sharedHTTPCookieStorage];
78 | for (NSHTTPCookie *cookie in cookieStore.cookies) {
79 | [cookieStore deleteCookie:cookie];
80 | }
81 |
82 | self.accessToken = nil;
83 | self.tokenCacheItem = nil;
84 | [self.context.tokenCacheStore removeAllWithError:nil];
85 | }
86 |
87 | #pragma mark - status
88 | - (BOOL) isConnected {
89 | return [[NSUserDefaults standardUserDefaults] boolForKey:kUserConnectionKey];
90 | }
91 |
92 | @end
93 |
94 |
--------------------------------------------------------------------------------
/ImageDiscovery/InitialViewController.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import "CameraViewController.h"
7 | #import "ImageFilterViewController.h"
8 | #import "ImageSearchViewController.h"
9 | #import "InitialViewController.h"
10 |
11 |
12 | @interface InitialViewController ()
13 |
14 | @property (strong, nonatomic) IBOutlet UIScrollView *scrollView;
15 | @property (strong, nonatomic) IBOutlet UIButton *switchModeButton;
16 | @property (nonatomic, strong) CameraViewController *cameraViewController;
17 | @property (nonatomic, strong) ImageSearchViewController *imageSearchViewController;
18 | @end
19 |
20 | @implementation InitialViewController
21 |
22 | - (void)viewDidLoad {
23 | [super viewDidLoad];
24 | }
25 |
26 | - (void)viewDidAppear:(BOOL)animated{
27 | [super viewDidAppear:animated];
28 | self.switchModeButton.hidden = NO;
29 | }
30 |
31 | - (void)viewWillDisappear:(BOOL)animated{
32 | [super viewWillDisappear:animated];
33 | self.switchModeButton.hidden = YES;
34 | }
35 |
36 | - (void)viewWillAppear:(BOOL)animated {
37 | [super viewWillAppear:animated];
38 | [self.navigationController setNavigationBarHidden:YES animated:YES];
39 | }
40 |
41 | - (void)didReceiveMemoryWarning {
42 | [super didReceiveMemoryWarning];
43 | }
44 |
45 | #pragma mark - UIScrollView delegate
46 | - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
47 | [self.imageSearchViewController dismissKeyboard];
48 | }
49 |
50 | - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
51 |
52 | if (scrollView.contentOffset.x == 0) {
53 | [self switchButtonToCamera:NO];
54 | }
55 | else {
56 | [self switchButtonToCamera:YES];
57 | }
58 | }
59 |
60 | #pragma mark - Toggle Camera/Image search
61 | - (IBAction)switchPictureMode:(id)sender {
62 | CGRect frame = self.scrollView.frame;
63 | if (self.scrollView.contentOffset.x == 0) {
64 | frame.origin.x = frame.size.width;
65 | frame.origin.y = 0;
66 | [self switchButtonToCamera:YES];
67 | }
68 | else {
69 | frame.origin.x = 0;
70 | frame.origin.y = 0;
71 | [self switchButtonToCamera:NO];
72 | }
73 | [self.scrollView scrollRectToVisible:frame animated:YES];
74 | }
75 |
76 |
77 |
78 | - (void)switchButtonToCamera:(BOOL)camera {
79 | if (camera) {
80 | [self.switchModeButton setImage:[UIImage imageNamed:@"Camera"]
81 | forState:UIControlStateNormal];
82 | }
83 | else {
84 | [self.switchModeButton setImage:[UIImage imageNamed:@"Search"]
85 | forState:UIControlStateNormal];
86 | }
87 | }
88 |
89 |
90 | #pragma mark - Navigation
91 |
92 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
93 |
94 | if ([segue.identifier isEqualToString:@"embedCamera"]) {
95 | self.cameraViewController = segue.destinationViewController;
96 | }
97 |
98 | else if ([segue.identifier isEqualToString:@"embedImageSearch"]) {
99 | self.imageSearchViewController = segue.destinationViewController;
100 | }
101 |
102 | else if ([segue.identifier isEqualToString:@"cameraImageFilter"]) {
103 | ImageFilterViewController *vc = segue.destinationViewController;
104 | vc.selectedImage = self.cameraViewController.selectedImage;
105 | vc.thumbnailImage = self.cameraViewController.selectedImage;
106 | }
107 |
108 | else if ([segue.identifier isEqualToString:@"searchImageFilter"]) {
109 | ImageFilterViewController *vc = segue.destinationViewController;
110 | vc.selectedImage = self.imageSearchViewController.selectedImage;
111 | vc.thumbnailImage = self.imageSearchViewController.selectedImage;
112 | vc.fullSizeImageURLString = self.imageSearchViewController.fullImageURLString;
113 | }
114 | }
115 |
116 |
117 | @end
118 |
--------------------------------------------------------------------------------
/ImageDiscovery/ImageSearchViewController.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import "ImageFilterViewController.h"
7 | #import "ImageResult.h"
8 | #import "ImageSearchManager.h"
9 | #import "ImageSearchViewController.h"
10 | #import
11 |
12 |
13 | @interface ImageSearchViewController ()
14 |
15 | @property (nonatomic, strong) NSArray *searchResult;
16 | @property (nonatomic,strong) UISearchBar *searchBar;
17 |
18 | @end
19 |
20 | @implementation ImageSearchViewController
21 |
22 | - (void)viewDidLoad {
23 | [super viewDidLoad];
24 | _searchResult = [NSMutableArray new];
25 |
26 | [self addSearchBar];
27 |
28 | self.collectionView.contentInset = UIEdgeInsetsMake(60, 0, 0, 0);
29 |
30 | }
31 |
32 | - (void)didReceiveMemoryWarning {
33 | [super didReceiveMemoryWarning];
34 | }
35 |
36 | - (void) dismissKeyboard {
37 | [self.searchBar resignFirstResponder];
38 | }
39 |
40 | #pragma mark - setup
41 | - (void)addSearchBar {
42 |
43 | self.searchBar = [[UISearchBar alloc]initWithFrame:CGRectMake(0, 20, [UIScreen mainScreen].bounds.size.width, 44)];
44 | self.searchBar.searchBarStyle = UISearchBarStyleMinimal;
45 | self.searchBar.tintColor = [UIColor whiteColor];
46 | self.searchBar.barTintColor = [UIColor whiteColor];
47 | self.searchBar.delegate = self;
48 | self.searchBar.placeholder = @"Search images from web";
49 | [self.view addSubview:self.searchBar];
50 |
51 | }
52 |
53 |
54 | #pragma mark - search delegates
55 |
56 | - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
57 | float length = (self.view.frame.size.width / 3) - 1;
58 | return CGSizeMake(length, length);
59 | }
60 |
61 | - (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {
62 | [searchBar resignFirstResponder];
63 |
64 | [ImageSearchManager searchForImage:searchBar.text completion:^(NSArray *result, NSError *error) {
65 | if (error) {
66 | UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Error"
67 | message:error.localizedDescription
68 | preferredStyle:UIAlertControllerStyleAlert];
69 | [alert addAction:[UIAlertAction actionWithTitle:@"Close" style:UIAlertActionStyleDefault handler:nil]];
70 | [self presentViewController:alert animated:true completion:nil];
71 | return;
72 | }
73 |
74 | self.searchResult = result;
75 | [self.collectionView reloadData];
76 | }];
77 | }
78 |
79 | - (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar {
80 | searchBar.text = @"";
81 | [searchBar endEditing:YES];
82 |
83 | }
84 |
85 | - (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar {
86 | [searchBar setShowsCancelButton:YES animated:YES];
87 |
88 | return YES;
89 | }
90 |
91 | - (BOOL)searchBarShouldEndEditing:(UISearchBar *)searchBar {
92 | [searchBar setShowsCancelButton:NO animated:YES];
93 |
94 | return YES;
95 | }
96 |
97 |
98 | #pragma mark - collection view
99 | - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
100 | return 1;
101 | }
102 |
103 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
104 |
105 | //defaultCollectionView
106 | UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"defaultCollectionView" forIndexPath:indexPath];
107 |
108 | ImageResult *image = self.searchResult[indexPath.row];
109 |
110 | [((UIImageView*)[cell viewWithTag:101]) setImageWithURL:[NSURL URLWithString:image.thumbnailURLString]
111 | placeholderImage:[UIImage imageNamed:@"PlaceHolder"]];
112 |
113 | return cell;
114 | }
115 |
116 |
117 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
118 | return self.searchResult.count;
119 | }
120 |
121 | - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
122 | UIImage *thumbnail = ((UIImageView*)[[self.collectionView cellForItemAtIndexPath:indexPath] viewWithTag:101]).image;
123 | self.selectedImage = thumbnail;
124 | self.fullImageURLString = ((ImageResult*)self.searchResult[indexPath.row]).imageURLString;
125 |
126 | [self.parentViewController performSegueWithIdentifier:@"searchImageFilter" sender:nil];
127 |
128 |
129 | }
130 |
131 | @end
132 |
--------------------------------------------------------------------------------
/ImageDiscovery/CameraViewController.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import "CameraViewController.h"
7 | #import "ImageFilterViewController.h"
8 | #import
9 | #import
10 |
11 |
12 | @interface CameraViewController () {
13 | AVCaptureSession *session;
14 | AVCaptureStillImageOutput *stillImageOutput;
15 | AVCaptureVideoPreviewLayer *previewLayer;
16 | AVCaptureDevice *captureDevice;
17 | }
18 |
19 | @property (strong, nonatomic) IBOutlet UIView *cameraView;
20 | @property (strong, nonatomic) IBOutlet UILabel *cameraLabel;
21 |
22 |
23 | @end
24 |
25 | @implementation CameraViewController
26 |
27 |
28 |
29 | - (void)viewDidLoad {
30 | [super viewDidLoad];
31 | }
32 |
33 | - (void)didReceiveMemoryWarning {
34 | [super didReceiveMemoryWarning];
35 | }
36 |
37 |
38 | - (void)viewDidAppear:(BOOL)animated {
39 | [super viewDidAppear:animated];
40 | [self startCamera];
41 | }
42 |
43 | - (void)viewWillDisappear:(BOOL)animated {
44 | [super viewWillDisappear:animated];
45 | [self stopCamera];
46 | }
47 |
48 |
49 | #pragma mark - camera
50 |
51 | - (void)startCamera {
52 | if (TARGET_IPHONE_SIMULATOR) {
53 | return;
54 | }
55 |
56 | self.cameraLabel.text = @"Loading Camera";
57 |
58 | if (!session) {
59 | [self initializeCamera];
60 | }
61 | [session startRunning];
62 | }
63 |
64 | - (void)stopCamera {
65 | if (TARGET_IPHONE_SIMULATOR) {
66 | return;
67 | }
68 |
69 | [session stopRunning];
70 | }
71 |
72 | - (IBAction)takePhotoButtonPressed:(UIButton *)sender {
73 | [self takePhotoWithCompletion:^(NSData *imageData, NSError *error) {
74 | if (error) {
75 | UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Error"
76 | message:error.localizedDescription
77 | preferredStyle:UIAlertControllerStyleAlert];
78 |
79 | [alert addAction:[UIAlertAction actionWithTitle:@"Close"
80 | style:UIAlertActionStyleCancel handler:nil]];
81 |
82 | [self presentViewController:alert animated:YES completion:nil];
83 | }
84 | else {
85 | self.selectedImage = [UIImage imageWithData:imageData];
86 | [self.parentViewController performSegueWithIdentifier:@"cameraImageFilter" sender:nil];
87 | }
88 | }];
89 |
90 | }
91 |
92 | - (void)initializeCamera {
93 | session = [[AVCaptureSession alloc] init];
94 | [session setSessionPreset:AVCaptureSessionPresetPhoto];
95 |
96 | AVCaptureDevice *inputDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
97 | NSError *error;
98 |
99 | captureDevice = inputDevice;
100 |
101 | AVCaptureDeviceInput *deviceInput = [AVCaptureDeviceInput deviceInputWithDevice:inputDevice
102 | error:&error];
103 |
104 | if ([session canAddInput:deviceInput]) {
105 | [session addInput:deviceInput];
106 | }
107 |
108 | previewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:session];
109 | [previewLayer setBackgroundColor:[UIColor clearColor].CGColor];
110 |
111 | CALayer *rootLayer = [self.cameraView layer];
112 | [rootLayer setMasksToBounds:NO];
113 | [previewLayer setFrame:CGRectMake(0, 0, rootLayer.bounds.size.width, rootLayer.bounds.size.height)];
114 | [rootLayer addSublayer:previewLayer];
115 |
116 | stillImageOutput = [[AVCaptureStillImageOutput alloc] init];
117 | NSDictionary *outputSettings = @{AVVideoCodecJPEG:AVVideoCodecKey};
118 | [stillImageOutput setOutputSettings:outputSettings];
119 | [session addOutput:stillImageOutput];
120 | }
121 |
122 |
123 | - (void)takePhotoWithCompletion:(void (^)(NSData *imageData, NSError *error))completion {
124 | if (TARGET_IPHONE_SIMULATOR) {
125 | completion(UIImagePNGRepresentation([UIImage imageNamed:@"SamplePhoto"]), nil);
126 | }
127 | else {
128 | // Capture image & upload
129 | AVCaptureConnection *videoConnection = nil;
130 |
131 | for (AVCaptureConnection *connection in stillImageOutput.connections) {
132 | for (AVCaptureInputPort *port in [connection inputPorts]) {
133 | if ([[port mediaType] isEqual:AVMediaTypeVideo]) {
134 | videoConnection = connection;
135 | break;
136 | }
137 | }
138 | if (videoConnection) {
139 | break;
140 | }
141 | }
142 |
143 | [stillImageOutput captureStillImageAsynchronouslyFromConnection:videoConnection
144 | completionHandler:^(CMSampleBufferRef imageDataSampleBuffer, NSError *error) {
145 | if (imageDataSampleBuffer) {
146 | NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageDataSampleBuffer];
147 | completion(imageData, nil);
148 | }
149 | else{
150 | completion(nil, error);
151 | }
152 | }];
153 | }
154 | }
155 |
156 | #pragma mark - Helper
157 |
158 | - (UIImage*)imageWithColor:(UIColor *)color {
159 | CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f);
160 | UIGraphicsBeginImageContext(rect.size);
161 | CGContextRef context = UIGraphicsGetCurrentContext();
162 |
163 | CGContextSetFillColorWithColor(context, [color CGColor]);
164 | CGContextFillRect(context, rect);
165 |
166 | UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
167 | UIGraphicsEndImageContext();
168 |
169 | return image;
170 | }
171 |
172 |
173 | @end
174 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # [ARCHIVED] Office 365 Microsoft Graph Image Discovery for iOS
2 |
3 | ## IMPORTANT
4 |
5 | This project is being archived. As part of the archival process, we're closing all open issues and pull requests.
6 |
7 | You can continue to use this sample "as-is", but it won't be maintained moving forward. We apologize for any inconvenience.
8 |
9 | ## Overview
10 |
11 | Image Discovery is an iOS sample app that allows you either to take a picture or to search the web for one, and process the fetched image. You can then save it in the cloud or mail to a recipient. For example, you can take a picture, convert the image to black and white, and push it to OneDrive for Business to store.
12 |
13 | 
14 |
15 | Or, you can search for an image via Google Custom Search and mail it to a friend.
16 |
17 | 
18 |
19 | This sample illustrates how to use Microsoft Graph, a unified API endpoint, for working with mail and files in Office 365. For more information about Microsoft Graph see the Microsoft Graph overview page.
20 |
21 | ## Prerequisites
22 | * [Xcode](https://developer.apple.com/xcode/downloads/) from Apple
23 | * Installation of [CocoaPods](https://guides.cocoapods.org/using/using-cocoapods.html) as a dependency manager.
24 | * An Office 365 account. You can sign up for [an Office 365 Developer subscription](https://aka.ms/devprogramsignup) that includes the resources that you need to start building Office 365 apps.
25 |
26 | > Note: If you already have a subscription, the previous link sends you to a page with the message *Sorry, you can’t add that to your current account*. In that case, use an account from your current Office 365 subscription.Mic
27 | * A Microsoft Azure Tenant to register your application. Microsoft Azure Active Directory (AD) provides identity services that applications use for authentication and authorization. A trial subscription can be acquired here: [Microsoft Azure](https://account.windowsazure.com/SignUp).
28 |
29 | > Important: You'll also need to ensure your Azure subscription is bound to your Office 365 tenant. To do this, see the Active Directory Team's Blog post, [Creating and Managing Multiple Windows Azure Active Directories](http://blogs.technet.com/b/ad/archive/2013/11/08/creating-and-managing-multiple-windows-azure-active-directories.aspx). The **Adding a new directory** section will explain how to do this. You can also see [Set up your Office 365 development environment](https://msdn.microsoft.com/office/office365/howto/setup-development-environment#bk_CreateAzureSubscription) and the section **Associate your Office 365 account with Azure AD to create and manage apps** for more information.
30 |
31 | * A client id (application id) and redirect uri values of an application registered in Azure. This sample application must be granted several permissions for **Microsoft Graph**. To create the registration, see [Grant permissions to the Snippets application in Azure](https://github.com/microsoftgraph/ios-objectivec-imagediscovery-rest-sample/wiki/Grant-permissions-to-the-Image-Discovery-application-in-Azure).
32 |
33 | * This sample uses Google Custom Search to search for images. In order for the search functionality in this app to work, you'll need your own API key and custom search engine ID (cx). For more information about obtaining these values see [Google Custom Search](https://developers.google.com/custom-search/docs/overview).
34 |
35 | > Note: The search functionality in this app is reliant on getting the API Key and search engine ID. The camera workflow, for getting an image, will still function without this information, but again you'll need these values for the search component in the app to work. Also, Google Custom Search is just being used as an example; you can implement other search engine options as needed.
36 |
37 |
38 | ## Running this sample in Xcode
39 |
40 | 1. Clone this repository
41 | 2. Use CocoaPods to import the Active Directory Authentication Library (ADAL) iOS dependency:
42 |
43 | pod 'AFNetworking', ' ~> 3.0'
44 | pod 'ADALiOS'
45 |
46 | This sample app already contains a podfile that will get the ADAL components (pods) into the project. Simply navigate to the project from **Terminal** and run:
47 |
48 | pod install
49 |
50 | For more information, see **Using CocoaPods** in [Additional Resources](#AdditionalResources)
51 |
52 | 3. Open **ImageDiscovery.xcworkspace**
53 | 4. Open **AuthenticationConstants.m**. You'll see that the **ClientID** (this is the application id from the registration process) and **RedirectUri** values can be added to the top of the file. Also you'll need to provide the Google API Key and the custom search engine ID (cx) for the search functionality to work. Supply the necessary values here:
54 |
55 | // You will set your application's Client ID and Redirect URI.
56 | NSString * const kRedirectUri = @"ENTER_YOUR_REDIRECT_URI";
57 | NSString * const kClientId = @"ENTER_YOUR_CLIENT_ID";
58 | NSString * const kResourceId = @"https://graph.microsoft.com";
59 | NSString * const kAuthority = @"https://login.microsoftonline.com/common";
60 |
61 | // To enable image search in the app, you'll need to supply the API Key and
62 | // custom search engine ID (cx) after registering for Google Images.
63 | NSString * const kGoogleAPIKey = @"ENTER_Google_API_KEY";
64 | NSString * const kGoogleCX = @"ENTER_Google_CX";
65 |
66 |
67 | 5. Run the sample.
68 |
69 |
70 | ## Contributing ##
71 |
72 | If you'd like to contribute to this sample, see [CONTRIBUTING.MD](/CONTRIBUTING.md).
73 |
74 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
75 |
76 | ## Questions and comments
77 |
78 | We'd love to get your feedback about the Office 365 iOS Microsoft Graph Image Discovery project. You can send your questions and suggestions to us in the [Issues](https://github.com/OfficeDev/O365-iOS-Microsoft-Graph-Image-Discovery/issues) section of this repository.
79 |
80 | Questions about Office 365 development in general should be posted to [Stack Overflow](http://stackoverflow.com/questions/tagged/Office365+API). Make sure that your questions or comments are tagged with [Office365] and [MicrosoftGraph].
81 |
82 | ## Additional resources
83 |
84 | * [Office Dev Center](http://dev.office.com/)
85 | * [Microsoft Graph overview page](https://graph.microsoft.io)
86 | * [Using CocoaPods](https://guides.cocoapods.org/using/using-cocoapods.html)
87 |
88 | ## Copyright
89 | Copyright (c) 2016 Microsoft. All rights reserved.
90 |
--------------------------------------------------------------------------------
/ImageDiscovery/ImageActionTableViewController.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
3 | * See LICENSE in the project root for license information.
4 | */
5 |
6 | #import "AuthenticationManager.h"
7 | #import "ImageActionTableViewController.h"
8 | #import
9 |
10 |
11 | @interface ImageActionTableViewController ()
12 | @property (weak, nonatomic) IBOutlet UIBarButtonItem *signInOutButton;
13 | @property (weak, nonatomic) IBOutlet UITableViewCell *sendEmailCell;
14 | @property (weak, nonatomic) IBOutlet UITableViewCell *storeOneDriveCell;
15 | @property (weak, nonatomic) IBOutlet UITableViewCell *storeLocalCell;
16 | @property (weak, nonatomic) IBOutlet UIImageView *previewImageView;
17 |
18 | @property (strong, nonatomic) AuthenticationManager *authManager;
19 | @property (assign, nonatomic) BOOL isConnected;
20 |
21 | @end
22 |
23 | @implementation ImageActionTableViewController
24 |
25 | - (void)viewDidLoad {
26 | [super viewDidLoad];
27 |
28 | self.tableView.tableFooterView = [UIView new];
29 | self.previewImageView.image = self.image;
30 |
31 | NSLog(@"userconnected %d", [AuthenticationManager sharedInstance].isConnected);
32 | if ([AuthenticationManager sharedInstance].isConnected) {
33 | [self setUserConnected:YES];
34 | }
35 | else {
36 | [self setUserConnected:NO];
37 | }
38 | }
39 |
40 | - (void)didReceiveMemoryWarning {
41 | [super didReceiveMemoryWarning];
42 | }
43 |
44 | #pragma mark - O365 connection
45 |
46 | - (void)setUserConnected:(BOOL)connected {
47 | self.isConnected = connected;
48 |
49 | if (connected) {
50 | dispatch_async(dispatch_get_main_queue(), ^{
51 | self.signInOutButton.title = @"Log out";
52 | });
53 | self.isConnected = YES;
54 | }
55 | else {
56 | dispatch_async(dispatch_get_main_queue(), ^{
57 | self.signInOutButton.title = @"Connect";
58 | });
59 | self.isConnected = NO;
60 | }
61 | }
62 |
63 |
64 | #pragma mark - Sign in and out
65 | - (IBAction)signInOutButtonPressed:(id)sender {
66 | if (!self.isConnected) {
67 | [[AuthenticationManager sharedInstance] acquireAuthTokenCompletion:^(ADAuthenticationResult *result) {
68 | if (result.status == AD_SUCCEEDED){
69 | [self setUserConnected:YES];
70 | }
71 | }];
72 | }
73 | else {
74 | [[AuthenticationManager sharedInstance] clearCredentials];
75 | [self setUserConnected:NO];
76 | }
77 | }
78 |
79 | #pragma mark - Upload to OneDrive
80 | - (void)uploadToOneDrive {
81 |
82 | [[AuthenticationManager sharedInstance] acquireAuthTokenCompletion:^(ADAuthenticationResult *result) {
83 | if (result.status == AD_SUCCEEDED) {
84 | [self setUserConnected:YES];
85 |
86 | UIAlertController *alertController = [UIAlertController
87 | alertControllerWithTitle:@"Save to OneDrive"
88 | message:@"Save this image with a file name.\nIt will be stored under /ImageDiscovery/{filename}.jpg"
89 | preferredStyle:UIAlertControllerStyleAlert];
90 |
91 | [alertController addTextFieldWithConfigurationHandler:^(UITextField *textField)
92 | {
93 | textField.placeholder = NSLocalizedString(@"Enter file name", @"Filename");
94 | }];
95 |
96 | UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"OK action")
97 | style:UIAlertActionStyleDefault
98 | handler:^(UIAlertAction *action)
99 | {
100 | UITextField *filename = alertController.textFields.firstObject;
101 | NSData *photoData = UIImageJPEGRepresentation(self.image, 0.5);
102 |
103 | [self uploadToOneDriveRESTWithFilename:filename.text content:photoData];
104 |
105 |
106 | }];
107 |
108 | UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel"
109 | style:UIAlertActionStyleCancel
110 | handler:nil];
111 | [alertController addAction:okAction];
112 | [alertController addAction:cancelAction];
113 | dispatch_async(dispatch_get_main_queue(), ^{
114 | [self presentViewController:alertController animated:YES completion:nil];
115 | });
116 | }
117 | else {
118 | NSLog(@"failed to acquire access token");
119 | self.storeOneDriveCell.detailTextLabel.text = @"Failed, please check log";
120 | }
121 | }];
122 | }
123 |
124 | - (void)uploadToOneDriveRESTWithFilename:(NSString*) filename
125 | content:(NSData*) data{
126 | self.storeOneDriveCell.detailTextLabel.text = @"Storing";
127 |
128 | NSMutableString *urlString = [NSMutableString stringWithString:@"https://graph.microsoft.com/v1.0/me/drive/root:/ImageDiscovery/.jpg:/content"];
129 |
130 | [urlString replaceOccurrencesOfString:@""
131 | withString:filename
132 | options:0 range:(NSRange){0, [urlString length]}];
133 |
134 | NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:urlString]];
135 |
136 | [request setHTTPMethod:@"PUT"];
137 | [request setValue:@"image/jpeg" forHTTPHeaderField:@"Content-Type"];
138 | [request setValue:@"application/json, text/plain, */*" forHTTPHeaderField:@"Accept"];
139 |
140 | NSString *authorization = [NSString stringWithFormat:@"Bearer %@", [AuthenticationManager sharedInstance].accessToken];
141 | [request setValue:authorization forHTTPHeaderField:@"Authorization"];
142 | [request setHTTPBody:data];
143 |
144 | AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
145 | [[manager dataTaskWithRequest:request completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
146 |
147 | if (!error && ((NSHTTPURLResponse*)response).statusCode == 201) {
148 | self.storeOneDriveCell.detailTextLabel.text = @"Done";
149 | }
150 | else {
151 | NSLog(@"%@", error.localizedDescription);
152 | NSLog(@"%@", response);
153 | self.storeOneDriveCell.detailTextLabel.text = @"Failed, please check log";
154 | }
155 | }] resume];
156 |
157 | }
158 |
159 | #pragma mark - Send mail
160 | - (void)sendMail {
161 |
162 | [[AuthenticationManager sharedInstance] acquireAuthTokenCompletion:^(ADAuthenticationResult *result) {
163 | if (result.status == AD_SUCCEEDED) {
164 | [self setUserConnected:YES];
165 |
166 | UIAlertController *alertController = [UIAlertController
167 | alertControllerWithTitle:@"Send mail"
168 | message:@"Email this image to"
169 | preferredStyle:UIAlertControllerStyleAlert];
170 |
171 | [alertController addTextFieldWithConfigurationHandler:^(UITextField *textField)
172 | {
173 | textField.placeholder = NSLocalizedString(@"Enter email address", @"Email");
174 | }];
175 |
176 | UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"OK action")
177 | style:UIAlertActionStyleDefault
178 | handler:^(UIAlertAction *action)
179 | {
180 | UITextField *emailAddress = alertController.textFields.firstObject;
181 | NSData *postData = [self mailContent:[UIImageJPEGRepresentation(self.image, 0.5) base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength]
182 | to:emailAddress.text];
183 |
184 | [self sendMailREST:postData];
185 | }];
186 |
187 | UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel"
188 | style:UIAlertActionStyleCancel
189 | handler:nil];
190 | [alertController addAction:okAction];
191 | [alertController addAction:cancelAction];
192 |
193 | dispatch_async(dispatch_get_main_queue(), ^{
194 | [self presentViewController:alertController animated:YES completion:nil];
195 | });
196 | }
197 | else {
198 | NSLog(@"failed to acquire access token");
199 | self.sendEmailCell.detailTextLabel.text = @"Failed, please check log";
200 | }
201 | }];
202 | }
203 |
204 | - (NSData *)mailContent:(NSString *)contentString
205 | to:(NSString *)emailAddress
206 | {
207 |
208 | NSString *jsonContentPath = [[NSBundle mainBundle] pathForResource:@"EmailPostContent" ofType:@"json"];
209 | NSMutableString *jsonContentString = [NSMutableString stringWithContentsOfFile:jsonContentPath encoding:NSUTF8StringEncoding error:nil];
210 |
211 | [jsonContentString replaceOccurrencesOfString:@""
212 | withString:emailAddress
213 | options:0 range:(NSRange){0, [jsonContentString length]}];
214 |
215 | [jsonContentString replaceOccurrencesOfString:@""
216 | withString:contentString
217 | options:0 range:(NSRange){0, [jsonContentString length]}];
218 | return [jsonContentString dataUsingEncoding:NSUTF8StringEncoding];
219 | }
220 |
221 | - (void)sendMailREST:(NSData *)postData {
222 | self.sendEmailCell.detailTextLabel.text = @"Sending";
223 |
224 | NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"https://graph.microsoft.com/v1.0/me/microsoft.graph.sendmail"]];
225 |
226 | [request setHTTPMethod:@"POST"];
227 | [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
228 | [request setValue:@"application/json, text/plain, */*" forHTTPHeaderField:@"Accept"];
229 |
230 | NSString *authorization = [NSString stringWithFormat:@"Bearer %@", [[AuthenticationManager sharedInstance] accessToken]];
231 | [request setValue:authorization forHTTPHeaderField:@"Authorization"];
232 | [request setHTTPBody:postData];
233 |
234 |
235 | AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
236 |
237 | [[manager dataTaskWithRequest:request completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
238 | NSLog(@"%d", (int)(((NSHTTPURLResponse*)response).statusCode));
239 |
240 | if (!error && ((NSHTTPURLResponse*)response).statusCode == 202) {
241 | self.sendEmailCell.detailTextLabel.text = @"Done";
242 | }
243 | else {
244 | NSLog(@"%@", error.localizedDescription);
245 | NSLog(@"%@", response);
246 | self.sendEmailCell.detailTextLabel.text = @"Failed, please check log";
247 | }
248 | }] resume];
249 | }
250 |
251 |
252 | #pragma mark - Save to local device
253 | - (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo: (void *)contextInfo
254 | {
255 | if (error) {
256 | NSLog(@"%@", error.localizedDescription);
257 | self.storeLocalCell.detailTextLabel.text = @"Failed, please check log";
258 | }
259 | else {
260 | self.storeLocalCell.detailTextLabel.text = @"Saved";
261 | }
262 | }
263 |
264 |
265 | #pragma mark - Table view data source
266 |
267 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
268 |
269 | UITableViewCell *selectedCell = [self.tableView cellForRowAtIndexPath:indexPath];
270 | if (selectedCell == _sendEmailCell) {
271 | [self sendMail];
272 | }
273 | else if(selectedCell == _storeLocalCell) {
274 | UIImageWriteToSavedPhotosAlbum(self.image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
275 | }
276 |
277 | else if(selectedCell == _storeOneDriveCell) {
278 | [self uploadToOneDrive];
279 | }
280 | [tableView deselectRowAtIndexPath:indexPath animated:YES];
281 | }
282 |
283 |
284 | @end
285 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Contribute to this documentation
2 |
3 | Thank you for your interest in our documentation!
4 |
5 | * [Ways to contribute](#ways-to-contribute)
6 | * [Contribute using GitHub](#contribute-using-github)
7 | * [Contribute using Git](#contribute-using-git)
8 | * [How to use Markdown to format your topic](#how-to-use-markdown-to-format-your-topic)
9 | * [FAQ](#faq)
10 | * [More resources](#more-resources)
11 |
12 | ## Ways to contribute
13 |
14 | Here are some ways you can contribute to this documentation:
15 |
16 | * To make small changes to an article, [Contribute using GitHub](#contribute-using-github).
17 | * To make large changes, or changes that involve code, [Contribute using Git](#contribute-using-git).
18 | * Report documentation bugs via GitHub Issues
19 | * Request new documentation at the [Office Developer Platform UserVoice](http://officespdev.uservoice.com) site.
20 |
21 | ## Contribute using GitHub
22 |
23 | Use GitHub to contribute to this documentation without having to clone the repo to your desktop. This is the easiest way to create a pull request in this repository. Use this method to make a minor change that doesn't involve code changes.
24 |
25 | **Note** Using this method allows you to contribute to one article at a time.
26 |
27 | ### To Contribute using GitHub
28 |
29 | 1. Find the article you want to contribute to on GitHub.
30 |
31 | If the article is in MSDN, choose the **suggest and submit changes** link in the **Contribute to this content** section and you'll be taken to the same article on GitHub.
32 | 2. Once you are on the article in GitHub, sign in to GitHub (get a free account [Join GitHub](https://github.com/join).
33 | 3. Choose the **pencil icon** (edit the file in your fork of this project) and make your changes in the **<>Edit file** window.
34 | 4. Scroll to the bottom and enter a description.
35 | 5. Choose **Propose file change**>**Create pull request**.
36 |
37 | You now have successfully submitted a pull request. Pull requests are typically reviewed within 10 business days.
38 |
39 |
40 | ## Contribute using Git
41 |
42 | Use Git to contribute substantive changes, such as:
43 |
44 | * Contributing code.
45 | * Contributing changes that affect meaning.
46 | * Contributing large changes to text.
47 | * Adding new topics.
48 |
49 | ### To Contribute using Git
50 |
51 | 1. If you don't have a GitHub account, set one up at [GitHub](https://github.com/join).
52 | 2. After you have an account, install Git on your computer. Follow the steps in [Setting up Git Tutorial](https://help.github.com/articles/set-up-git/).
53 | 3. To submit a pull request using Git, follow the steps in [Use GitHub, Git, and this repository](#use-github-git-and-this-repository).
54 | 4. You will be asked to sign the Contributor's License Agreement if you are:
55 |
56 | * A member of the Microsoft Open Technologies group.
57 | * A contributors who doesn't work for Microsoft.
58 |
59 | As a community member, you must sign the Contribution License Agreement (CLA) before you can contribute large submissions to a project. You only need to complete and submit the documentation once. Carefully review the document. You may be required to have your employer sign the document.
60 |
61 | Signing the CLA does not grant you rights to commit to the main repository, but it does mean that the Office Developer and Office Developer Content Publishing teams will be able to review and approve your contributions. You will be credited for your submissions.
62 |
63 | Pull requests are typically reviewed within 10 business days.
64 |
65 | ## Use GitHub, Git, and this repository
66 |
67 | **Note:** Most of the information in this section can be found in [GitHub Help] articles. If you're familiar with Git and GitHub, skip to the **Contribute and edit content** section for the specifics of the code/content flow of this repository.
68 |
69 | ### To set up your fork of the repository
70 |
71 | 1. Set up a GitHub account so you can contribute to this project. If you haven't done this, go to [GitHub](https://github.com/join) and do it now.
72 | 2. Install Git on your computer. Follow the steps in the [Setting up Git Tutorial] [Set Up Git].
73 | 3. Create your own fork of this repository. To do this, at the top of the page, choose the **Fork** button.
74 | 4. Copy your fork to your computer. To do this, open Git Bash. At the command prompt enter:
75 |
76 | git clone https://github.com//.git
77 |
78 | Next, create a reference to the root repository by entering these commands:
79 |
80 | cd
81 | git remote add upstream https://github.com/microsoftgraph/.git
82 | git fetch upstream
83 |
84 | Congratulations! You've now set up your repository. You won't need to repeat these steps again.
85 |
86 | ### Contribute and edit content
87 |
88 | To make the contribution process as seamless as possible, follow these steps.
89 |
90 | #### To contribute and edit content
91 |
92 | 1. Create a new branch.
93 | 2. Add new content or edit existing content.
94 | 3. Submit a pull request to the main repository.
95 | 4. Delete the branch.
96 |
97 | **Important** Limit each branch to a single concept/article to streamline the work flow and reduce the chance of merge conflicts. Content appropriate for a new branch includes:
98 |
99 | * A new article.
100 | * Spelling and grammar edits.
101 | * Applying a single formatting change across a large set of articles (for example, applying a new copyright footer).
102 |
103 | #### To create a new branch
104 |
105 | 1. Open Git Bash.
106 | 2. At the Git Bash command prompt, type `git pull upstream master:`. This creates a new branch locally that is copied from the latest MicrosoftGraph master branch.
107 | 3. At the Git Bash command prompt, type `git push origin `. This alerts GitHub to the new branch. You should now see the new branch in your fork of the repository on GitHub.
108 | 4. At the Git Bash command prompt, type `git checkout ` to switch to your new branch.
109 |
110 | #### Add new content or edit existing content
111 |
112 | You navigate to the repository on your computer by using File Explorer. The repository files are in `C:\Users\\`.
113 |
114 | To edit files, open them in an editor of your choice and modify them. To create a new file, use the editor of your choice and save the new file in the appropriate location in your local copy of the repository. While working, save your work frequently.
115 |
116 | The files in `C:\Users\\` are a working copy of the new branch that you created in your local repository. Changing anything in this folder doesn't affect the local repository until you commit a change. To commit a change to the local repository, type the following commands in GitBash:
117 |
118 | git add .
119 | git commit -v -a -m ""
120 |
121 | The `add` command adds your changes to a staging area in preparation for committing them to the repository. The period after the `add` command specifies that you want to stage all of the files that you added or modified, checking subfolders recursively. (If you don't want to commit all of the changes, you can add specific files. You can also undo a commit. For help, type `git add -help` or `git status`.)
122 |
123 | The `commit` command applies the staged changes to the repository. The switch `-m` means you are providing the commit comment in the command line. The -v and -a switches can be omitted. The -v switch is for verbose output from the command, and -a does what you already did with the add command.
124 |
125 | You can commit multiple times while you are doing your work, or you can commit once when you're done.
126 |
127 | #### Submit a pull request to the main repository
128 |
129 | When you're finished with your work and are ready to have it merged into the main repository, follow these steps.
130 |
131 | #### To submit a pull request to the main repository
132 |
133 | 1. In the Git Bash command prompt, type `git push origin `. In your local repository, `origin` refers to your GitHub repository that you cloned the local repository from. This command pushes the current state of your new branch, including all commits made in the previous steps, to your GitHub fork.
134 | 2. On the GitHub site, navigate in your fork to the new branch.
135 | 3. Choose the **Pull Request** button at the top of the page.
136 | 4. Verify the Base branch is `microsoftgraph/@master` and the Head branch is `/@`.
137 | 5. Choose the **Update Commit Range** button.
138 | 6. Add a title to your pull request, and describe all the changes you're making.
139 | 7. Submit the pull request.
140 |
141 | One of the site administrators will process your pull request. Your pull request will surface on the microsoftgraph/ site under Issues. When the pull request is accepted, the issue will be resolved.
142 |
143 | #### Create a new branch after merge
144 |
145 | After a branch is successfully merged (that is, your pull request is accepted), don't continue working in that local branch. This can lead to merge conflicts if you submit another pull request. To do another update, create a new local branch from the successfully merged upstream branch, and then delete your initial local branch.
146 |
147 | For example, if your local branch X was successfully merged into the OfficeDev/microsoft-graph-docs master branch and you want to make additional updates to the content that was merged. Create a new local branch, X2, from the OfficeDev/microsoft-graph-docs master branch. To do this, open GitBash and execute the following commands:
148 |
149 | cd microsoft-graph-docs
150 | git pull upstream master:X2
151 | git push origin X2
152 |
153 | You now have local copies (in a new local branch) of the work that you submitted in branch X. The X2 branch also contains all the work other writers have merged, so if your work depends on others' work (for example, shared images), it is available in the new branch. You can verify that your previous work (and others' work) is in the branch by checking out the new branch...
154 |
155 | git checkout X2
156 |
157 | ...and verifying the content. (The `checkout` command updates the files in `C:\Users\\microsoft-graph-docs` to the current state of the X2 branch.) Once you check out the new branch, you can make updates to the content and commit them as usual. However, to avoid working in the merged branch (X) by mistake, it's best to delete it (see the following **Delete a branch** section).
158 |
159 | #### Delete a branch
160 |
161 | Once your changes are successfully merged into the main repository, delete the branch you used because you no longer need it. Any additional work should be done in a new branch.
162 |
163 | #### To delete a branch
164 |
165 | 1. In the Git Bash command prompt, type `git checkout master`. This ensures that you aren't in the branch to be deleted (which isn't allowed).
166 | 2. Next, at the command prompt, type `git branch -d `. This deletes the branch on your computer only if it has been successfully merged to the upstream repository. (You can override this behavior with the `–D` flag, but first be sure you want to do this.)
167 | 3. Finally, type `git push origin :` at the command prompt (a space before the colon and no space after it). This will delete the branch on your github fork.
168 |
169 | Congratulations, you have successfully contributed to the project!
170 |
171 | ## How to use Markdown to format your topic
172 |
173 | ### Article template
174 |
175 | The [markdown template](/articles/0-markdown-template-for-new-articles.md) contains the basic Markdown for a topic that includes a table of contents, sections with subheadings, links to other Office developer topics, links to other sites, bold text, italic text, numbered and bulleted lists, code snippets, and images.
176 |
177 |
178 | ### Standard Markdown
179 |
180 | All of the articles in this repository use Markdown. A complete introduction (and listing of all the syntax) can be found at [Markdown Home] [].
181 |
182 | ## FAQ
183 |
184 | ### How do I get a GitHub account?
185 |
186 | Fill out the form at [Join GitHub](https://github.com/join) to open a free GitHub account.
187 |
188 | ### Where do I get a Contributor's License Agreement?
189 |
190 | You will automatically be sent a notice that you need to sign the Contributor's License Agreement (CLA) if your pull request requires one.
191 |
192 | As a community member, **you must sign the Contribution License Agreement (CLA) before you can contribute large submissions to this project**. You only need complete and submit the documentation once. Carefully review the document. You may be required to have your employer sign the document.
193 |
194 | ### What happens with my contributions?
195 |
196 | When you submit your changes, via a pull request, our team will be notified and will review your pull request. You will receive notifications about your pull request from GitHub; you may also be notified by someone from our team if we need more information. We reserve the right to edit your submission for legal, style, clarity, or other issues.
197 |
198 | ### Can I become an approver for this repository's GitHub pull requests?
199 |
200 | Currently, we are not allowing external contributors to approve pull requests in this repository.
201 |
202 | ### How soon will I get a response about my change request or issue?
203 |
204 | We typically review pull requests and respond to issues within 10 business days.
205 |
206 | ## More resources
207 |
208 | * To learn more about Markdown, go to the Git creator's site [Daring Fireball].
209 | * To learn more about using Git and GitHub, first check out the [GitHub Help section] [GitHub Help].
210 |
211 | [GitHub Home]: http://github.com
212 | [GitHub Help]: http://help.github.com/
213 | [Set Up Git]: http://help.github.com/win-set-up-git/
214 | [Markdown Home]: http://daringfireball.net/projects/markdown/
215 | [Daring Fireball]: http://daringfireball.net/
216 |
--------------------------------------------------------------------------------
/ImageDiscovery.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 962550C61C20ED720078C1DB /* CameraViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 962550C51C20ED720078C1DB /* CameraViewController.m */; };
11 | 962550C91C20EF220078C1DB /* ImageSearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 962550C81C20EF220078C1DB /* ImageSearchViewController.m */; };
12 | 9634C5C31C5FEC0A0032DE1A /* ImageSearchManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 9634C5C21C5FEC0A0032DE1A /* ImageSearchManager.m */; };
13 | 9634C5C91C6007DC0032DE1A /* AuthenticationConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 9634C5C81C6007DC0032DE1A /* AuthenticationConstants.m */; };
14 | 963A09E51C113048004E2C00 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 963A09E41C113048004E2C00 /* main.m */; };
15 | 963A09E81C113048004E2C00 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 963A09E71C113048004E2C00 /* AppDelegate.m */; };
16 | 963A09EB1C113048004E2C00 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 963A09EA1C113048004E2C00 /* ViewController.m */; };
17 | 963A09EE1C113048004E2C00 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 963A09EC1C113048004E2C00 /* Main.storyboard */; };
18 | 963A09F01C113048004E2C00 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 963A09EF1C113048004E2C00 /* Assets.xcassets */; };
19 | 963A09F31C113048004E2C00 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 963A09F11C113048004E2C00 /* LaunchScreen.storyboard */; };
20 | 966D6AB31C2263D5009D1DE3 /* ImageResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 966D6AB21C2263D5009D1DE3 /* ImageResult.m */; };
21 | 966D6AB51C226850009D1DE3 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 966D6AB41C226850009D1DE3 /* AVFoundation.framework */; };
22 | 96A005391C2409E0009D8246 /* EmailPostContent.json in Resources */ = {isa = PBXBuildFile; fileRef = 96A005381C2409E0009D8246 /* EmailPostContent.json */; };
23 | 96B616A91C238F5200C19C8E /* ImageFilterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 96B616A81C238F5200C19C8E /* ImageFilterViewController.m */; };
24 | 96B616B21C23A8F500C19C8E /* ImageActionTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 96B616B11C23A8F500C19C8E /* ImageActionTableViewController.m */; };
25 | 96B616B61C23AA6900C19C8E /* AuthenticationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 96B616B51C23AA6900C19C8E /* AuthenticationManager.m */; };
26 | 96FB3B781C16658600C763A9 /* InitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 96FB3B771C16658600C763A9 /* InitialViewController.m */; };
27 | B28054326136B5913DCF7207 /* libPods-ImageDiscovery.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 544916CE1594096153928E57 /* libPods-ImageDiscovery.a */; };
28 | /* End PBXBuildFile section */
29 |
30 | /* Begin PBXFileReference section */
31 | 23DDAC456D0906A37D933821 /* Pods-ImageDiscovery.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ImageDiscovery.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ImageDiscovery/Pods-ImageDiscovery.debug.xcconfig"; sourceTree = ""; };
32 | 49044FF3560B0C880A043900 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
33 | 544916CE1594096153928E57 /* libPods-ImageDiscovery.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ImageDiscovery.a"; sourceTree = BUILT_PRODUCTS_DIR; };
34 | 7123B609197F39CC5E39AF23 /* Pods-ImageDiscovery.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ImageDiscovery.release.xcconfig"; path = "Pods/Target Support Files/Pods-ImageDiscovery/Pods-ImageDiscovery.release.xcconfig"; sourceTree = ""; };
35 | 962550C41C20ED720078C1DB /* CameraViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CameraViewController.h; sourceTree = ""; };
36 | 962550C51C20ED720078C1DB /* CameraViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CameraViewController.m; sourceTree = ""; };
37 | 962550C71C20EF220078C1DB /* ImageSearchViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageSearchViewController.h; sourceTree = ""; };
38 | 962550C81C20EF220078C1DB /* ImageSearchViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageSearchViewController.m; sourceTree = ""; };
39 | 9634C5C11C5FEC0A0032DE1A /* ImageSearchManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageSearchManager.h; sourceTree = ""; };
40 | 9634C5C21C5FEC0A0032DE1A /* ImageSearchManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageSearchManager.m; sourceTree = ""; };
41 | 9634C5C71C6007DC0032DE1A /* AuthenticationConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuthenticationConstants.h; sourceTree = ""; };
42 | 9634C5C81C6007DC0032DE1A /* AuthenticationConstants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AuthenticationConstants.m; sourceTree = ""; };
43 | 963A09E01C113048004E2C00 /* ImageDiscovery.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ImageDiscovery.app; sourceTree = BUILT_PRODUCTS_DIR; };
44 | 963A09E41C113048004E2C00 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
45 | 963A09E61C113048004E2C00 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
46 | 963A09E71C113048004E2C00 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
47 | 963A09E91C113048004E2C00 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
48 | 963A09EA1C113048004E2C00 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
49 | 963A09ED1C113048004E2C00 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
50 | 963A09EF1C113048004E2C00 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
51 | 963A09F21C113048004E2C00 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
52 | 963A09F41C113048004E2C00 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
53 | 966D6AB11C2263D5009D1DE3 /* ImageResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageResult.h; sourceTree = ""; };
54 | 966D6AB21C2263D5009D1DE3 /* ImageResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageResult.m; sourceTree = ""; };
55 | 966D6AB41C226850009D1DE3 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
56 | 96A005381C2409E0009D8246 /* EmailPostContent.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = EmailPostContent.json; sourceTree = ""; };
57 | 96B616A71C238F5200C19C8E /* ImageFilterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageFilterViewController.h; sourceTree = ""; };
58 | 96B616A81C238F5200C19C8E /* ImageFilterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageFilterViewController.m; sourceTree = ""; };
59 | 96B616B01C23A8F500C19C8E /* ImageActionTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageActionTableViewController.h; sourceTree = ""; };
60 | 96B616B11C23A8F500C19C8E /* ImageActionTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageActionTableViewController.m; sourceTree = ""; };
61 | 96B616B41C23AA6900C19C8E /* AuthenticationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuthenticationManager.h; sourceTree = ""; };
62 | 96B616B51C23AA6900C19C8E /* AuthenticationManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AuthenticationManager.m; sourceTree = ""; };
63 | 96FB3B761C16658600C763A9 /* InitialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitialViewController.h; sourceTree = ""; };
64 | 96FB3B771C16658600C763A9 /* InitialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitialViewController.m; sourceTree = ""; };
65 | 9A023D3309D162D047CDA2A5 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; };
66 | CF97EC480B459EAC6DD6019F /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; };
67 | D37DAAC71C6BF4B400DBB561 /* ImageDiscovery.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = ImageDiscovery.entitlements; sourceTree = ""; };
68 | /* End PBXFileReference section */
69 |
70 | /* Begin PBXFrameworksBuildPhase section */
71 | 963A09DD1C113048004E2C00 /* Frameworks */ = {
72 | isa = PBXFrameworksBuildPhase;
73 | buildActionMask = 2147483647;
74 | files = (
75 | 966D6AB51C226850009D1DE3 /* AVFoundation.framework in Frameworks */,
76 | B28054326136B5913DCF7207 /* libPods-ImageDiscovery.a in Frameworks */,
77 | );
78 | runOnlyForDeploymentPostprocessing = 0;
79 | };
80 | /* End PBXFrameworksBuildPhase section */
81 |
82 | /* Begin PBXGroup section */
83 | 66BFB9F9FB9EF92682431E16 /* Frameworks */ = {
84 | isa = PBXGroup;
85 | children = (
86 | 966D6AB41C226850009D1DE3 /* AVFoundation.framework */,
87 | 49044FF3560B0C880A043900 /* libPods.a */,
88 | 544916CE1594096153928E57 /* libPods-ImageDiscovery.a */,
89 | );
90 | name = Frameworks;
91 | sourceTree = "";
92 | };
93 | 8DCC9DFCC97A226EEA1A1AEF /* Pods */ = {
94 | isa = PBXGroup;
95 | children = (
96 | CF97EC480B459EAC6DD6019F /* Pods.debug.xcconfig */,
97 | 9A023D3309D162D047CDA2A5 /* Pods.release.xcconfig */,
98 | 23DDAC456D0906A37D933821 /* Pods-ImageDiscovery.debug.xcconfig */,
99 | 7123B609197F39CC5E39AF23 /* Pods-ImageDiscovery.release.xcconfig */,
100 | );
101 | name = Pods;
102 | sourceTree = "";
103 | };
104 | 962550C31C20ED3E0078C1DB /* Controllers */ = {
105 | isa = PBXGroup;
106 | children = (
107 | 96FB3B761C16658600C763A9 /* InitialViewController.h */,
108 | 96FB3B771C16658600C763A9 /* InitialViewController.m */,
109 | 962550C41C20ED720078C1DB /* CameraViewController.h */,
110 | 962550C51C20ED720078C1DB /* CameraViewController.m */,
111 | 962550C71C20EF220078C1DB /* ImageSearchViewController.h */,
112 | 962550C81C20EF220078C1DB /* ImageSearchViewController.m */,
113 | 96B616A71C238F5200C19C8E /* ImageFilterViewController.h */,
114 | 96B616A81C238F5200C19C8E /* ImageFilterViewController.m */,
115 | 96B616B01C23A8F500C19C8E /* ImageActionTableViewController.h */,
116 | 96B616B11C23A8F500C19C8E /* ImageActionTableViewController.m */,
117 | );
118 | name = Controllers;
119 | sourceTree = "";
120 | };
121 | 9634C5CA1C6007F80032DE1A /* Authentication */ = {
122 | isa = PBXGroup;
123 | children = (
124 | 9634C5C71C6007DC0032DE1A /* AuthenticationConstants.h */,
125 | 9634C5C81C6007DC0032DE1A /* AuthenticationConstants.m */,
126 | 96B616B41C23AA6900C19C8E /* AuthenticationManager.h */,
127 | 96B616B51C23AA6900C19C8E /* AuthenticationManager.m */,
128 | );
129 | name = Authentication;
130 | sourceTree = "";
131 | };
132 | 9634C5CB1C6007FD0032DE1A /* ImageSearch */ = {
133 | isa = PBXGroup;
134 | children = (
135 | 9634C5C11C5FEC0A0032DE1A /* ImageSearchManager.h */,
136 | 9634C5C21C5FEC0A0032DE1A /* ImageSearchManager.m */,
137 | );
138 | name = ImageSearch;
139 | sourceTree = "";
140 | };
141 | 963A09D71C113047004E2C00 = {
142 | isa = PBXGroup;
143 | children = (
144 | 963A09E21C113048004E2C00 /* ImageDiscovery */,
145 | 963A09E11C113048004E2C00 /* Products */,
146 | 8DCC9DFCC97A226EEA1A1AEF /* Pods */,
147 | 66BFB9F9FB9EF92682431E16 /* Frameworks */,
148 | );
149 | sourceTree = "";
150 | };
151 | 963A09E11C113048004E2C00 /* Products */ = {
152 | isa = PBXGroup;
153 | children = (
154 | 963A09E01C113048004E2C00 /* ImageDiscovery.app */,
155 | );
156 | name = Products;
157 | sourceTree = "";
158 | };
159 | 963A09E21C113048004E2C00 /* ImageDiscovery */ = {
160 | isa = PBXGroup;
161 | children = (
162 | D37DAAC71C6BF4B400DBB561 /* ImageDiscovery.entitlements */,
163 | 96A005371C2409BC009D8246 /* Resources */,
164 | 96B616B31C23AA5100C19C8E /* Library */,
165 | 966D6AB01C2263C5009D1DE3 /* Models */,
166 | 962550C31C20ED3E0078C1DB /* Controllers */,
167 | 96AE01651C1F5E0B00BA4FD9 /* Views */,
168 | 963A09E61C113048004E2C00 /* AppDelegate.h */,
169 | 963A09E71C113048004E2C00 /* AppDelegate.m */,
170 | 963A09E91C113048004E2C00 /* ViewController.h */,
171 | 963A09EA1C113048004E2C00 /* ViewController.m */,
172 | 963A09EF1C113048004E2C00 /* Assets.xcassets */,
173 | 963A09F41C113048004E2C00 /* Info.plist */,
174 | 963A09E31C113048004E2C00 /* Supporting Files */,
175 | );
176 | path = ImageDiscovery;
177 | sourceTree = "";
178 | };
179 | 963A09E31C113048004E2C00 /* Supporting Files */ = {
180 | isa = PBXGroup;
181 | children = (
182 | 963A09E41C113048004E2C00 /* main.m */,
183 | );
184 | name = "Supporting Files";
185 | sourceTree = "";
186 | };
187 | 966D6AB01C2263C5009D1DE3 /* Models */ = {
188 | isa = PBXGroup;
189 | children = (
190 | 966D6AB11C2263D5009D1DE3 /* ImageResult.h */,
191 | 966D6AB21C2263D5009D1DE3 /* ImageResult.m */,
192 | );
193 | name = Models;
194 | sourceTree = "";
195 | };
196 | 96A005371C2409BC009D8246 /* Resources */ = {
197 | isa = PBXGroup;
198 | children = (
199 | 96A005381C2409E0009D8246 /* EmailPostContent.json */,
200 | );
201 | name = Resources;
202 | sourceTree = "";
203 | };
204 | 96AE01651C1F5E0B00BA4FD9 /* Views */ = {
205 | isa = PBXGroup;
206 | children = (
207 | 963A09EC1C113048004E2C00 /* Main.storyboard */,
208 | 963A09F11C113048004E2C00 /* LaunchScreen.storyboard */,
209 | );
210 | name = Views;
211 | sourceTree = "";
212 | };
213 | 96B616B31C23AA5100C19C8E /* Library */ = {
214 | isa = PBXGroup;
215 | children = (
216 | 9634C5CB1C6007FD0032DE1A /* ImageSearch */,
217 | 9634C5CA1C6007F80032DE1A /* Authentication */,
218 | );
219 | name = Library;
220 | sourceTree = "";
221 | };
222 | /* End PBXGroup section */
223 |
224 | /* Begin PBXNativeTarget section */
225 | 963A09DF1C113048004E2C00 /* ImageDiscovery */ = {
226 | isa = PBXNativeTarget;
227 | buildConfigurationList = 963A0A0D1C113048004E2C00 /* Build configuration list for PBXNativeTarget "ImageDiscovery" */;
228 | buildPhases = (
229 | 5F062BE6084AF4575CE6099E /* [CP] Check Pods Manifest.lock */,
230 | 963A09DC1C113048004E2C00 /* Sources */,
231 | 963A09DD1C113048004E2C00 /* Frameworks */,
232 | 963A09DE1C113048004E2C00 /* Resources */,
233 | FC85B5EB71887B85488DAC4C /* [CP] Embed Pods Frameworks */,
234 | 66F652FBDC9339464F3128F4 /* [CP] Copy Pods Resources */,
235 | );
236 | buildRules = (
237 | );
238 | dependencies = (
239 | );
240 | name = ImageDiscovery;
241 | productName = ImageShop;
242 | productReference = 963A09E01C113048004E2C00 /* ImageDiscovery.app */;
243 | productType = "com.apple.product-type.application";
244 | };
245 | /* End PBXNativeTarget section */
246 |
247 | /* Begin PBXProject section */
248 | 963A09D81C113047004E2C00 /* Project object */ = {
249 | isa = PBXProject;
250 | attributes = {
251 | LastUpgradeCheck = 0710;
252 | ORGANIZATIONNAME = "Jason Kim";
253 | TargetAttributes = {
254 | 963A09DF1C113048004E2C00 = {
255 | CreatedOnToolsVersion = 7.1.1;
256 | DevelopmentTeam = UBF8T346G9;
257 | SystemCapabilities = {
258 | com.apple.Keychain = {
259 | enabled = 1;
260 | };
261 | };
262 | };
263 | };
264 | };
265 | buildConfigurationList = 963A09DB1C113047004E2C00 /* Build configuration list for PBXProject "ImageDiscovery" */;
266 | compatibilityVersion = "Xcode 3.2";
267 | developmentRegion = English;
268 | hasScannedForEncodings = 0;
269 | knownRegions = (
270 | en,
271 | Base,
272 | );
273 | mainGroup = 963A09D71C113047004E2C00;
274 | productRefGroup = 963A09E11C113048004E2C00 /* Products */;
275 | projectDirPath = "";
276 | projectRoot = "";
277 | targets = (
278 | 963A09DF1C113048004E2C00 /* ImageDiscovery */,
279 | );
280 | };
281 | /* End PBXProject section */
282 |
283 | /* Begin PBXResourcesBuildPhase section */
284 | 963A09DE1C113048004E2C00 /* Resources */ = {
285 | isa = PBXResourcesBuildPhase;
286 | buildActionMask = 2147483647;
287 | files = (
288 | 963A09F31C113048004E2C00 /* LaunchScreen.storyboard in Resources */,
289 | 96A005391C2409E0009D8246 /* EmailPostContent.json in Resources */,
290 | 963A09F01C113048004E2C00 /* Assets.xcassets in Resources */,
291 | 963A09EE1C113048004E2C00 /* Main.storyboard in Resources */,
292 | );
293 | runOnlyForDeploymentPostprocessing = 0;
294 | };
295 | /* End PBXResourcesBuildPhase section */
296 |
297 | /* Begin PBXShellScriptBuildPhase section */
298 | 5F062BE6084AF4575CE6099E /* [CP] Check Pods Manifest.lock */ = {
299 | isa = PBXShellScriptBuildPhase;
300 | buildActionMask = 2147483647;
301 | files = (
302 | );
303 | inputPaths = (
304 | );
305 | name = "[CP] Check Pods Manifest.lock";
306 | outputPaths = (
307 | );
308 | runOnlyForDeploymentPostprocessing = 0;
309 | shellPath = /bin/sh;
310 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
311 | showEnvVarsInLog = 0;
312 | };
313 | 66F652FBDC9339464F3128F4 /* [CP] Copy Pods Resources */ = {
314 | isa = PBXShellScriptBuildPhase;
315 | buildActionMask = 2147483647;
316 | files = (
317 | );
318 | inputPaths = (
319 | );
320 | name = "[CP] Copy Pods Resources";
321 | outputPaths = (
322 | );
323 | runOnlyForDeploymentPostprocessing = 0;
324 | shellPath = /bin/sh;
325 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ImageDiscovery/Pods-ImageDiscovery-resources.sh\"\n";
326 | showEnvVarsInLog = 0;
327 | };
328 | FC85B5EB71887B85488DAC4C /* [CP] Embed Pods Frameworks */ = {
329 | isa = PBXShellScriptBuildPhase;
330 | buildActionMask = 2147483647;
331 | files = (
332 | );
333 | inputPaths = (
334 | );
335 | name = "[CP] Embed Pods Frameworks";
336 | outputPaths = (
337 | );
338 | runOnlyForDeploymentPostprocessing = 0;
339 | shellPath = /bin/sh;
340 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ImageDiscovery/Pods-ImageDiscovery-frameworks.sh\"\n";
341 | showEnvVarsInLog = 0;
342 | };
343 | /* End PBXShellScriptBuildPhase section */
344 |
345 | /* Begin PBXSourcesBuildPhase section */
346 | 963A09DC1C113048004E2C00 /* Sources */ = {
347 | isa = PBXSourcesBuildPhase;
348 | buildActionMask = 2147483647;
349 | files = (
350 | 962550C91C20EF220078C1DB /* ImageSearchViewController.m in Sources */,
351 | 9634C5C91C6007DC0032DE1A /* AuthenticationConstants.m in Sources */,
352 | 962550C61C20ED720078C1DB /* CameraViewController.m in Sources */,
353 | 963A09EB1C113048004E2C00 /* ViewController.m in Sources */,
354 | 96B616B21C23A8F500C19C8E /* ImageActionTableViewController.m in Sources */,
355 | 966D6AB31C2263D5009D1DE3 /* ImageResult.m in Sources */,
356 | 9634C5C31C5FEC0A0032DE1A /* ImageSearchManager.m in Sources */,
357 | 96B616B61C23AA6900C19C8E /* AuthenticationManager.m in Sources */,
358 | 963A09E81C113048004E2C00 /* AppDelegate.m in Sources */,
359 | 963A09E51C113048004E2C00 /* main.m in Sources */,
360 | 96B616A91C238F5200C19C8E /* ImageFilterViewController.m in Sources */,
361 | 96FB3B781C16658600C763A9 /* InitialViewController.m in Sources */,
362 | );
363 | runOnlyForDeploymentPostprocessing = 0;
364 | };
365 | /* End PBXSourcesBuildPhase section */
366 |
367 | /* Begin PBXVariantGroup section */
368 | 963A09EC1C113048004E2C00 /* Main.storyboard */ = {
369 | isa = PBXVariantGroup;
370 | children = (
371 | 963A09ED1C113048004E2C00 /* Base */,
372 | );
373 | name = Main.storyboard;
374 | sourceTree = "";
375 | };
376 | 963A09F11C113048004E2C00 /* LaunchScreen.storyboard */ = {
377 | isa = PBXVariantGroup;
378 | children = (
379 | 963A09F21C113048004E2C00 /* Base */,
380 | );
381 | name = LaunchScreen.storyboard;
382 | sourceTree = "";
383 | };
384 | /* End PBXVariantGroup section */
385 |
386 | /* Begin XCBuildConfiguration section */
387 | 963A0A0B1C113048004E2C00 /* Debug */ = {
388 | isa = XCBuildConfiguration;
389 | buildSettings = {
390 | ALWAYS_SEARCH_USER_PATHS = NO;
391 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
392 | CLANG_CXX_LIBRARY = "libc++";
393 | CLANG_ENABLE_MODULES = YES;
394 | CLANG_ENABLE_OBJC_ARC = YES;
395 | CLANG_WARN_BOOL_CONVERSION = YES;
396 | CLANG_WARN_CONSTANT_CONVERSION = YES;
397 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
398 | CLANG_WARN_EMPTY_BODY = YES;
399 | CLANG_WARN_ENUM_CONVERSION = YES;
400 | CLANG_WARN_INT_CONVERSION = YES;
401 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
402 | CLANG_WARN_UNREACHABLE_CODE = YES;
403 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
404 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
405 | COPY_PHASE_STRIP = NO;
406 | DEBUG_INFORMATION_FORMAT = dwarf;
407 | ENABLE_STRICT_OBJC_MSGSEND = YES;
408 | ENABLE_TESTABILITY = YES;
409 | GCC_C_LANGUAGE_STANDARD = gnu99;
410 | GCC_DYNAMIC_NO_PIC = NO;
411 | GCC_NO_COMMON_BLOCKS = YES;
412 | GCC_OPTIMIZATION_LEVEL = 0;
413 | GCC_PREPROCESSOR_DEFINITIONS = (
414 | "DEBUG=1",
415 | "$(inherited)",
416 | );
417 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
418 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
419 | GCC_WARN_UNDECLARED_SELECTOR = YES;
420 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
421 | GCC_WARN_UNUSED_FUNCTION = YES;
422 | GCC_WARN_UNUSED_VARIABLE = YES;
423 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
424 | MTL_ENABLE_DEBUG_INFO = YES;
425 | ONLY_ACTIVE_ARCH = YES;
426 | SDKROOT = iphoneos;
427 | };
428 | name = Debug;
429 | };
430 | 963A0A0C1C113048004E2C00 /* Release */ = {
431 | isa = XCBuildConfiguration;
432 | buildSettings = {
433 | ALWAYS_SEARCH_USER_PATHS = NO;
434 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
435 | CLANG_CXX_LIBRARY = "libc++";
436 | CLANG_ENABLE_MODULES = YES;
437 | CLANG_ENABLE_OBJC_ARC = YES;
438 | CLANG_WARN_BOOL_CONVERSION = YES;
439 | CLANG_WARN_CONSTANT_CONVERSION = YES;
440 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
441 | CLANG_WARN_EMPTY_BODY = YES;
442 | CLANG_WARN_ENUM_CONVERSION = YES;
443 | CLANG_WARN_INT_CONVERSION = YES;
444 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
445 | CLANG_WARN_UNREACHABLE_CODE = YES;
446 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
447 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
448 | COPY_PHASE_STRIP = NO;
449 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
450 | ENABLE_NS_ASSERTIONS = NO;
451 | ENABLE_STRICT_OBJC_MSGSEND = YES;
452 | GCC_C_LANGUAGE_STANDARD = gnu99;
453 | GCC_NO_COMMON_BLOCKS = YES;
454 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
455 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
456 | GCC_WARN_UNDECLARED_SELECTOR = YES;
457 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
458 | GCC_WARN_UNUSED_FUNCTION = YES;
459 | GCC_WARN_UNUSED_VARIABLE = YES;
460 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
461 | MTL_ENABLE_DEBUG_INFO = NO;
462 | SDKROOT = iphoneos;
463 | VALIDATE_PRODUCT = YES;
464 | };
465 | name = Release;
466 | };
467 | 963A0A0E1C113048004E2C00 /* Debug */ = {
468 | isa = XCBuildConfiguration;
469 | baseConfigurationReference = 23DDAC456D0906A37D933821 /* Pods-ImageDiscovery.debug.xcconfig */;
470 | buildSettings = {
471 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
472 | CODE_SIGN_ENTITLEMENTS = ImageDiscovery/ImageDiscovery.entitlements;
473 | CODE_SIGN_IDENTITY = "iPhone Developer";
474 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
475 | INFOPLIST_FILE = ImageDiscovery/Info.plist;
476 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
477 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
478 | PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.ImageDiscovery;
479 | PRODUCT_NAME = ImageDiscovery;
480 | PROVISIONING_PROFILE = "";
481 | };
482 | name = Debug;
483 | };
484 | 963A0A0F1C113048004E2C00 /* Release */ = {
485 | isa = XCBuildConfiguration;
486 | baseConfigurationReference = 7123B609197F39CC5E39AF23 /* Pods-ImageDiscovery.release.xcconfig */;
487 | buildSettings = {
488 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
489 | CODE_SIGN_ENTITLEMENTS = ImageDiscovery/ImageDiscovery.entitlements;
490 | CODE_SIGN_IDENTITY = "iPhone Developer";
491 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
492 | INFOPLIST_FILE = ImageDiscovery/Info.plist;
493 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
494 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
495 | PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.ImageDiscovery;
496 | PRODUCT_NAME = ImageDiscovery;
497 | PROVISIONING_PROFILE = "";
498 | };
499 | name = Release;
500 | };
501 | /* End XCBuildConfiguration section */
502 |
503 | /* Begin XCConfigurationList section */
504 | 963A09DB1C113047004E2C00 /* Build configuration list for PBXProject "ImageDiscovery" */ = {
505 | isa = XCConfigurationList;
506 | buildConfigurations = (
507 | 963A0A0B1C113048004E2C00 /* Debug */,
508 | 963A0A0C1C113048004E2C00 /* Release */,
509 | );
510 | defaultConfigurationIsVisible = 0;
511 | defaultConfigurationName = Release;
512 | };
513 | 963A0A0D1C113048004E2C00 /* Build configuration list for PBXNativeTarget "ImageDiscovery" */ = {
514 | isa = XCConfigurationList;
515 | buildConfigurations = (
516 | 963A0A0E1C113048004E2C00 /* Debug */,
517 | 963A0A0F1C113048004E2C00 /* Release */,
518 | );
519 | defaultConfigurationIsVisible = 0;
520 | defaultConfigurationName = Release;
521 | };
522 | /* End XCConfigurationList section */
523 | };
524 | rootObject = 963A09D81C113047004E2C00 /* Project object */;
525 | }
526 |
--------------------------------------------------------------------------------
/ImageDiscovery/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 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
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 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
157 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
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 |
248 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
272 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |
289 |
296 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 |
400 |
401 |
402 |
403 |
404 |
405 |
406 |
407 |
411 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
447 |
448 |
449 |
450 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 |
465 |
466 |
467 |
468 |
469 |
470 |
471 |
472 |
473 |
474 |
475 |
476 |
477 |
478 |
--------------------------------------------------------------------------------