我在 Xcode 项目中有一个自定义的 Swift 类,我们将其命名为 CustomClass
归档时,出现以下错误:
Use of unresolved identifier 'CustomClass'
在我调用那个类的每个文件中。由于此类只是创建一个 UIViewController
,因此我已将方法调用的输出替换为 UIViewController()
调用。
然后,我在存档期间收到以下错误:
Entry point (_main) undefined. for architecture arm64
我检查了我的 AppDelegate 文件并发现类定义是正确的:
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
由于存在 @UIApplicationMain
声明,因此应该有一个入口点。
此问题的根本原因可能是什么?
Xcode 11.2.1 GM 种子
请注意,问题仅在归档时发生,而不是在创建调试版本时发生。我还可以在我的设备上安装该应用程序。
最佳答案
检查文件的目标成员。选择文件,然后在底部的一个角(文件检查器部分)您可以看到目标成员。
关于ios - 归档应用程序时为 "Use of unresolved identifier",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58793239/