简体   繁体   English

适用于 iOS 和 MacOS X 的应用程序

[英]App for iOS and MacOS X

I'll be creating an app that will start it's life as an iPhone app.我将创建一个应用程序,它将开始它作为 iPhone 应用程序的生命。 Then a OS X application with very similar functionality will be developed.然后将开发一个功能非常相似的 OS X 应用程序。 Both apps will share a lot of code base and rely heavily on content stored in Core Data, so it seems logical to me to store everything in one Xcode project.这两个应用程序将共享大量代码库并严重依赖存储在 Core Data 中的内容,因此对我来说将所有内容存储在一个 Xcode 项目中似乎是合乎逻辑的。

Q1. Q1。 Is this a good idea and can it be done?这是个好主意吗?可以做到吗? What is the best way to set this up?设置它的最佳方法是什么?

Q2. Q2。 I'm looking to sync the Core Data content via iCloud (between the iPhone app and OS X application), can someone point me to a good source on how this works (I'm a registered Apple developer but can't seem to find it)我正在寻找通过 iCloud 同步核心数据内容(在 iPhone 应用程序和 OS X 应用程序之间),有人可以指出我是如何工作的一个很好的来源(我是一名注册的 Apple 开发人员,但似乎找不到它)

Q3. Q3。 An iPad version may come out later, should I start with a Universal app or convert it later? iPad 版本可能会在稍后发布,我应该从通用应用程序开始还是稍后转换它?

This should be created in a single workspace in Xcode 4. I would look to create separate projects for the OS X and iOS applications, but store the shared code in another project which would have multiple targets - one for the static library for iOS and one for OS X. Each project would need to be configured to include the correct library from the shared project. This should be created in a single workspace in Xcode 4. I would look to create separate projects for the OS X and iOS applications, but store the shared code in another project which would have multiple targets - one for the static library for iOS and one对于 OS X。每个项目都需要配置为包含来自共享项目的正确库。

For Core Data, watch the 'What's new in Core Data for iOS' session video from WWDC 2011 (obviously requires an Apple developer account):对于 Core Data,请观看来自 WWDC 2011 的“iOS 的 Core Data 中的新增功能”session 视频(显然需要 Apple 开发人员帐户):

http://developer.apple.com/videos/wwdc/2011/includes/whats-new-in-core-data-on-ios.html#whats-new-in-core-data-on-ios http://developer.apple.com/videos/wwdc/2011/includes/whats-new-in-core-data-on-ios.html#whats-new-in-core-data-on-ios

I would take a look at the Chameleon project which may help you out for your OS X port.我会看一下 Chameleon 项目,它可以帮助您完成 OS X 移植。

http://chameleonproject.org/ http://chameleonproject.org/

Also the iCloud stuff should not be talked about here as it is under NDA.此外,iCloud 的东西不应该在这里讨论,因为它在 NDA 之下。

As for the universal it is up to you, you can convert to Universal at a later stage if you don't want to do the work now.至于universal由你决定,如果你现在不想做这个工作,你可以在以后转换为universal。

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

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