Search Issue Tracker

Fixed in 2021.2.X

Fixed in 2021.1.X

Votes

9

Found in

2018.2.4f1

Issue ID

1071993

Regression

No

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

Mobile

-

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 "MapFileParser.sh: 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/MapFileParser.sh"
    line 2 of what it was on line 1: "$PROJECT_DIR/MapFileParser.sh"

    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 (1)

  1. 7a17223be0217e9bfffbc11e264ba036?d=mm

    MaskedMouse

    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.

    https://forum.unity.com/threads/mapfileparser-sh-permission-denied-not-set-as-executable-in-unity-4-6-8p1.352136/

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.