简体   繁体   English

是否可以在不使用 Swift UI 的 Xcode 11.2 或更高版本中使用 Swift 创建应用剪辑?

[英]Is it possible to create an App Clip using Swift in Xcode 11.2 or later without using Swift UI?

I wanted to create an AppClip for my app which will be based on a QR code, but most tutorials online achieve this goal by creating the AppClip in SwiftUI.我想为我的应用程序创建一个基于 QR 码的 AppClip,但大多数在线教程通过在 SwiftUI 中创建 AppClip 来实现这一目标。 I want to create the AppClip using standard swift coding using NSlayoutConstraints without using storyboard.我想使用标准 swift 编码创建 AppClip,使用NSlayoutConstraints而不使用 storyboard。 Is it possible?可能吗?

You can create App Clip using only UIKit .您可以仅使用UIKit创建 App Clip。 When creating new target, choose App Clip and then choose Storeboard as Interface and UIKit App Delegate as Life cycle.创建新目标时,选择App Clip ,然后选择Storeboard作为接口, UIKit App Delegate作为生命周期。

在此处输入图像描述

If you just need a short answer, then YES, it IS possible!如果您只需要一个简短的答案,那么是的,这是可能的!

Just follow the official documentation .只需按照官方文档

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

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