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。

  • 相关阅读:
    Date类型转换成LocalDateTime 类型
    连接mysql数据库执行写入语句
    排序的的值为非数字时的处理方法
    git所遇到的问题
    visual studio快捷键
    Win10编译chromium
    下载chromium CIPD client失败的解决办法
    Linux内核源代码情景分析
    【赵强老师】史上最详细的PostgreSQL体系架构介绍
    3.Consul 安装配置(Proxysql+mgr)
  • 原文地址:https://www.cnblogs.com/shenhongbang/p/4974094.html
Copyright © 2011-2022 走看看