├── MapkitAPI
├── Assets.xcassets
│ ├── Contents.json
│ ├── back.imageset
│ │ ├── back.png
│ │ ├── back@2x.png
│ │ ├── back@3x.png
│ │ └── Contents.json
│ ├── mark.imageset
│ │ ├── mark.png
│ │ ├── mark@2x.png
│ │ └── Contents.json
│ ├── user.imageset
│ │ ├── user.png
│ │ ├── user@2x.png
│ │ └── Contents.json
│ ├── arrow_btn.imageset
│ │ ├── arrow_btm.png
│ │ ├── arrow_btm@2x.png
│ │ ├── arrow_btm@3x.png
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── ViewController.h
├── AppDelegate.h
├── main.m
├── TYGooglePlace.h
├── TYGoogleAutoCompleteResult.h
├── TYPlaceSearchViewController.h
├── TYGooglePlacesApiClient.h
├── RouteFinderViewController.h
├── TYGoogleAutoCompleteResult.m
├── TYGooglePlace.m
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── Info.plist
├── AppDelegate.m
├── ViewController.m
├── TYGooglePlacesApiClient.m
├── TYPlaceSearchViewController.m
└── RouteFinderViewController.m
├── MapkitAPI.xcodeproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
├── xcuserdata
│ └── subramanibr.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── MapkitAPI.xcscheme
└── project.pbxproj
├── README.md
├── MapkitAPITests
├── Info.plist
└── MapkitAPITests.m
└── MapkitAPIUITests
├── Info.plist
└── MapkitAPIUITests.m
/MapkitAPI/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/MapkitAPI/Assets.xcassets/back.imageset/back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThabreshVivid/TYDirectionFinder/HEAD/MapkitAPI/Assets.xcassets/back.imageset/back.png
--------------------------------------------------------------------------------
/MapkitAPI/Assets.xcassets/mark.imageset/mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThabreshVivid/TYDirectionFinder/HEAD/MapkitAPI/Assets.xcassets/mark.imageset/mark.png
--------------------------------------------------------------------------------
/MapkitAPI/Assets.xcassets/user.imageset/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThabreshVivid/TYDirectionFinder/HEAD/MapkitAPI/Assets.xcassets/user.imageset/user.png
--------------------------------------------------------------------------------
/MapkitAPI/Assets.xcassets/back.imageset/back@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThabreshVivid/TYDirectionFinder/HEAD/MapkitAPI/Assets.xcassets/back.imageset/back@2x.png
--------------------------------------------------------------------------------
/MapkitAPI/Assets.xcassets/back.imageset/back@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThabreshVivid/TYDirectionFinder/HEAD/MapkitAPI/Assets.xcassets/back.imageset/back@3x.png
--------------------------------------------------------------------------------
/MapkitAPI/Assets.xcassets/mark.imageset/mark@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThabreshVivid/TYDirectionFinder/HEAD/MapkitAPI/Assets.xcassets/mark.imageset/mark@2x.png
--------------------------------------------------------------------------------
/MapkitAPI/Assets.xcassets/user.imageset/user@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThabreshVivid/TYDirectionFinder/HEAD/MapkitAPI/Assets.xcassets/user.imageset/user@2x.png
--------------------------------------------------------------------------------
/MapkitAPI/Assets.xcassets/arrow_btn.imageset/arrow_btm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThabreshVivid/TYDirectionFinder/HEAD/MapkitAPI/Assets.xcassets/arrow_btn.imageset/arrow_btm.png
--------------------------------------------------------------------------------
/MapkitAPI/Assets.xcassets/arrow_btn.imageset/arrow_btm@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThabreshVivid/TYDirectionFinder/HEAD/MapkitAPI/Assets.xcassets/arrow_btn.imageset/arrow_btm@2x.png
--------------------------------------------------------------------------------
/MapkitAPI/Assets.xcassets/arrow_btn.imageset/arrow_btm@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ThabreshVivid/TYDirectionFinder/HEAD/MapkitAPI/Assets.xcassets/arrow_btn.imageset/arrow_btm@3x.png
--------------------------------------------------------------------------------
/MapkitAPI.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MapkitAPI/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // MapkitAPI
4 | //
5 | // Created by Thabresh on 8/8/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 | @end
13 |
14 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TYDirectionFinder
2 |
3 | Direction between two routes and showing direction path information.Please provide API key in TYGooglePlacesApiClient.h
4 |
5 | For Swift ---> https://github.com/ThabreshVivid/TYDirectionSwift
6 |
7 | 
8 |
9 |
10 |
--------------------------------------------------------------------------------
/MapkitAPI/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // MapkitAPI
4 | //
5 | // Created by Thabresh on 8/8/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/MapkitAPI/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // MapkitAPI
4 | //
5 | // Created by Thabresh on 8/8/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/MapkitAPI/Assets.xcassets/mark.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "mark.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "mark@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/MapkitAPI/Assets.xcassets/user.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "user.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "user@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/MapkitAPI/Assets.xcassets/arrow_btn.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "arrow_btm.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "arrow_btm@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "arrow_btm@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/MapkitAPI/TYGooglePlace.h:
--------------------------------------------------------------------------------
1 | //
2 | // TYGooglePlace.h
3 | // MapkitAPI
4 | //
5 | // Created by Thabresh on 8/9/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface TYGooglePlace : NSObject
13 | @property (readonly) NSString *name;
14 | @property (readonly) CLLocation *location;
15 | @property (readonly) NSString *formatted_address;
16 |
17 | -(instancetype)initWithJSONData:(NSDictionary *)jsonDictionary;
18 | @end
19 |
--------------------------------------------------------------------------------
/MapkitAPI/Assets.xcassets/back.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "back.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "back@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "back@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | },
23 | "properties" : {
24 | "template-rendering-intent" : "original"
25 | }
26 | }
--------------------------------------------------------------------------------
/MapkitAPI/TYGoogleAutoCompleteResult.h:
--------------------------------------------------------------------------------
1 | //
2 | // TYGoogleAutoCompleteResult.h
3 | // MapkitAPI
4 | //
5 | // Created by Thabresh on 8/9/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | @interface TYGoogleAutoCompleteResult : NSObject
12 | @property (readonly) NSString *name;
13 | @property (readonly) NSString *description;
14 | @property (readonly) NSString *placeID;
15 |
16 | @property (readonly) CLLocationCoordinate2D locationCoordinates;
17 |
18 | -(instancetype)initWithJSONData:(NSDictionary *)jsonDictionary;
19 | @end
20 |
--------------------------------------------------------------------------------
/MapkitAPI/TYPlaceSearchViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // TYPlaceSearchViewController.h
3 | // MapkitAPI
4 | //
5 | // Created by Thabresh on 8/9/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "TYGooglePlace.h"
11 | @class TYPlaceSearchViewController;
12 |
13 | @protocol TYPlaceSearchViewControllerDelegate
14 |
15 | -(void)searchViewController:(TYPlaceSearchViewController *)controller didReturnPlace:(TYGooglePlace *)place;
16 |
17 |
18 | @end
19 | @interface TYPlaceSearchViewController : UIViewController
20 |
21 | @property (nonatomic) id delegate;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/MapkitAPI/TYGooglePlacesApiClient.h:
--------------------------------------------------------------------------------
1 | //
2 | // TYGooglePlacesApiClient.h
3 | // MapkitAPI
4 | //
5 | // Created by Thabresh on 8/9/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TYGooglePlacesApiClient : NSObject
12 | @property (strong, nonatomic) NSMutableArray *searchResults;
13 |
14 | + (instancetype)sharedInstance;
15 |
16 | - (void)retrieveGooglePlaceInformation:(NSString *)searchWord withCompletion:(void (^)(BOOL isSuccess, NSError *error))completion;
17 |
18 | - (void)retrieveJSONDetailsAbout:(NSString *)place withCompletion:(void (^)(NSDictionary *placeInformation, NSError *error))completion;
19 | @end
20 |
--------------------------------------------------------------------------------
/MapkitAPI/RouteFinderViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // RouteFinderViewController.h
3 | // MapkitAPI
4 | //
5 | // Created by Thabresh on 8/9/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | @interface RouteFinderViewController : UIViewController
12 | @property (weak, nonatomic) IBOutlet UITextField *txtFrom;
13 | @property (weak, nonatomic) IBOutlet UITextField *txtTo;
14 | @property (weak, nonatomic) IBOutlet MKMapView *mapShow;
15 | @property (weak, nonatomic) IBOutlet UIButton *btnDirection;
16 | @property (strong, nonatomic) IBOutlet UIView *popupDirect;
17 | @property (weak, nonatomic) IBOutlet UITableView *directionTbl;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/MapkitAPITests/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 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/MapkitAPIUITests/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 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/MapkitAPI.xcodeproj/xcuserdata/subramanibr.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MapkitAPI.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 00DF96721D58BC1E0056022E
16 |
17 | primary
18 |
19 |
20 | 00DF968B1D58BC1E0056022E
21 |
22 | primary
23 |
24 |
25 | 00DF96961D58BC1E0056022E
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/MapkitAPITests/MapkitAPITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // MapkitAPITests.m
3 | // MapkitAPITests
4 | //
5 | // Created by Thabresh on 8/8/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MapkitAPITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation MapkitAPITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/MapkitAPI/TYGoogleAutoCompleteResult.m:
--------------------------------------------------------------------------------
1 | //
2 | // TYGoogleAutoCompleteResult.m
3 | // MapkitAPI
4 | //
5 | // Created by Thabresh on 8/9/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import "TYGoogleAutoCompleteResult.h"
10 |
11 | @implementation TYGoogleAutoCompleteResult{
12 | NSDictionary *_jsonDictionary;
13 | }
14 | -(instancetype)initWithJSONData:(NSDictionary *)jsonDictionary {
15 | self = [super init];
16 | if (self) {
17 | _jsonDictionary = jsonDictionary;
18 | }
19 | return self;
20 | }
21 |
22 | #pragma mark - Properties
23 |
24 | -(NSString *)name{
25 | NSString *name = [NSString new];
26 | if([_jsonDictionary[@"terms"] objectAtIndex:0][@"value"] != [NSNull null]){
27 | name = [_jsonDictionary[@"terms"] objectAtIndex:0][@"value"];
28 | }
29 | return name;
30 | }
31 |
32 | -(NSString *)description {
33 | NSString *description = [NSString new];
34 | if(_jsonDictionary[@"description"] != [NSNull null]){
35 | description = _jsonDictionary[@"description"];
36 | }
37 | return description;
38 | }
39 |
40 | -(NSString *)placeID {
41 | NSString *placeID = [NSString new];
42 | if(_jsonDictionary[@"place_id"] != [NSNull null]){
43 | placeID = _jsonDictionary[@"place_id"];
44 | }
45 | return placeID;
46 | }
47 |
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/MapkitAPIUITests/MapkitAPIUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // MapkitAPIUITests.m
3 | // MapkitAPIUITests
4 | //
5 | // Created by Thabresh on 8/8/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MapkitAPIUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation MapkitAPIUITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 |
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 |
22 | // In UI tests it is usually best to stop immediately when a failure occurs.
23 | self.continueAfterFailure = NO;
24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
25 | [[[XCUIApplication alloc] init] launch];
26 |
27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
28 | }
29 |
30 | - (void)tearDown {
31 | // Put teardown code here. This method is called after the invocation of each test method in the class.
32 | [super tearDown];
33 | }
34 |
35 | - (void)testExample {
36 | // Use recording to get started writing UI tests.
37 | // Use XCTAssert and related functions to verify your tests produce the correct results.
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/MapkitAPI/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 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "size" : "83.5x83.5",
66 | "scale" : "2x"
67 | }
68 | ],
69 | "info" : {
70 | "version" : 1,
71 | "author" : "xcode"
72 | }
73 | }
--------------------------------------------------------------------------------
/MapkitAPI/TYGooglePlace.m:
--------------------------------------------------------------------------------
1 | //
2 | // TYGooglePlace.m
3 | // MapkitAPI
4 | //
5 | // Created by Thabresh on 8/9/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import "TYGooglePlace.h"
10 |
11 | @implementation TYGooglePlace
12 | {
13 | NSDictionary *_jsonDictionary;
14 | }
15 |
16 | -(instancetype)initWithJSONData:(NSDictionary *)jsonDictionary {
17 | self = [super init];
18 | if (self) {
19 | _jsonDictionary = jsonDictionary;
20 | }
21 | return self;
22 | }
23 |
24 | #pragma mark - Properties
25 |
26 | -(NSString *)name{
27 | NSString *name = [NSString new];
28 | if(_jsonDictionary[@"name"] != [NSNull null]){
29 | name = _jsonDictionary[@"name"];
30 | }
31 | return name;
32 | }
33 |
34 | -(NSString *)formatted_address {
35 | NSString *description = [NSString new];
36 | if(_jsonDictionary[@"formatted_address"] != [NSNull null]){
37 | description = _jsonDictionary[@"formatted_address"];
38 | }
39 | return description;
40 | }
41 |
42 |
43 | -(CLLocation *)location {
44 |
45 | CLLocation *location = [[CLLocation alloc] init];
46 | if(_jsonDictionary[@"geometry"] != [NSNull null] && _jsonDictionary[@"geometry"][@"location"] != [NSNull null]){
47 |
48 | NSNumber *latitude = _jsonDictionary[@"geometry"][@"location"][@"lat"];
49 | NSNumber *longitude = _jsonDictionary[@"geometry"][@"location"][@"lng"];
50 |
51 | location = [[CLLocation alloc] initWithLatitude:latitude.doubleValue longitude:longitude.doubleValue];
52 | }
53 | return location;
54 |
55 | }
56 |
57 |
58 | @end
59 |
60 |
--------------------------------------------------------------------------------
/MapkitAPI/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/MapkitAPI/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 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | NSLocationWhenInUseUsageDescription
30 | MapkitAPI requires location services to work
31 | NSLocationAlwaysUsageDescription
32 | MapkitAPI requires location services to work
33 | NSAppTransportSecurity
34 |
35 | NSAllowsArbitraryLoads
36 |
37 |
38 | UIRequiredDeviceCapabilities
39 |
40 | armv7
41 |
42 | UISupportedInterfaceOrientations
43 |
44 | UIInterfaceOrientationPortrait
45 | UIInterfaceOrientationLandscapeLeft
46 | UIInterfaceOrientationLandscapeRight
47 |
48 | UISupportedInterfaceOrientations~ipad
49 |
50 | UIInterfaceOrientationPortrait
51 | UIInterfaceOrientationPortraitUpsideDown
52 | UIInterfaceOrientationLandscapeLeft
53 | UIInterfaceOrientationLandscapeRight
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/MapkitAPI/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // MapkitAPI
4 | //
5 | // Created by Thabresh on 8/8/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | @interface AppDelegate ()
11 |
12 | @end
13 |
14 | @implementation AppDelegate
15 |
16 |
17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
18 | // Override point for customization after application launch.
19 | return YES;
20 | }
21 |
22 | - (void)applicationWillResignActive:(UIApplication *)application {
23 | // 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.
24 | // 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.
25 | }
26 |
27 | - (void)applicationDidEnterBackground:(UIApplication *)application {
28 | // 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.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | - (void)applicationWillEnterForeground:(UIApplication *)application {
33 | // 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.
34 | }
35 |
36 | - (void)applicationDidBecomeActive:(UIApplication *)application {
37 | // 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.
38 | }
39 |
40 | - (void)applicationWillTerminate:(UIApplication *)application {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/MapkitAPI/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // MapkitAPI
4 | //
5 | // Created by Thabresh on 8/8/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import
11 | #define IS_OS_8_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
12 |
13 | @interface ViewController ()
14 | @property (weak, nonatomic) IBOutlet MKMapView *mkMap;
15 | @property(nonatomic, retain) CLLocationManager *locationManager;
16 |
17 | @end
18 |
19 | @implementation ViewController
20 |
21 | - (void)viewDidLoad {
22 | [super viewDidLoad];
23 | self.mkMap.delegate = self;
24 | self.locationManager = [[CLLocationManager alloc] init];
25 | self.locationManager.delegate = self;
26 | #ifdef __IPHONE_8_0
27 | if(IS_OS_8_OR_LATER) {
28 | // Use one or the other, not both. Depending on what you put in info.plist
29 | [self.locationManager requestWhenInUseAuthorization];
30 | [self.locationManager requestAlwaysAuthorization];
31 | }
32 | #endif
33 | [self.locationManager startUpdatingLocation];
34 | // Do any additional setup after loading the view, typically from a nib.
35 | }
36 | - (IBAction)clickSeg:(UISegmentedControl *)sender {
37 | switch (sender.selectedSegmentIndex) {
38 | case 0:
39 | self.mkMap.mapType = MKMapTypeStandard;
40 | break;
41 | case 1:
42 | self.mkMap.mapType = MKMapTypeSatellite;
43 | break;
44 | case 2:
45 | self.mkMap.mapType = MKMapTypeHybrid;
46 | break;
47 | default:
48 | break;
49 | }
50 | }
51 | - (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation
52 | {
53 | NSLog(@"%f",userLocation.coordinate.latitude);
54 | NSLog(@"%f",userLocation.coordinate.longitude);
55 | [self zoomToFitMapAnnotations:self.mkMap];
56 | }
57 | - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id)annotation
58 | {
59 | MKAnnotationView *view = [[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"identifier"];
60 | UIButton *disclosure = [UIButton buttonWithType:UIButtonTypeContactAdd];
61 | [disclosure addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(disclosureTapped)]];
62 | view.rightCalloutAccessoryView = disclosure;
63 | view.enabled = YES;
64 | view.image = [UIImage imageNamed:@"mark"];
65 | // create a proper annotation view, be lazy and don't use the reuse identifier
66 | return view;
67 | }
68 | -(void)disclosureTapped
69 | {
70 | NSLog(@"Tapped");
71 | }
72 | - (void)zoomToFitMapAnnotations:(MKMapView *)mapView {
73 | if ([mapView.annotations count] == 0) return;
74 |
75 | CLLocationCoordinate2D topLeftCoord;
76 | topLeftCoord.latitude = -90;
77 | topLeftCoord.longitude = 180;
78 |
79 | CLLocationCoordinate2D bottomRightCoord;
80 | bottomRightCoord.latitude = 90;
81 | bottomRightCoord.longitude = -180;
82 |
83 | for(id annotation in mapView.annotations) {
84 | topLeftCoord.longitude = fmin(topLeftCoord.longitude, annotation.coordinate.longitude);
85 | topLeftCoord.latitude = fmax(topLeftCoord.latitude, annotation.coordinate.latitude);
86 | bottomRightCoord.longitude = fmax(bottomRightCoord.longitude, annotation.coordinate.longitude);
87 | bottomRightCoord.latitude = fmin(bottomRightCoord.latitude, annotation.coordinate.latitude);
88 | }
89 |
90 | MKCoordinateRegion region;
91 | region.center.latitude = topLeftCoord.latitude - (topLeftCoord.latitude - bottomRightCoord.latitude) * 0.5;
92 | region.center.longitude = topLeftCoord.longitude + (bottomRightCoord.longitude - topLeftCoord.longitude) * 0.5;
93 |
94 | // Add a little extra space on the sides
95 | region.span.latitudeDelta = fabs(topLeftCoord.latitude - bottomRightCoord.latitude) * 1.1;
96 | region.span.longitudeDelta = fabs(bottomRightCoord.longitude - topLeftCoord.longitude) * 1.1;
97 |
98 | region = [mapView regionThatFits:region];
99 | [mapView setRegion:region animated:YES];
100 | }
101 | - (void)didReceiveMemoryWarning {
102 | [super didReceiveMemoryWarning];
103 | // Dispose of any resources that can be recreated.
104 | }
105 |
106 | @end
107 |
--------------------------------------------------------------------------------
/MapkitAPI.xcodeproj/xcuserdata/subramanibr.xcuserdatad/xcschemes/MapkitAPI.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
43 |
49 |
50 |
51 |
52 |
53 |
59 |
60 |
61 |
62 |
63 |
64 |
74 |
76 |
82 |
83 |
84 |
85 |
86 |
87 |
93 |
95 |
101 |
102 |
103 |
104 |
106 |
107 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/MapkitAPI/TYGooglePlacesApiClient.m:
--------------------------------------------------------------------------------
1 | //
2 | // TYGooglePlacesApiClient.m
3 | // MapkitAPI
4 | //
5 | // Created by Thabresh on 8/9/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import "TYGooglePlacesApiClient.h"
10 | #import "TYGoogleAutoCompleteResult.h"
11 | NSString *const apiKey = @"Give your API key here";
12 | @interface TYGooglePlacesApiClient ()
13 |
14 | @property (nonatomic, strong) NSCache *searchResultsCache;
15 |
16 | @end
17 | @implementation TYGooglePlacesApiClient
18 | +(instancetype)sharedInstance{
19 | static TYGooglePlacesApiClient *_sharedClient = nil;
20 | static dispatch_once_t onceToken;
21 | dispatch_once(&onceToken, ^(void){
22 | _sharedClient = [[TYGooglePlacesApiClient alloc] init];
23 | });
24 |
25 | return _sharedClient;
26 | }
27 |
28 |
29 | #pragma mark - Network Methods
30 |
31 | -(void)retrieveGooglePlaceInformation:(NSString *)searchWord withCompletion:(void (^)(BOOL isSuccess, NSError *error))completion {
32 |
33 | if (!searchWord) {
34 | return;
35 | }
36 |
37 | searchWord = searchWord.lowercaseString;
38 |
39 | self.searchResults = [NSMutableArray array];
40 |
41 | if ([self.searchResultsCache objectForKey:searchWord]) {
42 | NSArray * pastResults = [self.searchResultsCache objectForKey:searchWord];
43 | self.searchResults = [NSMutableArray arrayWithArray:pastResults];
44 | completion(YES, nil);
45 |
46 | } else {
47 |
48 | NSString *urlString = [NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/place/autocomplete/json?input=%@&types=establishment|geocode&radius=500&language=en&key=%@",searchWord,apiKey];
49 |
50 | NSURL *url = [NSURL URLWithString:[urlString stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]];
51 | NSURLSession *session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
52 | NSURLRequest *request = [NSURLRequest requestWithURL:url];
53 | NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
54 | NSDictionary *jSONresult = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil];;
55 |
56 | if (error || [jSONresult[@"status"] isEqualToString:@"NOT_FOUND"] || [jSONresult[@"status"] isEqualToString:@"REQUEST_DENIED"]){
57 | if (!error){
58 | NSDictionary *userInfo = @{@"error":jSONresult[@"status"]};
59 | NSError *newError = [NSError errorWithDomain:@"API Error" code:666 userInfo:userInfo];
60 | completion(NO, newError);
61 | return;
62 | }
63 | completion(NO, error);
64 | return;
65 | } else {
66 |
67 | NSArray *results = [jSONresult valueForKey:@"predictions"];
68 |
69 | for (NSDictionary *jsonDictionary in results) {
70 | TYGoogleAutoCompleteResult *location = [[TYGoogleAutoCompleteResult alloc] initWithJSONData:jsonDictionary];
71 | [self.searchResults addObject:location];
72 | }
73 |
74 | [self.searchResultsCache setObject:self.searchResults forKey:searchWord];
75 |
76 | completion(YES, nil);
77 |
78 | }
79 | }];
80 |
81 | [task resume];
82 | }
83 | }
84 |
85 | -(void)retrieveJSONDetailsAbout:(NSString *)place withCompletion:(void (^)(NSDictionary *placeInformation, NSError *error))completion {
86 |
87 |
88 | NSString *urlString = [NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/place/details/json?placeid=%@&key=%@",place,apiKey];
89 | NSURL *url = [NSURL URLWithString:[urlString stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]];
90 | NSURLRequest *request = [NSURLRequest requestWithURL:url];
91 |
92 |
93 | NSURLSession *session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration] delegate: nil delegateQueue: [NSOperationQueue mainQueue]];
94 | NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
95 | NSDictionary *result = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:nil];
96 |
97 | if (error || [result[@"status"] isEqualToString:@"NOT_FOUND"] || [result[@"status"] isEqualToString:@"REQUEST_DENIED"]){
98 | if (!error){
99 | NSDictionary *userInfo = @{@"error":result[@"status"]};
100 | NSError *newError = [NSError errorWithDomain:@"API Error" code:666 userInfo:userInfo];
101 | completion(nil, newError);
102 | return;
103 | }
104 |
105 |
106 |
107 | completion(nil, error);
108 | return;
109 | }else{
110 |
111 | NSDictionary *placeDictionary = [result valueForKey:@"result"];
112 | completion(placeDictionary, nil);
113 | }
114 | }];
115 |
116 | [task resume];
117 |
118 | }
119 |
120 |
121 | #pragma mark - Properties
122 |
123 | -(NSMutableArray *)searchResults {
124 | if (!_searchResults) {
125 | _searchResults = [NSMutableArray array];
126 | }
127 | return _searchResults;
128 | }
129 |
130 |
131 | -(NSCache *)searchResultsCache {
132 | if (!_searchResultsCache) {
133 | _searchResultsCache = [[NSCache alloc] init];
134 | }
135 | return _searchResultsCache;
136 | }
137 |
138 | @end
139 |
--------------------------------------------------------------------------------
/MapkitAPI/TYPlaceSearchViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // TYPlaceSearchViewController.m
3 | // MapkitAPI
4 | //
5 | // Created by Thabresh on 8/9/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import "TYPlaceSearchViewController.h"
10 | #import "TYGooglePlacesAPIClient.h"
11 | #import "TYGoogleAutoCompleteResult.h"
12 |
13 | @interface TYPlaceSearchViewController ()
14 |
15 | @property (strong, nonatomic) UITableView *googleAutoCompleteTableView;
16 | @property (strong, nonatomic) UIBarButtonItem *closeButton;
17 | @property (strong, nonatomic) UISearchBar *searchBar;
18 | @property (strong, nonatomic) UIActivityIndicatorView *searchLoadingActivityIndicator;
19 |
20 |
21 | @end
22 |
23 | @implementation TYPlaceSearchViewController{
24 | NSTimer *_autoCompleteTimer;
25 | NSString *_substring;
26 | }
27 | -(void)viewWillAppear:(BOOL)animated {
28 | [super viewWillAppear:animated];
29 | [self.searchBar becomeFirstResponder];
30 | }
31 |
32 |
33 | - (void)viewDidLoad {
34 | [super viewDidLoad];
35 |
36 | [self.view addSubview:self.searchBar];
37 | [self.view addSubview:self.googleAutoCompleteTableView];
38 |
39 | [self.navigationItem setTitleView:self.searchBar];
40 | [self.navigationItem setRightBarButtonItem:self.closeButton animated:YES];
41 | // Do any additional setup after loading the view.
42 | }
43 |
44 | - (void)didReceiveMemoryWarning {
45 | [super didReceiveMemoryWarning];
46 | // Dispose of any resources that can be recreated.
47 | }
48 | #pragma mark - Actions
49 |
50 | - (void)onCloseButtonPressed:(UIBarButtonItem *)sender {
51 | [self.searchBar resignFirstResponder];
52 | [self dismissViewControllerAnimated:YES completion:nil];
53 | }
54 |
55 |
56 | #pragma mark - UISearchBarDelegate Methods
57 |
58 | -(void)searchBarSearchButtonClicked:(UISearchBar *)searchBar{
59 |
60 | [_autoCompleteTimer invalidate];
61 | [self searchAutocompleteLocationsWithSubstring];
62 | [searchBar resignFirstResponder];
63 | [self.googleAutoCompleteTableView reloadData];
64 | }
65 |
66 | -(void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText{
67 |
68 | NSString *searchWordProtection = [searchBar.text stringByReplacingOccurrencesOfString:@" " withString:@""];
69 |
70 | if (searchWordProtection.length != 0) {
71 |
72 | dispatch_async(dispatch_get_main_queue(), ^{
73 | [self.searchLoadingActivityIndicator startAnimating];
74 | });
75 |
76 | [self runScript];
77 | } else {
78 |
79 | dispatch_async(dispatch_get_main_queue(), ^{
80 | [self.searchLoadingActivityIndicator stopAnimating];
81 | });
82 | }
83 | }
84 |
85 | -(BOOL)searchBar:(UISearchBar *)searchBar shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text{
86 |
87 | _substring = [NSString stringWithString:searchBar.text];
88 | _substring= [_substring stringByReplacingOccurrencesOfString:@" " withString:@"+"];
89 | _substring = [_substring stringByReplacingCharactersInRange:range withString:text];
90 |
91 | if ([_substring hasPrefix:@"+"] && _substring.length >1) {
92 | _substring = [_substring substringFromIndex:1];
93 | }
94 |
95 | return YES;
96 | }
97 |
98 |
99 | #pragma mark - Auto Complete Helper Methods
100 | - (void)runScript{
101 |
102 | [_autoCompleteTimer invalidate];
103 | _autoCompleteTimer = [NSTimer scheduledTimerWithTimeInterval:0.65f
104 | target:self
105 | selector:@selector(searchAutocompleteLocationsWithSubstring)
106 | userInfo:_substring
107 | repeats:NO];
108 | }
109 |
110 |
111 | #pragma mark - Networking Methods
112 |
113 | - (void)searchAutocompleteLocationsWithSubstring {
114 |
115 | dispatch_async(dispatch_get_main_queue(), ^{
116 | [self.searchLoadingActivityIndicator startAnimating];
117 | });
118 |
119 | [[TYGooglePlacesApiClient sharedInstance] retrieveGooglePlaceInformation:_substring withCompletion:^(BOOL isSuccess, NSError *error) {
120 |
121 | dispatch_async(dispatch_get_main_queue(), ^{
122 |
123 | if (error) {
124 | [self showError:error];
125 | }
126 |
127 | [self.googleAutoCompleteTableView reloadData];
128 | [self.searchLoadingActivityIndicator stopAnimating];
129 | });
130 |
131 |
132 | }];
133 | }
134 |
135 |
136 |
137 | #pragma mark - Table View Data Source Methods
138 |
139 | -(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
140 |
141 | return NO;
142 | }
143 |
144 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
145 |
146 | return 1;
147 | }
148 |
149 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
150 |
151 | return [TYGooglePlacesApiClient sharedInstance].searchResults.count + 1;
152 |
153 | }
154 |
155 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
156 |
157 | if (indexPath.row < [TYGooglePlacesApiClient sharedInstance].searchResults.count) {
158 | return [self locationSearchResultCellForIndexPath:indexPath];
159 | } else {
160 | return [self loadingCell];
161 | }
162 |
163 | }
164 |
165 |
166 | - (UITableViewCell *)locationSearchResultCellForIndexPath:(NSIndexPath *)indexPath {
167 |
168 | TYGoogleAutoCompleteResult *autoCompleteResult = [[TYGooglePlacesApiClient sharedInstance].searchResults objectAtIndex:indexPath.row];
169 |
170 | UITableViewCell *cell = [self.googleAutoCompleteTableView dequeueReusableCellWithIdentifier:@"Cell"];
171 |
172 | if (!cell) {
173 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"Cell"];
174 | }
175 |
176 | [cell.textLabel setText:autoCompleteResult.name];
177 | [cell.detailTextLabel setText:autoCompleteResult.description];
178 |
179 | return cell;
180 | }
181 |
182 |
183 | #pragma mark - Table View Delegate Methods
184 |
185 |
186 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
187 |
188 | [self.searchBar resignFirstResponder];
189 | [tableView deselectRowAtIndexPath:indexPath animated:YES];
190 |
191 | TYGoogleAutoCompleteResult *autoCompleteResult = [[TYGooglePlacesApiClient sharedInstance].searchResults objectAtIndex:indexPath.row];
192 |
193 | [[TYGooglePlacesApiClient sharedInstance] retrieveJSONDetailsAbout:autoCompleteResult.placeID withCompletion:^(NSDictionary *placeInformation, NSError *error) {
194 | if (error) {
195 | [self showError:error];
196 | return;
197 | }
198 | TYGooglePlace *place = [[TYGooglePlace alloc] initWithJSONData:placeInformation];
199 | [self.delegate searchViewController:self didReturnPlace:place];
200 | [self dismissViewControllerAnimated:YES completion:nil];
201 | }];
202 | }
203 |
204 | #pragma mark - Properties
205 |
206 | - (UITableViewCell *)loadingCell {
207 |
208 | UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
209 | [cell setBackgroundColor:[UIColor clearColor]];
210 | [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
211 | [cell.contentView addSubview:self.searchLoadingActivityIndicator ];
212 |
213 | return cell;
214 | }
215 |
216 | -(UIActivityIndicatorView *)searchLoadingActivityIndicator {
217 | if (!_searchLoadingActivityIndicator) {
218 | _searchLoadingActivityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
219 | [_searchLoadingActivityIndicator setCenter:CGPointMake(self.view.center.x, 22)];
220 | [_searchLoadingActivityIndicator setHidesWhenStopped:YES];
221 | }
222 | return _searchLoadingActivityIndicator;
223 | }
224 |
225 | -(UITableView *)googleAutoCompleteTableView {
226 | if (!_googleAutoCompleteTableView) {
227 | _googleAutoCompleteTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
228 | [_googleAutoCompleteTableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
229 | [_googleAutoCompleteTableView setDelegate:self];
230 | [_googleAutoCompleteTableView setDataSource:self];
231 | }
232 | return _googleAutoCompleteTableView;
233 | }
234 |
235 | -(UISearchBar *)searchBar {
236 | if (!_searchBar) {
237 | _searchBar = [[UISearchBar alloc] init];
238 | [_searchBar setDelegate:self];
239 | [_searchBar setPlaceholder:@"Search Location.."];
240 | }
241 | return _searchBar;
242 | }
243 |
244 | -(UIBarButtonItem *)closeButton {
245 | if (!_closeButton) {
246 | _closeButton = [[UIBarButtonItem alloc] initWithTitle:@"Close" style:UIBarButtonItemStylePlain target:self action:@selector(onCloseButtonPressed:)];
247 | }
248 | return _closeButton;
249 | }
250 |
251 |
252 | #pragma mark - Helper Methods
253 |
254 | - (void) showError:(NSError *)error {
255 |
256 | UIAlertController *alertController = [UIAlertController
257 | alertControllerWithTitle:@"Error"
258 | message:error.localizedDescription
259 | preferredStyle:UIAlertControllerStyleAlert];
260 |
261 | UIAlertAction *cancelAction = [UIAlertAction
262 | actionWithTitle:NSLocalizedString(@"Cancel", @"Cancel action")
263 | style:UIAlertActionStyleCancel
264 | handler:nil];
265 |
266 | [alertController addAction:cancelAction];
267 |
268 | [self presentViewController:alertController animated:YES completion:nil];
269 |
270 | }
271 |
272 | #pragma mark - Lifetime
273 |
274 | - (void)dealloc
275 | {
276 | self.googleAutoCompleteTableView = nil;
277 | }
278 | @end
279 |
--------------------------------------------------------------------------------
/MapkitAPI/RouteFinderViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // RouteFinderViewController.m
3 | // MapkitAPI
4 | //
5 | // Created by Thabresh on 8/9/16.
6 | // Copyright © 2016 VividInfotech. All rights reserved.
7 | //
8 |
9 | #import "RouteFinderViewController.h"
10 | #import "TYPlaceSearchViewController.h"
11 | #define BACK_LOGO [UIImage imageNamed:@"back"]
12 |
13 | @interface RouteFinderViewController ()
14 | {
15 | BOOL shownRoute;
16 | BOOL fromClicked;
17 | NSMutableArray *addArray;
18 | NSDictionary *dictRouteInfo;
19 | }
20 |
21 | @end
22 | @interface UITextView(HTML)
23 | - (void)setContentToHTMLString:(id)fp8;
24 | @end
25 | @implementation RouteFinderViewController
26 |
27 | - (void)viewDidLoad {
28 | [super viewDidLoad];
29 | self.navigationItem.title = @"Find Direction";
30 | addArray = [NSMutableArray arrayWithObjects:@"0",@"1", nil];
31 | self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:BACK_LOGO style:UIBarButtonItemStylePlain target:self action:@selector(backButtonAction:)];
32 | [self.popupDirect setFrame:self.view.frame];
33 | [self.view addSubview:self.popupDirect];
34 | [self.popupDirect setHidden:YES];
35 | [self.btnDirection setEnabled:NO];
36 | // Do any additional setup after loading the view.
37 | }
38 | -(void) backButtonAction:(id)sender {
39 | if (shownRoute) {
40 | TYGooglePlace *myPlace = [addArray objectAtIndex:0];
41 | TYGooglePlace *myPlace1 = [addArray objectAtIndex:1];
42 | self.navigationItem.title =[NSString stringWithFormat:@"To : %f , %f",myPlace1.location.coordinate.latitude, myPlace1.location.coordinate.longitude];
43 | self.navigationItem.prompt = [NSString stringWithFormat:@"From : %f , %f",myPlace.location.coordinate.latitude, myPlace.location.coordinate.longitude];
44 | self.navigationItem.rightBarButtonItem.tintColor = [UIColor whiteColor];
45 | [self.navigationItem.rightBarButtonItem setEnabled:YES];
46 |
47 | shownRoute = NO;
48 | [self.popupDirect setHidden:YES];
49 | }else{
50 | [self.navigationController popViewControllerAnimated:YES];
51 | }
52 | }
53 | - (void)didReceiveMemoryWarning {
54 | [super didReceiveMemoryWarning];
55 | // Dispose of any resources that can be recreated.
56 | }
57 | - (IBAction)btnGo:(id)sender {
58 | if ([self CheckValidation]) {
59 | [self.mapShow removeAnnotations:self.mapShow.annotations];
60 | [self.mapShow removeOverlays: self.mapShow.overlays];
61 | TYGooglePlace *myPlace = [addArray objectAtIndex:0];
62 | TYGooglePlace *myPlace1 = [addArray objectAtIndex:1];
63 | [self LoadMapRoute:myPlace.name andDestinationAddress:myPlace1.name];
64 | }
65 | }
66 | -(void)textFieldDidBeginEditing:(UITextField *)textField
67 | {
68 | if (textField.tag==0) {
69 | fromClicked = YES;
70 | }else{
71 | fromClicked = NO;
72 | }
73 | [textField resignFirstResponder];
74 | TYPlaceSearchViewController *searchViewController = [[TYPlaceSearchViewController alloc] init];
75 | [searchViewController setDelegate:self];
76 | UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:searchViewController];
77 | [self presentViewController:navigationController animated:YES completion:nil];
78 |
79 | }
80 | -(BOOL)textFieldShouldReturn:(UITextField *)textField
81 | {
82 | [textField resignFirstResponder];
83 | return YES;
84 | }
85 | -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
86 | {
87 | [self.view endEditing:YES];
88 | }
89 | #pragma mark - ABCGooglePlacesSearchViewControllerDelegate Methods
90 |
91 | -(void)searchViewController:(TYPlaceSearchViewController *)controller didReturnPlace:(TYGooglePlace *)place {
92 | if (fromClicked) {
93 | [addArray replaceObjectAtIndex:0 withObject:place];
94 | self.txtFrom.text = place.formatted_address;
95 | self.navigationItem.prompt =[NSString stringWithFormat:@"From : %f , %f",place.location.coordinate.latitude, place.location.coordinate.longitude];
96 | }else{
97 | [addArray replaceObjectAtIndex:1 withObject:place];
98 | self.txtTo.text = place.formatted_address;
99 | self.navigationItem.title =[NSString stringWithFormat:@"To : %f , %f",place.location.coordinate.latitude, place.location.coordinate.longitude];
100 | }
101 |
102 | }
103 | -(BOOL)CheckValidation
104 | {
105 | if(self.txtFrom.text.length==0 && self.txtTo.text.length==0){
106 | [self ShowAlert:@"Please Enter Source & Destination address"];
107 | return FALSE;
108 | }else if (self.txtFrom.text.length==0) {
109 | [self ShowAlert:@"Please Enter Source address"];
110 | return FALSE;
111 | }else if(self.txtTo.text.length==0){
112 | [self ShowAlert:@"Please Enter Destination address"];
113 | return FALSE;
114 | }
115 | return TRUE;
116 | }
117 | -(void)LoadMapRoute:(NSString*)SourceAddress andDestinationAddress:(NSString*)DestinationAdds
118 | {
119 | NSString *strUrl;
120 | strUrl= [NSString stringWithFormat:@"http://maps.googleapis.com/maps/api/directions/json?origin=%@&destination=%@&sensor=true",SourceAddress,DestinationAdds];
121 | strUrl=[strUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
122 | NSData *data =[NSData dataWithContentsOfURL:[NSURL URLWithString:strUrl]];
123 | NSError* error;
124 | if (data) {
125 | NSDictionary* json = [NSJSONSerialization
126 | JSONObjectWithData:data //1
127 | options:kNilOptions
128 | error:&error];
129 | NSArray *arrRouts=[json objectForKey:@"routes"];
130 | if ([arrRouts isKindOfClass:[NSArray class]]&&arrRouts.count==0) {
131 | [self ShowAlert:@"didn't find direction"];
132 | return;
133 | }
134 | NSArray *arrDistance =[[[json valueForKeyPath:@"routes.legs.steps.distance.text"] objectAtIndex:0]objectAtIndex:0];
135 | NSString *totalDuration = [[[json valueForKeyPath:@"routes.legs.duration.text"] objectAtIndex:0]objectAtIndex:0];
136 | NSString *totalDistance = [[[json valueForKeyPath:@"routes.legs.distance.text"] objectAtIndex:0]objectAtIndex:0];
137 | NSArray *arrDescription =[[[json valueForKeyPath:@"routes.legs.steps.html_instructions"] objectAtIndex:0] objectAtIndex:0];
138 | dictRouteInfo=[NSDictionary dictionaryWithObjectsAndKeys:totalDistance,@"totalDistance",totalDuration,@"totalDuration",arrDistance ,@"distance",arrDescription,@"description", nil];
139 | [self.btnDirection setEnabled:NO];
140 | if (dictRouteInfo) {
141 | [self.btnDirection setEnabled:YES];
142 | }
143 | NSArray* arrpolyline = [[[json valueForKeyPath:@"routes.legs.steps.polyline.points"] objectAtIndex:0] objectAtIndex:0]; //2
144 | double srcLat=[[[[json valueForKeyPath:@"routes.legs.start_location.lat"] objectAtIndex:0] objectAtIndex:0] doubleValue];
145 | double srcLong=[[[[json valueForKeyPath:@"routes.legs.start_location.lng"] objectAtIndex:0] objectAtIndex:0] doubleValue];
146 | double destLat=[[[[json valueForKeyPath:@"routes.legs.end_location.lat"] objectAtIndex:0] objectAtIndex:0] doubleValue];
147 | double destLong=[[[[json valueForKeyPath:@"routes.legs.end_location.lng"] objectAtIndex:0] objectAtIndex:0] doubleValue];
148 | CLLocationCoordinate2D sourceCordinate = CLLocationCoordinate2DMake(srcLat, srcLong);
149 | CLLocationCoordinate2D destCordinate = CLLocationCoordinate2DMake(destLat, destLong);
150 |
151 | [self addAnnotationSrcAndDestination:sourceCordinate :destCordinate andAdds:SourceAddress andDestinationAddress:DestinationAdds];
152 | // NSArray *steps=[[aary objectAtIndex:0]valueForKey:@"steps"];
153 |
154 | // replace lines with this may work
155 |
156 | NSMutableArray *polyLinesArray =[[NSMutableArray alloc]initWithCapacity:0];
157 |
158 | for (int i = 0; i < [arrpolyline count]; i++)
159 | {
160 | NSString* encodedPoints = [arrpolyline objectAtIndex:i] ;
161 | MKPolyline *route = [self polylineWithEncodedString:encodedPoints];
162 | [polyLinesArray addObject:route];
163 | }
164 | [self.mapShow addOverlays:polyLinesArray];
165 | self.mapShow.delegate = self;
166 | [self zoomToFitMapAnnotations:self.mapShow];
167 | }else{
168 | [self.btnDirection setEnabled:NO];
169 | [self ShowAlert:@"didn't find direction"];
170 | }
171 | }
172 | #pragma mark - add annotation on source and destination
173 |
174 | -(void)addAnnotationSrcAndDestination :(CLLocationCoordinate2D )srcCord :(CLLocationCoordinate2D)destCord andAdds:(NSString*)SourceAddress andDestinationAddress:(NSString*)DestinationAdds
175 | {
176 | MKPointAnnotation *sourceAnnotation = [[MKPointAnnotation alloc]init];
177 | MKPointAnnotation *destAnnotation = [[MKPointAnnotation alloc]init];
178 | sourceAnnotation.coordinate=srcCord;
179 | destAnnotation.coordinate=destCord;
180 | sourceAnnotation.title=SourceAddress;
181 | destAnnotation.title=DestinationAdds;
182 | [self.mapShow addAnnotation:sourceAnnotation];
183 | [self.mapShow addAnnotation:destAnnotation];
184 | }
185 |
186 | #pragma mark - decode map polyline
187 |
188 | - (MKPolyline *)polylineWithEncodedString:(NSString *)encodedString {
189 | const char *bytes = [encodedString UTF8String];
190 | NSUInteger length = [encodedString lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
191 | NSUInteger idx = 0;
192 |
193 | NSUInteger count = length / 4;
194 | CLLocationCoordinate2D *coords = calloc(count, sizeof(CLLocationCoordinate2D));
195 | NSUInteger coordIdx = 0;
196 |
197 | float latitude = 0;
198 | float longitude = 0;
199 | while (idx < length) {
200 | char byte = 0;
201 | int res = 0;
202 | char shift = 0;
203 |
204 | do {
205 | byte = bytes[idx++] - 63;
206 | res |= (byte & 0x1F) << shift;
207 | shift += 5;
208 | } while (byte >= 0x20);
209 |
210 | float deltaLat = ((res & 1) ? ~(res >> 1) : (res >> 1));
211 | latitude += deltaLat;
212 |
213 | shift = 0;
214 | res = 0;
215 |
216 | do {
217 | byte = bytes[idx++] - 0x3F;
218 | res |= (byte & 0x1F) << shift;
219 | shift += 5;
220 | } while (byte >= 0x20);
221 |
222 | float deltaLon = ((res & 1) ? ~(res >> 1) : (res >> 1));
223 | longitude += deltaLon;
224 |
225 | float finalLat = latitude * 1E-5;
226 | float finalLon = longitude * 1E-5;
227 |
228 | CLLocationCoordinate2D coord = CLLocationCoordinate2DMake(finalLat, finalLon);
229 | coords[coordIdx++] = coord;
230 |
231 | if (coordIdx == count) {
232 | NSUInteger newCount = count + 10;
233 | coords = realloc(coords, newCount * sizeof(CLLocationCoordinate2D));
234 | count = newCount;
235 | }
236 | }
237 | MKPolyline *polyline = [MKPolyline polylineWithCoordinates:coords count:coordIdx];
238 | free(coords);
239 |
240 | return polyline;
241 | }
242 | #pragma mark - map overlay
243 | -(MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id)overlay
244 | {
245 | MKPolylineRenderer *renderer = [[MKPolylineRenderer alloc] initWithOverlay:overlay];
246 | renderer.strokeColor = [UIColor colorWithRed:155.0/255.0 green:89.0/255.0 blue:182.0/255.0 alpha:1.0];
247 | renderer.lineWidth = 5.0;
248 | return renderer;
249 | }
250 | - (IBAction)clickDirection:(id)sender {
251 | self.navigationItem.title = @"Route Directions";
252 | self.navigationItem.prompt = nil;
253 | self.navigationItem.rightBarButtonItem.tintColor = [UIColor clearColor];
254 | [self.navigationItem.rightBarButtonItem setEnabled:NO];
255 | shownRoute = YES;
256 | CGRect statusBarFrame = [[UIApplication sharedApplication] statusBarFrame];
257 | float targetHeight = self.navigationController.navigationBar.frame.size.height;
258 | float statusHeight = statusBarFrame.size.height;
259 | float addValue = statusHeight+targetHeight;
260 | [self.directionTbl setFrame:CGRectMake(0,addValue, self.view.frame.size.width, self.view.frame.size.height-addValue)];
261 | [self.directionTbl reloadData];
262 | [self.popupDirect setHidden:NO];
263 | }
264 | - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id)annotation
265 | {
266 | MKAnnotationView *view = [[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"identifier"];
267 | // create a disclosure button for map kit
268 | UIButton *disclosure = [UIButton buttonWithType:UIButtonTypeContactAdd];
269 | [disclosure addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(disclosureTapped)]];
270 | view.rightCalloutAccessoryView = disclosure;
271 | view.enabled = YES;
272 | view.image = [UIImage imageNamed:@"user"];
273 | // create a proper annotation view, be lazy and don't use the reuse identifier
274 | return view;
275 | }
276 | -(void)disclosureTapped
277 | {
278 | NSLog(@"Tapped");
279 | }
280 | -(void)ShowAlert:(NSString*)AlertMessage
281 | {
282 | [[[UIAlertView alloc]initWithTitle:AlertMessage message:nil delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]show];
283 | }
284 | - (void)zoomToFitMapAnnotations:(MKMapView *)mapView {
285 | if ([mapView.annotations count] == 0) return;
286 |
287 | CLLocationCoordinate2D topLeftCoord;
288 | topLeftCoord.latitude = -90;
289 | topLeftCoord.longitude = 180;
290 |
291 | CLLocationCoordinate2D bottomRightCoord;
292 | bottomRightCoord.latitude = 90;
293 | bottomRightCoord.longitude = -180;
294 |
295 | for(id annotation in mapView.annotations) {
296 | topLeftCoord.longitude = fmin(topLeftCoord.longitude, annotation.coordinate.longitude);
297 | topLeftCoord.latitude = fmax(topLeftCoord.latitude, annotation.coordinate.latitude);
298 | bottomRightCoord.longitude = fmax(bottomRightCoord.longitude, annotation.coordinate.longitude);
299 | bottomRightCoord.latitude = fmin(bottomRightCoord.latitude, annotation.coordinate.latitude);
300 | }
301 |
302 | MKCoordinateRegion region;
303 | region.center.latitude = topLeftCoord.latitude - (topLeftCoord.latitude - bottomRightCoord.latitude) * 0.5;
304 | region.center.longitude = topLeftCoord.longitude + (bottomRightCoord.longitude - topLeftCoord.longitude) * 0.5;
305 |
306 | // Add a little extra space on the sides
307 | region.span.latitudeDelta = fabs(topLeftCoord.latitude - bottomRightCoord.latitude) * 1.1;
308 | region.span.longitudeDelta = fabs(bottomRightCoord.longitude - topLeftCoord.longitude) * 1.1;
309 |
310 | region = [mapView regionThatFits:region];
311 | [mapView setRegion:region animated:YES];
312 | }
313 | #pragma mark - table view data source and delegate
314 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
315 | {
316 | return 100;
317 | }
318 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
319 | {
320 | return 2;
321 | }
322 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
323 | {
324 | if (section==0) {
325 | return 1;
326 | }
327 | else
328 | {
329 | if (dictRouteInfo) {
330 | return [[dictRouteInfo objectForKey:@"distance"] count];
331 | }
332 | return 0;
333 | }
334 |
335 | }
336 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
337 | if (section == 0) {
338 | return NSLocalizedString(@"Driving directions Summary", nil);
339 | } else
340 | return NSLocalizedString(@"Driving directions Detail", nil);
341 |
342 | }
343 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
344 | {
345 |
346 | }
347 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
348 | {
349 | static NSString *strCellIdentifier1=@"cellIdentifire1";
350 | static NSString *strCellIdentifier2=@"cellIdentifire2";
351 |
352 | UITableViewCell *cell =nil;
353 | if (indexPath.section==0) {
354 | cell = [tableView dequeueReusableCellWithIdentifier:strCellIdentifier1];
355 | }
356 | else if(indexPath.section==1)
357 | {
358 | cell = [tableView dequeueReusableCellWithIdentifier:strCellIdentifier2];
359 | }
360 | if (cell==nil) {
361 | if (indexPath.section==0) {
362 | cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:strCellIdentifier1];
363 | }
364 | else
365 | {
366 | cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:strCellIdentifier2];
367 | }
368 | cell.selectionStyle=UITableViewCellSelectionStyleNone;
369 | if (indexPath.section==0&&indexPath.row==0) {
370 | UILabel *lblSrcDest = [[UILabel alloc]init];
371 | lblSrcDest.tag=100000;
372 |
373 | lblSrcDest.backgroundColor=[UIColor clearColor];
374 | lblSrcDest.font=[UIFont fontWithName:@"helvetica" size:15];
375 | lblSrcDest.lineBreakMode=NSLineBreakByWordWrapping;
376 |
377 | lblSrcDest.frame=CGRectMake(20, 2, 290, 100);
378 | lblSrcDest.numberOfLines=5;
379 |
380 | [cell addSubview:lblSrcDest];
381 |
382 | }
383 | else if(indexPath.section==1)
384 | {
385 | UILabel *lblDistance = [[UILabel alloc]initWithFrame:CGRectMake(30, 2, 260, 20)];
386 | lblDistance.backgroundColor=[UIColor clearColor];
387 | [cell addSubview:lblDistance];
388 | lblDistance.tag=1;
389 | UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(20.0f, 30.0f, 280.0f, 56.0f)];
390 | textView.editable = NO;
391 | textView.scrollEnabled = NO;
392 | textView.opaque = YES;
393 | textView.backgroundColor = [UIColor clearColor];
394 | textView.tag = 2;
395 | [cell addSubview:textView];
396 | }
397 | }
398 | if (indexPath.section==0&&indexPath.row==0) {
399 | UILabel *lblSrcDest=(UILabel*)[cell viewWithTag:100000];
400 | if (![addArray containsObject:@"0"]) {
401 | TYGooglePlace *myPlace = [addArray objectAtIndex:0];
402 | TYGooglePlace *myPlace1 = [addArray objectAtIndex:1];
403 |
404 | lblSrcDest.text=[NSString stringWithFormat:@"Driving directions from %@ to %@ \ntotal Distace = %@ \ntotal Duration = %@",myPlace.name,myPlace1.name,[dictRouteInfo objectForKey:@"totalDistance"],[dictRouteInfo objectForKey:@"totalDuration"]];
405 | }
406 |
407 | }
408 | else if(indexPath.section==1){
409 | if (![addArray containsObject:@"0"]) {
410 | UILabel *lblDist = (UILabel *)[cell viewWithTag:1];
411 | lblDist.text=[[dictRouteInfo objectForKey:@"distance"]objectAtIndex:indexPath.row];
412 | UITextView *textView = (UITextView *)[cell viewWithTag:2];
413 | [textView setContentToHTMLString:[[dictRouteInfo objectForKey:@"description"]objectAtIndex:indexPath.row]];
414 | }
415 | // NSLog(@"index row==%i ,%@ , %@",indexPath.row,lblDist.text , [[dictRouteInfo objectForKey:@"distance"]objectAtIndex:indexPath.row]);
416 |
417 | }
418 |
419 | return cell;
420 | }
421 | /*
422 | #pragma mark - Navigation
423 |
424 | // In a storyboard-based application, you will often want to do a little preparation before navigation
425 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
426 | // Get the new view controller using [segue destinationViewController].
427 | // Pass the selected object to the new view controller.
428 | }
429 | */
430 |
431 | @end
432 |
--------------------------------------------------------------------------------
/MapkitAPI/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 |
93 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
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 |
242 |
243 |
244 |
--------------------------------------------------------------------------------
/MapkitAPI.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 00454AEE1D59F18200A3513D /* RouteFinderViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 00454AED1D59F18200A3513D /* RouteFinderViewController.m */; };
11 | 00454B021D5A18A500A3513D /* TYPlaceSearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 00454B011D5A18A500A3513D /* TYPlaceSearchViewController.m */; };
12 | 00454B051D5A18C600A3513D /* TYGooglePlacesApiClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 00454B041D5A18C600A3513D /* TYGooglePlacesApiClient.m */; };
13 | 00454B081D5A18D800A3513D /* TYGoogleAutoCompleteResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 00454B071D5A18D800A3513D /* TYGoogleAutoCompleteResult.m */; };
14 | 00454B0B1D5A18E900A3513D /* TYGooglePlace.m in Sources */ = {isa = PBXBuildFile; fileRef = 00454B0A1D5A18E900A3513D /* TYGooglePlace.m */; };
15 | 00DF96781D58BC1E0056022E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 00DF96771D58BC1E0056022E /* main.m */; };
16 | 00DF967B1D58BC1E0056022E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 00DF967A1D58BC1E0056022E /* AppDelegate.m */; };
17 | 00DF967E1D58BC1E0056022E /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 00DF967D1D58BC1E0056022E /* ViewController.m */; };
18 | 00DF96811D58BC1E0056022E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 00DF967F1D58BC1E0056022E /* Main.storyboard */; };
19 | 00DF96831D58BC1E0056022E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 00DF96821D58BC1E0056022E /* Assets.xcassets */; };
20 | 00DF96861D58BC1E0056022E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 00DF96841D58BC1E0056022E /* LaunchScreen.storyboard */; };
21 | 00DF96911D58BC1E0056022E /* MapkitAPITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00DF96901D58BC1E0056022E /* MapkitAPITests.m */; };
22 | 00DF969C1D58BC1E0056022E /* MapkitAPIUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00DF969B1D58BC1E0056022E /* MapkitAPIUITests.m */; };
23 | 00DF96AA1D58C2400056022E /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 00DF96A91D58C2400056022E /* MapKit.framework */; };
24 | /* End PBXBuildFile section */
25 |
26 | /* Begin PBXContainerItemProxy section */
27 | 00DF968D1D58BC1E0056022E /* PBXContainerItemProxy */ = {
28 | isa = PBXContainerItemProxy;
29 | containerPortal = 00DF966B1D58BC1E0056022E /* Project object */;
30 | proxyType = 1;
31 | remoteGlobalIDString = 00DF96721D58BC1E0056022E;
32 | remoteInfo = MapkitAPI;
33 | };
34 | 00DF96981D58BC1E0056022E /* PBXContainerItemProxy */ = {
35 | isa = PBXContainerItemProxy;
36 | containerPortal = 00DF966B1D58BC1E0056022E /* Project object */;
37 | proxyType = 1;
38 | remoteGlobalIDString = 00DF96721D58BC1E0056022E;
39 | remoteInfo = MapkitAPI;
40 | };
41 | /* End PBXContainerItemProxy section */
42 |
43 | /* Begin PBXFileReference section */
44 | 00454AEC1D59F18200A3513D /* RouteFinderViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RouteFinderViewController.h; sourceTree = ""; };
45 | 00454AED1D59F18200A3513D /* RouteFinderViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RouteFinderViewController.m; sourceTree = ""; };
46 | 00454B001D5A18A500A3513D /* TYPlaceSearchViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TYPlaceSearchViewController.h; sourceTree = ""; };
47 | 00454B011D5A18A500A3513D /* TYPlaceSearchViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TYPlaceSearchViewController.m; sourceTree = ""; };
48 | 00454B031D5A18C600A3513D /* TYGooglePlacesApiClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TYGooglePlacesApiClient.h; sourceTree = ""; };
49 | 00454B041D5A18C600A3513D /* TYGooglePlacesApiClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TYGooglePlacesApiClient.m; sourceTree = ""; };
50 | 00454B061D5A18D800A3513D /* TYGoogleAutoCompleteResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TYGoogleAutoCompleteResult.h; sourceTree = ""; };
51 | 00454B071D5A18D800A3513D /* TYGoogleAutoCompleteResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TYGoogleAutoCompleteResult.m; sourceTree = ""; };
52 | 00454B091D5A18E900A3513D /* TYGooglePlace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TYGooglePlace.h; sourceTree = ""; };
53 | 00454B0A1D5A18E900A3513D /* TYGooglePlace.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TYGooglePlace.m; sourceTree = ""; };
54 | 00DF96731D58BC1E0056022E /* MapkitAPI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MapkitAPI.app; sourceTree = BUILT_PRODUCTS_DIR; };
55 | 00DF96771D58BC1E0056022E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
56 | 00DF96791D58BC1E0056022E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
57 | 00DF967A1D58BC1E0056022E /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
58 | 00DF967C1D58BC1E0056022E /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
59 | 00DF967D1D58BC1E0056022E /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
60 | 00DF96801D58BC1E0056022E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
61 | 00DF96821D58BC1E0056022E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
62 | 00DF96851D58BC1E0056022E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
63 | 00DF96871D58BC1E0056022E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
64 | 00DF968C1D58BC1E0056022E /* MapkitAPITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MapkitAPITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
65 | 00DF96901D58BC1E0056022E /* MapkitAPITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MapkitAPITests.m; sourceTree = ""; };
66 | 00DF96921D58BC1E0056022E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
67 | 00DF96971D58BC1E0056022E /* MapkitAPIUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MapkitAPIUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
68 | 00DF969B1D58BC1E0056022E /* MapkitAPIUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MapkitAPIUITests.m; sourceTree = ""; };
69 | 00DF969D1D58BC1E0056022E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
70 | 00DF96A91D58C2400056022E /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; };
71 | /* End PBXFileReference section */
72 |
73 | /* Begin PBXFrameworksBuildPhase section */
74 | 00DF96701D58BC1E0056022E /* Frameworks */ = {
75 | isa = PBXFrameworksBuildPhase;
76 | buildActionMask = 2147483647;
77 | files = (
78 | 00DF96AA1D58C2400056022E /* MapKit.framework in Frameworks */,
79 | );
80 | runOnlyForDeploymentPostprocessing = 0;
81 | };
82 | 00DF96891D58BC1E0056022E /* Frameworks */ = {
83 | isa = PBXFrameworksBuildPhase;
84 | buildActionMask = 2147483647;
85 | files = (
86 | );
87 | runOnlyForDeploymentPostprocessing = 0;
88 | };
89 | 00DF96941D58BC1E0056022E /* Frameworks */ = {
90 | isa = PBXFrameworksBuildPhase;
91 | buildActionMask = 2147483647;
92 | files = (
93 | );
94 | runOnlyForDeploymentPostprocessing = 0;
95 | };
96 | /* End PBXFrameworksBuildPhase section */
97 |
98 | /* Begin PBXGroup section */
99 | 00454AFF1D5A187900A3513D /* AutoComplete */ = {
100 | isa = PBXGroup;
101 | children = (
102 | 00454B001D5A18A500A3513D /* TYPlaceSearchViewController.h */,
103 | 00454B011D5A18A500A3513D /* TYPlaceSearchViewController.m */,
104 | 00454B031D5A18C600A3513D /* TYGooglePlacesApiClient.h */,
105 | 00454B041D5A18C600A3513D /* TYGooglePlacesApiClient.m */,
106 | 00454B061D5A18D800A3513D /* TYGoogleAutoCompleteResult.h */,
107 | 00454B071D5A18D800A3513D /* TYGoogleAutoCompleteResult.m */,
108 | 00454B091D5A18E900A3513D /* TYGooglePlace.h */,
109 | 00454B0A1D5A18E900A3513D /* TYGooglePlace.m */,
110 | );
111 | name = AutoComplete;
112 | sourceTree = "";
113 | };
114 | 00DF966A1D58BC1D0056022E = {
115 | isa = PBXGroup;
116 | children = (
117 | 00DF96A91D58C2400056022E /* MapKit.framework */,
118 | 00DF96751D58BC1E0056022E /* MapkitAPI */,
119 | 00DF968F1D58BC1E0056022E /* MapkitAPITests */,
120 | 00DF969A1D58BC1E0056022E /* MapkitAPIUITests */,
121 | 00DF96741D58BC1E0056022E /* Products */,
122 | );
123 | sourceTree = "";
124 | };
125 | 00DF96741D58BC1E0056022E /* Products */ = {
126 | isa = PBXGroup;
127 | children = (
128 | 00DF96731D58BC1E0056022E /* MapkitAPI.app */,
129 | 00DF968C1D58BC1E0056022E /* MapkitAPITests.xctest */,
130 | 00DF96971D58BC1E0056022E /* MapkitAPIUITests.xctest */,
131 | );
132 | name = Products;
133 | sourceTree = "";
134 | };
135 | 00DF96751D58BC1E0056022E /* MapkitAPI */ = {
136 | isa = PBXGroup;
137 | children = (
138 | 00DF96791D58BC1E0056022E /* AppDelegate.h */,
139 | 00DF967A1D58BC1E0056022E /* AppDelegate.m */,
140 | 00DF967C1D58BC1E0056022E /* ViewController.h */,
141 | 00DF967D1D58BC1E0056022E /* ViewController.m */,
142 | 00454AEC1D59F18200A3513D /* RouteFinderViewController.h */,
143 | 00454AED1D59F18200A3513D /* RouteFinderViewController.m */,
144 | 00454AFF1D5A187900A3513D /* AutoComplete */,
145 | 00DF967F1D58BC1E0056022E /* Main.storyboard */,
146 | 00DF96821D58BC1E0056022E /* Assets.xcassets */,
147 | 00DF96841D58BC1E0056022E /* LaunchScreen.storyboard */,
148 | 00DF96871D58BC1E0056022E /* Info.plist */,
149 | 00DF96761D58BC1E0056022E /* Supporting Files */,
150 | );
151 | path = MapkitAPI;
152 | sourceTree = "";
153 | };
154 | 00DF96761D58BC1E0056022E /* Supporting Files */ = {
155 | isa = PBXGroup;
156 | children = (
157 | 00DF96771D58BC1E0056022E /* main.m */,
158 | );
159 | name = "Supporting Files";
160 | sourceTree = "";
161 | };
162 | 00DF968F1D58BC1E0056022E /* MapkitAPITests */ = {
163 | isa = PBXGroup;
164 | children = (
165 | 00DF96901D58BC1E0056022E /* MapkitAPITests.m */,
166 | 00DF96921D58BC1E0056022E /* Info.plist */,
167 | );
168 | path = MapkitAPITests;
169 | sourceTree = "";
170 | };
171 | 00DF969A1D58BC1E0056022E /* MapkitAPIUITests */ = {
172 | isa = PBXGroup;
173 | children = (
174 | 00DF969B1D58BC1E0056022E /* MapkitAPIUITests.m */,
175 | 00DF969D1D58BC1E0056022E /* Info.plist */,
176 | );
177 | path = MapkitAPIUITests;
178 | sourceTree = "";
179 | };
180 | /* End PBXGroup section */
181 |
182 | /* Begin PBXNativeTarget section */
183 | 00DF96721D58BC1E0056022E /* MapkitAPI */ = {
184 | isa = PBXNativeTarget;
185 | buildConfigurationList = 00DF96A01D58BC1E0056022E /* Build configuration list for PBXNativeTarget "MapkitAPI" */;
186 | buildPhases = (
187 | 00DF966F1D58BC1E0056022E /* Sources */,
188 | 00DF96701D58BC1E0056022E /* Frameworks */,
189 | 00DF96711D58BC1E0056022E /* Resources */,
190 | );
191 | buildRules = (
192 | );
193 | dependencies = (
194 | );
195 | name = MapkitAPI;
196 | productName = MapkitAPI;
197 | productReference = 00DF96731D58BC1E0056022E /* MapkitAPI.app */;
198 | productType = "com.apple.product-type.application";
199 | };
200 | 00DF968B1D58BC1E0056022E /* MapkitAPITests */ = {
201 | isa = PBXNativeTarget;
202 | buildConfigurationList = 00DF96A31D58BC1E0056022E /* Build configuration list for PBXNativeTarget "MapkitAPITests" */;
203 | buildPhases = (
204 | 00DF96881D58BC1E0056022E /* Sources */,
205 | 00DF96891D58BC1E0056022E /* Frameworks */,
206 | 00DF968A1D58BC1E0056022E /* Resources */,
207 | );
208 | buildRules = (
209 | );
210 | dependencies = (
211 | 00DF968E1D58BC1E0056022E /* PBXTargetDependency */,
212 | );
213 | name = MapkitAPITests;
214 | productName = MapkitAPITests;
215 | productReference = 00DF968C1D58BC1E0056022E /* MapkitAPITests.xctest */;
216 | productType = "com.apple.product-type.bundle.unit-test";
217 | };
218 | 00DF96961D58BC1E0056022E /* MapkitAPIUITests */ = {
219 | isa = PBXNativeTarget;
220 | buildConfigurationList = 00DF96A61D58BC1E0056022E /* Build configuration list for PBXNativeTarget "MapkitAPIUITests" */;
221 | buildPhases = (
222 | 00DF96931D58BC1E0056022E /* Sources */,
223 | 00DF96941D58BC1E0056022E /* Frameworks */,
224 | 00DF96951D58BC1E0056022E /* Resources */,
225 | );
226 | buildRules = (
227 | );
228 | dependencies = (
229 | 00DF96991D58BC1E0056022E /* PBXTargetDependency */,
230 | );
231 | name = MapkitAPIUITests;
232 | productName = MapkitAPIUITests;
233 | productReference = 00DF96971D58BC1E0056022E /* MapkitAPIUITests.xctest */;
234 | productType = "com.apple.product-type.bundle.ui-testing";
235 | };
236 | /* End PBXNativeTarget section */
237 |
238 | /* Begin PBXProject section */
239 | 00DF966B1D58BC1E0056022E /* Project object */ = {
240 | isa = PBXProject;
241 | attributes = {
242 | LastUpgradeCheck = 0730;
243 | ORGANIZATIONNAME = VividInfotech;
244 | TargetAttributes = {
245 | 00DF96721D58BC1E0056022E = {
246 | CreatedOnToolsVersion = 7.3.1;
247 | };
248 | 00DF968B1D58BC1E0056022E = {
249 | CreatedOnToolsVersion = 7.3.1;
250 | TestTargetID = 00DF96721D58BC1E0056022E;
251 | };
252 | 00DF96961D58BC1E0056022E = {
253 | CreatedOnToolsVersion = 7.3.1;
254 | TestTargetID = 00DF96721D58BC1E0056022E;
255 | };
256 | };
257 | };
258 | buildConfigurationList = 00DF966E1D58BC1E0056022E /* Build configuration list for PBXProject "MapkitAPI" */;
259 | compatibilityVersion = "Xcode 3.2";
260 | developmentRegion = English;
261 | hasScannedForEncodings = 0;
262 | knownRegions = (
263 | en,
264 | Base,
265 | );
266 | mainGroup = 00DF966A1D58BC1D0056022E;
267 | productRefGroup = 00DF96741D58BC1E0056022E /* Products */;
268 | projectDirPath = "";
269 | projectRoot = "";
270 | targets = (
271 | 00DF96721D58BC1E0056022E /* MapkitAPI */,
272 | 00DF968B1D58BC1E0056022E /* MapkitAPITests */,
273 | 00DF96961D58BC1E0056022E /* MapkitAPIUITests */,
274 | );
275 | };
276 | /* End PBXProject section */
277 |
278 | /* Begin PBXResourcesBuildPhase section */
279 | 00DF96711D58BC1E0056022E /* Resources */ = {
280 | isa = PBXResourcesBuildPhase;
281 | buildActionMask = 2147483647;
282 | files = (
283 | 00DF96861D58BC1E0056022E /* LaunchScreen.storyboard in Resources */,
284 | 00DF96831D58BC1E0056022E /* Assets.xcassets in Resources */,
285 | 00DF96811D58BC1E0056022E /* Main.storyboard in Resources */,
286 | );
287 | runOnlyForDeploymentPostprocessing = 0;
288 | };
289 | 00DF968A1D58BC1E0056022E /* Resources */ = {
290 | isa = PBXResourcesBuildPhase;
291 | buildActionMask = 2147483647;
292 | files = (
293 | );
294 | runOnlyForDeploymentPostprocessing = 0;
295 | };
296 | 00DF96951D58BC1E0056022E /* Resources */ = {
297 | isa = PBXResourcesBuildPhase;
298 | buildActionMask = 2147483647;
299 | files = (
300 | );
301 | runOnlyForDeploymentPostprocessing = 0;
302 | };
303 | /* End PBXResourcesBuildPhase section */
304 |
305 | /* Begin PBXSourcesBuildPhase section */
306 | 00DF966F1D58BC1E0056022E /* Sources */ = {
307 | isa = PBXSourcesBuildPhase;
308 | buildActionMask = 2147483647;
309 | files = (
310 | 00454B021D5A18A500A3513D /* TYPlaceSearchViewController.m in Sources */,
311 | 00454AEE1D59F18200A3513D /* RouteFinderViewController.m in Sources */,
312 | 00454B051D5A18C600A3513D /* TYGooglePlacesApiClient.m in Sources */,
313 | 00DF967E1D58BC1E0056022E /* ViewController.m in Sources */,
314 | 00454B0B1D5A18E900A3513D /* TYGooglePlace.m in Sources */,
315 | 00454B081D5A18D800A3513D /* TYGoogleAutoCompleteResult.m in Sources */,
316 | 00DF967B1D58BC1E0056022E /* AppDelegate.m in Sources */,
317 | 00DF96781D58BC1E0056022E /* main.m in Sources */,
318 | );
319 | runOnlyForDeploymentPostprocessing = 0;
320 | };
321 | 00DF96881D58BC1E0056022E /* Sources */ = {
322 | isa = PBXSourcesBuildPhase;
323 | buildActionMask = 2147483647;
324 | files = (
325 | 00DF96911D58BC1E0056022E /* MapkitAPITests.m in Sources */,
326 | );
327 | runOnlyForDeploymentPostprocessing = 0;
328 | };
329 | 00DF96931D58BC1E0056022E /* Sources */ = {
330 | isa = PBXSourcesBuildPhase;
331 | buildActionMask = 2147483647;
332 | files = (
333 | 00DF969C1D58BC1E0056022E /* MapkitAPIUITests.m in Sources */,
334 | );
335 | runOnlyForDeploymentPostprocessing = 0;
336 | };
337 | /* End PBXSourcesBuildPhase section */
338 |
339 | /* Begin PBXTargetDependency section */
340 | 00DF968E1D58BC1E0056022E /* PBXTargetDependency */ = {
341 | isa = PBXTargetDependency;
342 | target = 00DF96721D58BC1E0056022E /* MapkitAPI */;
343 | targetProxy = 00DF968D1D58BC1E0056022E /* PBXContainerItemProxy */;
344 | };
345 | 00DF96991D58BC1E0056022E /* PBXTargetDependency */ = {
346 | isa = PBXTargetDependency;
347 | target = 00DF96721D58BC1E0056022E /* MapkitAPI */;
348 | targetProxy = 00DF96981D58BC1E0056022E /* PBXContainerItemProxy */;
349 | };
350 | /* End PBXTargetDependency section */
351 |
352 | /* Begin PBXVariantGroup section */
353 | 00DF967F1D58BC1E0056022E /* Main.storyboard */ = {
354 | isa = PBXVariantGroup;
355 | children = (
356 | 00DF96801D58BC1E0056022E /* Base */,
357 | );
358 | name = Main.storyboard;
359 | sourceTree = "";
360 | };
361 | 00DF96841D58BC1E0056022E /* LaunchScreen.storyboard */ = {
362 | isa = PBXVariantGroup;
363 | children = (
364 | 00DF96851D58BC1E0056022E /* Base */,
365 | );
366 | name = LaunchScreen.storyboard;
367 | sourceTree = "";
368 | };
369 | /* End PBXVariantGroup section */
370 |
371 | /* Begin XCBuildConfiguration section */
372 | 00DF969E1D58BC1E0056022E /* Debug */ = {
373 | isa = XCBuildConfiguration;
374 | buildSettings = {
375 | ALWAYS_SEARCH_USER_PATHS = NO;
376 | CLANG_ANALYZER_NONNULL = YES;
377 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
378 | CLANG_CXX_LIBRARY = "libc++";
379 | CLANG_ENABLE_MODULES = YES;
380 | CLANG_ENABLE_OBJC_ARC = YES;
381 | CLANG_WARN_BOOL_CONVERSION = YES;
382 | CLANG_WARN_CONSTANT_CONVERSION = YES;
383 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
384 | CLANG_WARN_EMPTY_BODY = YES;
385 | CLANG_WARN_ENUM_CONVERSION = YES;
386 | CLANG_WARN_INT_CONVERSION = YES;
387 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
388 | CLANG_WARN_UNREACHABLE_CODE = YES;
389 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
390 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
391 | COPY_PHASE_STRIP = NO;
392 | DEBUG_INFORMATION_FORMAT = dwarf;
393 | ENABLE_STRICT_OBJC_MSGSEND = YES;
394 | ENABLE_TESTABILITY = YES;
395 | GCC_C_LANGUAGE_STANDARD = gnu99;
396 | GCC_DYNAMIC_NO_PIC = NO;
397 | GCC_NO_COMMON_BLOCKS = YES;
398 | GCC_OPTIMIZATION_LEVEL = 0;
399 | GCC_PREPROCESSOR_DEFINITIONS = (
400 | "DEBUG=1",
401 | "$(inherited)",
402 | );
403 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
404 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
405 | GCC_WARN_UNDECLARED_SELECTOR = YES;
406 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
407 | GCC_WARN_UNUSED_FUNCTION = YES;
408 | GCC_WARN_UNUSED_VARIABLE = YES;
409 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
410 | MTL_ENABLE_DEBUG_INFO = YES;
411 | ONLY_ACTIVE_ARCH = YES;
412 | SDKROOT = iphoneos;
413 | TARGETED_DEVICE_FAMILY = "1,2";
414 | };
415 | name = Debug;
416 | };
417 | 00DF969F1D58BC1E0056022E /* Release */ = {
418 | isa = XCBuildConfiguration;
419 | buildSettings = {
420 | ALWAYS_SEARCH_USER_PATHS = NO;
421 | CLANG_ANALYZER_NONNULL = YES;
422 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
423 | CLANG_CXX_LIBRARY = "libc++";
424 | CLANG_ENABLE_MODULES = YES;
425 | CLANG_ENABLE_OBJC_ARC = YES;
426 | CLANG_WARN_BOOL_CONVERSION = YES;
427 | CLANG_WARN_CONSTANT_CONVERSION = YES;
428 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
429 | CLANG_WARN_EMPTY_BODY = YES;
430 | CLANG_WARN_ENUM_CONVERSION = YES;
431 | CLANG_WARN_INT_CONVERSION = YES;
432 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
433 | CLANG_WARN_UNREACHABLE_CODE = YES;
434 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
435 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
436 | COPY_PHASE_STRIP = NO;
437 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
438 | ENABLE_NS_ASSERTIONS = NO;
439 | ENABLE_STRICT_OBJC_MSGSEND = YES;
440 | GCC_C_LANGUAGE_STANDARD = gnu99;
441 | GCC_NO_COMMON_BLOCKS = YES;
442 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
443 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
444 | GCC_WARN_UNDECLARED_SELECTOR = YES;
445 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
446 | GCC_WARN_UNUSED_FUNCTION = YES;
447 | GCC_WARN_UNUSED_VARIABLE = YES;
448 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
449 | MTL_ENABLE_DEBUG_INFO = NO;
450 | SDKROOT = iphoneos;
451 | TARGETED_DEVICE_FAMILY = "1,2";
452 | VALIDATE_PRODUCT = YES;
453 | };
454 | name = Release;
455 | };
456 | 00DF96A11D58BC1E0056022E /* Debug */ = {
457 | isa = XCBuildConfiguration;
458 | buildSettings = {
459 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
460 | INFOPLIST_FILE = MapkitAPI/Info.plist;
461 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
462 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
463 | PRODUCT_BUNDLE_IDENTIFIER = VividInfotech.MapkitAPI;
464 | PRODUCT_NAME = "$(TARGET_NAME)";
465 | };
466 | name = Debug;
467 | };
468 | 00DF96A21D58BC1E0056022E /* Release */ = {
469 | isa = XCBuildConfiguration;
470 | buildSettings = {
471 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
472 | INFOPLIST_FILE = MapkitAPI/Info.plist;
473 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
474 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
475 | PRODUCT_BUNDLE_IDENTIFIER = VividInfotech.MapkitAPI;
476 | PRODUCT_NAME = "$(TARGET_NAME)";
477 | };
478 | name = Release;
479 | };
480 | 00DF96A41D58BC1E0056022E /* Debug */ = {
481 | isa = XCBuildConfiguration;
482 | buildSettings = {
483 | BUNDLE_LOADER = "$(TEST_HOST)";
484 | INFOPLIST_FILE = MapkitAPITests/Info.plist;
485 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
486 | PRODUCT_BUNDLE_IDENTIFIER = VividInfotech.MapkitAPITests;
487 | PRODUCT_NAME = "$(TARGET_NAME)";
488 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MapkitAPI.app/MapkitAPI";
489 | };
490 | name = Debug;
491 | };
492 | 00DF96A51D58BC1E0056022E /* Release */ = {
493 | isa = XCBuildConfiguration;
494 | buildSettings = {
495 | BUNDLE_LOADER = "$(TEST_HOST)";
496 | INFOPLIST_FILE = MapkitAPITests/Info.plist;
497 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
498 | PRODUCT_BUNDLE_IDENTIFIER = VividInfotech.MapkitAPITests;
499 | PRODUCT_NAME = "$(TARGET_NAME)";
500 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MapkitAPI.app/MapkitAPI";
501 | };
502 | name = Release;
503 | };
504 | 00DF96A71D58BC1E0056022E /* Debug */ = {
505 | isa = XCBuildConfiguration;
506 | buildSettings = {
507 | INFOPLIST_FILE = MapkitAPIUITests/Info.plist;
508 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
509 | PRODUCT_BUNDLE_IDENTIFIER = VividInfotech.MapkitAPIUITests;
510 | PRODUCT_NAME = "$(TARGET_NAME)";
511 | TEST_TARGET_NAME = MapkitAPI;
512 | };
513 | name = Debug;
514 | };
515 | 00DF96A81D58BC1E0056022E /* Release */ = {
516 | isa = XCBuildConfiguration;
517 | buildSettings = {
518 | INFOPLIST_FILE = MapkitAPIUITests/Info.plist;
519 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
520 | PRODUCT_BUNDLE_IDENTIFIER = VividInfotech.MapkitAPIUITests;
521 | PRODUCT_NAME = "$(TARGET_NAME)";
522 | TEST_TARGET_NAME = MapkitAPI;
523 | };
524 | name = Release;
525 | };
526 | /* End XCBuildConfiguration section */
527 |
528 | /* Begin XCConfigurationList section */
529 | 00DF966E1D58BC1E0056022E /* Build configuration list for PBXProject "MapkitAPI" */ = {
530 | isa = XCConfigurationList;
531 | buildConfigurations = (
532 | 00DF969E1D58BC1E0056022E /* Debug */,
533 | 00DF969F1D58BC1E0056022E /* Release */,
534 | );
535 | defaultConfigurationIsVisible = 0;
536 | defaultConfigurationName = Release;
537 | };
538 | 00DF96A01D58BC1E0056022E /* Build configuration list for PBXNativeTarget "MapkitAPI" */ = {
539 | isa = XCConfigurationList;
540 | buildConfigurations = (
541 | 00DF96A11D58BC1E0056022E /* Debug */,
542 | 00DF96A21D58BC1E0056022E /* Release */,
543 | );
544 | defaultConfigurationIsVisible = 0;
545 | defaultConfigurationName = Release;
546 | };
547 | 00DF96A31D58BC1E0056022E /* Build configuration list for PBXNativeTarget "MapkitAPITests" */ = {
548 | isa = XCConfigurationList;
549 | buildConfigurations = (
550 | 00DF96A41D58BC1E0056022E /* Debug */,
551 | 00DF96A51D58BC1E0056022E /* Release */,
552 | );
553 | defaultConfigurationIsVisible = 0;
554 | defaultConfigurationName = Release;
555 | };
556 | 00DF96A61D58BC1E0056022E /* Build configuration list for PBXNativeTarget "MapkitAPIUITests" */ = {
557 | isa = XCConfigurationList;
558 | buildConfigurations = (
559 | 00DF96A71D58BC1E0056022E /* Debug */,
560 | 00DF96A81D58BC1E0056022E /* Release */,
561 | );
562 | defaultConfigurationIsVisible = 0;
563 | defaultConfigurationName = Release;
564 | };
565 | /* End XCConfigurationList section */
566 | };
567 | rootObject = 00DF966B1D58BC1E0056022E /* Project object */;
568 | }
569 |
--------------------------------------------------------------------------------