比《西游降魔篇》还要烂。。。
特效比不上84版《西游记》
问题描述:输入法加了一个新类库,报如下错误:
The current deployment target does not support automated __weak references
问题解决:
ARC是从4.2以上版本开始支持的,但是不能使用__weak。
从5.0开始支持所有ARC。
在project->info->ios Deployment Target 将target版本改为5.0或者5.0以上。
问题描述:近期使用CocoaPods,无论是执行pod install还是pod update都卡在Analyzing dependencies不动了。
问题解决:问题可能是主干网络出口问题。
带--no-repo-update参数,不更新repo仓库。命令如下:
pod install --verbose --no-repo-update
pod update --verbose --no-repo-update
昨天浏览器组的同事跑来问了一个没有细想过的问题:没有越狱过的机器怎么通过USB使用脚本批处理iOS设备上的数据。
没有越狱意味着习惯使用的SSH不能用了。
只有使用libimobiledevice了,如下:
1.安装libimobiledevice,ifuse,ifuse依赖与libimobiledevice,
可以选择airport或brew安装
sudo brew update
sudo brew install libimobiledevice
sudo brew install ifuse
2.拷贝osxfusefs.fs 到/Library/Filesystems,并添加执行权限
sudo /bin/cp -RfX /usr/local/Cellar/osxfuse/2.6.2/Library/Filesystems/osxfusefs.fs /Library/Filesystems
sudo chmod +s /Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs
3.终端输入ifuse -h,会打印出详细使用说明
挂载某个应用的沙盒到~/myapp:
app_bundleId=com.my.app
udid=xxxxxxxxxxxx
ifuse -u ${udid} --container ${app_bundleId} ~/myapp
4.关闭挂载:
umount ~/myapp
PS:itoos与iexploer等工具都是基于libimobiledevice库进行开发的,iOS 6.x的越狱也用到了此库,更为重要的是appium也依赖于它,如果大家有安装过appium环境那么可以查看下build/libimobiledevice-macosx/,有许多可执行的unix文件
idevice_id
idevicebackup
idevicebackup2
idevicedate
idevicedebugserverproxy
idevicediagnostics
ideviceenterrecovery
ideviceimagemounter
ideviceinfo
idevicepair
ideviceprovision
idevicescreenshot
idevicesyslog
可以直接使用这些命令行工具,例如:
idevice_id -l 可直接查看手机id
idevicediagnostics 可让iPhone进行重启,关机,睡眠等。
我们可以利用libimobiledevice与ifuse进行shell封装,辅助实现自动化的测试过程。
另附上git地址:
https://github.com/libimobiledevice/libimobiledevice
https://github.com/libimobiledevice/ifuse
问题描述:输入法用AFJSONRequestOperation获取服务器更新消息。发现AFNetworking示例可以使用,换了服务器访问地址就不行了。
问题分析:打印出错误消息,如下:
Error Domain=AFNetworkingErrorDomain Code=-1016 "Expected content type {(
"text/json",
"application/json",
"text/javascript"
)}, got text/html"
看来是AFJSONRequestOperation只支持3种META,而服务器返回的是"text/html"。
问题解决:增加如下代码,让AFJSONRequestOperation支持"text/html"。
[AFJSONRequestOperationaddAcceptableContentTypes:[NSSetsetWithObjects:@"text/html", nil]];
第一季
第二季
第三季(Part.1+Part.2)
最终季(Part.1+Part.2)+完结篇(前篇+后篇)