Phi*_*ens 7 xcode bundle unity-game-engine bundle-identifier
我目前正在尝试从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)
Run Code Online (Sandbox Code Playgroud)
退出代码1 - 体系结构arm64的未定义符号通常指向一个尚未包含的框架,但这些引用指向PlayerSettings_GetBundleIdentifier,这是我可以告诉Unity属性的.
此外,当在XCode中设置包标识符,版本和构建时:
这个错误是什么意思?我是否忘记在Unity或XCode设置中包含一个框架,哪个或哪个有问题?
出现此问题的原因是,随插件提供的任何 .h 和 .m 文件中都不存在 VoxelBusters 中引用的 3 个方法。使用 __Internal DLLImport 将方法链接到 Objective-C 代码。
[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);
Run Code Online (Sandbox Code Playgroud)
XCode 项目中不存在。当我从 Unity 将这些方法添加到 AppDelegate.h 和 AppDelegate.m 时,错误消失了,现在我可以继续工作。
| 归档时间: |
|
| 查看次数: |
332 次 |
| 最近记录: |