-
Notifications
You must be signed in to change notification settings - Fork 349
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
[Bug] iOS Resolver: Failed to install CocoaPods for the current user #654
Comments
This issue does not seem to follow the issue template. Make sure you provide all the required information. |
I also found this Issue: which has been closed but without a real solution. I tried to set the UTF8 setting mentioned in the comments, but this did not work. Plus, I tried to install cocoapods 1.10.2 as recommended in the comments as well, but this does not seem to be available for Silicon Macs, neither via sudo gem install nor via homebrew. |
Hi @derwaldgeist, Have you installed Xcode and Xcode Command Line Tools? You'll need Xcode in order to build your app on an iOS device since Unity only generates the Xcode project. You can install Xcode Command Line Tools using this command:
I look forward to hearing from you soon. |
I am in the same boat as the original poster.
osx Sonoma ships with ruby 2.6.10.210 and iOS Resolver uses the system shipped ruby version even when a newer ruby version is installed and configured in shell profile.
|
I confirmed my shell profile is loading correctly into Unity process by executing
Outputs:
.rbenv/shims have symlinks to the ruby-3.2.2 environment |
Yes, Xcode command line tools are already installed. But still, I cannot make it work. This did not happen on my Intel Mac, with the very same setup. Could it be that it is a Silicon Mac specific problem? |
@remzisenel I guess you didn't find a solution yet, did you? This is driving me nuts... I get the same output from |
I've also checked my path now. It contains The error dialog I am getting claims that it only finds |
I tried to tell I've also checked |
I was abe to fix this using these instructions: I guess the important part is this:
I also tried it without the However, this seems like a pretty odd workaround to me. Would appreciate a better solution. |
I believe the root of the problem is that the resolvers are not using the right binaries in PATH. I couldn't figure out why yet. I did get around the cocoapods problem by manually installing cocoapods through my own terminal, somewhat akin to what @derwaldgeist did - he installed (an older version of) cocoapods for the system ruby environment, I installed cocoapods manually for the newer rbenv installed ruby environment. |
I agree with @remzisenel Spent a few hours trying to resolve this issue today, and yes, it seems no matter what I do, the iOS Resolver seems dead set on using the old outdated /usr/bin/ruby, even though I've installed 3.2.2 (tried both with homebrew and with rbenv) It would be nice if the tool could be fixed to properly respect the path and use the correct version of ruby. |
I'll also share my workaround.
Note! You must use at least 1.12.1 or it will not work to archive using XCode 14.3 or later. But of course, the real fix is for Unity-Jar-Resolver to use the proper version of Ruby instead of only using /usr/bin/ruby, since the latest version of cocoapods is not compatible with 2.6.0 |
I alse have this error. And add path to zsh is invaild. Then I foud add path to bash is ok! It seems that Unity uses the bash environment by default。 |
我将 .zshrc 中的相关配置拷贝到 .profile 中了一份,这样就可以使用我自己安装的 ruby 和 cocoapods 版本了。 |
yeah!!!! it save me. thanks |
Okay, I accidentally broke this in my own install, and have found a solution that fixed things for me. If you are using
If you are using zsh as your primary shell, make sure these are set in BOTH your Having the environment variables in both fixed the issue for me. |
Thanks for raising this issue! I was just investigating it myself. I read that it is not recommended to make changes to the OS ruby. the iOS resolver does seem to search for existing cocoapods install:
|
For those who want to run the command mentioned by @derwaldgeist on x86_64 architecture: |
I just got my M3 MacBook Pro and am trying to get my existing Unity project up and running. After installing the Silicon version of Unity Editor, I opened my project for the first time. This resulted in an error message that Cocoapods cannot be installed
I have upgraded my cocapods (1.14.2) and Ruby (3.2.2) installations, but still the problem persists. It seems as if EDM4U picks up an installation that was already pre-installed on the machine.
What's the issue repro rate? 100%
What happened? How can we make the problem occur?
Just install Unity on a fresh Apple Silicon MacBook and try to open an existing project using EDM4U.
The text was updated successfully, but these errors were encountered: