zoukankan      html  css  js  c++  java
  • 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。

  • 相关阅读:
    [转载] boost安装笔记——vs2008
    CSS 中的分离、抽象和层叠(转载)
    web server大全之GoAhead移植(转载)
    MIT牛人解说数学体系(转载)
    CodeBlocks 编辑器设置绿色背景
    Eclipse+Tomcat+Mysql构建J2EE开发环境(转载)
    堆和栈的区别——给初学者 (装载)
    Eclipse下设置github开发环境
    [原创] MyEclipse配置Tomcat和MySQL
    VS2008下编译Boost(转载+更改)
  • 原文地址:https://www.cnblogs.com/shenhongbang/p/4974094.html
Copyright © 2011-2022 走看看