好人被迫变坏,坏人想变好人。
月度归档: 2015 年 7 月
《万物生长》
《战狼》
《速度与激情7》
复制目录除了.svn
问题描述:
本地编译通过,而Jenkins编译不过,日志如下:
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/all-wcprops: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/entries: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/prop-base/about.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/prop-base/dictionary.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/prop-base/fuzzySound.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/prop-base/general.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/prop-base/handwrite.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/prop-base/keyboard.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/prop-base/keyboard_tick.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/prop-base/mohu.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/prop-base/Root.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/prop-base/shuangpin.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/prop-base/UserProtocol.html.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/text-base/about.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/text-base/dictionary.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/text-base/fuzzySound.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/text-base/general.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/text-base/handwrite.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/text-base/keyboard.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/text-base/keyboard_tick.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/text-base/mohu.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/text-base/Root.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/text-base/shuangpin.plist.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/.svn/text-base/UserProtocol.html.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/en.lproj/.svn/all-wcprops: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/en.lproj/.svn/entries: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/en.lproj/.svn/prop-base/Root.strings.svn-base: Permission denied
cp: ../SettingsKit/SettingsKit/UserDefaults.bundle/en.lproj/.svn/text-base/Root.strings.svn-base: Permission denied
问题分析:
报的错是当cp命令时.svn目录没有权限。
其实.svn目录不应该copy。
问题解决:
把脚本中的命令:cp -r config/ temp/
改为:rsync -rv --exclude=.svn config/ temp/
《风语者》
iOS9跨应用链接需要设置白名单
问题描述:今天输入法适配iOS9,发现分享都不能用了
问题分析:
因为是跨应用链接,怀疑和iOS9的新安全机制有关
Log报错:2015-07-09 16:49:31.546 BaiduInputMethodContainer[339:27725] -canOpenURL: failed for URL: "sinaweibo://" - error: "(null)"
问题解决:
在info.plist中,加入:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>sinaweibo</string>
</array>
iOS9 beta2在iPad横屏下UITableView位置不正确
问题描述:设置项适配iOS9的时候发现UITableView的所有在iPad横屏下两边着很大的空白,如下图
问题分析:
1.用UI视图看了下。UITableViewCell撑满整个屏幕是正确的。UITableViewCell的ContentView也是正确的。TextLabel不正确,你只能通过强行给TextLabel一个约束来修正。
2.设置了所有有关间距的属性,代码如下:
cell.indentationLevel=0;
cell.indentationWidth=0;
cell.separatorInset=UIEdgeInsetsZero;
cell.layoutMargins=UIEdgeInsetsZero;
cell.contentView.preservesSuperviewLayoutMargins=NO;
cell.preservesSuperviewLayoutMargins=NO;
tableView.contentInset=UIEdgeInsetsZero;
tableView.scrollIndicatorInsets=UIEdgeInsetsZero;
tableView.separatorInset=UIEdgeInsetsZero;
tableView.layoutMargins=UIEdgeInsetsZero;
[cell setNeedsLayout];
[cell setNeedsDisplay];
[cell layoutIfNeeded];
[tableView setNeedsLayout];
[tableView setNeedsDisplay];
[tableView layoutIfNeeded];
3.以上代码无效后,单独做了一个Demo:只放一个UITableView进去,问题同样存在,如下
TableViewDemo
问题结论:
估计是iOS9 beta2的bug
环境:iPad Air2,iOS9 beta2,Xcode7.0 beta (7A120f)