- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
由于以下原因,我的 iOS 应用被苹果拒绝了:-
Your app enables the display of nearby users' locations on a map, but does not have the required privacy precautions in place.
他们正在分享我的应用程序截图和拒绝消息。
在我的应用中,我使用用户的位置在 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/
我正在使用 this solution在二进制矩阵中找到与图像边界对齐的矩形。假设现在我想找到一个不与图像边框对齐的矩形,并且我不知道它的方向;找到它的最快方法是什么? 为了示例,让我们寻找一个仅包含
else: 行在这个 Python 程序中是否正确/必要? from random import randrange for n in range(10): r = randrange(0,1
在 TDPL 7.1.5.1 中讨论了将 Widget w2 分配给 w1 并且作者指出“将 w2 逐个字段分配给 w1 会将 w2.array 分配给 w1.array——一个简单的数组边界分配,而
我是一名优秀的程序员,十分优秀!