本文来源地址:www.osjoin.com
1:最近做微信登录在真机上调试的时候遇见一个问题
ld: '/Users/hzbj/Desktop/工程/20151118/weixinOAuth/weixinOAuth/libWeChatSDK.a(WXApiObject.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
问题有点奇怪:
在模拟器上跑得时候没有这个问题,
但是在真机上跑就报这个错误。很是个问题
最后解决办法如下:
把YES---->改成NO
问题解决!!!!
2:在真机调试的时候会遇见一个弹框“使用开发者“iphone developer。。。。”的应用。您可以在“设置”中允许使用这些应用”
解决办法:
打开手机设置
通用--》描述文件--》信任应用
3:安装cocapods的时候 报错
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/xcodeproj
解决办法
把终端的输入 安装命令
sudo gem install cocoa pods
改成如下命令即可
sudo gem install -n /usr/local/bin cocoapods
4,安装pod install 的时候 提示如下提醒,但不是错误,看这费劲
- Use the `$(inherited)` flag, or - Remove the build settings from the target.
虽然对项目编译没什么影响,但是看着还是挺不舒服的.解决办法就是
找到工程的 targets 点击工程名 Build Settings -> Other linker flags -> 添加 $(inherited)
5:百度地图 授权失败 onGetPermissionState 230
原因是你的bundle id 和你百度地图的绑定的id不一致
6: Collection <__NSDictionaryM: 0x7fe1d283cf30> was mutated while being enumerated
我今天在遍历字典的时候,又修改他的数据,结果只能循环一次。然后就出现上面的原因。
分析错误原因如下:
当程序出现这个提示的时候,是因为你同时遍历你的数组,有同时修改你数组里的数据,导致崩溃。
解决办法两种
1:搞一个和你要遍历的数组一样的数组出来
/*
// 便利数组A 操作数组B
NSMutableDictionary * mutableDictionary = [[NSMutableDictionary alloc] initWithDictionary:parameters];
for (NSString * key in parameters) {
[mutableDictionary setObject:@"ddddddd" forKey:key];
}
NSLog(@"-----------------%@",mutableDictionary);
2:用系统自带的遍历,原理也差不多
NSMutableDictionary * tempDictionary = [[NSMutableDictionary alloc] init];
[parameters enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, id _Nonnull obj, BOOL * _Nonnull stop) {
NSLog(@"key---%@",obj);
[tempDictionary setObject:@"dddddddd" forKey:key];
}];
NSLog(@"==========%@",tempDictionary);
2016-03-03 00:11编辑
7:iOS报错信息如下:
Warning: Attempt to dismiss from view controller <UINavigationController: 0xb359a20> while a presentation or dismiss is in progress
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (![self.presentedViewController isBeingDismissed]) {
// TODO Something
}
})
更多大招,即时更新,请扫描下面我的二维码哦