ios 错误

  1. directory not found for option ‘-F/Applications/Xcode.app/Contents/Developer/Library/Frameworks’

(选择正确的project或者target,看提示是谁得。比如有可能是xxxtest的)project (targets)–>
Build Settings–> Library Search Paths–> 删除填写的路径

2 Implicit declaration of function ‘sysctlbyname’ is invalid in C99

project (targets)–> Build Settings–>C Language Dialect—>GNU89[-std=gnu89]

3 unexpected dylib (………) on link line

project (targets)–>Build Phases–>Link Binary With Libraries–把警告的类库删掉

4 “std::ios_base::Init::~Init()”, referenced from

出现这样的编译问题,是需要再加进libstdc++.dylib和libstdc++.6.dylib(为6.1使用)

5 apple Mach-o Linker error

因为compile source中有相同的.m文件

6 出现expect a type的错误

可能出现了在.h文件中的循环引用

7 linker command failed with exit code 1 (use -vto see invocation)

可能同时有两个一样的.m文件在编译.

1 IOS——Warning
2 IOS开发笔记:编译时出现的错误

补充:
1. xcode7报错:does not contain bitcode

Build Settings 搜索 bitcode 将Enable Bitcode更改为NO即可

2 Unknown class ViewController in Interface Builder file

在Main.storyboard中把Viewcontroller改成你的ViewController(也就是你启动app的第一个试图控制器类),就不会有该问题了 .

3.Xcode6在iPhone5+iOS7模拟器上编译,上下有黑边问题
原因:
Xcode6在Xcode5的基础上,做出的一些调整,其实并不是向下兼容的。Xcode5在启动页通过images asset进行管理,而到了Xcode6,苹果引入了一种新的启动页机制:LaunchScreen.xib,而这种机制恰恰是不向下兼容的。Xcode6已经自动为iPhone6以上的模拟器强制使用iOS8+系统,iPhone 6 (7.1)这种模拟器是不存在的(至少我没有找到),因此对于iPhone 6以上的模拟器,不存在这个问题,对于iPhone 4s模拟器,在iOS7.1下也仅仅是没有加载LaunchScreen.xib,这种苹果最为古老的屏幕尺寸当然不存在留白的状况。但对于iPhone5/5s + iOS7/7.1,由于iOS7无法兼容LaunchScreen.xib这种机制,而又找不到对应的default-568h.png文件,问题自然就出现了。

在项目配置页,General下面有一栏App Icons and Launch Images,其中有一项Launch Images Source,如果你遇到了问题,那么旁边显示的可能是一个按钮,Use Asset Catalog,点一下然后确定就可以了,会在项目中的Images.xcassets中生成LaunchImage,就像Xcode5中那样。此时再运行程序,已经不会再有上下的黑边问题了。但为了更好的用户体验,做张图片放进去吧。当然,在iOS8中依然会加载LaunchScreen.xib,看来至少二者是可以共存的。
问题延伸:
如果你想删掉这套启动图,仅仅是删除Images.xcassets中的LaunchImage是不行的,还要在项目配置,Build Settings中找到Asset Catalog Launch Image Set Name(搜索asset可以帮你快速定位到这项),把后面的值删掉。否则编译都通不过,会报错Images.xcassets: None of the input catalogs contained a matching launch image set named “LaunchImage”。

4.The launch image set “BrandAsset” has 2 unassigned children.

在image.asset中删除brandAsset即可

5.Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘Application tried to present modally an active controller

//不要用navi去present
 [self.navigationController presentViewController:t animated:YES completion:nil];
 //修改为
 [self presentViewController:t animated:YES completion:nil];

6.Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘Pushing a navigation controller is not supported’

//当被nav推出以后,推出的viewcontroller公用一个nav,所以不要重洗设置
 pushViewController *t = [[pushViewController alloc]init];
    UINavigationController *tnav = [[UINavigationController alloc]initWithRootViewController:t];
    [self.navigationController pushViewController:tnav animated:YES];
//修改为下边这个
pushViewController *t = [[pushViewController alloc]init];
[self.navigationController pushViewController:t animated:YES];

7.Scene is unreachable due to lack of entry points and does not have an identifier for runtime access
大意是为了在程序中动态访问Scene,需要给其设置一个Storyboard ID,所以给出了警告,解决方法:设置一个Storyboard ID即可
这里写图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值