iOS - 如何添加“今日扩展"Xcode 12.1 中的目标? [英] iOS - How to add "Today Extension" target in Xcode 12.1?

查看:18
本文介绍了iOS - 如何添加“今日扩展"Xcode 12.1 中的目标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Xcode 12.1 12A7403,当我转到 Editor >添加目标,创建今日扩展"的选项;使用 Storyboards 不再存在,而是只有创建Widget Extensions"的选项;使用 SwiftUI.

I'm using Xcode 12.1 12A7403, and when I go to Editor > Add Target, the option to create "Today Extensions" using Storyboards no longer exists, but instead, there is only the option to create "Widget Extensions" using SwiftUI.

有没有办法创建今日扩展"?在这个版本的 Xcode 中?我仍然希望我的扩展程序与 iOS 13 兼容.

Is there a way to create "Today Extensions" in this version of Xcode? I still want my extension to be compatible with iOS 13.

推荐答案

来自 Apple 系统工程师来自 Apple 开发者论坛的:

今天扩展程序继续可用,但已弃用.当您的应用针对较新的 SDK 提交时,旧版 Today 小部件扩展程序将被移除.

Today Extensions continue to be available, however, they are deprecated. When your app is submitted for the newer SDK the legacy today widget extension will be removed.

话虽如此,最初为早期 iOS 版本设计的小部件仍然可以在设备上使用 - 只是容量有限(今日视图底部的应用程序).根据 Apple:

That being said, widgets that were originally designed for earlier iOS versions are still available on device - just only in more limited capacity (app the bottom of Today View). According to Apple:

专为 iOS 13 及更早版本设计的今日小部件在主屏幕上不可用,但仍可在今日视图底部和 macOS 通知中心访问.

Today widgets designed for iOS 13 and earlier aren’t available on the Home screen, but remain accessible at the bottom of the Today View and in the macOS Notification Center.

这意味着要创建 Today Extension,必须降级到 XCode 11,然后创建目标 Today Extension.

This means in order to create a Today Extension, one must downgrade to XCode 11, then create an target Today Extension.

这篇关于iOS - 如何添加“今日扩展"Xcode 12.1 中的目标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆