iosxcodemacosrealmrsync

error: Sandbox: rsync.samba in Xcode project


when integrating Realm into the Xcode project, two errors appear:

  1. error: Sandbox: rsync.samba(23748) deny(1) file-write-create /Users/danilkoksenev/DerivedXcode/MyPlaces-egyurzcpvwpcvjbgtnifjfqlhsia/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/Realm/Headers (in target 'Realm' from project 'Pods')

  2. error: Sandbox: rsync.samba(23749) deny(1) file-write-create /Users/danilkoksenev/DerivedXcode/MyPlaces-egyurzcpvwpcvjbgtnifjfqlhsia/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/Realm/.librealm-monorepo.a.iHlLDE (in target 'Realm' from project 'Pods')

First, Clean Build Folder, then I thought that this directory did not have enough rights or the SIP system on macOS was blocking it, I decided to move DerivedData to a user directory, namely to (/Users/danilkoksenev/DerivedXcode) and Clean Build Folder, which has all the necessary rights, but this did not help solve this error.

Also in the file .xcworkspace in the MyPlaces project changed the User Script Sandboxing Yes to No, it didn't help either

I also tried to change source="$(readlink "${source}")" to source="$(readlink -f "${source}")" in the Pods -> Pods-MyPlaces -> folder of the left area of Xcode, but this also did not solve this problem

My Podfile:

Uncomment the next line to define a global platform for your project

platform :ios, '9.0'

target 'MyPlaces' do

Comment the next line if you don't want to use dynamic frameworks

use_frameworks!

Pods for MyPlaces

pod 'RealmSwift', '~>10'

end

Can you tell me what I should do to solve this error?


Solution

  • This error is related to User Script Sandboxing.

    The easiest fix is to select your project in the navigator, then

    1. select your target.

    2. Go to Build Settings and in the search box enter sandbox

    3. Then set all options to NO.

    Here's a screen shot

    enter image description here

    Then, you'll need to go to Signing and Capabilities and check the boxes to allow incoming and outgoing network connections.

    enter image description here

    Oh - and don't forget with 10.50.0 for now, the framework needs to be embedded and signed.

    enter image description here