![](/img/trans.png)
[英]Xcode 4.2: Build for Archive is good, but Archive fails with errors
[英]Build fails due to errors in CLErrorDomain.h
我已经能够在XCode中毫无问题地构建我的iOS应用,直到突然开始发生这种情况。 在构建时,我在CLErrorDomain.h-中收到2个错误
Redefinition of 'NSString' as different kind of symbol
Expected ';' after top level declarator
CLErrorDomain.h是框架的一部分,我无法对其进行编辑或更改。 这是重新定义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];
我想通了-定义枚举后我忘记了分号。
如果出现这种情况,请在代码中更早查找以确保其有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.