UnityFramework Issue when building in Xcode 15/16

I made the switch from XCode 15.1 to 15.4 and things started to go wrong. I am now unable to build my project for iPhone (previously worked fine with no issues). I have tried multiple versions of XCode (15 and 16 betas) and going back to 15.1 with no luck. Been searching for 2 days for ideas or clues with no luck. Here is the log info from xcode on the build…

Showing All Issues

Ld /Users/markkelly/Library/Developer/Xcode/DerivedData/Unity-iPhone-ajfteurcpfxmdygxvxagpuednjlu/Build/Products/ReleaseForRunning-iphoneos/UnityFramework.framework/UnityFramework normal (in target 'UnityFramework' from project 'Unity-iPhone')
    cd /Users/markkelly/UNITY\ Projects/HG-Mobile-App/BUILD-IPHONE
    /Users/markkelly/Downloads/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -Xlinker -reproducible -target arm64-apple-ios15.0 -dynamiclib -isysroot /Users/markkelly/Downloads/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk -Os -L/Users/markkelly/Library/Developer/Xcode/DerivedData/Unity-iPhone-ajfteurcpfxmdygxvxagpuednjlu/Build/Intermediates.noindex/EagerLinkingTBDs/ReleaseForRunning-iphoneos -L/Users/markkelly/Library/Developer/Xcode/DerivedData/Unity-iPhone-ajfteurcpfxmdygxvxagpuednjlu/Build/Products/ReleaseForRunning-iphoneos -L/Users/markkelly/UNITY\ Projects/HG-Mobile-App/BUILD-IPHONE/Libraries -F/Users/markkelly/Library/Developer/Xcode/DerivedData/Unity-iPhone-ajfteurcpfxmdygxvxagpuednjlu/Build/Intermediates.noindex/EagerLinkingTBDs/ReleaseForRunning-iphoneos -F/Users/markkelly/Library/Developer/Xcode/DerivedData/Unity-iPhone-ajfteurcpfxmdygxvxagpuednjlu/Build/Products/ReleaseForRunning-iphoneos -filelist /Users/markkelly/Library/Developer/Xcode/DerivedData/Unity-iPhone-ajfteurcpfxmdygxvxagpuednjlu/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/UnityFramework.build/Objects-normal/arm64/UnityFramework.LinkFileList -install_name @rpath/UnityFramework.framework/UnityFramework -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -map -Xlinker /Users/markkelly/Library/Developer/Xcode/DerivedData/Unity-iPhone-ajfteurcpfxmdygxvxagpuednjlu/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/UnityFramework.build/UnityFramework-LinkMap-normal-arm64.txt -dead_strip -Xlinker -object_path_lto -Xlinker /Users/markkelly/Library/Developer/Xcode/DerivedData/Unity-iPhone-ajfteurcpfxmdygxvxagpuednjlu/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/UnityFramework.build/Objects-normal/arm64/UnityFramework_lto.o -stdlib\=libc++ -fobjc-arc -fobjc-link-runtime -weak_framework CoreMotion -weak-lSystem -liPhone-lib -framework Metal -framework Security -framework MediaToolbox -framework CoreText -framework AudioToolbox -weak_framework AVFoundation -framework AVKit -framework CFNetwork -framework CoreGraphics -framework CoreMedia -weak_framework CoreMotion -framework CoreVideo -framework Foundation -framework OpenAL -framework QuartzCore -framework SystemConfiguration -framework UIKit -lGameAssembly -liconv.2 -lil2cpp /Users/markkelly/UNITY\ Projects/HG-Mobile-App/BUILD-IPHONE/Libraries/baselib.a -framework CoreBluetooth -framework CoreLocation -weak_framework GameController -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/markkelly/Library/Developer/Xcode/DerivedData/Unity-iPhone-ajfteurcpfxmdygxvxagpuednjlu/Build/Intermediates.noindex/Unity-iPhone.build/ReleaseForRunning-iphoneos/UnityFramework.build/Objects-normal/arm64/UnityFramework_dependency_info.dat -o /Users/markkelly/Library/Developer/Xcode/DerivedData/Unity-iPhone-ajfteurcpfxmdygxvxagpuednjlu/Build/Products/ReleaseForRunning-iphoneos/UnityFramework.framework/UnityFramework
Undefined symbols for architecture arm64:
  "_ReloadPage", referenced from:
      _QuitApp_ReloadPage_m8D82739E5C8C05F16EBD6ECA2C5FF8A40A2B74E2 in libGameAssembly.a[3](v7wf8c39xmtf.o)
      _QuitApp_Reload_m302C2E7668DDEBFB2A15DF030C668E556CBE3CB7 in libGameAssembly.a[3](v7wf8c39xmtf.o)
ld: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
1 Like

So, try to “reset” project:

  • Close Xcode and Unity
  • Update iOS (it will lead to downloading new Debug Symbols later when connecting phone to Xcode in “/Users/{username}/Library/Developer/Xcode/iOS DeviceSupport”)
  • Delete Debug Symbols for previous iOS version after completing downloading for the new one > the whole folder called “iPhone…{ios_version}…”
  • Delete Unity iOS build folder
  • Delete Unity Library folder
  • Delete appropriate project in “/Users/{username}/Library/Developer/Xcode/DerivedData”
  • Open Unity and Build and Run for iOS again

Thank you for the advice and great suggestions. I did most of them without any luck. After a few more hours of back-and-forth, I finally tracked down the issue. The App has multiple versions, including WEBGL. I had a DLL and associated functionality in the code for that version. A typo in the Preprocessor Directives wrapping the DLL inclusion made the code active during the iOS build, resulting in the issue with XCode dealing with it.

Thank you again for the prompt response.

1 Like