Xcode 错误收集及解决办法

1、An unknown error occurred.

如果仅仅提示“An unknown error occurred.” 而没有别的提示,很有可能是设备内存已满,没有足够的空间来安装这个应用。

2、BSXPCMessage received error for message: Connection interrupted

我在图片识别,生成CIImage 时报出此东警告。

通过设置 CIContext 的options 可以消除此警告---不过,过滤器的效率好像会变慢一点

 1 NSData *imageData = UIImageJPEGRepresentation(image, 1);
 2         
 3 // kCIContextUseSoftwareRenderer : 软件渲染 -- 可以消除 "BSXPCMessage received error for message: Connection interrupted" 警告
 4 // kCIContextPriorityRequestLow : 低优先级在 GPU 渲染-- 设置为false可以加快图片处理速度
 5 CIContext *context = [CIContext contextWithOptions:@{kCIContextUseSoftwareRenderer : @(true), kCIContextPriorityRequestLow : @(false)}];
 6         
 7 CIDetector *detector = [CIDetector detectorOfType:CIDetectorTypeQRCode context:context options:nil];
 8 CIImage *ciImage = [CIImage imageWithData:imageData];
 9         
10 NSArray *ar = [detector featuresInImage:ciImage];
11 CIQRCodeFeature *feature = [ar firstObject];
12 NSLog(@"context: %@", feature.messageString);
View Code

 

3、“(null)” is of a model that is not supported by this version of Xcode. Please use a different device.

重启 Xcode 就好

 

4、证书错误,先重装下这个证书,点此下载。

 

5、ARC forbids Objective-C objects in struct

在ARC环境下,结构体中要有oc对象,必须用 __unsafe_unretained 修饰;

typedef struct PBUser__storage_ {
  uint32_t _has_storage_[1];
  __unsafe_unretained NSString *userId;
  __unsafe_unretained NSString *nick;
  __unsafe_unretained NSString *avatar;
  __unsafe_unretained NSString *password;
  __unsafe_unretained NSString *email;
  __unsafe_unretained NSString *mobile;
  __unsafe_unretained NSString *qqOpenId;
  __unsafe_unretained NSString *sinaId;
  __unsafe_unretained NSString *weixinId;
} PBUser__storage_;

 

 

6、The operation couldn’t be completed. (LaunchServicesError error 0.)

重置模拟器,或者 clean。

posted @ 2015-11-18 12:04  沈红榜  阅读(1679)  评论(0编辑  收藏  举报