常见bug更新
2019年10月27日更新
错误提示
This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.
遇到这个问题是因为没有在 info.plist 文件添加一个 NSPhotoLibraryUsageDescription的 key,然后还需要添加一个描述。
解决方案
1.在项目中找到info.plist文件,右键点击以 Source Code形式打开
2.添加以下键值对,这里以 PhotoLibrary 作为例子
<key>NSCameraUsageDescription</key>
<string>用到这个权限需要做什么的描述,可以借鉴已上架的应用的描述</string>
<key>NSContactsUsageDescription</key>
<string>用到这个权限需要做什么的描述,可以借鉴已上架的应用的描述</string>
<key>NSMicrophoneUsageDescription</key>
<string>用到这个权限需要做什么的描述,可以借鉴已上架的应用的描述</string>
注意,key 是绝对不能写错的,
2019年10月23日更新
测试的同学测试遇到一个崩溃,调试显示下面的错误信息
Cannot form weak reference to instance (0x109a06f10) of class WKWebViewController. It is possible that this object was over-released, or is in the process of deallocation.
崩溃原因:这个bug只是出现在iOS13系统当中,为什么是iOS13系统出现这个问题,具体原因还未查询到,原因是访问了一个已经释放的对象。
解决方法:检查代码中已经释放的对象,更改即可。
2019年10月18日更新
git常见错误
Pulling is not possible because you have unmerged files.
ComputerNamedeMacBook-Pro:ComputerName ProjectName$ git pull
error: Pulling is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
- 错误原因:上一次拉取代码的时候,本地有冲突没有解决,就又去拉取代码了。
- 解决方法:把本地的冲突解决了,
然后:git add .
git commit - m “description” 就可以了