从ios移植到windows
我即将为 Windows 编写代码,其功能与已为 iPhone 编写的应用程序中现有的代码有些相似。我正在考虑分离常见功能以形成一个组件并将其编译到 iPhone 和 Windows。该代码是用 Objective C 编写的,并使用 RestKit 和 Core Data(可能还有 sqlite)。为 Windows 编译它是一项可行的任务吗?据我了解,GCC 可以在 Windows 上编译 Objective C,但我不确定 RestKit 和 Core Data api 在 Windows 上的可用性。我看到了两个可能有用的名称:GNUStep 和 Cocotron,但我不知道它们是否能与 RestKit 配合良好。
注意:我对 iOS 开发一无所知,所以我可能会感到困惑。任何帮助表示赞赏。
I'm about to write code for Windows that has somewhat similar functionality to the one existing in already written application for iPhone. I'm thinking of separating common functionality to form a component and compile it to both to iPhone and to Windows. This code is written in Objective C and uses RestKit and Core Data (and probably sqlite). Is compiling it for Windows a viable task? As I understand it GCC could compile Objective C on Windows but I'm unsure about the RestKit and Core Data api availability on Windows. I have seen two names that could be of use: GNUStep and Cocotron but I don't know if they will play well together with RestKit.
Note: I have no idea about iOS development so I might be confusing things. Any help is appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将无法轻松地在应用程序之间共享此功能。 CoreData 对 sql 存储使用自定义的不透明(未记录)格式。你很难对此进行逆向工程。
通过为 Windows 重写该部分,而不是尝试让它工作,您可能会节省大量时间。确实没有多少iOS代码可以在windows下重用,除非你写的是纯C或C++。
You will not easily be able to share this functionality between your applications. CoreData uses a custom opaque (not documented) format for the sql store. You would be hard pressed to reverse engineer this.
You will probably save a lot of time by rewriting that part for windows, rather than trying to get it working. There really isn't much iOS code that can be reused under windows, unless you have written pure C or C++.