急救!!两天了,还冒解决,哪位救救我啦! 我新手,试着写个程序,弄两天都是错在这里,按照<深入浅出iphone开发>上敲的 ,还是有问题,急a!源码附件:http://www.cocoachina.com/bbs/read.php?tid=81094 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 报错:GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul 1 10:50:06 UTC 2011)Copyright 2004 Free Software Foundation, Inc.GDB is free software, covered by the GNU General Public License, and you arewelcome to change it and/or distribute copies of it under certain conditions.Type "show copying" to see the conditions.There is absolutely no warranty for GDB. Type "show warranty" for details.This GDB was configured as "x86_64-apple-darwin".Attaching to process 361.2011-11-02 18:34:47.288 iBountyHunter[361:b603] Unresolved error Error Domain=NSCocoaErrorDomain Code=134130 "The operation couldn’t be completed. (Cocoa error 134130.)" UserInfo=0x5a5c230 {URL=/Users/xuzhihong/Library/Application Support/iPhone Simulator/4.3.2/Applications/EE6C0ECE-4237-43A0-9E74-92C8D77BBFA6/Documents/iBountyHunter.sqlite, metadata=<CFBasicHash 0x4d83b60 [0x1008400]>{type = immutable dict, count = 7,entries => 2 : <CFString 0x4d842f0 [0x1008400]>{contents = "NSStoreModelVersionIdentifiers"} = <CFArray 0x4d843c0 [0x1008400]>{type = immutable, count = 0, values = ()} 4 : <CFString 0x4d84340 [0x1008400]>{contents = "NSPersistenceFrameworkVersion"} = <CFNumber 0x4d83db0 [0x1008400]>{value = +248, type = kCFNumberSInt64Type} 6 : <CFString 0x4d84370 [0x1008400]>{contents = "NSStoreModelVersionHashes"} = <CFBasicHash 0x4d84450 [0x1008400]>{type = immutable dict, count = 1,entries => 1 : <CFString 0x4d843e0 [0x1008400]>{contents = "Fugitive"} = <CFData 0x4d84400 [0x1008400]>{length = 32, capacity = 32, bytes = 0xe33370b6e7ca3101f91d25951e8bfe01 ... 9e50237bb313d390}} 7 : <CFString 0xe248b0 [0x1008400]>{contents = "NSStoreUUID"} = <CFString 0x4d840d0 [0x1008400]>{contents = "E711F65F-3C5A-4889-872B-6541E4B2863A"} 8 : <CFString 0xe24720 [0x1008400]>{contents = "NSStoreType"} = <CFString 0xe248f0 [0x1008400]>{contents = "SQLite"} 9 : <CFString 0x4d83f40 [0x1008400]>{contents = "NSStoreModelVersionHashesVersion"} = <CFNumber 0x5a43d60 [0x1008400]>{value = +3, type = kCFNumberSInt32Type} 10 : <CFString 0x4d843a0 [0x1008400]>{contents = "_NSAutoVacuumLevel"} = <CFString 0x4d844a0 [0x1008400]>{contents = "2"}}, reason=Can't find model for source store}, { URL = "file://localhost/Users/xuzhihong/Library/Application%20Support/iPhone%20Simulator/4.3.2/Applications/EE6C0ECE-4237-43A0-9E74-92C8D77BBFA6/Documents/iBountyHunter.sqlite"; metadata = { NSPersistenceFrameworkVersion = 248; NSStoreModelVersionHashes = { Fugitive = <e33370b6 e7ca3101 f91d2595 1e8bfe01 3e7fb4de 6ef2a31d 9e50237b b313d390>; }; NSStoreModelVersionHashesVersion = 3; NSStoreModelVersionIdentifiers = ( ); NSStoreType = SQLite; NSStoreUUID = "E711F65F-3C5A-4889-872B-6541E4B2863A"; "_NSAutoVacuumLevel" = 2; }; reason = "Can't find model for source store";}sharedlibrary apply-load-rules allCurrent language: auto; currently objective-c(gdb) 将方法改为:- (NSManagedObjectModel *)managedObjectModel{ if (__managedObjectModel != nil) { return __managedObjectModel; } NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"iBountyHunter" withExtension:@"momd"]; __managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]; return __managedObjectModel;}就可以了。试试吧。 我下载了,运行是可以的,那就多半是你那边设置的问题了。你试试用lldb编译吧,4.6的Scheme在product里面,其他版本你自己找吧。edit scheme里面,info-》里面的debuger改成lldb。 这是因为你的coredata模型与数据库已经对不上了,你是不是改过coredata模型? can I say goodbye to CoreData? IOS开发,看到报错就头大。 请教,ios怎样在按住图片时更换图片,松开后再变回原先的图片呢? ipad如何才能显示播放swf文件 关于viewport import的时候提示找不到或路径不存在 请问同名同类型的certificate ,怎么理解? 如何让UIImageView加载的图片会自动拉伸填满这个ImageView,并且修改view的大小,image也会跟着变? ios应用,开发些什么产品,会用到socket? IOS cocoapods UIscrollview不全屏滑动 服务器用C语言写的,客户请求url,服务器怎么返回一个json字符串 请教图片处理问题 iphone开发入门到精通
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".Attaching to process 361.
2011-11-02 18:34:47.288 iBountyHunter[361:b603] Unresolved error Error Domain=NSCocoaErrorDomain Code=134130 "The operation couldn’t be completed. (Cocoa error 134130.)" UserInfo=0x5a5c230 {URL=/Users/xuzhihong/Library/Application Support/iPhone Simulator/4.3.2/Applications/EE6C0ECE-4237-43A0-9E74-92C8D77BBFA6/Documents/iBountyHunter.sqlite, metadata=<CFBasicHash 0x4d83b60 [0x1008400]>{type = immutable dict, count = 7,
entries =>
2 : <CFString 0x4d842f0 [0x1008400]>{contents = "NSStoreModelVersionIdentifiers"} = <CFArray 0x4d843c0 [0x1008400]>{type = immutable, count = 0, values = ()}
4 : <CFString 0x4d84340 [0x1008400]>{contents = "NSPersistenceFrameworkVersion"} = <CFNumber 0x4d83db0 [0x1008400]>{value = +248, type = kCFNumberSInt64Type}
6 : <CFString 0x4d84370 [0x1008400]>{contents = "NSStoreModelVersionHashes"} = <CFBasicHash 0x4d84450 [0x1008400]>{type = immutable dict, count = 1,
entries =>
1 : <CFString 0x4d843e0 [0x1008400]>{contents = "Fugitive"} = <CFData 0x4d84400 [0x1008400]>{length = 32, capacity = 32, bytes = 0xe33370b6e7ca3101f91d25951e8bfe01 ... 9e50237bb313d390}
} 7 : <CFString 0xe248b0 [0x1008400]>{contents = "NSStoreUUID"} = <CFString 0x4d840d0 [0x1008400]>{contents = "E711F65F-3C5A-4889-872B-6541E4B2863A"}
8 : <CFString 0xe24720 [0x1008400]>{contents = "NSStoreType"} = <CFString 0xe248f0 [0x1008400]>{contents = "SQLite"}
9 : <CFString 0x4d83f40 [0x1008400]>{contents = "NSStoreModelVersionHashesVersion"} = <CFNumber 0x5a43d60 [0x1008400]>{value = +3, type = kCFNumberSInt32Type}
10 : <CFString 0x4d843a0 [0x1008400]>{contents = "_NSAutoVacuumLevel"} = <CFString 0x4d844a0 [0x1008400]>{contents = "2"}
}
, reason=Can't find model for source store}, {
URL = "file://localhost/Users/xuzhihong/Library/Application%20Support/iPhone%20Simulator/4.3.2/Applications/EE6C0ECE-4237-43A0-9E74-92C8D77BBFA6/Documents/iBountyHunter.sqlite";
metadata = {
NSPersistenceFrameworkVersion = 248;
NSStoreModelVersionHashes = {
Fugitive = <e33370b6 e7ca3101 f91d2595 1e8bfe01 3e7fb4de 6ef2a31d 9e50237b b313d390>;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
);
NSStoreType = SQLite;
NSStoreUUID = "E711F65F-3C5A-4889-872B-6541E4B2863A";
"_NSAutoVacuumLevel" = 2;
};
reason = "Can't find model for source store";
}
sharedlibrary apply-load-rules all
Current language: auto; currently objective-c
(gdb)
- (NSManagedObjectModel *)managedObjectModel
{
if (__managedObjectModel != nil)
{
return __managedObjectModel;
}
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"iBountyHunter" withExtension:@"momd"];
__managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
return __managedObjectModel;
}就可以了。试试吧。