简体   繁体   English

我可以向通用应用添加WatchKit扩展吗?

[英]Can I add a WatchKit Extension to a Universal app?

I have an app in the App Store. 我在App Store中有一个应用。 It is for iPhone and iPad (Universal). 它适用于iPhone和iPad(通用)。 Can I add a WatchKit Extension in the next version or do I have to remove iPad from the targets in order to do that? 我可以在下一个版本中添加WatchKit Extension,还是必须从目标中删除iPad? I'm asking because iPad does not support connecting an Apple Watch. 我问是因为iPad不支持连接Apple Watch。

Yes, you can add a WatchKit extension to a universal app. 是的,您可以将WatchKit扩展添加到通用应用中。 As a general rule, if you add an extension to an app that a device cannot support, it simply won't appear there. 通常,如果您向设备添加了设备无法支持的扩展程序,则该扩展程序就不会在此处显示。

In your existing App in Xcode in the Editor menu select Add Target... 在“ Editor菜单中现有的Xcode应用程序中,选择“ Add Target...

在此处输入图片说明

from there select watchOS and WatchKit App . 从那里选择watchOSWatchKit App

在此处输入图片说明

Name the WatchKit Extension, and you should be all set. 命名WatchKit扩展,您应该已经准备就绪。

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

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