iOS doesn't have Cocoa, which thankfully isn't a requirement of this code that supposedly requires it
In 11729cdc there was a fix added for macOS, but the fix uses Cocoa and indirectly assumes that "darwin" means "macOS" (when meson, correctly, uses "darwin" to include iOS and tvOS).
if host_system == 'darwin'
glib_sources += files('gosxutils.m')
endif
#ifndef HAVE_COCOA
#error "Can only build gutils-macos.m on MacOS"
#endif
Thankfully, this is an easy fix: the functions being called aren't part of Cocoa, they are part of Foundation. The only reason this code worked is because Cocoa is a (massive and usually unnecessary) superset of Foundation.
diff --git a/glib/gosxutils.m b/glib/gosxutils.m
index 7a0d84d31..9b6601783 100644
--- a/glib/gosxutils.m
+++ b/glib/gosxutils.m
@@ -17,11 +17,7 @@
#include "config.h"
-#ifndef HAVE_COCOA
-#error "Can only build gutils-macos.m on MacOS"
-#endif
-
-#include <Cocoa/Cocoa.h>
+#include <Foundation/Foundation.h>
#include "gutils.h"
#include "gstrfuncs.h"
I have verified that making this change results in this file compiling correctly for iOS.