Unity 2019 LTS and XCode 12 - Mach-O Linker Errors

Hello,

I am using Unity 2019.4.27f1, running on Win10.
I build to IOS project on PC.
Then Move to Mac on Catalina/XCode 12 and use XCode to push to AppStore.

I have a project that builds fine on Unity 2018 all the way to app store.
When upgrading to Unity 2019, I am getting several Mach-O linker errors as show below.
These are all related to GameCenter, and I have confirmed that Game Center capability is added, and GameKit.Framework is also in the project.:

The version of XCode I have was able to find and archive the 2018 project with identical code. The same code/calls used were in the 2018 project, so it is not my code or the plugins.
I cannot understand why XCode is not finding the GameKit.Framework and reporting Mach-O linker errors.

I have tried the following:

  • Uninstall Game Center Capability and Re-Add
  • Uninstall GameKit.Framework and Re-Add
  • Adding GameController.Framework
  • Adding Authenticator.Framework
  • Adding Framework Searching paths to point directly GameKit.Framework folder
  • Rebuilding project and doing all of the above again.

Here is the list of frameworks currently in the project:
⌁ AdSupport
⌁ Core Telephony
⌁ GLKit
⌁ MessageUI
⌁ MobileCoreServices
⌁ Security
⌁ StoreKit

  • CoreLocation.framework
  • MessageUI.framework
  • Metal.framework
  • Social.framework
  • WebKit.framework

⌁ GoogleAppMeasurement.framework
⌁ GoogleMobileAds.framework
⌁ GoogleUtilities.framework
⌁ nanopb.framework

  • GameKit.framework

Those the standard frameworks I use in all my projects, which all have the same plugins to access AdMob ads, Play Game Services, and Sharing. I would appreciate it if anyone has further solutions for me to explore, thanks!

Here is the Error list reported in XCode:

Showing Recent Messages
Check dependencies

ld: warning: arm64 function not 4-byte aligned: _unwind_tester from /Users/andy/Desktop/XcodeProjects/APPNAME2.35/Libraries/libiPhone-lib.a(unwind_test_arm64.o)
Undefined symbols for architecture arm64:
“_utilityBundleVersion”, referenced from:
_NativeBinding_utilityBundleVersion_mD80003E27FAF596460550EE12879AF02BC683E25 in Assembly-CSharp-firstpass2.o
_NativeBinding_GetBundleVersion_m4E2333F8C6FCB9A2907CB20FFFA8498681C14288 in Assembly-CSharp-firstpass2.o
_PlayerSettings_GetBundleVersion_m1B5092EC2AEA8DEDD479C573F3F37970408E37D1 in Assembly-CSharp-firstpass2.o
(maybe you meant: _NativeBinding_utilityBundleVersion_mD80003E27FAF596460550EE12879AF02BC683E25)
“_setPopoverPoint”, referenced from:
_UIIOS_setPopoverPoint_m8ADACA886F8E90ACC1883BA81BBBD8A3864C5CA9 in Assembly-CSharp-firstpass1.o
_UIIOS_SetPopoverPoint_mCB6394B4374F18B4AEFFE6953F53BC9CFE86CDC2 in Assembly-CSharp-firstpass1.o
(maybe you meant: _UIIOS_setPopoverPoint_m8ADACA886F8E90ACC1883BA81BBBD8A3864C5CA9)
“_canShareOnWhatsApp”, referenced from:
_SharingIOS_canShareOnWhatsApp_m101F0C685AAD7817503EEAF098EDF83955729B87 in Assembly-CSharp-firstpass1.o
_SharingIOS_IsWhatsAppServiceAvailable_m3F98EE9A38EC54C1B9FEC9A5A91FEA38104EF6F0 in Assembly-CSharp-firstpass1.o
(maybe you meant: _SharingIOS_canShareOnWhatsApp_m101F0C685AAD7817503EEAF098EDF83955729B87)
“_socialShare”, referenced from:
_SharingIOS_socialShare_mB7F3B695A587839FF8FD73A967BC8D39136BF267 in Assembly-CSharp-firstpass1.o
(maybe you meant: _SharingIOS_socialShare_mB7F3B695A587839FF8FD73A967BC8D39136BF267)
“_loadFriendPlayers”, referenced from:
_iOSLocalUser_loadFriendPlayers_m55BFF5F7C74C32A75BC327F912D4AF43DB2D4186 in Assembly-CSharp-firstpass1.o
_iOSLocalUser_LoadFriends_m4A640E3D4862C74D99A058023DBB0075C0E4D572 in Assembly-CSharp-firstpass1.o
(maybe you meant: _iOSLocalUser_loadFriendPlayers_m55BFF5F7C74C32A75BC327F912D4AF43DB2D4186)
“_sendTextMessage”, referenced from:
_SharingIOS_sendTextMessage_m8A43305BC7722639EEC2EDB93CB57BD53AA9DAF8 in Assembly-CSharp-firstpass1.o
(maybe you meant: _SharingIOS_sendTextMessage_m8A43305BC7722639EEC2EDB93CB57BD53AA9DAF8)
“_loadAchievementImage”, referenced from:
_iOSAchievementDescription_loadAchievementImage_mC219C74E19EE7E23BDC9FD8397F1AC1DF320FAB4 in Assembly-CSharp-firstpass1.o
_iOSAchievementDescription_RequestForImage_m74BBAAEACFD8CBC724B8D161D4DDA862EF74F638 in Assembly-CSharp-firstpass1.o
(maybe you meant: _iOSAchievementDescription_loadAchievementImage_mC219C74E19EE7E23BDC9FD8397F1AC1DF320FAB4)
“_isMessagingAvailable”, referenced from:
_SharingIOS_isMessagingAvailable_mA2C852EB48D036DD4EA01684634033BB93DB208B in Assembly-CSharp-firstpass1.o
_SharingIOS_IsMessagingServiceAvailable_m2EF0DAEA403F45C491B1271F37BB0547A9D7E194 in Assembly-CSharp-firstpass1.o
(maybe you meant: _SharingIOS_isMessagingAvailable_mA2C852EB48D036DD4EA01684634033BB93DB208B)
“_showLoginPromptDialog”, referenced from:
_UIIOS_showLoginPromptDialog_m4BA392654A94013F72CE9E7B02EF2C02E53FE081 in Assembly-CSharp-firstpass1.o
(maybe you meant: _UIIOS_showLoginPromptDialog_m4BA392654A94013F72CE9E7B02EF2C02E53FE081)
“_sendMail”, referenced from:
_SharingIOS_sendMail_mD2EA7C71E5EB648ABE16FE1AAC966D28EB209ABB in Assembly-CSharp-firstpass1.o
(maybe you meant: _SharingIOS_sendMail_mD2EA7C71E5EB648ABE16FE1AAC966D28EB209ABB)
“_loadPhoto”, referenced from:
_iOSUser_loadPhoto_mFF38AB7679B4A127FF8D5C269D85C6E44845B27A in Assembly-CSharp-firstpass1.o
_iOSUser_RequestForImage_mF61DB15A09C9E5C08EF33DBC19DA7CD6F51DFBE5 in Assembly-CSharp-firstpass1.o
(maybe you meant: _iOSUser_loadPhoto_mFF38AB7679B4A127FF8D5C269D85C6E44845B27A)
“_reportScore”, referenced from:
_iOSScore_reportScore_m3A3ACB7F32FC85B749050380ACA6EA8AAE1863CC in Assembly-CSharp-firstpass1.o
_iOSScore_ReportScore_m39C15E43092768C0433274468D1EF0F6978F9F31 in Assembly-CSharp-firstpass1.o
(maybe you meant: _iOSScore_reportScore_m3A3ACB7F32FC85B749050380ACA6EA8AAE1863CC)
“_authenticatePlayer”, referenced from:
_iOSLocalUser_authenticatePlayer_mD01A67B04A0FAED3C548DF5B29CB32AA945ABD53 in Assembly-CSharp-firstpass1.o
_iOSLocalUser_Authenticate_m88624A4AF42658CE9F6A514307567623BCF81DCB in Assembly-CSharp-firstpass1.o
(maybe you meant: _iOSLocalUser_authenticatePlayer_mD01A67B04A0FAED3C548DF5B29CB32AA945ABD53)
“_isAuthenticated”, referenced from:
_iOSLocalUser_get_IsAuthenticated_m1D1359907788A00D1D6B0853311F265453995D27 in Assembly-CSharp-firstpass1.o
_iOSLocalUser_isAuthenticated_m606C98F99CA227BDBC3F88606BC6FE46F0E9C5B9 in Assembly-CSharp-firstpass1.o
(maybe you meant: _iOSLocalUser_isAuthenticated_m606C98F99CA227BDBC3F88606BC6FE46F0E9C5B9)
“_canSendMail”, referenced from:
_SharingIOS_canSendMail_mD0F4D24C12D14F61B81C61DCD71B55A33BE19ADC in Assembly-CSharp-firstpass1.o
_SharingIOS_IsMailServiceAvailable_mC3D53FF5B7ABA3C8B3FFD7F376080C914D38F5C5 in Assembly-CSharp-firstpass1.o
(maybe you meant: _SharingIOS_canSendMail_mD0F4D24C12D14F61B81C61DCD71B55A33BE19ADC)
“_showLeaderboardView”, referenced from:
_GameServicesIOS_showLeaderboardView_m5248BB083DDC239C13D7B2AF7CD4A0EE10DFCEBC in Assembly-CSharp-firstpass1.o
_GameServicesIOS_ShowLeaderboardUIWithID_mA6CCFC1307B1EF2FE81795F747FD831A3DC4DB7F in Assembly-CSharp-firstpass1.o
(maybe you meant: _GameServicesIOS_showLeaderboardView_m5248BB083DDC239C13D7B2AF7CD4A0EE10DFCEBC)
“_isSocialShareServiceAvailable”, referenced from:
_SharingIOS_isSocialShareServiceAvailable_mE723F416750D1A2B52C4C4C12C782644D4BF660D in Assembly-CSharp-firstpass1.o
_SharingIOS_IsFBShareServiceAvailable_m5A086F0FB680556BBD94AE2C57956014668D1C94 in Assembly-CSharp-firstpass1.o
_SharingIOS_IsTwitterShareServiceAvailable_m84192346FD58FEBE7618F0CA0CCD7E27C19A47B8 in Assembly-CSharp-firstpass1.o
(maybe you meant: _SharingIOS_isSocialShareServiceAvailable_mE723F416750D1A2B52C4C4C12C782644D4BF660D)
“_shareImageOnWhatsApp”, referenced from:
_SharingIOS_shareImageOnWhatsApp_m6D9C8E2C0FEBE989099CF3383E142261296A9B9B in Assembly-CSharp-firstpass1.o
_SharingIOS_ShowWhatsAppShareComposer_m4A8A3685F90C79B1E5AE8F3CEE9765778FA8693A in Assembly-CSharp-firstpass1.o
_SharingIOS_ShareImageOnWhatsApp_m872220F909061EA1D88A5CD2FA7AFAFB1FD1AA49 in Assembly-CSharp-firstpass1.o
(maybe you meant: _SharingIOS_shareImageOnWhatsApp_m6D9C8E2C0FEBE989099CF3383E142261296A9B9B)
“_shareTextMessageOnWhatsApp”, referenced from:
_SharingIOS_shareTextMessageOnWhatsApp_mDB63FB4E9A50E21852488C10D8500B2B1205B989 in Assembly-CSharp-firstpass1.o
_SharingIOS_ShowWhatsAppShareComposer_m4A8A3685F90C79B1E5AE8F3CEE9765778FA8693A in Assembly-CSharp-firstpass1.o
_SharingIOS_ShareTextMessageOnWhatsApp_m7B39B5F430FCD79CB9A7BCB577630EC89640CBC0 in Assembly-CSharp-firstpass1.o
(maybe you meant: _SharingIOS_shareTextMessageOnWhatsApp_mDB63FB4E9A50E21852488C10D8500B2B1205B989)
“_loadAchievementDescriptions”, referenced from:
_GameServicesIOS_loadAchievementDescriptions_m79BC5754AE5F1FB76DC540B59F440A772E3918CA in Assembly-CSharp-firstpass1.o
_GameServicesIOS_LoadAchievementDescriptions_m7C53E098E88DE872D1D1A9A281363F1805B1208A in Assembly-CSharp-firstpass1.o
(maybe you meant: _GameServicesIOS_loadAchievementDescriptions_m79BC5754AE5F1FB76DC540B59F440A772E3918CA)
“_reportProgress”, referenced from:
_iOSAchievement_reportProgress_mFA3DC9DB320DE5A7B822955F302FA6D355F0BFA8 in Assembly-CSharp-firstpass1.o
_iOSAchievement_ReportProgress_mC893AD33D00E0361F55D73205F38012C64F02C72 in Assembly-CSharp-firstpass1.o
(maybe you meant: _iOSAchievement_reportProgress_mFA3DC9DB320DE5A7B822955F302FA6D355F0BFA8)
“_loadExternalAuthenticationCredentials”, referenced from:
_GameServicesIOS_loadExternalAuthenticationCredentials_m905028330FB13B0605A5CE993CF4F0B861C656C8 in Assembly-CSharp-firstpass1.o
_GameServicesIOS_LoadExternalAuthenticationCredentials_mED5725AECCCC0A07DDF660F5B9DDB5DB2E1774F4 in Assembly-CSharp-firstpass1.o
(maybe you meant: _GameServicesIOS_loadExternalAuthenticationCredentials_m905028330FB13B0605A5CE993CF4F0B861C656C8)
“_showAlertDialog”, referenced from:
_UIIOS_showAlertDialog_m521B187555185433DCD9AD265799285989AD4AC9 in Assembly-CSharp-firstpass1.o
(maybe you meant: _UIIOS_showAlertDialog_m521B187555185433DCD9AD265799285989AD4AC9)
“_isGameCenterAvailable”, referenced from:
_GameServicesIOS_isGameCenterAvailable_m483A640ED47E96A2F98F1CEC6ED291E804126A81 in Assembly-CSharp-firstpass1.o
_GameServicesIOS_IsAvailable_m75D2E8E22B9DAB4D86CC7880653A7378DA426081 in Assembly-CSharp-firstpass1.o
(maybe you meant: _GameServicesIOS_isGameCenterAvailable_m483A640ED47E96A2F98F1CEC6ED291E804126A81)
“_setApplicationIconBadgeNumber”, referenced from:
_UtilityIOS_setApplicationIconBadgeNumber_mF57ADD749B43F8CC7C5114F9DDF1A533C8EA15CE in Assembly-CSharp-firstpass1.o
_UtilityIOS_SetApplicationIconBadgeNumber_m309E692E61F47A133C96CC0043623868364BA120 in Assembly-CSharp-firstpass1.o
(maybe you meant: _UtilityIOS_setApplicationIconBadgeNumber_mF57ADD749B43F8CC7C5114F9DDF1A533C8EA15CE)
“_share”, referenced from:
_SharingIOS_share_m20DDAC5051E286E5FF796EFBD668004857B109FB in Assembly-CSharp-firstpass1.o
(maybe you meant: typeinfo for std::__1::__shared_ptr_pointer<std::__1::__empty_state, std::__1::default_delete<std::__1::__empty_state >, std::__1::allocator<std::__1::__empty_state > >, typeinfo name for std::__1::__shared_ptr_pointer<std::__1::__empty_state, std::__1::default_delete<std::__1::__empty_state >, std::__1::allocator<std::__1::__empty_state > > , std::__1::__shared_ptr_pointer<std::__1::__empty_state, std::__1::default_delete<std::__1::__empty_state >, std::__1::allocator<std::__1::__empty_state > >::__on_zero_shared() , std::__1::__shared_ptr_pointer<std::__1::__empty_state, std::__1::default_delete<std::__1::__empty_state >, std::__1::allocator<std::__1::__empty_state > >::~__shared_ptr_pointer() , Register_UnityEngine_SkinnedMeshRenderer_set_sharedMesh() , Register_UnityEngine_SkinnedMeshRenderer_get_sharedMesh() , Register_UnityEngine_MeshFilter_get_sharedMesh() , OBJC_IVAR_APMASIdentifierManager._sharedIdentifierManager , std::__1::__shared_ptr_pointer<std::__1::__empty_state<char>*, std::__1::default_delete<std::__1::__empty_state<char> >, std::__1::allocator<std::__1::__empty_state<char> > >::__get_deleter(std::type_info const&) const , std::__1::__shared_ptr_pointer<std::__1::__empty_state<char>*, std::__1::default_delete<std::__1::__empty_state<char> >, std::__1::allocator<std::__1::__empty_state<char> > >::__on_zero_shared_weak() , vtable for std::__1::__shared_ptr_pointer<std::__1::__empty_state<char>*, std::__1::default_delete<std::__1::__empty_state<char> >, std::__1::allocator<std::__1::__empty_state<char> > > , _SharingIOS_shareTextMessageOnWhatsApp_mDB63FB4E9A50E21852488C10D8500B2B1205B989 , std::__1::__shared_ptr_pointer<std::__1::__empty_state<char>*, std::__1::default_delete<std::__1::__empty_state<char> >, std::__1::allocator<std::__1::__empty_state<char> > >::~__shared_ptr_pointer() , _CultureInfo_insert_into_shared_tables_mEF7A50DE94D03F4C663AEC7D7E23A0BD309F872C , _mbedtls_ecdh_compute_shared , _SharingIOS_shareImageOnWhatsApp_m6D9C8E2C0FEBE989099CF3383E142261296A9B9B , Register_UnityEngine_MeshFilter_set_sharedMesh() , _CultureInfo_insert_into_shared_tables_mEF7A50DE94D03F4C663AEC7D7E23A0BD309F872C_MetadataUsageId , _OBJC_IVAR__GADAdVerification._sharedGADOMID , _SharingIOS_share_m20DDAC5051E286E5FF796EFBD668004857B109FB , _Renderer_get_sharedMaterial_m2BE9FF3D269968F2E323AC60EFBBCC0B26E7E6F9 )
“_showAchievementView”, referenced from:
_GameServicesIOS_showAchievementView_m76DFDABB9FE9D89D9D46F2171C6F2EB2C5D5E4CF in Assembly-CSharp-firstpass1.o
_GameServicesIOS_ShowAchievementsUI_m9712AAC105C249E2031A0899708AC5B08158FB6C in Assembly-CSharp-firstpass1.o
(maybe you meant: _GameServicesIOS_showAchievementView_m76DFDABB9FE9D89D9D46F2171C6F2EB2C5D5E4CF)
“_showSingleFieldPromptDialog”, referenced from:
_UIIOS_showSingleFieldPromptDialog_mB48438BE3088F8FF67572329E41D772CEAE78E86 in Assembly-CSharp-firstpass1.o
(maybe you meant: _UIIOS_showSingleFieldPromptDialog_mB48438BE3088F8FF67572329E41D772CEAE78E86)
“_loadScores”, referenced from:
_iOSLeaderboard_loadScores_m8FED1C13664372D85F1978BB6E571F72AB145CED in Assembly-CSharp-firstpass1.o
_iOSLeaderboard_LoadScores_m1CE3476375136C30C67C240AB1BCCCB74898D489 in Assembly-CSharp-firstpass1.o
(maybe you meant: _iOSLeaderboard_loadScores_m8FED1C13664372D85F1978BB6E571F72AB145CED)
“_loadAchievements”, referenced from:
_GameServicesIOS_loadAchievements_mAE94D5D5E731C2A7FEF9E5CDE96943CBB37AE14F in Assembly-CSharp-firstpass1.o
_GameServicesIOS_LoadAchievements_m6742D6BD6FD85D2BE1B2334748D7094DB301A545 in Assembly-CSharp-firstpass1.o
(maybe you meant: _GameServicesIOS_loadAchievements_mAE94D5D5E731C2A7FEF9E5CDE96943CBB37AE14F)
“_utilityBundleIdentifier”, referenced from:
_NativeBinding_utilityBundleIdentifier_m4C574FFF9E383D19F6C0D732838BE67A1F05F1C1 in Assembly-CSharp-firstpass2.o
_NativeBinding_GetBundleIdentifier_m4C483F056CE6FF13B224E0C3B73D3DBD2A1222DA in Assembly-CSharp-firstpass2.o
_PlayerSettings_GetBundleIdentifier_m465614E239E0A20D45423786FC5C9A5CA132C077 in Assembly-CSharp-firstpass2.o
(maybe you meant: _NativeBinding_utilityBundleIdentifier_m4C574FFF9E383D19F6C0D732838BE67A1F05F1C1)
“_showDefaultAchievementCompletionBanner”, referenced from:
_GameServicesIOS_showDefaultAchievementCompletionBanner_m5C6BD430EC3A3FE4B74049F2D8CE93B97CE09DBA in Assembly-CSharp-firstpass1.o
_GameServicesIOS_Awake_mDA9C347F87B55FC4EE7E7AA1DC652161FCC71AC7 in Assembly-CSharp-firstpass1.o
_GameServicesIOS_ShowDefaultAchievementCompletionBanner_m6B02E74D5A3CD572B508FF14931A0532578B4B6F in Assembly-CSharp-firstpass1.o
(maybe you meant: _GameServicesIOS_showDefaultAchievementCompletionBanner_m5C6BD430EC3A3FE4B74049F2D8CE93B97CE09DBA)
“_loadPlayers”, referenced from:
_GameServicesIOS_loadPlayers_m6777852DE655E178C2ABF1BCF2B52AE545CEDC53 in Assembly-CSharp-firstpass1.o
_GameServicesIOS_LoadUsers_mC7BA5859C347A72CBC20B8D7F772E0FCD1B2A90A in Assembly-CSharp-firstpass1.o
(maybe you meant: _GameServicesIOS_loadPlayers_m6777852DE655E178C2ABF1BCF2B52AE545CEDC53)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@Ebonicus starting from 2019.3 Xcode project structure changed.

If yours or plugins custom Xcode project adjustments are not reflecting these changes most likely you will receive this kind of linking errors.

  • check for Build errors in Editor console after you generate Xcode project
  • Upgrade plugins to a newer version that is compatible with 2019.3 ( or fix them manually) and fix custom Xcode adjustments if you have any.

No ios build errors in Unity console.
Plugins are all updated to 2019.4.12f1 LTS.

Not sure what you mean by custom XCode adjustments,
all I ever have to do is add frameworks, and -ObjC other linker flag.

The project builds fine in XCode when built with Unity 2018. The only thing that changes is Unity 2019 version will not build in XCode. The plugin for Google ads is not causing the error, the same plugin version works for 2018 and 2019. Same with CPNP plugin, both plugins are compatible with both Unity versions, per the developers.

you can check Frameworks/Libraries section of Unity-iPhone target, if you see more than UnityFramework there then there is a chance that some plugins or yours build postprocess added them to the wrong target. You can try to move them to UnityFramework target to see if it helps to solve the missing symbols issue

All Frameworks are not listed there, they are all under Target>Unity-Framework as required.

This issue was solved by Plugin Developer.
Asset had incorrect library calls and required updates.

1 Like