1. When the plug-in Xcode because GoogleAdmob need to use CocoaPods to handle package dependencies, so the unity export xcode project GoogleAdmob integrated plug-in mac, will first test the installation environment CocoaPods, if not installed, it will automatically install, this time You get stuck in: Converting managed assemblies to C ++ interface, due to network problems, this process takes home normally takes 1-2 hours, if not anxious to wait, if you need to accelerate reference : https://juejin.im/post/5c41211ce51d453ba81022c9 solve
2. In determining the mac CocoaPods occur when error has been installed,
The message is below:
Error running CocoaPods. Please ensure you have at least version 1.0.0. You can install CocoaPods with the Ruby gem package manager:
> sudo gem install -n /usr/local/bin cocoapods
> pod setup
'pod --version' returned status: 1
output:
[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8
[0m
/Users/daihuoying/.gem/ruby/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/executable.rb:118:in `block in which!': [31m[!] Unable to locate the executable `git`[0m (Pod::Informative)
from /Users/daihuoying/.gem/ruby/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/executable.rb:117:in `tap'
from /Users/daihuoying/.gem/ruby/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/executable.rb:117:in `which!'
from /Users/daihuoying/.gem/ruby/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/executable.rb:143:in `capture_command'
from /Users/daihuoying/.gem/ruby/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:116:in `git_version'
from /Users/daihuoying/.gem/ruby/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:130:in `verify_minimum_git_version!'
from /Users/daihuoying/.gem/ruby/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:49:in `run'
from /Users/daihuoying/.gem/ruby/2.6.0/gems/cocoapods-1.9.1/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
UnityEngine.Debug:LogError(Object)
Google.Logger:Log(String, LogLevel) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/Logger.cs:91)
Google.IOSResolver:Log(String, Boolean, LogLevel) (at /Users/smiles/dev/src/unity-jar-resolver/source/IOSResolver/src/IOSResolver.cs:809)
Google.IOSResolver:OnPostProcessInstallPods(BuildTarget, String) (at /Users/smiles/dev/src/unity-jar-resolver/source/IOSResolver/src/IOSResolver.cs:1974)
UnityEditor.BuildPipeline:BuildPlayer(String[], String, BuildTarget, BuildOptions)
AutoBuildUtil:BuildIOS(String) (at Assets/Editor/Utils/AutoBuildUtil.cs:238)
<>c:<BuildIOSTest>b__16_0() (at Assets/Editor/Utils/AutoBuildUtil.cs:245)
ExportUtil:ExportComplete() (at Assets/Editor/Export/ExportUtil.cs:98)
ExportUtil:ExportResource(BuildTarget) (at Assets/Editor/Export/ExportUtil.cs:70)
ExportUtil:ToBuildiPhoneResource() (at Assets/Editor/Export/ExportUtil.cs:36)
ExportUtil:BuildIPhoneResource(Action) (at Assets/Editor/Export/ExportUtil.cs:24)
AutoBuildUtil:BuildIOSTest() (at Assets/Editor/Utils/AutoBuildUtil.cs:244)
Error Screenshot:
In accordance with the error message:
1. Access terminal sequentially performed :
sudo gem install -n /usr/local/bin cocoapods
pod setup
2. The findings suggest that the installation is complete CocoaPods
3. packing again found still reported above mistakes
4. Analyze: obviously this machine has been installed cocoapods, unity still suggesting no cocoapods version,
So I guess While the above command, but cocoapods not installed into the ruby directory unity call, so check the system ruby situation:
So, the solution is that the system directory already installed cocoapods file (or folder of all the gems) are copied to the ruby gems unity call of the corresponding directory , as shown:
5. After replacing a good copy, packing again, Unity successfully exported xcode project as: