Skip to content

Commit 202f5b9

Browse files
authored
Merge pull request #556 from zapcannon87/master
Release v11.6.1
2 parents 4192d0a + ad71f71 commit 202f5b9

19 files changed

+164
-434
lines changed

AVOS/AVOS.xcodeproj/project.pbxproj

Lines changed: 5 additions & 20 deletions
Large diffs are not rendered by default.

AVOS/AVOSCloud/ACL/AVRole.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ + (AVQuery *)query
8383
}
8484

8585
-(NSMutableDictionary *)initialBodyData {
86-
return [self.requestManager initialSetAndAddRelationDict];
86+
return [self._requestManager initialSetAndAddRelationDict];
8787
}
8888

8989
-(void)setName:(NSString *)name {

AVOS/AVOSCloud/Analytics/AVAnalytics.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ typedef NS_ENUM(int, AVReportPolicy) {
3535
} ;
3636

3737
@protocol AVAnalyticsDelegate;
38-
@class CLLocation;
3938

4039
NS_ASSUME_NONNULL_BEGIN
4140

@@ -316,12 +315,6 @@ NS_ASSUME_NONNULL_BEGIN
316315

317316
+ (void)setLatitude:(double)latitude longitude:(double)longitude;
318317

319-
/** 为了更精确的统计用户地理位置,可以调用此方法传入经纬度信息
320-
@param location CLLocation *型的地理信息
321-
*/
322-
+ (void)setLocation:(CLLocation *)location;
323-
324-
325318
/**
326319
* 设置自定义信息
327320
*

AVOS/AVOSCloud/Analytics/AVAnalytics.m

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#import "AVUtils.h"
1414

1515
#import "AVOSCloud_Internal.h"
16-
#import <CoreLocation/CoreLocation.h>
16+
//#import <CoreLocation/CoreLocation.h>
1717

1818
static NSString * endPoint = @"statistics";
1919

@@ -230,11 +230,6 @@ + (void)setLatitude:(double)latitude longitude:(double)longitude {
230230
[[AVAnalyticsImpl sharedInstance] setLatitude:latitude longitude:longitude];
231231
}
232232

233-
+ (void)setLocation:(CLLocation *)location {
234-
[[AVAnalyticsImpl sharedInstance] setLatitude:location.coordinate.latitude
235-
longitude:location.coordinate.longitude];
236-
}
237-
238233
+(void)startInternally {
239234
if ([[AVAnalyticsImpl sharedInstance] isLocalEnabled]) {
240235
[AVAnalytics startInternallyWithChannel:@""];

AVOS/AVOSCloud/Geo/AVGeoPoint.h

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
#import <Foundation/Foundation.h>
88

9-
@class CLLocation;
10-
119
NS_ASSUME_NONNULL_BEGIN
1210

1311
/*!
@@ -28,14 +26,6 @@ NS_ASSUME_NONNULL_BEGIN
2826
*/
2927
+ (instancetype)geoPoint;
3028

31-
/*!
32-
Creates a new AVGeoPoint object for the given CLLocation, set to the location's
33-
coordinates.
34-
@param location CLLocation object, with set latitude and longitude.
35-
@return a new AVGeoPoint at specified location.
36-
*/
37-
+ (instancetype)geoPointWithLocation:(CLLocation *)location;
38-
3929
/*!
4030
Creates a new AVGeoPoint object with the specified latitude and longitude.
4131
@param latitude Latitude of point in degrees.
@@ -44,45 +34,13 @@ NS_ASSUME_NONNULL_BEGIN
4434
*/
4535
+ (instancetype)geoPointWithLatitude:(double)latitude longitude:(double)longitude;
4636

47-
/*!
48-
Fetches the user's current location and returns a new AVGeoPoint object via the
49-
provided block.
50-
@param geoPointHandler A block which takes the newly created AVGeoPoint as an
51-
argument.
52-
*/
53-
+ (void)geoPointForCurrentLocationInBackground:(void(^)(AVGeoPoint * _Nullable geoPoint, NSError * _Nullable error))geoPointHandler;
54-
5537
/** @name Controlling Position */
5638

5739
/// Latitude of point in degrees. Valid range (-90.0, 90.0).
5840
@property (nonatomic) double latitude;
5941
/// Longitude of point in degrees. Valid range (-180.0, 180.0).
6042
@property (nonatomic) double longitude;
6143

62-
/** @name Calculating Distance */
63-
64-
/*!
65-
Get distance in radians from this point to specified point.
66-
@param point AVGeoPoint location of other point.
67-
@return distance in radians
68-
*/
69-
- (double)distanceInRadiansTo:(AVGeoPoint*)point;
70-
71-
/*!
72-
Get distance in miles from this point to specified point.
73-
@param point AVGeoPoint location of other point.
74-
@return distance in miles
75-
*/
76-
- (double)distanceInMilesTo:(AVGeoPoint*)point;
77-
78-
/*!
79-
Get distance in kilometers from this point to specified point.
80-
@param point AVGeoPoint location of other point.
81-
@return distance in kilometers
82-
*/
83-
- (double)distanceInKilometersTo:(AVGeoPoint*)point;
84-
85-
8644
@end
8745

8846
NS_ASSUME_NONNULL_END

AVOS/AVOSCloud/Geo/AVGeoPoint.m

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66

77
#import "AVGeoPoint.h"
8-
#import "AVLocationManager.h"
9-
#import <CoreLocation/CoreLocation.h>
108

119
@implementation AVGeoPoint
1210

@@ -43,14 +41,6 @@ + (AVGeoPoint *)geoPoint
4341
return result;
4442
}
4543

46-
+ (AVGeoPoint *)geoPointWithLocation:(CLLocation *)location
47-
{
48-
AVGeoPoint * point = [AVGeoPoint geoPoint];
49-
point.latitude = location.coordinate.latitude;
50-
point.longitude = location.coordinate.longitude;
51-
return point;
52-
}
53-
5444
+ (AVGeoPoint *)geoPointWithLatitude:(double)latitude longitude:(double)longitude
5545
{
5646
AVGeoPoint * point = [AVGeoPoint geoPoint];
@@ -59,31 +49,6 @@ + (AVGeoPoint *)geoPointWithLatitude:(double)latitude longitude:(double)longitud
5949
return point;
6050
}
6151

62-
- (CLLocation *)location {
63-
return [[CLLocation alloc] initWithLatitude:self.latitude longitude:self.longitude];
64-
}
65-
66-
+ (void)geoPointForCurrentLocationInBackground:(void(^)(AVGeoPoint *geoPoint, NSError *error))geoPointHandler
67-
{
68-
[[AVLocationManager sharedInstance] updateWithBlock:geoPointHandler];
69-
}
70-
71-
- (double)distanceInRadiansTo:(AVGeoPoint*)point
72-
{
73-
// 6378.140 is the Radius of the earth
74-
return ([self distanceInKilometersTo:point] / 6378.140);
75-
}
76-
77-
- (double)distanceInMilesTo:(AVGeoPoint*)point
78-
{
79-
return [self distanceInKilometersTo:point] / 1.609344;
80-
}
81-
82-
- (double)distanceInKilometersTo:(AVGeoPoint*)point
83-
{
84-
return [[self location] distanceFromLocation:[point location]] / 1000.0;
85-
}
86-
8752
+(NSDictionary *)dictionaryFromGeoPoint:(AVGeoPoint *)point
8853
{
8954
return @{ @"__type": @"GeoPoint", @"latitude": @(point.latitude), @"longitude": @(point.longitude) };

AVOS/AVOSCloud/Geo/AVLocationManager.h

Lines changed: 0 additions & 38 deletions
This file was deleted.

AVOS/AVOSCloud/Geo/AVLocationManager.m

Lines changed: 0 additions & 131 deletions
This file was deleted.

0 commit comments

Comments
 (0)