![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mac dev
ken_sz
这个作者很懒,什么都没留下…
展开
-
Getters and Setters in Swift
reposthttps://www.advancedswift.com/getters-setters-swift/转载 2021-10-18 22:21:40 · 108 阅读 · 0 评论 -
Mac OS实现URLSchema自定义处理
参考这两篇即可:https://gist.github.com/guoc/a7a00e6d4d1adc0b26c2aaf01b6f1fabhttps://gist.github.com/schultyy/5673939原创 2021-09-14 11:04:55 · 416 阅读 · 0 评论 -
记录一次appdmg的报错
1. 问题描述给用户配置的mac打包平台,用户反馈编译成功,但是拿到的安装包dmg文件是0k查看日志,发现appdmg打包报错:AssertionError: Volume name is not longer than 27 chars2.问题定位发现是dmgspec.json中的title超过了字符数限制,修改长度满足要求即可参考:githubappdmg...原创 2021-05-11 18:56:42 · 237 阅读 · 0 评论 -
Mac app 组成
Code PlacesMac app文件构成及含义Mac app文件构成及含义WWDC2019[1]: https://developer.apple.com/videos/play/wwdc2019/703/原创 2021-04-25 00:23:32 · 167 阅读 · 0 评论 -
mac OS get cpu usage by pid
‘’‘(float)getCpuUsage:(unsigned int)pid{kern_return_t kr;thread_array_t thread_list;mach_msg_type_number_t thread_count;thread_info_data_t thinfo;mach_msg_type_number_t thread_info_count;thread_basic_info_t basic_inf原创 2021-03-16 17:45:07 · 220 阅读 · 0 评论 -
获取Mac OS的CPU型号,intel或者是M1
背景:需要对最新的M1 silicon的Mac电脑进行特殊化处理,因此需要获取CPU型号方法://记得引入下面的头文件,否则可能出现warning#import <sys/sysctl.h>(NSString *) hwMachine{size_t size;sysctlbyname(“hw.machine”, NULL, &size, NULL, 0);char *machine = malloc(size);sysctlbyname(“hw.machine”, ma原创 2021-03-16 17:43:11 · 1696 阅读 · 1 评论 -
判断Mac的NSWindow是否被遮挡
判断Mac的NSWindow是否被遮挡BOOL isCovered = !(_window.occlusionState & NSApplicationOcclusionStateVisible);原创 2021-03-12 10:45:41 · 261 阅读 · 0 评论