加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Unity Xcode项目PlayerSettings_GetBundleIdentifier

发布时间:2020-12-14 19:38:09 所属栏目:百科 来源:网络整理
导读:我目前正在尝试从Unity构建iOS应用程序,但仍然遇到这4个错误: Undefined symbols for architecture arm64:"_utilityBundleIdentifier",referenced from: _NativeBinding_utilityBundleIdentifier_m3566456099 in Bulk_Assembly-CSharp-firstpass_4.o _Nativ
我目前正在尝试从Unity构建iOS应用程序,但仍然遇到这4个错误:

Undefined symbols for architecture arm64:
"_utilityBundleIdentifier",referenced from:
      _NativeBinding_utilityBundleIdentifier_m3566456099 in Bulk_Assembly-CSharp-firstpass_4.o
      _NativeBinding_GetBundleIdentifier_m2869188113 in Bulk_Assembly-CSharp-firstpass_4.o
      _PlayerSettings_GetBundleIdentifier_m1189967083 in Bulk_Assembly-CSharp-firstpass_4.o
     (maybe you meant: _NativeBinding_utilityBundleIdentifier_m3566456099)
  "_utilityBundleVersion",referenced from:
      _NativeBinding_utilityBundleVersion_m3211654534 in Bulk_Assembly-CSharp-firstpass_4.o
      _NativeBinding_GetBundleVersion_m3758909934 in Bulk_Assembly-CSharp-firstpass_4.o
      _PlayerSettings_GetBundleVersion_m1248687572 in Bulk_Assembly-CSharp-firstpass_4.o
     (maybe you meant: _NativeBinding_utilityBundleVersion_m3211654534)
  "_debugProLogMessage",referenced from:
      _NativeBinding_debugProLogMessage_m135661794 in Bulk_Assembly-CSharp-firstpass_2.o
     (maybe you meant: _NativeBinding_debugProLogMessage_m135661794)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

退出代码1 – 体系结构arm64的未定义符号通常指向一个尚未包含的框架,但这些引用指向PlayerSettings_GetBundleIdentifier,这是我可以告诉Unity属性的.

此外,当捆绑标识符,版本&构建在XCode中设置:

Xcode Bundle Identfier

这些是其他链接器标志

Other Linker Flags

这个错误是什么意思?我是否忘记在Unity或XCode设置中包含一个框架,哪个或哪个有问题?

解决方法

问题出现了,因为VoxelBusters中引用的3种方法在.h&随插件提供的.m文件.使用__Internal DLLImport将方法链接到Objective-C Code.

[DllImport("__Internal")]
private static extern string utilityBundleVersion ();
[DllImport("__Internal")]
private static extern string utilityBundleIdentifier ();
[DllImport("__Internal")]
public static extern void debugProLogMessage (string _message,eConsoleLogType _type,string _stackTrace);

在XCode项目中不存在.当我将这些方法添加到AppDelegate.h&来自Unity的AppDelegate.m错误消失了,现在我可以继续工作了.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读