Search Issue Tracker

Fixed in 2021.2.X

Fixed in 2021.1.X



Found in


Issue ID




[iOS] " Permission denied" when building Xcode project built from Windows directly to a macOS shared folder



Reproduction steps:
1. Build an empty iOS project from a Windows machine directly to a shared macOS folder.
- Use build pipeline script to build the project (Default builder in the Build Settings doesn't work for the network builds). You can check the attached script, named 't.cs' as a reference.
- Make sure macOS shared folder is configured to be accessed from a Windows machine.
2. Open and try to build the built Xcode project.

Actual behavior:
- Build fails with " Permission denied" error message.

  1. Response avatar

    Resolution Note (fix version 2021.2):

    MapFileParser will be removed from 2021.1+ version
    For earlier versions:
    By default SMB configuration on Mac device does not allow to set an executable flag for security reasons.
    One way to work around this is to make Xcode to set it for you.
    Open generated Xcode project go to UnityFramework target / Build Phases / Run Script
    at line 1 add: chmod +x "$PROJECT_DIR/"
    line 2 of what it was on line 1: "$PROJECT_DIR/"

    you can do it:
    - manually
    - with BuildPostProcessor via PBXProject API
    - or if you want to make this change for all iOS/tvOS generated projects change Unity-iPhone.xcodeproj in your Unity Editor installation for iOS/tvOS platform support modules Trampoline folder

    p.s. In order to build directly to Mac shared folder you can Map Network Drive on windows and use it as target to Generate Xcode project.

Comments (2)

  1. 36b3d6ec96eda547f1e7adadb59a5675?d=mm


    Jun 06, 2021 15:35

    This is not fixed with the latest LTS

  2. 7a17223be0217e9bfffbc11e264ba036?d=mm


    Oct 12, 2018 07:19

    This issue has been there for ages. You can fix it by using chmod +x /path/to/MapFileParser via the terminal.
    We've made an automator task for this so we can just right click the folder and let it use chmod on all .sh files.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.