踩过的坑

2020.04.09
  • Git修改密码之后git push提示“fatal: Authentication failed for”

命令行输入

git config --system --unset credential.helper
git config --global credential.helper store

然后在执行git push 输入用户名和密码即可

2020.03.27

编译报错

  • /Users/apple/Library/Developer/Xcode/DerivedData/Build/Intermediates.noindex/HUIListDemoTest.build/Debug-iphoneos/HUIListDemoTest.build/Script-F3847BE95BC819D7AE7F2E6A.sh: line 2: /Users/apple/Desktop/200310HUI控件/List/source/Demo/HUIListDemoTest/Pods/Target Support Files/Pods-HUIListDemoTest/Pods-HUIListDemoTest-resources.sh: Permission denied


    1.png

    Pods-resources.sh: Permission denied,即没有权限

  • 解决办法:
    chmod a+x “/Users/... 个人文件路径 .../Pods/Pods-resources.sh”
    例如我的是 chmod a+x "/Users/yunsung/360云盘/iOSPro/Jianbu/Jianbu/Pods/Target Support Files/Pods/Pods-resources.sh"
2018.08.23
  • 问题: 更新至iOS11后,发现Group样式的TableView,怎么设置头部或底部高度都没用
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 10;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
   return 10;
}
  • 原因:只要直接随便设置下面两个属性值后,上面两个方法就会响应
_tableView.sectionHeaderHeight = 0.01;
_tableView.sectionFooterHeight = 0.01;
2017.11.24
  • warning: The Copy Bundle Resources build phase contains this target’s Info.plist file
  • 原因:The Info.plist file build setting specifies the name of the Info.plist associated with your target. When building a target, Xcode reads this build setting and copies the referenced Info.plist into your application bundle. Because Xcode automatically processes the Info.plist, you should not add it to your Copy Bundle Resources build phase or make it a target member.
  • 解决办法:
    (1)点击 项目名->Build phases->找到Copy bundle Resources->找到里面的info.plist->选中然后delete
    (2)重新添加.plist文件,但是取消选择 "add to targets" 选项.
  • warning: Missing file: is missing from working copy
  • 原因:因为直接在Finder里删除文件,而版本控制svn/git却还记录着对这个文件的引用,所以导致爆出警告
  • 解决办法1:
    1,打开Finder,按照爆出的提示路径,从/Users/mac/Desktop,一路对照下去,少文件夹,就创建文件,
    2,然后,打开工程,add new file,把文件夹aaa重新添加到对应文件夹下面,
    3,重新创建缺失的文件 test.m,并添加到aaa文件下,
    4,最后,在工程中,重新删除aaa文件夹和test.m文件。就可以消除警告。
    方法2:
    1, 打开终端,cd到报错的路径 cd /Users/mac/Desktop/TestProject/aaa/
    爆出错误cd: /Users/mac/Desktop/TestProject/aaa/: No such file or directory, 这是因为,我把文件夹aaa都删除了,所以,还是要进入finder,重新创建文件夹aaa,再重新cd 到前面的路径,pwd查看一下,显示/Users/mac/Desktop/TestProject/aaa,
    2,在终端执行 git rm test.m,警告消除。
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容