简体   繁体   English

在同一个 Xcode 项目中拥有 iOS 和 macOS 应用程序

[英]Having iOS and macOS app in same Xcode project

I want to make a Mac version of my iOS app.我想制作我的 iOS 应用程序的 Mac 版本。 I have never done this before and have three questions I could not find answers to on the internet.我以前从未这样做过,并且有三个问题我在互联网上找不到答案。

1) Should I add a new target for the Mac component in my iOS app's Xcode project? 1)我应该在我的 iOS 应用程序的 Xcode 项目中为 Mac 组件添加一个新目标吗? If so, is there a way to only send new updates for the iOS version to the App Store if the Mac app is not ready yet?如果是这样,如果 Mac 应用程序还没有准备好,有没有办法只将 iOS 版本的新更新发送到 App Store?

2) I will like to use iCloud syncing for both apps so changes the user makes on the iOS app can go to the Mac one (vice versa). 2)我想对这两个应用程序使用 iCloud 同步,以便用户在 iOS 应用程序上所做的更改可以转到 Mac 应用程序(反之亦然)。 Does the Mac and iOS app both need to be in the same Xcode project for this to happen? Mac 和 iOS 应用程序是否都需要在同一个 Xcode 项目中才能发生这种情况?

3) When I want to add an app to App Store Connect, I only get the option of "New App" (iOS or tvOS apps) or "New macOS App". 3)当我想向 App Store Connect 添加应用程序时,我只能得到“新应用程序”(iOS 或 tvOS 应用程序)或“新 macOS 应用程序”的选项。 If they're in the same Xcode Project how can I send both (iOS and Mac app) to the App Store?如果它们在同一个 Xcode 项目中,我如何将两者(iOS 和 Mac 应用程序)发送到 App Store?

Thank you in advance!先感谢您!

ad 1.) You should if you of want to share certain parts of code.广告 1.) 如果您想共享代码的某些部分,您应该这样做。 It also makes it easier to maintain across releases with git.它还可以更轻松地使用 git 跨版本维护。

ad 2.) No. But the shared icloud container will only work after one app has been already approved by apple. ad 2.) 不可以。但是共享的 icloud 容器只有在一个应用程序已经被苹果批准后才能工作。

ad 3.) No, OSX apps and ios/tvos apps do not share the same appstore entry, independently of them being in the same xcode project or not.广告 3.) 不,OSX 应用程序和 ios/tvos 应用程序不共享相同的应用商店条目,无论它们是否在同一个 xcode 项目中。

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

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