Update, back to square 1... After switching code signing setting to Run Locally and back to Developer, and cleaning, the xcodebuild test command succeeds from the Terminal with this target. Still fails on Xcode Cloud however, including after a clean environment.
Additional info: I discovered that this is not just an issue with Xcode cloud, I can reproduce by just trying to run the testing target from the command-line locally, with
xcodebuild -scheme (XCTest-scheme-name) test
I get the same error shown above, which does not occur when I run the Test action from the IDE. In this case it's looking for the test file in the Debug .app build in derived data - and the file is actually there. Any suggestions? Is this a code-signing issue?
Many of us would like this! I'm mainly interested in use on Mac in NSImage, but it's the same issue - clearly NSImage has the capability since it can be created from an asset, why isn't it possible from loose .svg resource or svg NSData?
I think I answered my question by searching for "macos sandbox entitlement font auto-activation" online... I came across a troubleshooting article on limitations of Suitcase auto-activation, which won't work for Sandboxed apps (including Pages etc.), which unfortunately this forum won't let me post a link to for some reason. (Can't post the search link either, gah).
So it would seem that auto-activation for sandboxed apps is unsupported. I will file a feedback request to ask for an entitlement for this feature, it's an important use case for designers that have large collections of fonts and Sandboxed apps shouldn't be denied the ability to leverage it. A global font auto-activation entitlement would make sense for apps that use typography in significant ways.
Oh I also tried CTFontManagerSetAutoActivationSetting(kCTFontManagerBundleIdentifier, kCTFontManagerAutoActivationEnabled); which is supposed to set "global auto-activation", but no difference in behavior.
Update, back to square 1... After switching code signing setting to Run Locally and back to Developer, and cleaning, the xcodebuild test command succeeds from the Terminal with this target. Still fails on Xcode Cloud however, including after a clean environment.
Additional info: I discovered that this is not just an issue with Xcode cloud, I can reproduce by just trying to run the testing target from the command-line locally, with
xcodebuild -scheme (XCTest-scheme-name) test
I get the same error shown above, which does not occur when I run the Test action from the IDE. In this case it's looking for the test file in the Debug .app build in derived data - and the file is actually there. Any suggestions? Is this a code-signing issue?
Many of us would like this! I'm mainly interested in use on Mac in NSImage, but it's the same issue - clearly NSImage has the capability since it can be created from an asset, why isn't it possible from loose .svg resource or svg NSData?
I think I answered my question by searching for "macos sandbox entitlement font auto-activation" online... I came across a troubleshooting article on limitations of Suitcase auto-activation, which won't work for Sandboxed apps (including Pages etc.), which unfortunately this forum won't let me post a link to for some reason. (Can't post the search link either, gah).
So it would seem that auto-activation for sandboxed apps is unsupported. I will file a feedback request to ask for an entitlement for this feature, it's an important use case for designers that have large collections of fonts and Sandboxed apps shouldn't be denied the ability to leverage it. A global font auto-activation entitlement would make sense for apps that use typography in significant ways.
Oh I also tried CTFontManagerSetAutoActivationSetting(kCTFontManagerBundleIdentifier, kCTFontManagerAutoActivationEnabled); which is supposed to set "global auto-activation", but no difference in behavior.