简体   繁体   English

iPhone上的BNRPersistence和NSDocument

[英]BNRPersistence on the iPhone, and NSDocument

I'm trying to get BNRPersistence running in an iPhone app, but I'm having a problem that I have no idea how to solve. 我正在尝试让BNRPersistence在iPhone应用程序中运行,但遇到一个我不知道如何解决的问题。 Keep in mind I'm relatively new to iPhone dev. 请记住,我是iPhone开发人员的新手。

The problem is that BNRStoreDocument subclasses NSDocument, which exists in the Cocoa framework and thus isn't available on the iPhone. 问题是BNRStoreDocument子类化了NSDocument,它存在于Cocoa框架中,因此在iPhone上不可用。 So obviously I'm getting compile errors that it can't find NSDocument. 所以很明显我遇到了找不到NSDocument的编译错误。 The developer of BNRPersistence states that it works on the iPhone, so I'm sure there a solution, I just don't what it is. BNRPersistence的开发人员说它可以在iPhone上运行,所以我确定有解决方案,我只是不知道这是什么。

Any help would be greatly appreciated! 任何帮助将不胜感激!

The iphone Demo project does not have BNRStoreDocument in it but just BNRStore. iPhone演示项目中没有BNRStoreDocument,而只有BNRStore。 I think is reasonable to assume that BNRStoreDocument is only available when running under Cocoa on a Mac OS X. 我认为可以合理地假设BNRStoreDocument仅在Mac OS X上的Cocoa下运行时可用。

The BNRStore is an analog of NSPersistantStore. BNRStore是NSPersistantStore的类似物。 I'm pretty sure that's what you should be using on the iPhone. 我很确定这就是您应该在iPhone上使用的方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM