[英]Add target to iOS/macOS Multi-Platform Project (Xcode 12)
Xcode 12 (Beta) introduced the new multi-platform project template for iOS/macOS apps. Xcode 12 (Beta) 为 iOS/macOS 应用程序引入了新的多平台项目模板。 If I add a new target (File -> New -> Target... -> Watch App), Xcode adds a new app project to the existing one.
如果我添加一个新目标(文件 -> 新建 -> 目标... -> 监视应用程序),Xcode 会在现有应用程序项目中添加一个新应用程序项目。 My preference is, that the watchOS-Project uses the shared folder, like the iOS and macOS app.
我的偏好是 watchOS-Project 使用共享文件夹,例如 iOS 和 macOS 应用程序。
My question is, how to integrate another app project, like watchOS or tvOS, to an existing multi-platform project?我的问题是,如何将另一个应用程序项目(如 watchOS 或 tvOS)集成到现有的多平台项目中? As a reference, I found a GitHub-Project, which integrated watchOS and tvOS in a multi-platform project: https://github.com/jordansinger/SwiftUI-Kit
作为参考,我找到了一个 GitHub-Project,它在一个多平台项目中集成了 watchOS 和 tvOS: https://github.com/jordansinger/SwiftUI-Kit
I also struggled adding an new target for an additional platform.我还努力为其他平台添加新目标。 I ended up doing it like this:
我最终这样做了:
9. Do the same for the Tests und UITests 9. 对 Tests 和 UITests 做同样的事情
It's cumbersome, but it works.这很麻烦,但它有效。 Maybe somebody else finds a better way...
也许其他人会找到更好的方法...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.