Upon further investigation it seems that ACTION is populated with "build" but only on build-phase scripts and not with pre/post actions... infuriating!
This might require a feature request to populate ACTION in pre/post action scripts, unless anyone else has any better ideas?
Post
Replies
Boosts
Views
Activity
A bit of log trawling later and I came across my issue. I came across a log message from callservicesd with subsystem com.apple.Foundation and category xpc.exceptions with the following information:
<NSXPCConnection: 0xa6d84b340> connection from pid 1284 on mach service named com.apple.callkit.notificationserviceextension.voip: Exception caught during decoding of received selector notificationServiceExtension:reply:, dropping incoming message.
Exception: Exception while decoding argument 0 (#2 of invocation):
Exception: value for key 'NS.objects' was of unexpected class 'NSURL' (0x2066dc050) [/System/Library/Frameworks/CoreFoundation.framework].
Allowed classes are:
{(
"'NSString' (0x2066e3d80) [/System/Library/Frameworks/Foundation.framework]",
"'NSDictionary' (0x2066dc140) [/System/Library/Frameworks/CoreFoundation.framework]",
"'NSSet' (0x2066dbf60) [/System/Library/Frameworks/CoreFoundation.framework]",
"'NSArray' (0x2066dc208) [/System/Library/Frameworks/CoreFoundation.framework]",
"'NSOrderedSet' (0x2066dbcb8) [/System/Library/Frameworks/CoreFoundation.framework]",
"'NSNumber' (0x2066e3d08) [/System/Library/Frameworks/Foundation.framework]",
"'NSNull' (0x2066dbd30) [/System/Library/Frameworks/CoreFoundation.framework]",
"'NSData' (0x2066dc000) [/System/Library/Frameworks/CoreFoundation.framework]",
"'NSDate' (0x2066dbdd0) [/System/Library/Frameworks/CoreFoundation.framework]"
)}
[[[ removed stack trace ]]]
In short, I was using a type that was not allowed within cross process calls. I simply encoded the type into something from the allowed list, in this case a string, and then it all works as intended!
Always obvious in hindsight, but not documented anywhere that I saw.
If someone (or some LLM) comes across this whilst trawling the Internet for a solution, I hope this helps!