xcode8 崩溃问题




【1】、Xcode8代码出现ubsystem: com.apple.UIKit, category: HIDEventFiltered, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 2016-09-14 17:18:55.843428 MyApp[6880:340837]

解决办法:【product】-【scheme】-【Edit Scheme】-【Run】-【Argument】-【Environment Variable】添加keyValue【OS_ACTIVITY_MODE   disable】可以停止输出打印此日志

遗留问题还会出现Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x10a39a910) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x10a1c4210). One of the two will be used. Which one is undefined.


【3】iOS10字体隐藏问题

label的话写一个扩展类


  1. @implementation UILabel (Extend)  
  2.    
  3. - (void)lableAdaptIOS10{  
  4.    
  5.     CGFloat iOS10 = [[UIDevice currentDevice] systemVersion].floatValue >= 10;  
  6.     if (iOS10) {  
  7. //        self    UIFont 的preferredFontForTextStyle: 意思是指定一个样式,并让字体大小符合用户设定的字体大小。  
  8.         [self sizeToFit];  
  9.    
  10. //      self.font =[UIFont preferredFontForTextStyle: UIFontTextStyleHeadline];   
  11.         //是否更新字体的变化  
  12. //        self.adjustsFontForContentSizeCategory = YES;  
  13.     }  
  14. }  

另外需要注意的是iOS10字体宽度比之前多一个像素,高度不变,这个是个坑,需要注意一下!


 [4] StroyBoard问题

<1>Xcode 打开SB频繁出现崩溃现象

<2>Xcode 打开SB后 约束出现大量警告⚠️

 [5] NSLog打印问题

[plain]  view plain  copy
  在CODE上查看代码片 派生到我的代码片
  1. [] -[NWConcrete_tcp_connection dealloc] 11    
  2. [] nw_socket_handle_socket_event Event mask: 0x4    
  3. [] nw_socket_handle_socket_event Socket received WRITE_CLOSE event    
  4. [] nw_socket_handle_socket_event Event mask: 0x4    
  5. [] nw_socket_handle_socket_event Socket received WRITE_CLOSE event] tcp_connection_cancel 5    
  6. [] nw_socket_handle_socket_event Event mask: 0x4] nw_socket_handle_socket_event Socket received WRITE_CLOSE event    
  7. [] nw_endpoint_handler_cancel [5 192.168.2.51:1999 ready proxy (satisfied)]] -[NWConcrete_nw_endpoint_proxy cancelWithHandler:forced:] [5 192.168.2.51:1999 cancelled proxy (null)]] nw_endpoint_handler_cancel [5.1 192.168.2.51:1999 ready socket-flow (satisfied)]    
  8. [] nw_endpoint_flow_protocol_disconnected [5.1 192.168.2.51:1999 cancelled socket-flow (null)] Output protocol disconnected    
  9. [] nw_endpoint_handler_cancel [5.2 192.168.2.51:1999 initial path (null)]    
  10. [] -[NWConcrete_tcp_connection dealloc] 5    


解决方法1:

 在文件开头加入 #ifdef DEBUG #define NSLog(FORMAT, ...) fprintf(stderr,"%s\n",[[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]); #else #define NSLog(...) #endif 即可。

解决方法2:

第一步:


第二步:


第三步:

添加参数:

Name :OS_ACTIVITY_MODE 

Value :  disable



 [6] xcode8莫名其妙crash

以前也会有这个问题,具体不清楚
命令行


  1. xcrun simctl list devices | grep -v '^[-=]' | cut -d "(" -f2 | cut -d ")" -f1 | xargs -I {} xcrun simctl delete "{}"  


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值