Ipatool error on ad-hoc build

I'm trying to push out an ad-hoc build from Xcode 13.1 but keep getting the following error:

ipatool failed with an exception: #<NoMethodError: undefined method `sdkPath' for nil:NilClass>.....

I've set 'enable bitcode' to 'no' in build settings, and also set 'Enable code coverage support' to 'no' but still getting this error. Can anybody help?

This is the full error message:

ipatool failed with an exception: #<NoMethodError: undefined method sdkPath' for nil:NilClass> /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:480:in _expandPath' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:428:in block in resolveLoadedDylibs' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:425:in map' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:425:in resolveLoadedDylibs' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1924:in block (2 levels) in initialize' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1923:in each' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1923:in block in initialize' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1922:in each' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1922:in initialize' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3022:in new' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3022:in ProcessIPA' /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:4010:in `'

Solved:

If anyone's facing a similar issue, I'd installed the USD package to enable me to export a model to QuickLook. Needed to remove in package manager before doing a distributable build.

Ipatool error on ad-hoc build
 
 
Q