Unity Xcode Project PlayerSettings_GetBundleIdentifier

I am currently trying to create an iOS application from Unity, but continue to work with these 4 errors:

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) 

Exit code 1 - Undefined symbols for arm64 architecture usually indicate a framework that was not included, but these links point to PlayerSettings_GetBundleIdentifier, as far as I can tell the Unity property.

Also, when the package identifier, version, and assembly are installed in Xcode:

Xcode Bundle Identfier

These are other linker flags. Other linker flags

What does this error mean? Did I forget to enable the framework and which one or something is wrong in the Unity or Xcode settings?

+6
source share
1 answer

The problem arose because the 3 methods referenced in VoxelBusters did not exist in any of the .h and .m files that were provided using the plugin. Using __Internal DLLImport, you bind methods to 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); 

Does not exist in an Xcode project. When I add these methods to AppDelegate.h and AppDelegate.m from Unity, the errors disappear and now I can continue to work.

+1
source

Source: https://habr.com/ru/post/1013131/


All Articles