
iOS各种报错
豪冷啊
@Haomissyou,iOS开发工程师,个人作品:小五笔,小笔记,小汉字,小挑战,小编辑器等等
展开
-
Xcode15(iOS17.4)打包的项目在 iOS12 系统上启动崩溃
崩溃日志,只有 2 行,看不出啥来。原创 2024-11-26 14:11:43 · 883 阅读 · 0 评论 -
iOS 17.4 Not Installed
没有安装 17.4 的模拟器,任何操作都无法进行!点击OK去下载,完成之后,依旧是原样!原创 2024-11-26 11:25:52 · 704 阅读 · 0 评论 -
iOS 左滑返回事件的控制
1-根视图1.1-控制器A1.1.1-控制器B1.1.1.1-控制器C。原创 2024-07-18 19:00:38 · 1117 阅读 · 0 评论 -
iOS Hook 崩溃
被Hook写的Hook。原创 2024-06-06 15:39:58 · 492 阅读 · 0 评论 -
iOS AppStore提审报错 “无法添加以供审核,遇到意外错误” 快速解决方案
最近有些战友,遇到这个无法提审的Bug。原创 2024-05-07 14:49:59 · 476 阅读 · 0 评论 -
iOS cocoapods pod FrozenError and RuntimeError
1、更新 CocoaPods 到与 Xcode 兼容的版本。凭我多年的经验,我修改了一下这个地方,居然没报错了!2、清理 CocoaPods 缓存。原创 2024-04-10 18:33:52 · 994 阅读 · 0 评论 -
iOS library not found for -lMBProgressHUD
一开始是使用CocoaPods管理,后来直接导入。原创 2024-03-28 15:27:16 · 711 阅读 · 0 评论 -
iOS 关于 SocketRocket 报错 _utf8_nextCharSafeBody
【代码】iOS 关于 SocketRocket 报错 _utf8_nextCharSafeBody。原创 2023-11-16 11:23:36 · 265 阅读 · 0 评论 -
iOS Autolayout 约束设置【顺序】的重要性!
iOS Autolayout 约束设置【顺序】的重要性!原创 2023-10-28 14:00:00 · 463 阅读 · 0 评论 -
iOS Xcode15 适配:Other Linker Flags:-ld_classic
Xcode 14毛问题都没有,Xcode 15崩溃。原创 2023-10-27 10:32:25 · 2153 阅读 · 1 评论 -
iOS unable to find utility “pngcrush“, not a developer tool or in PATH
很奇怪,还很蛋疼 T_T前一秒还能Build成功,运行后一秒直接网上查找了一番,也没什么结果。原创 2023-05-30 16:46:27 · 799 阅读 · 0 评论 -
iOS Undefined symbols for architecture arm64
提示某个类XXX,没找到!原创 2023-04-10 17:26:23 · 424 阅读 · 0 评论 -
iOS Passing address of non-local object to __autoreleasing parameter for write-back
使用第三方库时,由于这个库太老了。这个方法在内部修改了。原创 2022-10-18 18:16:45 · 267 阅读 · 0 评论 -
iOS Xcode Could not inspect the application package.
unable to install XXX具体原因是:Could not inspect the application package.原创 2022-07-08 09:52:26 · 1384 阅读 · 0 评论 -
iOS Please ensure the provisioning profile is configured for this device.
iOS 安装描述文件失败Please ensure the provisioning profile is configured for this device. If not, please try to generate原创 2022-05-23 11:13:11 · 2921 阅读 · 0 评论 -
iOS WKWebView Origin null is not allowed by Access-Control-Allow-Origin
iOS WKWebView Origin null is not allowed by Access-Control-Allow-Origin原创 2022-05-17 17:32:22 · 1545 阅读 · 0 评论 -
iOS 代理 delegate 不都是用 weak 吗?
iOS 代理 delegate 不都是用 weak 吗?原创 2022-05-04 18:35:14 · 410 阅读 · 0 评论 -
iOS property 自定义名称彩蛋
iOS property 自定义名称彩蛋原创 2022-04-18 16:51:08 · 312 阅读 · 0 评论 -
iOS 从原生界面跳转自定义的 Web 界面后,左滑卡死
iOS 从自定义的 Web 界面跳转原生界面后,左滑卡死!原创 2022-03-17 11:32:05 · 3503 阅读 · 0 评论 -
iOS ‘AliyunOSSiOS/OSSService.h‘ file not found
Pod使用 Pod 方式导入 AliyunOSSiOS 后更新 Pod 中其他三方库时,出现了这个 红色警告'AliyunOSSiOS/OSSService.h' file not found各种工程路径配置,都不行!真是蛋疼!后来,找到一种方法:清除了 Xcode->DerivedData 中的文件,重新 Build居然可以了!!该死的缓存!!!前往路径:Xcode->Preference->Locations小笔记不大不小,一步就好!...原创 2022-01-05 17:14:26 · 1167 阅读 · 0 评论 -
iOS 一道关于 dispatch_sync 打印的题目
0x00 输出顺序下面代码的输出顺序是?NSLog(@"1");dispatch_queue_t queue = dispatch_queue_create("queue", DISPATCH_QUEUE_SERIAL);dispatch_async(queue, ^{ NSLog(@"2"); dispatch_sync(queue, ^{ NSLog(@"3"); }); NSLog(@"4");});NSLog(@"5");输出顺序是:1原创 2021-06-02 18:59:10 · 229 阅读 · 0 评论 -
iOS Thread 1: “Changing the delegate of a tab bar managed by a tab bar controller is not allowed.“
0x00 多此一举当我试图改变 UITabBarController 的 tabBar 的 delegate 时系统给我抛出一个错误,并终止的程序:Thread 1: "Changing the delegate of a tab bar managed by a tab bar controller is not allowed."虽然我是在继承 UITabBarController 的子类里面改的self.tabBar.delegate = self;但这个操作,似乎是有点多余 Q_QU原创 2021-03-17 11:15:30 · 500 阅读 · 0 评论 -
iOS dyld: Library not loaded: @rpath/XXX.framework/XXX
方案1.工程配置里面,Build Phases 里添加 Copy Files2.修改 Copy Files 配置:Destination 改成 Frameworks,Name 栏添加对应的 xxx.framework3.搞定!后续后来查看第三方的 framework 工程(Swift)发现打包出来是的 动态库通过终端命令查看:cd 到 xxx.framework 里file xxx输出:xxx: Mach-O 64-bit dynamically linked shared原创 2021-01-28 11:08:21 · 906 阅读 · 1 评论 -
iOS 支付宝SDK跳转的坑
0x00 scheme之坑NSString *scheme = @"xx_alisdk";[[AlipaySDK defaultService] payOrder:orderStr fromScheme:scheme callback:^(NSDictionary *resultDic) { // SDK内部浏览器支付完成回调 [weakSelf handleResult:resultDic];}];队友写 scheme 时,参考支付宝的 Demo,估计想加个前缀区别一下就写原创 2020-09-11 17:31:21 · 575 阅读 · 0 评论 -
iOS 无法添加 push notifications
0x00 添加不了在工程配置中点击 +Capability搜索Push Notifications单击、双击、拖动都添加不了0x01 解决方案项目中的 XXX.entitlements(这个) 以及工程配置中的 Signing -> Code Signing Entitlements -> XXX/XXX.entitlements(这个)将这两个删掉, 重新添加即可直播送礼连击特效https://github.com/xjh093/JHLiveGiftAnimat原创 2020-08-06 10:15:14 · 1028 阅读 · 0 评论 -
iOS The run destination iPhone X is not valid for tests you have chosen to perform.
0x00 跑个单元测试,这么难了?对方向你扔出了一个警告⚠️,并不想理你:The run destination iPhone X is not valid for tests you have chosen to perform.Please select a run destination which supports the tests that you wish to perform.目前为止(2020-07-30 20:32:42)只看到一篇关于这个的:传送门由于没图无力吐槽还是原创 2020-07-30 20:45:07 · 392 阅读 · 0 评论 -
iOS An instance of AVPlayer cannot remove a time observer that was added by a different instance
0x00 进退两难在利用AVPlayer播放网络 mp3 时,因为有监听状态,所以移除监听是必须的不然会出现以下错误:An instance 0x174016100 of class AVPlayerItem was deallocated while key value observers were still registered with it.不移除观察者时,导致的崩溃:Trapped uncaught exception 'NSInternalInconsistencyException原创 2020-07-28 12:16:48 · 1958 阅读 · 0 评论 -
iOS mp3播放 CoreMediaErrorDomain Code=-12939
0x00错误信息:byte range length mismatch - should be length 16384 is length 82338play error:Error Domain=NSURLErrorDomain Code=-1 "未知错误" UserInfo={NSLocalizedDescription=未知错误, NSUnderlyingError=0x283a26f70 {Error Domain=CoreMediaErrorDomain Code=-12939 "byte原创 2020-07-27 17:08:01 · 1235 阅读 · 0 评论 -
iOS pod引入的第三方库,找不到头文件
0x00 看图‘DoraemonKit/DoraemonManager.h’ file not found可能存在的一个原因是:Build Setting -> Header Search Paths 没有添加$(PODS_ROOT) ---------> recursive原创 2020-06-24 10:41:18 · 3646 阅读 · 0 评论 -
iOS something is trying to start the receiver simultaneously from more than one thread
0x00Trapped uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSOperationInternal _start:]: something is trying to start the receiver simultaneously from more than one thread'自定义oper...原创 2020-04-03 11:37:36 · 803 阅读 · 0 评论 -
iOS 企业包无法安装
通用方案请先参考这里:1.iOS ipa 安装包安装失败原因2.iOS企业应用安装失败原因排查如果上面的打不开请看文末的原文还没解决?看看这里我遇到情况是项目的project.pbxproj文件里面的缩进格式变了!左边的缩进是4个空格,打包是能安装成功的右边的缩进是1个Tab,打包后安装不成功所以,问题就出在SVN同步代码时空格缩进被改成了Tab缩进原文iOS...原创 2020-03-19 12:30:19 · 4527 阅读 · 2 评论 -
iOS 打包失败 IPA processing failed
0x00 架构问题某些第三方SDK中包含了i386 x86_64架构,iOS13苹果取消了32位系统的支持其实去掉x86_64就可以打包成功了0x01方法:使用终端cd到第三库的文件夹使用命令:lipo -remove x86_64 xxx -o lib如果是xxx.a进入到xxx.a所在文件夹lipo -remove x86_64 xxx.a -o lib.a如果是xxx....原创 2020-03-18 17:04:56 · 1697 阅读 · 0 评论 -
iOS Xcode一打开就崩溃退出
0x00找到根目录下的xxx.xcworkspace文件夹(工程使用的是Cocoapods管理的)显示包内容删除xcuserdata重新打开试试如果没有使用Cocoapods管理可尝试xxx.xcodeproj文件夹参考https://blog.youkuaiyun.com/zhuoyuetec/article/details/22862189文本点击事件如此简单!https://...原创 2020-01-16 19:12:14 · 1937 阅读 · 0 评论 -
iOS Trapped uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN'
0x00在设置一个视图A的frame时,忘记设置它的高度了然后又通过视图A的frame来生成视图B的frame导致视图B的frame出现了无穷大∞po _msgView.frame(origin = (x = 59.5, y = 92), size = (width = 194.5, height = 0))_msgLabel.frame = CGRectInset(_msgView...原创 2020-01-08 18:43:31 · 686 阅读 · 0 评论 -
iOS _NSZombie_CFString
原因定义属性的时候,使用了assign@property(nonatomic, assign) NSString * showMsg;导致崩溃:- [CFString release]: message sent to deallocated instance打断点,查看内存:_showMsg = (_NSZombie_CFString *) class name = _NSZom...原创 2019-11-07 14:45:15 · 829 阅读 · 0 评论 -
[!] CocoaPods was not able to update the `master` repo.
问题执行命令pod repo update --verbose 后一直报错:[!] CocoaPods was not able to update the `master` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose解决方案...原创 2019-10-28 16:54:37 · 8315 阅读 · 0 评论 -
iOS 支付宝SDK Demo 报错:rsa_private read error : private key is NULL
0x00解决方法:1)搜索代码[result appendString:@"-----BEGIN PRIVATE KEY-----\n"];将其改成[result appendString:@"-----BEGIN RSA PRIVATE KEY-----\n"];2)搜索代码[result appendString:@"\n-----END PRIVATE KEY-----"];...原创 2019-08-29 20:53:49 · 645 阅读 · 0 评论 -
iOS JSON解析:Unescaped control character around character 11256.
0x00返回的数据中包含控制字符需要进行遍历删除 NSMutableString *mstring = [NSMutableString stringWithString:originalString]; NSCharacterSet *controlChars = [NSCharacterSet controlCharacterSet]; NSRange range ...原创 2019-08-08 12:30:39 · 529 阅读 · 0 评论 -
iOS UITableView 返回的 indexPath.row 不是从 0 开始的
0x00 下标从4开始!?封装了一个包含TableView的视图使用的时候创建了一个子类来用把这个子类视图放在了一个嵌套了多层的视图内一开始发现触摸视图时会抖动为何会抖动呢?在方法tableView:cellForRowAtIndexPath:内打印日志居然是这种!!怎么会直接从4开始!?0x01 代理方法之前在控制器内的写法是:- (CGFloat)tableView...原创 2019-09-02 17:11:07 · 1054 阅读 · 0 评论 -
iOS WKWebView调用JS事件时抛出的Error
问题具体代码:NSString *api = [URL.absoluteString stringByRemovingPercentEncoding];NSString *result = [NSString jh_JSONStringFromDictionary:responseObject];NSString *method = [NSString stringWithForm...原创 2018-08-03 17:43:36 · 13411 阅读 · 0 评论