1.Xcode8.1 bundle format unrecognized, invalid, or unsuitable(包格式无法识别的、无效的或不合适的)
这个问题比较蛋疼,更新X8.1后编译出现这个问题,我在真机上能够运行,模拟器上就报这个错误,查找了好多资料,都说让更新下pod,然后我更新了又出现好多错误,搞得我这个项目基本报废,后来问我一个朋友,他说让我找这个报错的bundle,然后看build seting ,最后还是没弄好,
后来我随便点了点,然后就出现我以下步骤,然后竟然奇迹的弄好了,也算是瞎猫碰到一个死老鼠了
我更新后编译报错如下:
解决方法如下:
首先找到这个bundle,点击报错的地方
然后找到报错的那个bundle:(为了详细我图片尽量弄大点)
点击之后出现如下图:
然后出现出如下图所示:
这是一个坑,按道理说,pod生成的第三方,我们直接都可以用,plist文件自动生成,然而更新到X8.1之后他出现这种问题,可能是这个bundle创建方式不太一样?或者就是一些验证方式改变了,才会出现这样一个错误,所以在这里写上,以免以后再遇到类似的坑坑坑坑!!!!!
-(void)setupSearchBarUI{
//自定义搜索框
_searchBar= [[UISearchBaralloc]initWithFrame:CGRectMake(40,8,kScreenWidth-60,30)];
_searchBar.backgroundColor= [UIColorclearColor];
[[[_searchBar.subviewsobjectAtIndex:0].subviewsobjectAtIndex:0]removeFromSuperview];
_searchBar.showsCancelButton=YES;
_searchBar.tintColor= [UIColorwhiteColor];
UITextField*searchFiled=[_searchBarvalueForKey:@"_searchField"];
//设置处于编辑状态
//[searchFiled becomeFirstResponder];
//输入文本的颜色
searchFiled.textColor=[UIColorwhiteColor];
//输入文本字体的大小
searchFiled.font=[UIFontsystemFontOfSize:13];
//左侧指示框
[_searchBarsetImage:[UIImageimageNamed:@"1111"]forSearchBarIcon:UISearchBarIconSearchstate:UIControlStateNormal];
//输入框的圆角设置
//searchFiled.layer.cornerRadius=10;
//searchFiled.layer.masksToBounds=YES;
searchFiled.borderStyle=UITextBorderStyleNone;
//输入框里面的背景颜色
//searchFiled.backgroundColor=[UIColor whiteColor];
searchFiled.placeholder=@"请输入关键字";
//提示文本的颜色
[searchFiledsetValue:[YBBColorwhiteColor]forKeyPath:@"_placeholderLabel.textColor"];
[_searchBarsetBackgroundColor:[UIColorclearColor]];
UIButton*cancelBtn=[_searchBarvalueForKey:@"_cancelButton"];
[cancelBtnsetTitle:@""forState:UIControlStateNormal];
[cancelBtnsetBackgroundImage:[UIImageimageNamed:@"1_first_search_btn"]forState:(UIControlStateNormal)];
cancelBtn.titleLabel.font=[UIFontsystemFontOfSize:14];
[cancelBtnsetTitleColor:[UIColorwhiteColor]forState:UIControlStateNormal];
[cancelBtnaddTarget:selfaction:@selector(stringAction:)forControlEvents:(UIControlEventTouchUpInside)];
[[[_searchBar.subviewsobjectAtIndex:0].subviewsobjectAtIndex:0]removeFromSuperview];
UIView*linView = [[UIViewalloc]initWithFrame:CGRectMake(kScreenWidth*0.032,CGRectGetMaxY(_searchBar.frame),kScreenWidth-115,1)];
linView.backgroundColor=RGB(250,244,241);
[self.navigationController.navigationBaraddSubview:linView];
[self.navigationController.navigationBaraddSubview:_searchBar];
//_searchBar.delegate = self;
}