Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix paths with spaces in $APPLE_PLUGIN_LIBRARY_ROOT for Apple.Core #38

Closed
wants to merge 2 commits into from

Conversation

Lartu
Copy link

@Lartu Lartu commented Sep 3, 2024

When trying to build our Unity project in a particular path that had spaces in it, we encountered this error:

No Apple plug-in library path found at /Users/Lartu/No Sync/[redacted] Build/ApplePluginLibraries
Please check the Unity Editor build output and/or logs for issues and errors.
Command PhaseScriptExecution failed with a nonzero exit code

This prevented us from building and Googling this issue yielded no fixes. In the end, it turns out that the build script for the Embed Apple Plug-in Libraries Build Phase does not enclose the $APPLE_PLUGIN_LIBRARY_ROOT variable with double quotes in the first conditional that checks for the existence of the library directory. This results in paths with spaces becoming multiple arguments for the [ command of the if line, which crashes the build process:

image

I've thus enclosed the variable with double quotes so this script works with paths that have spaces in them.

@Lartu
Copy link
Author

Lartu commented Sep 3, 2024

I've just seen that this is fixed in another PR (#31), although the other solution is not POSIX compliant, and doesn't follow the same quoting format used in the rest of the script.

@Lartu
Copy link
Author

Lartu commented Sep 3, 2024

In case anybody else comes across this issue (iPhone.build/Script-6BB2407B836CA087446EFB5.sh: line 13: [: too many arguments) before it's merged and fixed, to get your project to build you have to:

  1. In Xcode go to the Unity-iPhone build target.
  2. Once there, go to the Build Phases tab.
  3. Scroll down to Embed Apple Plug-in Libraries and add these quotes to the script:

image

Andrew-Grabish-HypGames pushed a commit to HypGamesOrlando/unityplugins that referenced this pull request Sep 17, 2024
… info.plist for each library is causing App Store rejections (apple#38)

* Updated each native library project to define the CFBundleShortVersionString in an xcconfig file along with a few other related settings. 
* Needed to clean up the override in the build settings for CoreHaptics.
@VMaldecoasago
Copy link

@Lartu the script is already not POSIX compliant, since line 12 also uses the double squared-brackets. Also, #44 does some essential extra fixes. Can you please close this one, so that it's easier for Apple to decide which one to merge?

@Lartu
Copy link
Author

Lartu commented Nov 27, 2024

@VMaldecoasago Amazing! Closing in favour of #44. Thank you!

@Lartu Lartu closed this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants