“uiframework”无法访问,因为它没有入口点,也没有运行时访问的标识符

问题描述

我在 Xcode 中构建了一个框架,用于多个项目。该框架有一个我有条件加载的故事板。

我坚持要消除编译器警告,我的整个项目中只有 1 个警告:

“uiframework“ is unreachable because it has no entry points,and no identifier for runtime access via -[nsstoryboard instantiateControllerWithIdentifier:] [9]

我不明白警告。

我正在像这样在我的代码中实例化故事板:

NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.foo.uiframework"];
nsstoryboard *sb = [nsstoryboard storyboardWithName:@"uiframework" bundle:bundle];

// if no identities then show welcome view
if (identities.size() == 0) {
    welcomeVC = [sb instantiateControllerWithIdentifier:@"Welcome"];
    self.view.window.contentViewController = welcomeVC;        
} else {
    [Utils activationComplete];
}

那么编译器到底想让我在这里做什么?

Xcode 的部分屏幕显示和故事板显示一个入口点,它是欢迎场景

enter image description here

类似的问题 here 但不是正确的解决方

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)