Environment: Xcode v. 16.2; Swift version 6+
Scenario: I have an .xcodeproj within an .xcsworkingspace that must follow the 'command-line' paradigm outside the sandbox.
My UnitTest (using the newer 'Swift Test' vs 'XCTest') is hitting runtime fatal errors due to sandbox violations.
Here's a typical error line from the compiler:
1 duplicate report for Sandbox: chmod(41377) deny(1) file-read-data /Users/Ric/Library/..
I've set the .entitlement to ignore sandbox:
<key>com.apple.security.app-sandbox</key>
<false/>
I also created a shell script in the project build phase to access my TestData which was copied via a Build Phase:
#!/bin/bash
BUILD_DIR="${BUILT_PRODUCTS_DIR}"
TEST_DATA="${SRCROOT}/SwiftModelTest/TestData"
mkdir -p "${BUILD_DIR}/TestData"
cp -R "${TEST_DATA}/" "${BUILD_DIR}/TestData/"
What do I need to allow real-time Testing of my code without worrying about the Sandbox?
Post
Replies
Boosts
Views
Activity
I was nearly finished with my SwiftUI/Combine application and everything was working correctly via simulation.
However, upon using a device, I noticed the presented Views don't display within their own ZStack Layer when running on any device.
That is, I get a blank white screen when running the code on a device. Why the difference with the same code?
Is this a Screen-Builder flaw (code is large) and if so, why only on a device but not via simulator?
I don't have an active (purchased) developer membership.