0
我已经能够在XCode中毫无问题地构建iOS应用程序,直到突然发生这种情况。在构建,我得到了CLErrorDomain.h-由于CLErrorDomain.h中的错误而导致构建失败。
Redefinition of 'NSString' as different kind of symbol
Expected ';' after top level declarator
CLErrorDomain.h是框架的一部分2个错误,我不能编辑或更改。下面是代码的行重新定义NSString-
extern NSString *const kCLErrorDomain;
我已经重新启动了XCode,清理我的项目,它仍然给了我同样的错误的身材,我是否建立了模拟器或设备。
我应该寻找什么信息来弄清楚如何解决这个问题?
更新
我恢复到旧的承诺,并重建了什么我做了。直到我添加了这段代码才算正常。在这里做什么CLErrorDomain给出错误?
mapView = [[MKMapView alloc] initWithFrame:CGRectMake(0,0,self.view.frame.size.width,200)];
mapView.delegate = self;
[mapView showsUserLocation];
HotspotAnnotation *annotation = [[HotspotAnnotation alloc] initWitHotspot:_hotspot];
[mapView addAnnotation:annotation];
CLLocationCoordinate2D zoomLocation = _hotspot.coordinates.coordinate;
MKCoordinateRegion viewRegion = MKCoordinateRegionMakeWithDistance(zoomLocation, 20000, 20000);
[mapView setRegion:viewRegion];
请发布与错误有关的类的代码,如果没有它,很难说出为什么会出现错误。 –