NSInvalidArgumentException’, reason: ‘Cannot create an NSPersistentStoreCoordinator with a nil model’

问题描述:NSInvalidArgumentException’, reason: ‘Cannot create an NSPersistentStoreCoordinator with a nil model’
问题解决:原因是缺少.momd文件,即缺少.xcdatamodeld文件,在工程中加上就行

SSH into iPhone over USB without Wi-Fi

最近在做iPhone守护进程,通过ssh和scp等脚本安装,速度总是不理想。同事告知如下可以通过usb运行ssh,找到如下好东西,附上安装运行方法。

1.准备python环境并下载usbmuxd
2.把手机通过USB连接Mac
3.运行python usbmuxd-1.0.8/python-client/tcprelay.py -t 22:2222
4.运行ssh root@localhost -p2222

这里有一篇for windows的:http://www.securitylearn.net/2012/10/11/ssh-into-iphone-over-usb-without-wi-fi/

CocoaPods错误

问题描述:用“pod update”更新,遇到如下错误

Pull is not possible because you have unmerged files.

Please, fix them up in the work tree, and then use 'git add/rm <file>'

as appropriate to mark resolution, or use 'git commit -a'.

问题解决

A bug was found in libgit2 and they had to execute a force push on the specs repo. This is what broke everyone’s CocoaPods setup.

You can find the official post about this issue on the CocoaPods blog :http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/

The recommended way to fix your setup is to execute the following commands :

$ pod repo remove master
$ pod setup

If that doesn’t work, you can also delete manually all your cached specs :

$ rm -rf ~/.cocoapods/
$ pod setup

Xcode创建动态库

1.用Xcode打开如下2个xcspec文件:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Specifications/iPhoneOSPackageTypes.xcspec
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications/MacOSX Package Types.xcspec

2.把MacOSX Package Types.xcspec中Identifier为com.apple.package-type.mach-o-dylib的item复制到iPhoneOSPackageTypes.xcspec

3.把MacOSX Product Types.xcspec中Identifier为com.apple.product-type.library.dynamic的item复制到iPhoneOSProductTypes.xcspec

以上为真机,模拟器类似,路径在:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Specifications/

 

1.把/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/Framework & Library/Cocoa Touch Static Library.xctemplate整个文件夹复制并改名为Cocoa Touch Dynamic Library.xctemplate

2.修改Description中的”a static library”为”a dynamic library”
修改Identifier中的”cocoaTouchStaticLibrary”为”cocoaTouchDynamicLibrary”
修改Description中的”.static”为”.dynamic”

 

1.Installation Directory设置为@executable_path/

《希区柯克推理经典集 : 后窗》

目录:寻找证据谨慎杀手寡妇的事故海滩之夜死亡预言他是谁虚幻的绿色以牙还牙谋杀看不见的线索化妆间里的眼药水椰子糖移花接木错爱钻戒最佳舞伴找错了人裸体画像奇怪信件异国杀手小三之死狗嘴妙用重新活过第三个电话双双出轨剑与锤罗宾汉的故事百密一疏两个老头甩卖清仓如此出狱后窗