你可以如何设置项目的 “lifecycle” 选项?

huangapple go评论100阅读模式
英文:

How can I set the "lifecycle" option for my project?

问题

I am currently in the process of learning Swift as a beginner and I am using Xcode 14.2 for my learning journey.

In the tutorial book I am following, it mentions the ability to configure the "lifecycle" within UIKit App Delegate.

However, I have encountered a challenge in locating this particular option when I attempt to initiate a new project.

I would greatly appreciate it if someone could kindly guide me on how to properly set up the "lifecycle" for a project within the context of my current Xcode version.

Alternatively, I wonder if it is unnecessary to perform this step anymore due to the advancements in Xcode versions 12 and above.

Thank you ever so much for your time and assistance.

英文:

I am currently in the process of learning Swift as a beginner and I am using Xcode 14.2 for my learning journey.

In the tutorial book I am following, it mentions the ability to configure the "lifecycle" within UIKit App Delegate.

However, I have encountered a challenge in locating this particular option when I attempt to initiate a new project.

I would greatly appreciate it if someone could kindly guide me on how to properly set up the "lifecycle" for a project within the context of my current Xcode version.

Alternatively, I wonder if it is unnecessary to perform this step anymore due to the advancements in Xcode versions 12 and above.

Thank you ever so much for your time and assistance.

你可以如何设置项目的 “lifecycle” 选项?
你可以如何设置项目的 “lifecycle” 选项?

Tried:
Try to find "lifecycle" option in "General" tab of project.
你可以如何设置项目的 “lifecycle” 选项?

Expecting:
Understand how to set "lifecycle" within UIKit App Delegate

答案1

得分: 2

我相信在最新的Xcode中,创建新项目的生命周期设置已被弃用。这就是为什么你在你的Xcode中看不到它的原因。

参考链接:
https://developer.apple.com/forums/thread/695644

英文:

I believe that the life cycle setting for creating a new project is deprecated in the latest Xcode. That's why you don't see it in your Xcode.

Reference:
https://developer.apple.com/forums/thread/695644

答案2

得分: 1

Xcode 12引入了在创建新项目时的“Life Cycle”选项“UIKit / AppKit AppDelegate”和“SwiftUI”。

Xcode 13及以后的版本不再提供这个选项。设置将从“Interface”设置中推断,即如果您需要一个AppDelegate生命周期,请选择“Storyboard”。

解决方案:在XCode 13及以上版本中创建新的iOS项目时,选择“Storyboard”以获取“UIKit App Delegate”生命周期。

英文:

Xcode 12 introduced the "Life Cycle" options "UIKit / AppKit AppDelegate" and "SwiftUI" when creating a new project.

Xcode 13 and later do not have this option anymore. The setting is inferred from the "Interface" setting, i.e. if you need an AppDelegate life cycle, choose "Storyboard".

Solution: When creating a new iOS project in XCode 13 and above, select „Storyboard“ to get a „UIKit App Delegate“ life cycle.

huangapple
  • 本文由 发表于 2023年8月10日 19:13:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76875192.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定