Xcode errors: fmod_register_static_plugins.cpp and fmodplugins.cpp can't be found

I have just upgraded FMOD to version 2.02.21 and I’m trying to build to iOS. Xcode generates these errors:

Build input file cannot be found: ‘/Users/[my-user]/www/[my-project]/_builds/iOS/[my-app]/Libraries/Plugins/FMOD/Cache/fmod_register_static_plugins.cpp’. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?

Build input file cannot be found: ‘/Users/[my-user]/www/[my-project]/_builds/iOS/[my-app]/Libraries/Plugins/FMOD/src/Runtime/fmodplugins.cpp’. Did you forget to declare this file as an output of a script phase or custom build rule which produces it?

With regards to the first item, the only reference I have found to fmod_register_static_plugins is here in this legacy code block:
/Assets/Plugins/FMID/src/Settings.cs

    internal static class Legacy
    {
#if UNITY_EDITOR
        private const string RegisterStaticPluginsAssetPathRelative =
            "/Plugins/FMOD/Cache/fmod_register_static_plugins.cpp";

With regards to the second item, I found only this reference:
/Assets/Plugins/FMOD/src/Editor/FileReorganizer.cs

            private static readonly MoveRecord[] looseAssets = {
                // Release 1.10 layout
                new MoveRecord() { source = FMODRoot + "/fmodplugins.cpp", destination = "obsolete" },

It appears that both of these files are obsolete in this version of FMOD, but my Unity project appears to still have references to them. How can I remove these references?

Screenshot 2024-04-08 at 6.26.25 PM

Digging further into my xcode error, I found these files labeled in red. In addition to the two missing files that threw specific errors, I see also that xcode believes this file to be missing:

/Assets/Plugins/FMOD/lib/ios/libfmodstudiounityplugin.a

However, I moved that file because the File Reorganizer considered it to be missing when it was in that location. Its new location is here:

/Assets/Plugins/FMOD/platforms/ios/lib/libfmodstudiounityplugin.a

So it seems to me that my project still has some cached references to the prior version of FMOD. How can I update these?

Ah hah. I discovered what I was missing. I’d been appending my Unity->Xcode build rather than replacing, and so presumably leaving old references in place. Just needed to rebuild the xcode project from scratch.

1 Like