iOS 问题记录合集(持续更新2020/12/29)

持续记录一些 iOS开发 平时遇见的问题 + 方法

(文章有些部分参考、转载其他博客所得,仅供自己学习作笔记使用)

GCD 循环定时请求方法

dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);

/*注意  dispatch_source_t _timer; 要是全局变量 防止被释放*/

  _timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue);

 dispatch_source_set_timer(_timer, dispatch_walltime(NULL, 0), cycleTime * NSEC_PER_SEC, 0); //每秒执行

        dispatch_source_set_event_handler(_timer, ^{

            //在这里执行事件

            DLog(@"重复");

        });

    dispatch_resume(_timer);

1.获取导航高度

self.navigationController.navigationBar.frame.size.height + [[UIApplication sharedApplication] statusBarFrame].size.height;

1.ios 引用story body中的视图

UIStoryboard*board = [UIStoryboard storyboardWithName: @"Main" bundle: nil];//Main你自己工程里面的Storyboard的名字

KKViewController * vc = [board instantiateViewControllerWithIdentifier: @"KKViewController"];//Identifier是你想要得到的控制器在Storyboard的identity

1、清理Xcode编译项目产生的缓存垃圾

手动删除:

打开菜单的前往->前往文件夹输入—> ~/Library/Developer/Xcode/DerivedData

2、删除Xcode中多余的证书provisioning profile

手动删除:

打开菜单的前往->前往文件夹输入—> ~/Library/MobileDevice/Provisioning Profiles (删除的时候,只要是过期的证书都可以删除,需要的时候再去https://developer.apple.com/account/resources/profiles  下载)


1.打包上传问题: (2020/03/18)

Dear Developer,

We identified one or more issues with a recent delivery for your app, "x x x x" 1.1.2 (2). Your delivery was successful, but you may wish to correct the following issues in your next delivery:

ITMS-90381: Too many symbol files - These symbols have no corresponding slice in any binary [7070C4F4-C0BE-357D-9716-92A61A024157.symbols, 4BE27498-B308-3178-8048-EEE494B81536.symbols, 0B538CB2-C011-34BB-9A6C-AC6F96038C25.symbols, 533DAAFB-EEE8-33AF-8255-1B5716211D6B.symbols, 1349DC04-C0FB-333F-B6A5-80E4C5D76C58.symbols, F1C7FBAA-140D-3A5D-8915-3C4EE12CC3AB.symbols].

错误原因以及解决方法:

借鉴网友文章 :https://www.jianshu.com/p/66fe9785da61 

其中需要注意的是 你的app  构建的最低版本

1.如果是iOS developer target 10.0 以后,需要去掉 armv7 的指令集

2.将iOS developer target 调整为 10.0 以下

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容