iOS 应用被拒绝 - 您的应用可以在 map 上显示附近用户的位置,但没有采取必要的隐私预防措施

标签 ios mkmapview location-services

由于以下原因,我的 iOS 应用被苹果拒绝了:-

Your app enables the display of nearby users' locations on a map, but does not have the required privacy precautions in place.

他们正在分享我的应用程序截图和拒绝消息。

enter image description here

在我的应用中,我使用用户的位置在 map 上显示附近的事件。我还启用了在 map 上显示用户位置的选项。

我正在使用以下代码在我的应用中设置定位服务。

//Declarting objects in .h file
CLGeocoder *geocoder;
CLPlacemark *placemark;

@property (nonatomic,retain) CLLocationManager *locationManager;

//Calling this method from viewDidLoad for setup location services..
-(void)getUserCurrentLocation
{
    geocoder = [[CLGeocoder alloc] init];

    self.locationManager=[[CLLocationManager alloc]init];
    self.locationManager.delegate=self;
    self.locationManager.desiredAccuracy = kCLLocationAccuracyBest;
    _locationManager.distanceFilter=kCLDistanceFilterNone;

    if ([_locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)])
    {
        [_locationManager requestWhenInUseAuthorization];
    }

    [self.locationManager startUpdatingLocation];
}

-(void)StopUpdateLOcation
{
    if([CLLocationManager locationServicesEnabled])
    {
        [self.locationManager stopUpdatingLocation];
    }
}

- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{
    CLLocation *currentLocation = newLocation;

    if (currentLocation != nil)
    {

        //Saving location
        [USERDEFAULT setValue:[NSNumber numberWithFloat:currentLocation.coordinate.latitude] forKey:@"CurrentLocationLatitude"];
        [USERDEFAULT setValue:[NSNumber numberWithFloat:currentLocation.coordinate.longitude] forKey:@"CurrentLocationLongitude"];

       //Here reverseGeocodeLocation method for fetching address from location

        [self StopUpdateLOcation];
    }
}

- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
{
    NSLog(@"didFailWithError: %@", error);
}

我还添加了带有正确消息的属性“隐私 - 使用时的位置使用说明”。另外,我在获取位置时禁用了位置服务。

不确定,为什么他们拒绝应用程序。我错过了什么。?

我该如何解决这个问题?

如有任何帮助,我们将不胜感激。

最佳答案

最后,找到了正确的解决方案。感谢@Anbu.kartik 帮助找到这个解决方案。

我启用了在 map 上显示用户位置的选项。但没有编写失败委托(delegate)方法来处理,如果找不到用户的位置。

所以我编写了以下委托(delegate)方法并再次发送应用程序以供批准。并且该应用已获得 Apple 批准。

- (void)mapView:(MKMapView *)mapView didFailToLocateUserWithError:(NSError *)error{
    NSLog(@"didFailToLocateUserWithError %@", error.description);
}

- (void)mapViewDidFailLoadingMap:(MKMapView *)mapView withError:(NSError *)error{
    NSLog(@"mapViewDidFailLoadingMap %@", error.description);
}

因此我们必须编写故障委托(delegate)来处理所有功能的错误。因此,拒绝与此类问题相关的应用绝不会发生。

希望,这就是您要找的。有任何疑虑,请回复我。 :)

关于iOS 应用被拒绝 - 您的应用可以在 map 上显示附近用户的位置,但没有采取必要的隐私预防措施,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43108737/

相关文章:

ios - 有什么方法可以查看键盘是否隐藏?

ios - 如何在 Xcode Storyboard上显示一段文字?

ios - 有没有更好的方法在iOS应用中使用新的Facebook Comments插件?

ios - 聚类注解覆盖非聚类注解

iphone - 如何在 MKMapView 上画一条线来显示用户走过的路线?

ios - viewforoverlay 永远不会被调用

ios - 如何从设置屏幕打开位置服务屏幕?

当用户在 iPhone 设置中关闭和打开位置服务时,iOS 应用程序会自动重新启动

ios - 检查 CKRecords 数组是否包含特定记录

android - Android Lollipop 和其他设备如何请求位置权限?