关于申请网站建设的请示,自己建的网站百度查找不到,网站备案是域名备案还是空间备案,wordpress 图库主题自己这两天在用Unity开发IOS时#xff0c;遇到了安装Cocoapods失败的问题#xff0c;记录一下问题及解决方法#xff0c;便于自己后续查看#xff0c;以及有相同遭遇的人查看 发生场景#xff1a;打开 unity#xff0c;触发自动安装 Cocoapods - 安装失败#xff08…自己这两天在用Unity开发IOS时遇到了安装Cocoapods失败的问题记录一下问题及解决方法便于自己后续查看以及有相同遭遇的人查看 发生场景打开 unity触发自动安装 Cocoapods - 安装失败各种失败情况在【问题及解决】中都有记录及有解决方法 原因分析mac 10.15 自带的 ruby 为 2.6.3这个版本太低会导致安装 Cocoapods 出错及后续 pod 会有问题我们只需安装新的ruby版本即可 解决流程安装 rvm - 安装 ruby-2.7.2 启用 - 安装 Cocoapods 具体解决步骤如下如安装过程中遇到问题请查看【问题及解决】 1. 安装多ruby管理工具rvm 》curl -L https://get.rvm.io | bash -s stable # 查看rvm已安装的版本 》rvm -v 2. 安装 ruby-2.7.2 》rvm install ruby-2.7.2 # 查看已安装的ruby 》rvm list # 查看当前系统使用的ruby版本 》ruby -v # 如果上面显示版本是旧的2.6的话请运行下面让其使用2.7.2 》rvm use 2.7.2 3. 打开 unity触发自动安装 Cocoapods显示 gem install cocoapods- 还是安装失败的话直接看第4步好像unity中gem认到的还是旧的而不是我用rvm安装好ruby后新的gem 4. 打开 终端 并手动运行安装 Cocoapods我这里是安装成功了然后再打开unity就不会再弹出安装 cocoapods 了因为已经手动安装好了 》gem install cocoapods 5. 搞定现在可以用 unity 去导出 XCode 工程了 运行前-重点注意 1. 运行时一定不要用 iTerm 运行请用 终端 运行否则 rvm install ruby-2.7.2 这一步可能会安装失败 2. 安装时会涉及安装第三方库会比较慢请查看底下 『brew update 更新太慢』的解决方法去提速要不然安装会慢到你怀疑人生 3. 当到最后一步安装 cocoapods 时想简单点就直接 终端 上运行 gem install cocoapods 就好了可以省去一些麻烦 【问题及解决】 rvm 安装异常 出现 curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused 解决设置hosts 步骤查找IP - 修改本地host - 重装运行第一步curl 1. 打开 https://site.ip138.com - 查询 raw.githubusercontent.com 的ip并记下来会出现多个ip我用的第一个出现的ipping虽然一般但能下载。用贵州的那个ipping虽然最快但是下载有问题 2. 修改host复制上面记下来的ip到hosts中 》sudo vim /etc/hosts 182.43.124.6 raw.githubusercontent.com 3. 重新执行安装 》curl -L https://get.rvm.io | bash -s stable 4. 检查是否安装完成 》rvm -v 说明 安装成功后rvm会自动在 .bash_profile 中添加如下内容如果想知道rvm装在哪里了看这里就知道了 [[ -s $HOME/.rvm/scripts/rvm ]] source $HOME/.rvm/scripts/rvm # Load RVM into a shell session *as a function* ruby-2.7.2 安装异常出现 No binary rubies available for: osx/10.15/x86_64/ruby-2.7.2. Failed to update Homebrew, follow instructions at https://docs.brew.sh/Common-Issues and make sure brew update works before continuing. Error running requirements_osx_brew_update_system ruby-2.7.2, please read /Users/apple/.rvm/log/1706324534_ruby-2.7.2/update_system.log Requirements installation failed with status: 1. 解决1brew update 解决2如果【解决1】后还是不行请查看你是否使用了 iTerm请换成 终端 后再重新运行 rvm install ruby-2.7.2 brew update 更新异常出现 fatal: unable to access https://github.com/shivammathur/homebrew-php/: Failed to connect to github.com port 443: Operation timed out Error: Fetching /usr/local/Homebrew/Library/Taps/shivammathur/homebrew-php failed! Installing from the API is now the default behaviour! You can save space and time by running: brew untap homebrew/core brew untap homebrew/cask 解决 》sudo vim /etc/hosts 140.82.114.4 github.com brew update 更新太慢 解决 # 改变 brew 源由默认的国外源改为国内源 cd $(brew --repo) git remote set-url origin https://mirrors.ustc.edu.cn/brew.git # 改变 brew-core 源 cd $(brew --repo)/Library/Taps/homebrew/homebrew-core git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git # 完成换源之后再执行更新指令一次速度就很快了 brew update Cocoapods 安装异常出现 fatal error: ruby/config.h file not found 解决ruby 加软链 》cd /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby 》sudo ln -sf ../../../../Headers/ruby/config.h Cocoapods 安装异常出现 make: *** No rule to make target /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h, needed by AbstractMemory.o. Stop. 解决ruby 加软链 》cd /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0 》sudo ln -sf universal-darwin20 universal-darwin19 Cocoapods 安装异常出现 ERROR: Error installing cocoapods: The last version of drb ( 0) to support your Ruby RubyGems was 2.0.6. Try installing it with gem install drb -v 2.0.6 and then running the current command again drb requires Ruby version 2.7.0. The current ruby version is 2.6.3.62. 解决 安装 ruby-2.7.2 版本请查看开头 2. 安装多ruby管理工具、新版ruby Cocoapods 安装异常出现 You dont have write permissions for the /Library/Ruby/Gems/2.6.0 directory. 出现unity 打开时自动弹出安装 cocoapods 时出现 解决直接关闭 unity改用打开系统 终端 直接运行命令 gem install cocoapods 就行了 原因unity 打开时他的 gem 命令好像用的还是旧的会自动安装到/Library库中不是我新装好的 gem导致出错怎么在unity中让gem运行时是新的弄了一会没弄出来算了先不管了终端能安装也行了 ------ 其它 ------ Unity开发Ios部分流程安装 XCode - 进入Unity自动安装Cocospods - 导出XCode工程 - XCode打开工程真机测试 - 上传appstore
说明mac 10.15.7 unity 开发ios需要安装 XCode 12.4 及以下版本更高的版本需要更高的系统 XCode与Mac版本对应网址https://xcodereleases.com/ XCode各大版本下载网址https://developer.apple.com/download/all/?qxcod