vendor 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/Gemfile.lock +2 -4
- data/LICENSE +20 -0
- data/Readme.markdown +91 -10
- data/bin/vendor +5 -53
- data/lib/vendor.rb +37 -26
- data/lib/vendor/api.rb +1 -1
- data/lib/vendor/cli.rb +3 -15
- data/lib/vendor/cli/app.rb +140 -0
- data/lib/vendor/cli/auth.rb +6 -4
- data/lib/vendor/cli/console.rb +25 -0
- data/lib/vendor/extensions/string.rb +1 -1
- data/lib/vendor/template.rb +55 -0
- data/lib/vendor/templates/Vendorfile +3 -0
- data/lib/vendor/templates/vendorspec +15 -0
- data/lib/vendor/ui.rb +62 -0
- data/lib/vendor/vendor_file.rb +12 -0
- data/lib/vendor/vendor_file/dsl.rb +54 -0
- data/lib/vendor/vendor_file/library.rb +16 -0
- data/lib/vendor/vendor_file/library/base.rb +95 -0
- data/lib/vendor/vendor_file/library/git.rb +71 -0
- data/lib/vendor/vendor_file/library/local.rb +22 -0
- data/lib/vendor/vendor_file/library/remote.rb +18 -0
- data/lib/vendor/vendor_file/loader.rb +36 -0
- data/lib/vendor/vendor_file/source.rb +21 -0
- data/lib/vendor/vendor_spec.rb +11 -0
- data/lib/vendor/vendor_spec/builder.rb +10 -3
- data/lib/vendor/version.rb +1 -1
- data/lib/vendor/xcode.rb +10 -0
- data/lib/vendor/xcode/project.rb +132 -19
- data/lib/vendor/xcode/proxy.rb +28 -0
- data/lib/vendor/xcode/{object.rb → proxy/base.rb} +52 -25
- data/lib/vendor/xcode/proxy/pbx_build_file.rb +9 -0
- data/lib/vendor/xcode/proxy/pbx_container_item_proxy.rb +8 -0
- data/lib/vendor/xcode/proxy/pbx_file_reference.rb +39 -0
- data/lib/vendor/xcode/proxy/pbx_frameworks_build_phase.rb +9 -0
- data/lib/vendor/xcode/proxy/pbx_group.rb +35 -0
- data/lib/vendor/xcode/{objects → proxy}/pbx_native_target.rb +2 -2
- data/lib/vendor/xcode/{objects → proxy}/pbx_project.rb +2 -2
- data/lib/vendor/xcode/proxy/pbx_resources_build_phase.rb +7 -0
- data/lib/vendor/xcode/proxy/pbx_shell_script_build_phase.rb +7 -0
- data/lib/vendor/xcode/proxy/pbx_sources_build_phase.rb +9 -0
- data/lib/vendor/xcode/proxy/pbx_target_dependency.rb +7 -0
- data/lib/vendor/xcode/proxy/pbx_variant_group.rb +7 -0
- data/lib/vendor/xcode/proxy/xc_build_configuration.rb +7 -0
- data/lib/vendor/xcode/proxy/xc_configuration_list.rb +9 -0
- data/lib/vendor/xcode/proxy/xc_version_group.rb +7 -0
- data/spec/{vendor → lib/vendor}/api_spec.rb +0 -0
- data/spec/{vendor → lib/vendor}/cli/auth_spec.rb +1 -1
- data/spec/{vendor → lib/vendor}/config_spec.rb +1 -1
- data/spec/lib/vendor/template_spec.rb +36 -0
- data/spec/lib/vendor/vendor_file/dsl_spec.rb +5 -0
- data/spec/lib/vendor/vendor_file/library/base_spec.rb +148 -0
- data/spec/lib/vendor/vendor_file/library/git_spec.rb +33 -0
- data/spec/lib/vendor/vendor_file/library/local_spec.rb +19 -0
- data/spec/lib/vendor/vendor_file/library/remote_spec.rb +13 -0
- data/spec/lib/vendor/vendor_file/loader_spec.rb +102 -0
- data/spec/lib/vendor/vendor_file/source_spec.rb +17 -0
- data/spec/{vendor → lib/vendor}/vendor_spec/builder_spec.rb +0 -0
- data/spec/{vendor → lib/vendor}/vendor_spec/dsl_spec.rb +0 -0
- data/spec/{vendor → lib/vendor}/vendor_spec/loader_spec.rb +1 -1
- data/spec/lib/vendor/xcode/project_spec.rb +400 -0
- data/spec/{vendor/xcode/object_spec.rb → lib/vendor/xcode/proxy/base_spec.rb} +15 -3
- data/spec/lib/vendor/xcode/proxy/pbx_file_reference_spec.rb +25 -0
- data/spec/lib/vendor/xcode/proxy/pbx_group_spec.rb +27 -0
- data/spec/{vendor/xcode/objects → lib/vendor/xcode/proxy}/pbx_project_spec.rb +1 -1
- data/spec/spec_helper.rb +5 -3
- data/spec/support/api_stubs.rb +4 -3
- data/spec/support/resources/Vendorfile +22 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/BICoreDataCache.mom +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/BMMapCalloutView.nib +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/Info.plist +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/bingmaps_logo.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/bingmaps_logo@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/blue_selected_comp.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/blue_selected_comp@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/blue_unselected.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/blue_unselected@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/blue_unselected_comp.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/blue_unselected_comp@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/callout_white.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/callout_white@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/green_selected_comp.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/green_selected_comp@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/green_unselected.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/green_unselected@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/green_unselected_comp.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/green_unselected_comp@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/mapConfiguration.plist +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/me_dot_128.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/networkDefaults.plist +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/orange_selected_comp.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/orange_selected_comp@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/orange_unselected.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/orange_unselected@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/orange_unselected_comp.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/orange_unselected_comp@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/purple_selected_comp.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/purple_selected_comp@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/purple_unselected.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/purple_unselected@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/purple_unselected_comp.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/purple_unselected_comp@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/red_selected_comp.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/red_selected_comp@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/red_unselected.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/red_unselected@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/red_unselected_comp.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/red_unselected_comp@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/shadow.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/shadow@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/yellow_selected_comp.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/yellow_selected_comp@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/yellow_unselected.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/yellow_unselected@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/yellow_unselected_comp.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps.Resources.bundle/yellow_unselected_comp@2x.png +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps/BMEntity.h +34 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps/BMGeometry.h +67 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps/BMMapView.h +159 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps/BMMarker.h +41 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps/BMMarkerView.h +47 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps/BMPushpinView.h +31 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps/BMReverseGeocoder.h +63 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps/BMTypes.h +25 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps/BMUserLocation.h +26 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/BingMaps/BingMaps.h +210 -0
- data/spec/support/resources/cache/base/BingMapsIOS/MapControl/libBingMaps.a +0 -0
- data/spec/support/resources/cache/base/BingMapsIOS/README.html +8 -0
- data/spec/support/resources/cache/base/DKBenchmark-Manifest/data/DKBenchmark.h +18 -0
- data/spec/support/resources/cache/base/DKBenchmark-Manifest/data/DKBenchmark.m +73 -0
- data/spec/support/resources/cache/base/DKBenchmark-Manifest/vendor.json +1 -0
- data/spec/support/resources/cache/base/DKBenchmark-Vendorspec/DKBenchmark.h +18 -0
- data/spec/support/resources/cache/base/DKBenchmark-Vendorspec/DKBenchmark.m +73 -0
- data/spec/support/resources/cache/base/DKBenchmark-Vendorspec/DKBenchmark.vendorspec +11 -0
- data/spec/support/resources/projects/TabBarWithUnitTests/TabBarWithUnitTests.xcodeproj/project.pbxproj +10 -0
- data/spec/support/resources/projects/UtilityApplication/UtilityApplication.xcodeproj/project.pbxproj +288 -0
- data/spec/support/resources/projects/UtilityApplication/UtilityApplication/UAAppDelegate.h +15 -0
- data/spec/support/resources/projects/UtilityApplication/UtilityApplication/UAAppDelegate.m +60 -0
- data/spec/support/resources/projects/UtilityApplication/UtilityApplication/UAFlipsideViewController.h +23 -0
- data/spec/support/resources/projects/UtilityApplication/UtilityApplication/UAFlipsideViewController.m +69 -0
- data/spec/support/resources/projects/UtilityApplication/UtilityApplication/UAMainViewController.h +13 -0
- data/spec/support/resources/projects/UtilityApplication/UtilityApplication/UAMainViewController.m +75 -0
- data/spec/support/resources/projects/UtilityApplication/UtilityApplication/UtilityApplication-Info.plist +42 -0
- data/spec/support/resources/projects/UtilityApplication/UtilityApplication/UtilityApplication-Prefix.pch +14 -0
- data/spec/support/resources/projects/UtilityApplication/UtilityApplication/en.lproj/InfoPlist.strings +2 -0
- data/spec/support/resources/projects/UtilityApplication/UtilityApplication/en.lproj/MainStoryboard.storyboard +90 -0
- data/spec/support/resources/projects/UtilityApplication/UtilityApplication/main.m +18 -0
- data/spec/support/resources/{files → source}/SecondViewController.h +0 -0
- data/spec/support/resources/{files → source}/SecondViewController.m +0 -0
- data/vendor.gemspec +0 -1
- metadata +254 -74
- data/LICENCE +0 -19
- data/lib/vendor/xcode/objects/pbx_build_file.rb +0 -9
- data/lib/vendor/xcode/objects/pbx_container_item_proxy.rb +0 -8
- data/lib/vendor/xcode/objects/pbx_file_reference.rb +0 -21
- data/lib/vendor/xcode/objects/pbx_frameworks_build_phase.rb +0 -9
- data/lib/vendor/xcode/objects/pbx_group.rb +0 -13
- data/lib/vendor/xcode/objects/pbx_resources_build_phase.rb +0 -7
- data/lib/vendor/xcode/objects/pbx_shell_script_build_phase.rb +0 -7
- data/lib/vendor/xcode/objects/pbx_sources_build_phase.rb +0 -9
- data/lib/vendor/xcode/objects/pbx_target_dependency.rb +0 -7
- data/lib/vendor/xcode/objects/pbx_variant_group.rb +0 -7
- data/lib/vendor/xcode/objects/xc_build_configuration.rb +0 -7
- data/lib/vendor/xcode/objects/xc_configuration_list.rb +0 -9
- data/spec/vendor/xcode/project_spec.rb +0 -211
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//
|
|
2
|
+
// BMMarker.h
|
|
3
|
+
// BingMaps
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2011 Microsoft Corporation. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @brief The BMMarker protocol models data which can be used to add markers to the map.
|
|
10
|
+
*
|
|
11
|
+
* The marker protocol is implemented in an object that can be represented as a marker on a map view.
|
|
12
|
+
* This protocol does not specify the marker pin itself, as this can be done with a custom BMMarkerView.
|
|
13
|
+
* The coordinate property is required, however the title and subtitle of the callout are optional.
|
|
14
|
+
*/
|
|
15
|
+
#import <UIKit/UIKit.h>
|
|
16
|
+
#import <CoreLocation/CoreLocation.h>
|
|
17
|
+
|
|
18
|
+
@protocol BMMarker <NSObject>
|
|
19
|
+
|
|
20
|
+
@required
|
|
21
|
+
/**
|
|
22
|
+
* @brief Latitude and longitude of the marker.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
@property (nonatomic, readonly) CLLocationCoordinate2D coordinate;
|
|
26
|
+
|
|
27
|
+
@optional
|
|
28
|
+
/**
|
|
29
|
+
* @brief Returns the marker's title.
|
|
30
|
+
*
|
|
31
|
+
* @return String containing the title.
|
|
32
|
+
*/
|
|
33
|
+
- (NSString*)title;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @brief Returns the marker's subtitle.
|
|
37
|
+
*
|
|
38
|
+
* @return String containing the subtitle.
|
|
39
|
+
*/
|
|
40
|
+
- (NSString*)subtitle;
|
|
41
|
+
@end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//
|
|
2
|
+
// BMMarkerView.h
|
|
3
|
+
// BingMaps
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2011 Microsoft Corporation. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <UIKit/UIKit.h>
|
|
9
|
+
|
|
10
|
+
// Post this notification to re-query callout information.
|
|
11
|
+
UIKIT_EXTERN NSString *BMMarkerCalloutInfoDidChangeNotification;
|
|
12
|
+
|
|
13
|
+
@class BMMarkerViewInternal;
|
|
14
|
+
@protocol BMMarker;
|
|
15
|
+
|
|
16
|
+
@interface BMMarkerView : UIView
|
|
17
|
+
{
|
|
18
|
+
@private
|
|
19
|
+
BMMarkerViewInternal *_internal;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
- (id)initWithMarker:(id <BMMarker>)marker reuseIdentifier:(NSString *)reuseIdentifier;
|
|
23
|
+
|
|
24
|
+
@property (nonatomic, readonly) NSString *reuseIdentifier;
|
|
25
|
+
|
|
26
|
+
// Classes that override must call super.
|
|
27
|
+
- (void)prepareForReuse;
|
|
28
|
+
|
|
29
|
+
@property (nonatomic, retain) id <BMMarker> marker;
|
|
30
|
+
@property (nonatomic, retain) UIImage *image;
|
|
31
|
+
@property (nonatomic) CGPoint centerOffset;
|
|
32
|
+
@property (nonatomic) CGPoint calloutOffset;
|
|
33
|
+
/** @brief A Boolean value indicating whether the marker is enabled.
|
|
34
|
+
*
|
|
35
|
+
* The default value of this property is YES.
|
|
36
|
+
* If the value of this property is NO, the marker view ignores touch events and cannot be selected.
|
|
37
|
+
*/
|
|
38
|
+
@property (nonatomic, getter=isEnabled) BOOL enabled;
|
|
39
|
+
/** @brief A Boolean value indicating whether the annotation view is currently selected.
|
|
40
|
+
* You should not set the value of this property directly. If the property contains YES, the marker view is displaying a callout bubble.
|
|
41
|
+
*/
|
|
42
|
+
@property (nonatomic, getter=isSelected) BOOL selected;
|
|
43
|
+
@property (nonatomic) BOOL canShowCallout;
|
|
44
|
+
@property (retain, nonatomic) UIView *calloutAccessoryView1;
|
|
45
|
+
@property (retain, nonatomic) UIView *calloutAccessoryView2;
|
|
46
|
+
- (void)setSelected:(BOOL)selected animated:(BOOL)animated;
|
|
47
|
+
@end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// BMPushpinView.h
|
|
3
|
+
// BingMaps
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2011 Microsoft Corporation. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import "BMMarkerView.h"
|
|
9
|
+
|
|
10
|
+
/** \enum BMPushpinColor */
|
|
11
|
+
typedef enum BMPushpinColor{
|
|
12
|
+
BMPushpinColorOrange = 0, /**< enum value 1 */
|
|
13
|
+
BMPushpinColorGreen,/**< enum value 2 */
|
|
14
|
+
BMPushpinColorRed,/**< enum value 3 */
|
|
15
|
+
BMPushpinColorBlue,/**< enum value 4 */
|
|
16
|
+
BMPushpinColorYellow,/**< enum value 5 */
|
|
17
|
+
BMPushpinColorPurple,/**< enum value 6 */
|
|
18
|
+
} BMPushpinColor;
|
|
19
|
+
|
|
20
|
+
@class BMPushpinViewInternal;
|
|
21
|
+
|
|
22
|
+
@interface BMPushpinView : BMMarkerView
|
|
23
|
+
{
|
|
24
|
+
@private
|
|
25
|
+
BMPushpinViewInternal *_pinInternal;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@property (nonatomic) BMPushpinColor pinColor;
|
|
29
|
+
@property (nonatomic) BOOL animatesDrop;
|
|
30
|
+
|
|
31
|
+
@end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
//
|
|
2
|
+
// BMReverseGeocoder.h
|
|
3
|
+
// BingMaps
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2011 Microsoft Corporation. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <UIKit/UIKit.h>
|
|
9
|
+
#import <CoreLocation/CoreLocation.h>
|
|
10
|
+
#import <BingMaps/BMTypes.h>
|
|
11
|
+
|
|
12
|
+
@class BMReverseGeocoderInternal;
|
|
13
|
+
@class BMEntity;
|
|
14
|
+
@protocol BMReverseGeocoderDelegate;
|
|
15
|
+
|
|
16
|
+
@interface BMReverseGeocoder : NSObject {
|
|
17
|
+
@private
|
|
18
|
+
BMReverseGeocoderInternal* _internal;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
- (id)initWithCoordinate:(CLLocationCoordinate2D)coordinate;
|
|
22
|
+
|
|
23
|
+
- (void)start;
|
|
24
|
+
- (void)cancel;
|
|
25
|
+
|
|
26
|
+
@property (nonatomic, assign) id<BMReverseGeocoderDelegate> delegate;
|
|
27
|
+
|
|
28
|
+
@property (nonatomic, readonly) CLLocationCoordinate2D coordinate; // the exact coordinate being reverse geocoded.
|
|
29
|
+
|
|
30
|
+
@property (nonatomic, readonly) BMEntity *entity;
|
|
31
|
+
|
|
32
|
+
@property (nonatomic, readonly, getter=isQuerying) BOOL querying;
|
|
33
|
+
|
|
34
|
+
@end
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @brief The BMReverseGeocoderDelegate protocol defines the interface for receiving messages from a BMReverseGeocoder object.
|
|
38
|
+
*
|
|
39
|
+
* A BMEntity object is returned from didFindEntity if a location is found for a coordinate.
|
|
40
|
+
* If no location is found or if there is an error in the request, the didFailWithError method is called
|
|
41
|
+
* with details of the error. Both delegate methods are required.
|
|
42
|
+
*/
|
|
43
|
+
@protocol BMReverseGeocoderDelegate <NSObject>
|
|
44
|
+
@required
|
|
45
|
+
/**
|
|
46
|
+
* @brief Tells the delegate that a reverse geocoder successfully obtained a BMEntity and returns the BMEntity.
|
|
47
|
+
*
|
|
48
|
+
* @param geocoder The geocoder.
|
|
49
|
+
* @param entity The entity.
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
52
|
+
- (void)reverseGeocoder:(BMReverseGeocoder *)geocoder didFindEntity:(BMEntity *)entity;
|
|
53
|
+
/**
|
|
54
|
+
* @brief Tells the delegate that a reverse geocoder failed to obtain a BMEntity.
|
|
55
|
+
*
|
|
56
|
+
* Errors include network issues which may fall under system framework domains, and result in not found errors which have the domain BMErrorDomain and the code BMErrorEntityNotFound.
|
|
57
|
+
*
|
|
58
|
+
* @param geocoder The geocoder.
|
|
59
|
+
* @param error The error.
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
- (void)reverseGeocoder:(BMReverseGeocoder *)geocoder didFailWithError:(NSError *)error;
|
|
63
|
+
@end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//
|
|
2
|
+
// BMTypes.h
|
|
3
|
+
// BingMaps
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2011 Microsoft Corporation. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <UIKit/UIKit.h>
|
|
9
|
+
|
|
10
|
+
enum {
|
|
11
|
+
BMMapModeRoad = 0,
|
|
12
|
+
BMMapModeAerial,
|
|
13
|
+
BMMapModeAerialWithLabels,
|
|
14
|
+
};
|
|
15
|
+
typedef NSUInteger BMMapMode;
|
|
16
|
+
|
|
17
|
+
UIKIT_EXTERN NSString *BMErrorDomain;
|
|
18
|
+
|
|
19
|
+
enum BMErrorCode {
|
|
20
|
+
BMErrorUnknown = 1,
|
|
21
|
+
BMErrorServerFailure,
|
|
22
|
+
BMErrorLoadingThrottled,
|
|
23
|
+
BMErrorEntityNotFound,
|
|
24
|
+
BMErrorAuthenticationFailure,
|
|
25
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// BMUserLocation.h
|
|
3
|
+
// BingMaps
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2011 Microsoft Corporation. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <UIKit/UIKit.h>
|
|
9
|
+
#import <CoreLocation/CoreLocation.h>
|
|
10
|
+
#import <BingMaps/BMGeometry.h>
|
|
11
|
+
#import <BingMaps/BMTypes.h>
|
|
12
|
+
#import <BingMaps/BMMarker.h>
|
|
13
|
+
|
|
14
|
+
@class BMUserLocationInternal;
|
|
15
|
+
|
|
16
|
+
@interface BMUserLocation : NSObject <BMMarker> {
|
|
17
|
+
@private
|
|
18
|
+
BMUserLocationInternal* _internal;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@property (readonly, nonatomic, getter=isUpdating) BOOL updating;
|
|
22
|
+
@property (readonly, nonatomic) CLLocation *location;
|
|
23
|
+
@property (retain, nonatomic) NSString *title;
|
|
24
|
+
@property (retain, nonatomic) NSString *subtitle;
|
|
25
|
+
|
|
26
|
+
@end
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
//
|
|
2
|
+
// BingMaps.h
|
|
3
|
+
// BingMaps
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) Microsoft 2011. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <BingMaps/BMGeometry.h>
|
|
9
|
+
#import <BingMaps/BMMapView.h>
|
|
10
|
+
#import <BingMaps/BMUserLocation.h>
|
|
11
|
+
#import <BingMaps/BMReverseGeocoder.h>
|
|
12
|
+
#import <BingMaps/BMTypes.h>
|
|
13
|
+
#import "BingMaps/BMMarker.h"
|
|
14
|
+
#import "BingMaps/BMMarkerView.h"
|
|
15
|
+
#import "BingMaps/BMPushpinView.h"
|
|
16
|
+
#import "BingMaps/BMEntity.h"
|
|
17
|
+
|
|
18
|
+
/** @mainpage
|
|
19
|
+
*
|
|
20
|
+
* @section aboutbmios Bing Maps iOS Control
|
|
21
|
+
*
|
|
22
|
+
* The Bing Maps iOS Control is an Objective-C control for
|
|
23
|
+
* embedding maps directly into native iOS apps. With a rich,
|
|
24
|
+
* gesture-based UI provided by Seadragon, the Bing Maps iOS Control
|
|
25
|
+
* provides support for adding pushpins and other overlays to the map,
|
|
26
|
+
* allows your device location to be displayed, and provides the
|
|
27
|
+
* ability to retrieve contextual information for a given map location.
|
|
28
|
+
*
|
|
29
|
+
* @section gettingstarted Getting Started
|
|
30
|
+
*
|
|
31
|
+
* Before you being using the Bing Maps iOS Control, you need to get a Bing Maps Key to
|
|
32
|
+
* authenticate your iOS app. To obtain a Bing Maps Key, go to the <A HREF="http://www.bingmapsportal.com/" target="_blank">Bing Maps
|
|
33
|
+
* Account Center</a> and create a Bing Maps Account. This is described in the <a href="http://msdn.microsoft.com/en-us/library/gg650598.aspx" target="_blank">Creating a Bing Maps Account</a> and <a href="http://msdn.microsoft.com/en-us/library/ff428642.aspx" target="_blank">Getting a Bing Maps Key</a>
|
|
34
|
+
* topics. Information about using your Bing Maps Key in your app is found in the Adding your Bing Maps Key topic in this SDK.
|
|
35
|
+
*
|
|
36
|
+
* @section filesincinrelease Installation Files
|
|
37
|
+
*
|
|
38
|
+
* The Bing Maps iOS Control SDK includes the following:
|
|
39
|
+
*
|
|
40
|
+
* - A readme.html file.
|
|
41
|
+
* - The Bing Maps iOS Control (as a universal static library) plus the required resources bundle and header files, found in the @a MapControl folder.
|
|
42
|
+
* - Sample Xcode projects, found in the @a Samples folder.
|
|
43
|
+
* - API reference documentation for the Bing Maps iOS Control, as HTML files in the @a Docs folder.
|
|
44
|
+
*
|
|
45
|
+
* @section seealso See Also
|
|
46
|
+
*
|
|
47
|
+
* - <a href="http://msdn.microsoft.com/en-us/library/dd877180.aspx" target="_blank">Bing Maps REST Services</a>
|
|
48
|
+
* - <a href="http://www.microsoft.com/maps/product/terms.html" target="_blank">Bing Maps Platform API Terms of Use</a>
|
|
49
|
+
* - <A HREF="http://www.bing.com/maps/" target="_blank">Bing Maps</A>
|
|
50
|
+
*
|
|
51
|
+
* @page gettingstarted Getting Started with the Bing Maps iOS Control
|
|
52
|
+
*
|
|
53
|
+
* @section one Include the Library in Your Xcode Project
|
|
54
|
+
*
|
|
55
|
+
* You can find the Bing Maps iOS Control (as a universal static library) plus the required resources bundle and header files in the @a MapControl folder of your SDK installation.
|
|
56
|
+
*
|
|
57
|
+
* - Right-click on the project file and choose @b <b> Add Files to "<Project>"...</b>. Navigate to the @a MapControl folder, and select all items. Click @b Add.
|
|
58
|
+
*
|
|
59
|
+
* @image html addexistingfiles.png
|
|
60
|
+
*
|
|
61
|
+
* - Left-click on the project file and click on the @b <b> Build Settings </b> tab.
|
|
62
|
+
*
|
|
63
|
+
* - Set the value of the <b>Header Search Paths</b> environment variable to the path to your @a MapControl directory (for example, <tt>/Users/{username}/Documents/BingMapsiOS/MapControl/</tt>).
|
|
64
|
+
*
|
|
65
|
+
* @b Note: If there are any spaces in the path, be sure to enclose the entire path with double quotes (").
|
|
66
|
+
*
|
|
67
|
+
* @section two Add Linker Flags
|
|
68
|
+
*
|
|
69
|
+
* - Left-click on the project file and click on the @b <b> Build Settings </b> tab.
|
|
70
|
+
*
|
|
71
|
+
* - Set the value of the <b>Other Linker Flags</b> environment variable to <tt>-ObjC -all_load</tt>.
|
|
72
|
+
*
|
|
73
|
+
* @image html addlinkerflags.png
|
|
74
|
+
*
|
|
75
|
+
* @section three Add Required Frameworks
|
|
76
|
+
*
|
|
77
|
+
* - Left-click on the project file. Select the target of your project and select the @b <b> Build Phases </b> tab.
|
|
78
|
+
*
|
|
79
|
+
* - Click to expand the <b>Link Binary With Libraries</b> item and click the [+] on the bottom to add frameworks. Select the following frameworks:
|
|
80
|
+
*
|
|
81
|
+
* - CoreData.framework
|
|
82
|
+
* - CoreLocation.framework
|
|
83
|
+
* - OpenGLES.framework
|
|
84
|
+
* - QuartzCore.framework
|
|
85
|
+
* - SystemConfiguration.framework
|
|
86
|
+
* - libxml2.dylib
|
|
87
|
+
* - libz.dylib
|
|
88
|
+
*
|
|
89
|
+
* @image html addframeworks.png
|
|
90
|
+
*
|
|
91
|
+
* @section four Inserting the Map Control in a NIB File
|
|
92
|
+
*
|
|
93
|
+
* - Open up the NIB file (.xib) where you want to insert the map in <b>Interface Builder</b>. From the @b Library palette, select the Objects tab and drag the @a UIView control to the space where you want the map to appear.
|
|
94
|
+
*
|
|
95
|
+
* @image html insertmapcontrolinanib.png
|
|
96
|
+
*
|
|
97
|
+
* - With the @a UIView control selected, tick the <b>Multiple Touch</b> checkbox within the @b Interaction section of the @b Inspector palette.
|
|
98
|
+
*
|
|
99
|
+
* - Click on the @b Identity tab of the @b Inspector palette. For the @b Class item, type in @c BMMapView.
|
|
100
|
+
*
|
|
101
|
+
* - Save the file in <b>Interface Builder</b>.
|
|
102
|
+
*
|
|
103
|
+
* @section five Implementing the BMMapView Delegate in UIViewController
|
|
104
|
+
*
|
|
105
|
+
* - Within your View Controller header file, import BingMaps/BingMaps.h.
|
|
106
|
+
*
|
|
107
|
+
|
|
108
|
+
@code
|
|
109
|
+
#import "BingMaps/BingMaps.h"
|
|
110
|
+
@endcode
|
|
111
|
+
|
|
112
|
+
* - Declare the ViewController to be implementing BMMapViewDelegate. Also declare a BMMapView @a IBOutlet member as shown below:
|
|
113
|
+
*
|
|
114
|
+
|
|
115
|
+
@code
|
|
116
|
+
@interface LocationMapViewController : UIViewController <BMMapViewDelegate> {
|
|
117
|
+
IBOutlet BMMapView* mapView;
|
|
118
|
+
}
|
|
119
|
+
@end
|
|
120
|
+
@endcode
|
|
121
|
+
|
|
122
|
+
*
|
|
123
|
+
* - Go to the ViewController class file and add the following code in the @a viewDidLoad: method.
|
|
124
|
+
*
|
|
125
|
+
*
|
|
126
|
+
|
|
127
|
+
@code
|
|
128
|
+
- (void)viewDidLoad {
|
|
129
|
+
[super viewDidLoad];
|
|
130
|
+
[mapView setDelegate:self];
|
|
131
|
+
|
|
132
|
+
// If you want to show user location...
|
|
133
|
+
[mapView setShowsUserLocation:YES];
|
|
134
|
+
}
|
|
135
|
+
@endcode
|
|
136
|
+
|
|
137
|
+
* - Save and build your project.
|
|
138
|
+
*
|
|
139
|
+
* - Open up the NIB file (.xib) where you want to insert the map in Interface Builder. Ctrl + drag from the <b>File's Owner</b> item in the @b Document window to the BMMapView you created earlier and select @a mapView in the @b Outlets pop-up.
|
|
140
|
+
*
|
|
141
|
+
* @image html implementing.png
|
|
142
|
+
*
|
|
143
|
+
* - Save the file in <b>Interface Builder</b>.
|
|
144
|
+
*
|
|
145
|
+
* @section addingyourbingmapskey Adding Your Bing Maps Key
|
|
146
|
+
*
|
|
147
|
+
* To use the Bing Maps iOS Control, you need to have a Bing Maps Key to use in your app.
|
|
148
|
+
*
|
|
149
|
+
* Bing Maps Keys can be requested from the Bing Maps Account Center (http://www.bingmapsportal.com). More information is available at http://msdn.microsoft.com/en-us/library/ff428642.aspx
|
|
150
|
+
*
|
|
151
|
+
* Once you have a Bing Maps Key, follow the steps below to add it to your app project's main property list, named <i>{appname}_Info.plist</i>
|
|
152
|
+
*
|
|
153
|
+
* - In the property list, click the [+] at the bottom-right to add a new row. The key should be specified as @a BingMapsKey and the value should be your Bing Maps Key.
|
|
154
|
+
*
|
|
155
|
+
* @image html addingkey.png
|
|
156
|
+
*
|
|
157
|
+
* @section sessioncounting Session Counting
|
|
158
|
+
*
|
|
159
|
+
* When the Bing Maps iOS Control is loaded with a valid Bing Maps Key, Bing Maps counts sessions. A session begins with the load of the first Bing Maps iOS Control which appears in an app and includes all map control interactions until the app is terminated. Information about Bing Maps usage reports is found in the <A HREF="http://msdn.microsoft.com/en-us/library/ff859477.aspx" target="_blank">Viewing Bing Maps Usage Reports</a> topic.
|
|
160
|
+
*
|
|
161
|
+
* @page releasenotes System Requirements
|
|
162
|
+
*
|
|
163
|
+
* @section systemrequirement Development Requirements
|
|
164
|
+
*
|
|
165
|
+
* To develop a Bing Maps iOS Control app, you must have:
|
|
166
|
+
*
|
|
167
|
+
* - A Macintosh computer with an Intel x86 processor.
|
|
168
|
+
* - Mac OS X Snow Leopard, version 10.6.4 or later.
|
|
169
|
+
* - Xcode version 4.0 or later.
|
|
170
|
+
* - The latest version of the iOS SDK. (This SDK is available from http://developer.apple.com. An Apple Developer
|
|
171
|
+
* account is required.)
|
|
172
|
+
*
|
|
173
|
+
* @page samplecode Sample Code
|
|
174
|
+
*
|
|
175
|
+
* The Bing Maps iOS Control SDK includes a template project and three sample projects, which are found
|
|
176
|
+
* in the @a Samples folder.
|
|
177
|
+
*
|
|
178
|
+
* @section template iOS Map Control Project Template
|
|
179
|
+
*
|
|
180
|
+
* - @b BMMapTemplate Load this template project to quickly get started building your Bing Maps iOS Control app.
|
|
181
|
+
*
|
|
182
|
+
* @section samples Sample Projects
|
|
183
|
+
*
|
|
184
|
+
* - @b BMMapViewDynamic This sample shows how to create a map view programmatically.
|
|
185
|
+
* - @b LocationMap This sample demonstrates user location functionality.
|
|
186
|
+
* - @b MapMarkers This sample demonstrates how to work with map markers.
|
|
187
|
+
*
|
|
188
|
+
* @page devresources Developer Resources
|
|
189
|
+
*
|
|
190
|
+
* @section links Developer Resources
|
|
191
|
+
*
|
|
192
|
+
* The following resources are available for Bing Maps iOS Control developers:
|
|
193
|
+
*
|
|
194
|
+
* - <A HREF="http://www.bing.com/community/maps/f/13224.aspx" target="_blank">Bing Maps iOS Control Forum</A>
|
|
195
|
+
* - <A HREF="http://msdn.microsoft.com/en-us/library/dd877180.aspx" target="_blank">Bing Maps on MSDN</A>
|
|
196
|
+
* - <A HREF="http://www.bing.com/community/blogs/maps/default.aspx" target="_blank">Bing Maps Developer Blog</A>
|
|
197
|
+
* - <A HREF="http://developer.apple.com/iphone/" target="_blank">Apple iPhone Developer Center</A>
|
|
198
|
+
*
|
|
199
|
+
* @section accountissues Account Issues
|
|
200
|
+
*
|
|
201
|
+
* If you are having issues creating a Bing Maps Account in the <A HREF="http://www.bingmapsportal.com/" target="_blank">Bing Maps Account Center</A>, getting a Bing Maps Key, or have an account access question, contact @a mpnet@microsoft.com.
|
|
202
|
+
*
|
|
203
|
+
* @section licensing Licensing Questions
|
|
204
|
+
*
|
|
205
|
+
* If you are interested in finding out more about Bing Maps or have questions about licensing Bing Maps, email @a maplic@microsoft.com or go to <A HREF="http://www.microsoft.com/maps/resources/default.aspx" target="_blank">http://www.microsoft.com/maps/resources/default.aspx</A>.
|
|
206
|
+
*
|
|
207
|
+
* @section seealso See Also
|
|
208
|
+
* - <A HREF="http://www.microsoft.com/maps/product/terms.html" target="_blank">Bing Maps Platform API Terms of Use</A>
|
|
209
|
+
* - <A HREF="http://www.bing.com/maps/" target="_blank">Bing Maps</A>
|
|
210
|
+
*/
|