【问题标题】:Changing Watchkit extension bundle id after renaming project重命名项目后更改 Watchkit 扩展包 ID
【发布时间】:2015-08-06 06:07:19
【问题描述】:

将我的项目从“apple watch company tutorial”重命名为“Project x”后,我遇到了一些麻烦,我通过查看answerthis one解决了一些问题

iPhone 应用程序 Info.plist:

Bundle identifier: com.company.projectx

Watchkit 扩展 Info.plist:

Bundle identifier: com.company.projectx.watchkitextension

WKAppBundleIdentifier: com.company.projectx.watchkitapp

RemoteInterfacePrincipalClass: com.company.projectx.watchkitextension.InterfaceController

WatchKit 应用信息.plist

Bundle identifier: com.company.projectx.watchkitapp

WKCompanionAppBundleIdentifier: com.company.projectx

我的起始界面被命名为 InterfaceController

但现在我遇到了麻烦

 2015-08-05 08:38:21.758 projectx WatchKit Extension[24714:1080879] WatchKit error - unable to find interface controller class '_TtC46Apple_Watch_Company_Tutorial_WatchKit_Extension19InterfaceController' to instantiate

我认为我的问题仍然与重命名项目和手动更改捆绑包有关,但我不知道我做错了什么。

【问题讨论】:

  • 它似乎正在尝试在旧名称包中定位接口,请注意这部分 class '_TtC46Apple_Watch_Company_Tutorial_WatchKit_Extension19InterfaceController' 仍然包含 Watch_Company_Tutorial。清理项目可能会有所帮助。
  • 我跟着这个,它对我有用:) stackoverflow.com/questions/29121727/…

标签: ios swift rename watchkit apple-watch


【解决方案1】:

似乎在接口中更改类的模块是必要的。它被命名为以前的模块,在我单击名称时 xcode 已经建议的新模块的更改之后,它正在工作。

【讨论】:

  • 这解决了我的问题。为清楚起见 - 转到 interface.storyboard。转到脚本属性并重新选择下拉菜单。
猜你喜欢
  • 1970-01-01
  • 2015-07-24
  • 2010-11-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多